summaryrefslogtreecommitdiff
path: root/boost
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:41:18 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:43:11 +0900
commitf763a99a501650eff2c60288aa6f10ef916d769e (patch)
tree02af7e13f9a38c888ebf340fe764cbe7dae99da9 /boost
parent5cde13f21d36c7224b0e13d11c4b49379ae5210d (diff)
downloadboost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.gz
boost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.bz2
boost-f763a99a501650eff2c60288aa6f10ef916d769e.zip
Imported Upstream version 1.62.0upstream/1.62.0
Change-Id: I9d4c1ddb7b7d8f0069217ecc582700f9fda6dd4c Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost')
-rw-r--r--boost/algorithm/algorithm.hpp4
-rw-r--r--boost/algorithm/cxx11/all_of.hpp3
-rw-r--r--boost/algorithm/cxx11/any_of.hpp1
-rw-r--r--boost/algorithm/cxx11/copy_if.hpp4
-rw-r--r--boost/algorithm/cxx11/copy_n.hpp4
-rw-r--r--boost/algorithm/cxx11/find_if_not.hpp4
-rw-r--r--boost/algorithm/cxx11/iota.hpp4
-rw-r--r--boost/algorithm/cxx11/is_partitioned.hpp4
-rw-r--r--boost/algorithm/cxx11/is_permutation.hpp8
-rw-r--r--boost/algorithm/cxx11/is_sorted.hpp1
-rw-r--r--boost/algorithm/cxx11/none_of.hpp7
-rw-r--r--boost/algorithm/cxx11/partition_copy.hpp5
-rw-r--r--boost/algorithm/cxx11/partition_point.hpp4
-rw-r--r--boost/algorithm/cxx14/equal.hpp3
-rw-r--r--boost/algorithm/cxx14/is_permutation.hpp7
-rw-r--r--boost/algorithm/cxx14/mismatch.hpp1
-rw-r--r--boost/algorithm/hex.hpp123
-rw-r--r--boost/algorithm/is_palindrome.hpp161
-rw-r--r--boost/algorithm/searching/boyer_moore.hpp32
-rw-r--r--boost/algorithm/searching/boyer_moore_horspool.hpp33
-rw-r--r--boost/algorithm/searching/detail/bm_traits.hpp2
-rw-r--r--boost/algorithm/searching/knuth_morris_pratt.hpp33
-rw-r--r--boost/algorithm/sort_subrange.hpp109
-rw-r--r--boost/algorithm/string/replace.hpp2
-rw-r--r--boost/align/aligned_allocator.hpp18
-rw-r--r--boost/align/aligned_allocator_adaptor.hpp25
-rw-r--r--boost/align/aligned_delete.hpp2
-rw-r--r--boost/align/alignment_of.hpp6
-rw-r--r--boost/align/detail/align.hpp12
-rw-r--r--boost/align/detail/align_down.hpp3
-rw-r--r--boost/align/detail/align_up.hpp3
-rw-r--r--boost/align/detail/alignment_of.hpp4
-rw-r--r--boost/align/detail/alignment_of_clang.hpp3
-rw-r--r--boost/align/detail/alignment_of_codegear.hpp3
-rw-r--r--boost/align/detail/alignment_of_gcc.hpp3
-rw-r--r--boost/align/detail/alignment_of_msvc.hpp3
-rw-r--r--boost/align/detail/assume_aligned_clang.hpp2
-rw-r--r--boost/align/detail/assume_aligned_gcc.hpp2
-rw-r--r--boost/align/detail/assume_aligned_msvc.hpp2
-rw-r--r--boost/align/detail/element_type.hpp39
-rw-r--r--boost/align/detail/integral_constant.hpp10
-rw-r--r--boost/align/detail/is_aligned.hpp4
-rw-r--r--boost/align/detail/is_alignment_constant.hpp3
-rw-r--r--boost/align/detail/max_align.hpp3
-rw-r--r--boost/align/detail/max_objects.hpp3
-rw-r--r--boost/align/detail/max_size.hpp3
-rw-r--r--boost/align/detail/min_size.hpp3
-rw-r--r--boost/asio.hpp2
-rw-r--r--boost/asio/async_result.hpp2
-rw-r--r--boost/asio/basic_datagram_socket.hpp2
-rw-r--r--boost/asio/basic_deadline_timer.hpp2
-rw-r--r--boost/asio/basic_io_object.hpp9
-rw-r--r--boost/asio/basic_raw_socket.hpp2
-rw-r--r--boost/asio/basic_seq_packet_socket.hpp2
-rw-r--r--boost/asio/basic_serial_port.hpp2
-rw-r--r--boost/asio/basic_signal_set.hpp2
-rw-r--r--boost/asio/basic_socket.hpp2
-rw-r--r--boost/asio/basic_socket_acceptor.hpp2
-rw-r--r--boost/asio/basic_socket_iostream.hpp2
-rw-r--r--boost/asio/basic_socket_streambuf.hpp2
-rw-r--r--boost/asio/basic_stream_socket.hpp2
-rw-r--r--boost/asio/basic_streambuf.hpp2
-rw-r--r--boost/asio/basic_streambuf_fwd.hpp2
-rw-r--r--boost/asio/basic_waitable_timer.hpp2
-rw-r--r--boost/asio/buffer.hpp2
-rw-r--r--boost/asio/buffered_read_stream.hpp2
-rw-r--r--boost/asio/buffered_read_stream_fwd.hpp2
-rw-r--r--boost/asio/buffered_stream.hpp2
-rw-r--r--boost/asio/buffered_stream_fwd.hpp2
-rw-r--r--boost/asio/buffered_write_stream.hpp2
-rw-r--r--boost/asio/buffered_write_stream_fwd.hpp2
-rw-r--r--boost/asio/buffers_iterator.hpp2
-rw-r--r--boost/asio/completion_condition.hpp2
-rw-r--r--boost/asio/connect.hpp2
-rw-r--r--boost/asio/coroutine.hpp2
-rw-r--r--boost/asio/datagram_socket_service.hpp2
-rw-r--r--boost/asio/deadline_timer.hpp2
-rw-r--r--boost/asio/deadline_timer_service.hpp2
-rw-r--r--boost/asio/detail/addressof.hpp2
-rw-r--r--boost/asio/detail/array.hpp2
-rw-r--r--boost/asio/detail/array_fwd.hpp2
-rw-r--r--boost/asio/detail/assert.hpp2
-rw-r--r--boost/asio/detail/atomic_count.hpp2
-rw-r--r--boost/asio/detail/base_from_completion_cond.hpp2
-rw-r--r--boost/asio/detail/bind_handler.hpp2
-rw-r--r--boost/asio/detail/buffer_resize_guard.hpp2
-rw-r--r--boost/asio/detail/buffer_sequence_adapter.hpp2
-rw-r--r--boost/asio/detail/buffered_stream_storage.hpp2
-rw-r--r--boost/asio/detail/call_stack.hpp2
-rw-r--r--boost/asio/detail/chrono_time_traits.hpp2
-rw-r--r--boost/asio/detail/completion_handler.hpp2
-rw-r--r--boost/asio/detail/config.hpp28
-rw-r--r--boost/asio/detail/consuming_buffers.hpp2
-rw-r--r--boost/asio/detail/cstdint.hpp2
-rw-r--r--boost/asio/detail/date_time_fwd.hpp2
-rw-r--r--boost/asio/detail/deadline_timer_service.hpp2
-rw-r--r--boost/asio/detail/dependent_type.hpp2
-rw-r--r--boost/asio/detail/descriptor_ops.hpp2
-rw-r--r--boost/asio/detail/descriptor_read_op.hpp2
-rw-r--r--boost/asio/detail/descriptor_write_op.hpp2
-rw-r--r--boost/asio/detail/dev_poll_reactor.hpp2
-rw-r--r--boost/asio/detail/epoll_reactor.hpp2
-rw-r--r--boost/asio/detail/event.hpp2
-rw-r--r--boost/asio/detail/eventfd_select_interrupter.hpp2
-rw-r--r--boost/asio/detail/fd_set_adapter.hpp2
-rw-r--r--boost/asio/detail/fenced_block.hpp2
-rw-r--r--boost/asio/detail/function.hpp2
-rw-r--r--boost/asio/detail/gcc_arm_fenced_block.hpp2
-rw-r--r--boost/asio/detail/gcc_hppa_fenced_block.hpp2
-rw-r--r--boost/asio/detail/gcc_sync_fenced_block.hpp2
-rw-r--r--boost/asio/detail/gcc_x86_fenced_block.hpp2
-rw-r--r--boost/asio/detail/handler_alloc_helpers.hpp2
-rw-r--r--boost/asio/detail/handler_cont_helpers.hpp2
-rw-r--r--boost/asio/detail/handler_invoke_helpers.hpp2
-rw-r--r--boost/asio/detail/handler_tracking.hpp2
-rw-r--r--boost/asio/detail/handler_type_requirements.hpp2
-rw-r--r--boost/asio/detail/hash_map.hpp2
-rw-r--r--boost/asio/detail/impl/buffer_sequence_adapter.ipp2
-rw-r--r--boost/asio/detail/impl/descriptor_ops.ipp2
-rw-r--r--boost/asio/detail/impl/dev_poll_reactor.hpp2
-rw-r--r--boost/asio/detail/impl/dev_poll_reactor.ipp2
-rw-r--r--boost/asio/detail/impl/epoll_reactor.hpp2
-rw-r--r--boost/asio/detail/impl/epoll_reactor.ipp2
-rw-r--r--boost/asio/detail/impl/eventfd_select_interrupter.ipp2
-rw-r--r--boost/asio/detail/impl/handler_tracking.ipp2
-rw-r--r--boost/asio/detail/impl/kqueue_reactor.hpp2
-rw-r--r--boost/asio/detail/impl/kqueue_reactor.ipp2
-rw-r--r--boost/asio/detail/impl/pipe_select_interrupter.ipp2
-rw-r--r--boost/asio/detail/impl/posix_event.ipp2
-rw-r--r--boost/asio/detail/impl/posix_mutex.ipp2
-rw-r--r--boost/asio/detail/impl/posix_thread.ipp2
-rw-r--r--boost/asio/detail/impl/posix_tss_ptr.ipp2
-rw-r--r--boost/asio/detail/impl/reactive_descriptor_service.ipp2
-rw-r--r--boost/asio/detail/impl/reactive_serial_port_service.ipp2
-rw-r--r--boost/asio/detail/impl/reactive_socket_service_base.ipp2
-rw-r--r--boost/asio/detail/impl/resolver_service_base.ipp2
-rw-r--r--boost/asio/detail/impl/select_reactor.hpp2
-rw-r--r--boost/asio/detail/impl/select_reactor.ipp2
-rw-r--r--boost/asio/detail/impl/service_registry.hpp2
-rw-r--r--boost/asio/detail/impl/service_registry.ipp2
-rw-r--r--boost/asio/detail/impl/signal_set_service.ipp2
-rw-r--r--boost/asio/detail/impl/socket_ops.ipp2
-rw-r--r--boost/asio/detail/impl/socket_select_interrupter.ipp5
-rw-r--r--boost/asio/detail/impl/strand_service.hpp2
-rw-r--r--boost/asio/detail/impl/strand_service.ipp2
-rw-r--r--boost/asio/detail/impl/task_io_service.hpp2
-rw-r--r--boost/asio/detail/impl/task_io_service.ipp2
-rw-r--r--boost/asio/detail/impl/throw_error.ipp2
-rw-r--r--boost/asio/detail/impl/timer_queue_ptime.ipp2
-rw-r--r--boost/asio/detail/impl/timer_queue_set.ipp2
-rw-r--r--boost/asio/detail/impl/win_event.ipp2
-rw-r--r--boost/asio/detail/impl/win_iocp_handle_service.ipp2
-rw-r--r--boost/asio/detail/impl/win_iocp_io_service.hpp2
-rw-r--r--boost/asio/detail/impl/win_iocp_io_service.ipp2
-rw-r--r--boost/asio/detail/impl/win_iocp_serial_port_service.ipp2
-rw-r--r--boost/asio/detail/impl/win_iocp_socket_service_base.ipp2
-rw-r--r--boost/asio/detail/impl/win_mutex.ipp2
-rw-r--r--boost/asio/detail/impl/win_object_handle_service.ipp2
-rw-r--r--boost/asio/detail/impl/win_static_mutex.ipp2
-rw-r--r--boost/asio/detail/impl/win_thread.ipp2
-rw-r--r--boost/asio/detail/impl/win_tss_ptr.ipp2
-rw-r--r--boost/asio/detail/impl/winrt_ssocket_service_base.ipp2
-rw-r--r--boost/asio/detail/impl/winrt_timer_scheduler.hpp2
-rw-r--r--boost/asio/detail/impl/winrt_timer_scheduler.ipp2
-rw-r--r--boost/asio/detail/impl/winsock_init.ipp2
-rw-r--r--boost/asio/detail/io_control.hpp2
-rw-r--r--boost/asio/detail/keyword_tss_ptr.hpp2
-rw-r--r--boost/asio/detail/kqueue_reactor.hpp2
-rw-r--r--boost/asio/detail/local_free_on_block_exit.hpp2
-rw-r--r--boost/asio/detail/macos_fenced_block.hpp2
-rw-r--r--boost/asio/detail/mutex.hpp2
-rw-r--r--boost/asio/detail/noncopyable.hpp2
-rw-r--r--boost/asio/detail/null_event.hpp2
-rw-r--r--boost/asio/detail/null_fenced_block.hpp2
-rw-r--r--boost/asio/detail/null_mutex.hpp2
-rw-r--r--boost/asio/detail/null_reactor.hpp2
-rw-r--r--boost/asio/detail/null_signal_blocker.hpp2
-rw-r--r--boost/asio/detail/null_socket_service.hpp2
-rw-r--r--boost/asio/detail/null_static_mutex.hpp2
-rw-r--r--boost/asio/detail/null_thread.hpp2
-rw-r--r--boost/asio/detail/null_tss_ptr.hpp2
-rw-r--r--boost/asio/detail/object_pool.hpp2
-rw-r--r--boost/asio/detail/old_win_sdk_compat.hpp2
-rw-r--r--boost/asio/detail/op_queue.hpp2
-rw-r--r--boost/asio/detail/operation.hpp2
-rw-r--r--boost/asio/detail/pipe_select_interrupter.hpp2
-rw-r--r--boost/asio/detail/pop_options.hpp2
-rw-r--r--boost/asio/detail/posix_event.hpp2
-rw-r--r--boost/asio/detail/posix_fd_set_adapter.hpp2
-rw-r--r--boost/asio/detail/posix_mutex.hpp2
-rw-r--r--boost/asio/detail/posix_signal_blocker.hpp2
-rw-r--r--boost/asio/detail/posix_static_mutex.hpp2
-rw-r--r--boost/asio/detail/posix_thread.hpp2
-rw-r--r--boost/asio/detail/posix_tss_ptr.hpp2
-rw-r--r--boost/asio/detail/push_options.hpp2
-rw-r--r--boost/asio/detail/reactive_descriptor_service.hpp2
-rw-r--r--boost/asio/detail/reactive_null_buffers_op.hpp2
-rw-r--r--boost/asio/detail/reactive_serial_port_service.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_accept_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_connect_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_recv_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_recvfrom_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_recvmsg_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_send_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_sendto_op.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_service.hpp2
-rw-r--r--boost/asio/detail/reactive_socket_service_base.hpp2
-rw-r--r--boost/asio/detail/reactor.hpp2
-rw-r--r--boost/asio/detail/reactor_fwd.hpp2
-rw-r--r--boost/asio/detail/reactor_op.hpp2
-rw-r--r--boost/asio/detail/reactor_op_queue.hpp2
-rw-r--r--boost/asio/detail/regex_fwd.hpp2
-rw-r--r--boost/asio/detail/resolve_endpoint_op.hpp2
-rw-r--r--boost/asio/detail/resolve_op.hpp2
-rw-r--r--boost/asio/detail/resolver_service.hpp2
-rw-r--r--boost/asio/detail/resolver_service_base.hpp2
-rw-r--r--boost/asio/detail/scoped_lock.hpp2
-rw-r--r--boost/asio/detail/scoped_ptr.hpp2
-rw-r--r--boost/asio/detail/select_interrupter.hpp2
-rw-r--r--boost/asio/detail/select_reactor.hpp2
-rw-r--r--boost/asio/detail/service_registry.hpp2
-rw-r--r--boost/asio/detail/shared_ptr.hpp2
-rw-r--r--boost/asio/detail/signal_blocker.hpp2
-rw-r--r--boost/asio/detail/signal_handler.hpp2
-rw-r--r--boost/asio/detail/signal_init.hpp2
-rw-r--r--boost/asio/detail/signal_op.hpp2
-rw-r--r--boost/asio/detail/signal_set_service.hpp2
-rw-r--r--boost/asio/detail/socket_holder.hpp2
-rw-r--r--boost/asio/detail/socket_ops.hpp2
-rw-r--r--boost/asio/detail/socket_option.hpp2
-rw-r--r--boost/asio/detail/socket_select_interrupter.hpp2
-rw-r--r--boost/asio/detail/socket_types.hpp2
-rw-r--r--boost/asio/detail/solaris_fenced_block.hpp2
-rw-r--r--boost/asio/detail/static_mutex.hpp2
-rw-r--r--boost/asio/detail/std_event.hpp2
-rw-r--r--boost/asio/detail/std_mutex.hpp2
-rw-r--r--boost/asio/detail/std_static_mutex.hpp2
-rw-r--r--boost/asio/detail/std_thread.hpp2
-rw-r--r--boost/asio/detail/strand_service.hpp2
-rw-r--r--boost/asio/detail/task_io_service.hpp2
-rw-r--r--boost/asio/detail/task_io_service_operation.hpp2
-rw-r--r--boost/asio/detail/task_io_service_thread_info.hpp2
-rw-r--r--boost/asio/detail/thread.hpp2
-rw-r--r--boost/asio/detail/thread_info_base.hpp2
-rw-r--r--boost/asio/detail/throw_error.hpp2
-rw-r--r--boost/asio/detail/throw_exception.hpp2
-rw-r--r--boost/asio/detail/timer_queue.hpp2
-rw-r--r--boost/asio/detail/timer_queue_base.hpp2
-rw-r--r--boost/asio/detail/timer_queue_ptime.hpp2
-rw-r--r--boost/asio/detail/timer_queue_set.hpp2
-rw-r--r--boost/asio/detail/timer_scheduler.hpp2
-rw-r--r--boost/asio/detail/timer_scheduler_fwd.hpp2
-rw-r--r--boost/asio/detail/tss_ptr.hpp2
-rw-r--r--boost/asio/detail/type_traits.hpp2
-rw-r--r--boost/asio/detail/variadic_templates.hpp2
-rw-r--r--boost/asio/detail/wait_handler.hpp2
-rw-r--r--boost/asio/detail/wait_op.hpp2
-rw-r--r--boost/asio/detail/weak_ptr.hpp2
-rw-r--r--boost/asio/detail/win_event.hpp2
-rw-r--r--boost/asio/detail/win_fd_set_adapter.hpp2
-rw-r--r--boost/asio/detail/win_fenced_block.hpp2
-rw-r--r--boost/asio/detail/win_iocp_handle_read_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_handle_service.hpp2
-rw-r--r--boost/asio/detail/win_iocp_handle_write_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_io_service.hpp2
-rw-r--r--boost/asio/detail/win_iocp_null_buffers_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_operation.hpp2
-rw-r--r--boost/asio/detail/win_iocp_overlapped_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_overlapped_ptr.hpp2
-rw-r--r--boost/asio/detail/win_iocp_serial_port_service.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_accept_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_connect_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_recv_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_recvfrom_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_recvmsg_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_send_op.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_service.hpp2
-rw-r--r--boost/asio/detail/win_iocp_socket_service_base.hpp2
-rw-r--r--boost/asio/detail/win_iocp_thread_info.hpp2
-rw-r--r--boost/asio/detail/win_mutex.hpp2
-rw-r--r--boost/asio/detail/win_object_handle_service.hpp2
-rw-r--r--boost/asio/detail/win_static_mutex.hpp2
-rw-r--r--boost/asio/detail/win_thread.hpp2
-rw-r--r--boost/asio/detail/win_tss_ptr.hpp2
-rw-r--r--boost/asio/detail/winapi_thread.hpp2
-rw-r--r--boost/asio/detail/wince_thread.hpp118
-rw-r--r--boost/asio/detail/winrt_async_manager.hpp2
-rw-r--r--boost/asio/detail/winrt_async_op.hpp2
-rw-r--r--boost/asio/detail/winrt_resolve_op.hpp2
-rw-r--r--boost/asio/detail/winrt_resolver_service.hpp2
-rw-r--r--boost/asio/detail/winrt_socket_connect_op.hpp2
-rw-r--r--boost/asio/detail/winrt_socket_recv_op.hpp2
-rw-r--r--boost/asio/detail/winrt_socket_send_op.hpp2
-rw-r--r--boost/asio/detail/winrt_ssocket_service.hpp2
-rw-r--r--boost/asio/detail/winrt_ssocket_service_base.hpp2
-rw-r--r--boost/asio/detail/winrt_timer_scheduler.hpp2
-rw-r--r--boost/asio/detail/winrt_utils.hpp2
-rw-r--r--boost/asio/detail/winsock_init.hpp2
-rw-r--r--boost/asio/detail/wrapped_handler.hpp2
-rw-r--r--boost/asio/error.hpp2
-rw-r--r--boost/asio/generic/basic_endpoint.hpp2
-rw-r--r--boost/asio/generic/datagram_protocol.hpp2
-rw-r--r--boost/asio/generic/detail/endpoint.hpp2
-rw-r--r--boost/asio/generic/detail/impl/endpoint.ipp2
-rw-r--r--boost/asio/generic/raw_protocol.hpp2
-rw-r--r--boost/asio/generic/seq_packet_protocol.hpp2
-rw-r--r--boost/asio/generic/stream_protocol.hpp2
-rw-r--r--boost/asio/handler_alloc_hook.hpp2
-rw-r--r--boost/asio/handler_continuation_hook.hpp2
-rw-r--r--boost/asio/handler_invoke_hook.hpp2
-rw-r--r--boost/asio/handler_type.hpp2
-rw-r--r--boost/asio/high_resolution_timer.hpp2
-rw-r--r--boost/asio/impl/buffered_read_stream.hpp2
-rw-r--r--boost/asio/impl/buffered_write_stream.hpp2
-rw-r--r--boost/asio/impl/connect.hpp4
-rw-r--r--boost/asio/impl/error.ipp2
-rw-r--r--boost/asio/impl/handler_alloc_hook.ipp2
-rw-r--r--boost/asio/impl/io_service.hpp2
-rw-r--r--boost/asio/impl/io_service.ipp2
-rw-r--r--boost/asio/impl/read.hpp2
-rw-r--r--boost/asio/impl/read_at.hpp2
-rw-r--r--boost/asio/impl/read_until.hpp2
-rw-r--r--boost/asio/impl/serial_port_base.hpp2
-rw-r--r--boost/asio/impl/serial_port_base.ipp2
-rw-r--r--boost/asio/impl/spawn.hpp2
-rw-r--r--boost/asio/impl/src.cpp2
-rw-r--r--boost/asio/impl/src.hpp2
-rw-r--r--boost/asio/impl/use_future.hpp18
-rw-r--r--boost/asio/impl/write.hpp2
-rw-r--r--boost/asio/impl/write_at.hpp2
-rw-r--r--boost/asio/io_service.hpp2
-rw-r--r--boost/asio/ip/address.hpp2
-rw-r--r--boost/asio/ip/address_v4.hpp2
-rw-r--r--boost/asio/ip/address_v6.hpp2
-rw-r--r--boost/asio/ip/basic_endpoint.hpp2
-rw-r--r--boost/asio/ip/basic_resolver.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_entry.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_iterator.hpp2
-rw-r--r--boost/asio/ip/basic_resolver_query.hpp2
-rw-r--r--boost/asio/ip/detail/endpoint.hpp2
-rw-r--r--boost/asio/ip/detail/impl/endpoint.ipp2
-rw-r--r--boost/asio/ip/detail/socket_option.hpp2
-rw-r--r--boost/asio/ip/host_name.hpp2
-rw-r--r--boost/asio/ip/icmp.hpp2
-rw-r--r--boost/asio/ip/impl/address.hpp2
-rw-r--r--boost/asio/ip/impl/address.ipp2
-rw-r--r--boost/asio/ip/impl/address_v4.hpp2
-rw-r--r--boost/asio/ip/impl/address_v4.ipp2
-rw-r--r--boost/asio/ip/impl/address_v6.hpp2
-rw-r--r--boost/asio/ip/impl/address_v6.ipp2
-rw-r--r--boost/asio/ip/impl/basic_endpoint.hpp2
-rw-r--r--boost/asio/ip/impl/host_name.ipp2
-rw-r--r--boost/asio/ip/multicast.hpp2
-rw-r--r--boost/asio/ip/resolver_query_base.hpp2
-rw-r--r--boost/asio/ip/resolver_service.hpp2
-rw-r--r--boost/asio/ip/tcp.hpp2
-rw-r--r--boost/asio/ip/udp.hpp2
-rw-r--r--boost/asio/ip/unicast.hpp2
-rw-r--r--boost/asio/ip/v6_only.hpp2
-rw-r--r--boost/asio/is_read_buffered.hpp2
-rw-r--r--boost/asio/is_write_buffered.hpp2
-rw-r--r--boost/asio/local/basic_endpoint.hpp2
-rw-r--r--boost/asio/local/connect_pair.hpp2
-rw-r--r--boost/asio/local/datagram_protocol.hpp2
-rw-r--r--boost/asio/local/detail/endpoint.hpp2
-rw-r--r--boost/asio/local/detail/impl/endpoint.ipp2
-rw-r--r--boost/asio/local/stream_protocol.hpp2
-rw-r--r--boost/asio/placeholders.hpp2
-rw-r--r--boost/asio/posix/basic_descriptor.hpp2
-rw-r--r--boost/asio/posix/basic_stream_descriptor.hpp2
-rw-r--r--boost/asio/posix/descriptor_base.hpp2
-rw-r--r--boost/asio/posix/stream_descriptor.hpp2
-rw-r--r--boost/asio/posix/stream_descriptor_service.hpp2
-rw-r--r--boost/asio/raw_socket_service.hpp2
-rw-r--r--boost/asio/read.hpp2
-rw-r--r--boost/asio/read_at.hpp2
-rw-r--r--boost/asio/read_until.hpp2
-rw-r--r--boost/asio/seq_packet_socket_service.hpp2
-rw-r--r--boost/asio/serial_port.hpp2
-rw-r--r--boost/asio/serial_port_base.hpp2
-rw-r--r--boost/asio/serial_port_service.hpp2
-rw-r--r--boost/asio/signal_set.hpp2
-rw-r--r--boost/asio/signal_set_service.hpp2
-rw-r--r--boost/asio/socket_acceptor_service.hpp2
-rw-r--r--boost/asio/socket_base.hpp2
-rw-r--r--boost/asio/spawn.hpp2
-rw-r--r--boost/asio/ssl.hpp2
-rw-r--r--boost/asio/ssl/basic_context.hpp2
-rw-r--r--boost/asio/ssl/context.hpp2
-rw-r--r--boost/asio/ssl/context_base.hpp2
-rw-r--r--boost/asio/ssl/context_service.hpp2
-rw-r--r--boost/asio/ssl/detail/buffered_handshake_op.hpp2
-rw-r--r--boost/asio/ssl/detail/engine.hpp2
-rw-r--r--boost/asio/ssl/detail/handshake_op.hpp2
-rw-r--r--boost/asio/ssl/detail/impl/engine.ipp12
-rw-r--r--boost/asio/ssl/detail/impl/openssl_init.ipp44
-rw-r--r--boost/asio/ssl/detail/io.hpp2
-rw-r--r--boost/asio/ssl/detail/openssl_init.hpp2
-rw-r--r--boost/asio/ssl/detail/openssl_types.hpp4
-rw-r--r--boost/asio/ssl/detail/password_callback.hpp2
-rw-r--r--boost/asio/ssl/detail/read_op.hpp2
-rw-r--r--boost/asio/ssl/detail/shutdown_op.hpp2
-rw-r--r--boost/asio/ssl/detail/stream_core.hpp2
-rw-r--r--boost/asio/ssl/detail/verify_callback.hpp2
-rw-r--r--boost/asio/ssl/detail/write_op.hpp2
-rw-r--r--boost/asio/ssl/error.hpp42
-rw-r--r--boost/asio/ssl/impl/context.hpp2
-rw-r--r--boost/asio/ssl/impl/context.ipp93
-rw-r--r--boost/asio/ssl/impl/error.ipp47
-rw-r--r--boost/asio/ssl/impl/rfc2818_verification.ipp2
-rw-r--r--boost/asio/ssl/impl/src.hpp2
-rw-r--r--boost/asio/ssl/old/basic_context.hpp2
-rw-r--r--boost/asio/ssl/old/context_service.hpp2
-rw-r--r--boost/asio/ssl/old/detail/openssl_context_service.hpp2
-rw-r--r--boost/asio/ssl/old/detail/openssl_stream_service.hpp2
-rw-r--r--boost/asio/ssl/old/stream.hpp2
-rw-r--r--boost/asio/ssl/old/stream_service.hpp2
-rw-r--r--boost/asio/ssl/rfc2818_verification.hpp2
-rw-r--r--boost/asio/ssl/stream.hpp2
-rw-r--r--boost/asio/ssl/stream_base.hpp2
-rw-r--r--boost/asio/ssl/stream_service.hpp2
-rw-r--r--boost/asio/ssl/verify_context.hpp2
-rw-r--r--boost/asio/ssl/verify_mode.hpp2
-rw-r--r--boost/asio/steady_timer.hpp2
-rw-r--r--boost/asio/strand.hpp2
-rw-r--r--boost/asio/stream_socket_service.hpp2
-rw-r--r--boost/asio/streambuf.hpp2
-rw-r--r--boost/asio/system_timer.hpp2
-rw-r--r--boost/asio/time_traits.hpp2
-rw-r--r--boost/asio/unyield.hpp2
-rw-r--r--boost/asio/use_future.hpp2
-rw-r--r--boost/asio/version.hpp4
-rw-r--r--boost/asio/wait_traits.hpp2
-rw-r--r--boost/asio/waitable_timer_service.hpp2
-rw-r--r--boost/asio/windows/basic_handle.hpp2
-rw-r--r--boost/asio/windows/basic_object_handle.hpp2
-rw-r--r--boost/asio/windows/basic_random_access_handle.hpp2
-rw-r--r--boost/asio/windows/basic_stream_handle.hpp2
-rw-r--r--boost/asio/windows/object_handle.hpp2
-rw-r--r--boost/asio/windows/object_handle_service.hpp2
-rw-r--r--boost/asio/windows/overlapped_ptr.hpp2
-rw-r--r--boost/asio/windows/random_access_handle.hpp2
-rw-r--r--boost/asio/windows/random_access_handle_service.hpp2
-rw-r--r--boost/asio/windows/stream_handle.hpp2
-rw-r--r--boost/asio/windows/stream_handle_service.hpp2
-rw-r--r--boost/asio/write.hpp2
-rw-r--r--boost/asio/write_at.hpp2
-rw-r--r--boost/asio/yield.hpp2
-rw-r--r--boost/atomic/detail/caps_gcc_x86.hpp23
-rw-r--r--boost/atomic/detail/caps_msvc_x86.hpp5
-rw-r--r--boost/atomic/detail/ops_gcc_sparc.hpp8
-rw-r--r--boost/atomic/detail/ops_gcc_x86.hpp2
-rw-r--r--boost/atomic/detail/ops_msvc_x86.hpp5
-rw-r--r--boost/atomic/detail/platform.hpp4
-rw-r--r--boost/bind/bind.hpp108
-rw-r--r--boost/chrono/detail/inlined/chrono.hpp2
-rw-r--r--boost/chrono/detail/inlined/mac/chrono.hpp1
-rw-r--r--boost/chrono/detail/inlined/mac/thread_clock.hpp1
-rw-r--r--boost/chrono/detail/inlined/posix/chrono.hpp17
-rw-r--r--boost/chrono/detail/inlined/posix/thread_clock.hpp1
-rw-r--r--boost/chrono/detail/inlined/process_cpu_clocks.hpp3
-rw-r--r--boost/chrono/detail/inlined/thread_clock.hpp2
-rw-r--r--boost/chrono/detail/inlined/win/chrono.hpp3
-rw-r--r--boost/chrono/detail/inlined/win/process_cpu_clocks.hpp8
-rw-r--r--boost/chrono/detail/inlined/win/thread_clock.hpp23
-rw-r--r--boost/chrono/duration.hpp2
-rw-r--r--boost/chrono/io/ios_base_state.hpp7
-rw-r--r--boost/chrono/io/time_point_get.hpp4
-rw-r--r--boost/chrono/io/time_point_io.hpp10
-rw-r--r--boost/chrono/io/utility/ios_base_state_ptr.hpp7
-rw-r--r--boost/chrono/process_cpu_clocks.hpp13
-rw-r--r--boost/circular_buffer.hpp5
-rw-r--r--boost/circular_buffer/base.hpp13
-rw-r--r--boost/circular_buffer/details.hpp5
-rw-r--r--boost/circular_buffer/space_optimized.hpp2
-rw-r--r--boost/compute/algorithm/adjacent_difference.hpp76
-rw-r--r--boost/compute/algorithm/copy.hpp584
-rw-r--r--boost/compute/algorithm/detail/copy_on_device.hpp154
-rw-r--r--boost/compute/algorithm/detail/copy_to_device.hpp68
-rw-r--r--boost/compute/algorithm/detail/copy_to_host.hpp83
-rw-r--r--boost/compute/algorithm/detail/find_extrema.hpp12
-rw-r--r--boost/compute/algorithm/detail/find_extrema_on_cpu.hpp138
-rw-r--r--boost/compute/algorithm/detail/find_extrema_with_reduce.hpp2
-rw-r--r--boost/compute/algorithm/detail/merge_sort_on_gpu.hpp590
-rw-r--r--boost/compute/algorithm/detail/radix_sort.hpp50
-rw-r--r--boost/compute/algorithm/detail/reduce_on_cpu.hpp110
-rw-r--r--boost/compute/algorithm/detail/scan_on_cpu.hpp160
-rw-r--r--boost/compute/algorithm/detail/scan_on_gpu.hpp1
-rw-r--r--boost/compute/algorithm/detail/search_all.hpp2
-rw-r--r--boost/compute/algorithm/detail/serial_scan.hpp103
-rw-r--r--boost/compute/algorithm/find_end.hpp33
-rw-r--r--boost/compute/algorithm/gather.hpp4
-rw-r--r--boost/compute/algorithm/minmax_element.hpp2
-rw-r--r--boost/compute/algorithm/reduce.hpp14
-rw-r--r--boost/compute/algorithm/sort.hpp27
-rw-r--r--boost/compute/algorithm/sort_by_key.hpp23
-rw-r--r--boost/compute/algorithm/stable_sort.hpp24
-rw-r--r--boost/compute/algorithm/stable_sort_by_key.hpp102
-rw-r--r--boost/compute/algorithm/transform.hpp2
-rw-r--r--boost/compute/config.hpp14
-rw-r--r--boost/compute/container/array.hpp48
-rw-r--r--boost/compute/container/vector.hpp24
-rw-r--r--boost/compute/context.hpp2
-rw-r--r--boost/compute/detail/literal.hpp10
-rw-r--r--boost/compute/detail/meta_kernel.hpp89
-rw-r--r--boost/compute/detail/parameter_cache.hpp2
-rw-r--r--boost/compute/detail/vendor.hpp12
-rw-r--r--boost/compute/exception/context_error.hpp2
-rw-r--r--boost/compute/function.hpp2
-rw-r--r--boost/compute/interop/opengl/acquire.hpp5
-rw-r--r--boost/compute/interop/opengl/context.hpp2
-rw-r--r--boost/compute/kernel.hpp38
-rw-r--r--boost/compute/memory/svm_ptr.hpp103
-rw-r--r--boost/compute/random/bernoulli_distribution.hpp8
-rw-r--r--boost/compute/random/discrete_distribution.hpp91
-rw-r--r--boost/compute/random/normal_distribution.hpp24
-rw-r--r--boost/compute/random/uniform_int_distribution.hpp8
-rw-r--r--boost/compute/random/uniform_real_distribution.hpp17
-rw-r--r--boost/compute/svm.hpp14
-rw-r--r--boost/compute/system.hpp14
-rw-r--r--boost/compute/utility/wait_list.hpp16
-rw-r--r--boost/config/compiler/borland.hpp1
-rw-r--r--boost/config/compiler/clang.hpp20
-rw-r--r--boost/config/compiler/codegear.hpp1
-rw-r--r--boost/config/compiler/comeau.hpp2
-rw-r--r--boost/config/compiler/common_edg.hpp1
-rw-r--r--boost/config/compiler/compaq_cxx.hpp2
-rw-r--r--boost/config/compiler/cray.hpp3
-rw-r--r--boost/config/compiler/digitalmars.hpp1
-rw-r--r--boost/config/compiler/gcc.hpp1
-rw-r--r--boost/config/compiler/gcc_xml.hpp3
-rw-r--r--boost/config/compiler/greenhills.hpp2
-rw-r--r--boost/config/compiler/hp_acc.hpp3
-rw-r--r--boost/config/compiler/intel.hpp2
-rw-r--r--boost/config/compiler/kai.hpp2
-rw-r--r--boost/config/compiler/metrowerks.hpp1
-rw-r--r--boost/config/compiler/mpw.hpp1
-rw-r--r--boost/config/compiler/pathscale.hpp1
-rw-r--r--boost/config/compiler/pgi.hpp1
-rw-r--r--boost/config/compiler/sgi_mipspro.hpp2
-rw-r--r--boost/config/compiler/sunpro_cc.hpp8
-rw-r--r--boost/config/compiler/vacpp.hpp1
-rw-r--r--boost/config/compiler/visualc.hpp26
-rw-r--r--boost/config/compiler/xlcpp.hpp4
-rw-r--r--boost/config/platform/linux.hpp2
-rw-r--r--boost/config/select_compiler_config.hpp42
-rw-r--r--boost/config/stdlib/libcpp.hpp8
-rw-r--r--boost/config/stdlib/libstdcpp3.hpp18
-rw-r--r--boost/config/suffix.hpp16
-rw-r--r--boost/container/adaptive_pool.hpp2
-rw-r--r--boost/container/allocator.hpp3
-rw-r--r--boost/container/deque.hpp48
-rw-r--r--boost/container/detail/addressof.hpp4
-rw-r--r--boost/container/detail/advanced_insert_int.hpp4
-rw-r--r--boost/container/detail/compare_functors.hpp8
-rw-r--r--boost/container/detail/construct_in_place.hpp44
-rw-r--r--boost/container/detail/copy_move_algo.hpp12
-rw-r--r--boost/container/detail/dispatch_uses_allocator.hpp136
-rw-r--r--boost/container/detail/flat_tree.hpp319
-rw-r--r--boost/container/detail/is_sorted.hpp57
-rw-r--r--boost/container/detail/iterators.hpp56
-rw-r--r--boost/container/detail/mpl.hpp15
-rw-r--r--boost/container/detail/node_alloc_holder.hpp13
-rw-r--r--boost/container/detail/pair.hpp197
-rw-r--r--boost/container/detail/tree.hpp430
-rw-r--r--boost/container/detail/value_init.hpp2
-rw-r--r--boost/container/detail/variadic_templates_tools.hpp23
-rw-r--r--boost/container/detail/workaround.hpp18
-rw-r--r--boost/container/flat_map.hpp366
-rw-r--r--boost/container/flat_set.hpp109
-rw-r--r--boost/container/list.hpp42
-rw-r--r--boost/container/map.hpp588
-rw-r--r--boost/container/new_allocator.hpp2
-rw-r--r--boost/container/node_allocator.hpp3
-rw-r--r--boost/container/node_handle.hpp396
-rw-r--r--boost/container/pmr/deque.hpp2
-rw-r--r--boost/container/pmr/flat_map.hpp4
-rw-r--r--boost/container/pmr/flat_set.hpp4
-rw-r--r--boost/container/pmr/list.hpp2
-rw-r--r--boost/container/pmr/map.hpp4
-rw-r--r--boost/container/pmr/set.hpp4
-rw-r--r--boost/container/pmr/slist.hpp2
-rw-r--r--boost/container/pmr/small_vector.hpp2
-rw-r--r--boost/container/pmr/stable_vector.hpp2
-rw-r--r--boost/container/pmr/string.hpp2
-rw-r--r--boost/container/pmr/vector.hpp2
-rw-r--r--boost/container/set.hpp121
-rw-r--r--boost/container/slist.hpp33
-rw-r--r--boost/container/small_vector.hpp8
-rw-r--r--boost/container/stable_vector.hpp14
-rw-r--r--boost/container/static_vector.hpp8
-rw-r--r--boost/container/string.hpp11
-rw-r--r--boost/container/vector.hpp33
-rw-r--r--boost/context/fixedsize_stack.hpp5
-rw-r--r--boost/coroutine/asymmetric_coroutine.hpp8
-rw-r--r--boost/coroutine/detail/config.hpp8
-rw-r--r--boost/coroutine/symmetric_coroutine.hpp8
-rw-r--r--boost/coroutine2/detail/pull_control_block_ecv1.ipp126
-rw-r--r--boost/coroutine2/detail/pull_control_block_ecv2.ipp133
-rw-r--r--boost/coroutine2/detail/push_control_block_ecv1.ipp166
-rw-r--r--boost/coroutine2/detail/push_control_block_ecv2.ipp123
-rw-r--r--boost/coroutine2/detail/state.hpp3
-rw-r--r--boost/date_time/posix_time/time_parsers.hpp4
-rw-r--r--boost/date_time/time_facet.hpp5
-rw-r--r--boost/detail/iterator.hpp13
-rw-r--r--boost/detail/utf8_codecvt_facet.hpp4
-rw-r--r--boost/detail/utf8_codecvt_facet.ipp8
-rw-r--r--boost/detail/winapi/GetCurrentProcess.hpp2
-rw-r--r--boost/detail/winapi/GetCurrentThread.hpp2
-rw-r--r--boost/detail/winapi/GetLastError.hpp2
-rw-r--r--boost/detail/winapi/GetProcessTimes.hpp2
-rw-r--r--boost/detail/winapi/GetThreadTimes.hpp2
-rw-r--r--boost/detail/winapi/environment.hpp118
-rw-r--r--boost/detail/winapi/error_codes.hpp2959
-rw-r--r--boost/detail/winapi/file_management.hpp20
-rw-r--r--boost/detail/winapi/handles.hpp12
-rw-r--r--boost/detail/winapi/jobs.hpp115
-rw-r--r--boost/detail/winapi/process.hpp35
-rw-r--r--boost/dll/alias.hpp2
-rw-r--r--boost/dll/detail/aggressive_ptr_cast.hpp2
-rw-r--r--boost/dll/detail/ctor_dtor.hpp42
-rw-r--r--boost/dll/detail/demangling/demangle_symbol.hpp39
-rw-r--r--boost/dll/detail/demangling/itanium.hpp75
-rw-r--r--boost/dll/detail/demangling/mangled_storage_base.hpp14
-rw-r--r--boost/dll/detail/demangling/msvc.hpp65
-rw-r--r--boost/dll/detail/get_mem_fn_type.hpp6
-rw-r--r--boost/dll/detail/import_mangled_helpers.hpp284
-rw-r--r--boost/dll/detail/pe_info.hpp6
-rw-r--r--boost/dll/detail/type_info.hpp83
-rw-r--r--boost/dll/import_class.hpp558
-rw-r--r--boost/dll/import_mangled.hpp306
-rw-r--r--boost/dll/smart_library.hpp163
-rw-r--r--boost/dynamic_bitset/dynamic_bitset.hpp32
-rw-r--r--boost/exception/detail/error_info_impl.hpp15
-rw-r--r--boost/exception/errinfo_errno.hpp3
-rw-r--r--boost/exception/exception.hpp17
-rw-r--r--boost/exception/info.hpp113
-rw-r--r--boost/fiber/algo/algorithm.hpp114
-rw-r--r--boost/fiber/algo/detail/chase_lev_queue.hpp172
-rw-r--r--boost/fiber/algo/round_robin.hpp69
-rw-r--r--boost/fiber/algo/shared_work.hpp86
-rw-r--r--boost/fiber/all.hpp34
-rw-r--r--boost/fiber/barrier.hpp48
-rw-r--r--boost/fiber/bounded_channel.hpp431
-rw-r--r--boost/fiber/channel_op_status.hpp34
-rw-r--r--boost/fiber/condition_variable.hpp261
-rw-r--r--boost/fiber/context.hpp558
-rw-r--r--boost/fiber/detail/config.hpp38
-rw-r--r--boost/fiber/detail/convert.hpp59
-rw-r--r--boost/fiber/detail/data.hpp71
-rw-r--r--boost/fiber/detail/decay_copy.hpp36
-rw-r--r--boost/fiber/detail/disable_overload.hpp34
-rw-r--r--boost/fiber/detail/fss.hpp58
-rw-r--r--boost/fiber/detail/spinlock.hpp42
-rw-r--r--boost/fiber/detail/wrap.hpp113
-rw-r--r--boost/fiber/exceptions.hpp148
-rw-r--r--boost/fiber/fiber.hpp160
-rw-r--r--boost/fiber/fixedsize_stack.hpp33
-rw-r--r--boost/fiber/fss.hpp107
-rw-r--r--boost/fiber/future.hpp10
-rw-r--r--boost/fiber/future/async.hpp89
-rw-r--r--boost/fiber/future/detail/shared_state.hpp312
-rw-r--r--boost/fiber/future/detail/shared_state_object.hpp57
-rw-r--r--boost/fiber/future/detail/task_base.hpp41
-rw-r--r--boost/fiber/future/detail/task_object.hpp156
-rw-r--r--boost/fiber/future/future.hpp463
-rw-r--r--boost/fiber/future/future_status.hpp27
-rw-r--r--boost/fiber/future/packaged_task.hpp140
-rw-r--r--boost/fiber/future/promise.hpp219
-rw-r--r--boost/fiber/mutex.hpp70
-rw-r--r--boost/fiber/operations.hpp92
-rw-r--r--boost/fiber/policy.hpp46
-rw-r--r--boost/fiber/pooled_fixedsize_stack.hpp30
-rw-r--r--boost/fiber/properties.hpp79
-rw-r--r--boost/fiber/protected_fixedsize_stack.hpp30
-rw-r--r--boost/fiber/recursive_mutex.hpp76
-rw-r--r--boost/fiber/recursive_timed_mutex.hpp92
-rw-r--r--boost/fiber/scheduler.hpp153
-rw-r--r--boost/fiber/segmented_stack.hpp35
-rw-r--r--boost/fiber/timed_mutex.hpp86
-rw-r--r--boost/fiber/type.hpp108
-rw-r--r--boost/fiber/unbounded_channel.hpp270
-rw-r--r--boost/format/parsing.hpp4
-rw-r--r--boost/function/function_base.hpp258
-rw-r--r--boost/function/function_template.hpp115
-rw-r--r--boost/functional/forward_adapter.hpp33
-rw-r--r--boost/functional/hash/hash.hpp8
-rw-r--r--boost/functional/lightweight_forward_adapter.hpp33
-rw-r--r--boost/geometry/algorithms/append.hpp2
-rw-r--r--boost/geometry/algorithms/area.hpp6
-rw-r--r--boost/geometry/algorithms/assign.hpp18
-rw-r--r--boost/geometry/algorithms/buffer.hpp12
-rw-r--r--boost/geometry/algorithms/centroid.hpp2
-rw-r--r--boost/geometry/algorithms/clear.hpp2
-rw-r--r--boost/geometry/algorithms/convert.hpp2
-rw-r--r--boost/geometry/algorithms/convex_hull.hpp10
-rw-r--r--boost/geometry/algorithms/correct.hpp2
-rw-r--r--boost/geometry/algorithms/covered_by.hpp6
-rw-r--r--boost/geometry/algorithms/crosses.hpp4
-rw-r--r--boost/geometry/algorithms/detail/assign_box_corners.hpp4
-rw-r--r--boost/geometry/algorithms/detail/assign_indexed_point.hpp8
-rw-r--r--boost/geometry/algorithms/detail/azimuth.hpp2
-rw-r--r--boost/geometry/algorithms/detail/buffer/buffer_policies.hpp14
-rw-r--r--boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp25
-rw-r--r--boost/geometry/algorithms/detail/buffer/buffered_ring.hpp16
-rw-r--r--boost/geometry/algorithms/detail/comparable_distance/interface.hpp8
-rw-r--r--boost/geometry/algorithms/detail/disjoint/interface.hpp2
-rw-r--r--boost/geometry/algorithms/detail/distance/interface.hpp8
-rw-r--r--boost/geometry/algorithms/detail/envelope/interface.hpp4
-rw-r--r--boost/geometry/algorithms/detail/envelope/transform_units.hpp2
-rw-r--r--boost/geometry/algorithms/detail/equals/collect_vectors.hpp285
-rw-r--r--boost/geometry/algorithms/detail/expand/interface.hpp8
-rw-r--r--boost/geometry/algorithms/detail/extreme_points.hpp6
-rw-r--r--boost/geometry/algorithms/detail/intersection/interface.hpp6
-rw-r--r--boost/geometry/algorithms/detail/is_simple/interface.hpp2
-rw-r--r--boost/geometry/algorithms/detail/is_valid/interface.hpp2
-rw-r--r--boost/geometry/algorithms/detail/overlay/cluster_info.hpp49
-rw-r--r--boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp14
-rw-r--r--boost/geometry/algorithms/detail/overlay/copy_segments.hpp2
-rw-r--r--boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp13
-rw-r--r--boost/geometry/algorithms/detail/overlay/enrichment_info.hpp6
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp4
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_relative_order.hpp2
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turn_info.hpp3
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp6
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp37
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp4
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp1
-rw-r--r--boost/geometry/algorithms/detail/overlay/get_turns.hpp8
-rw-r--r--boost/geometry/algorithms/detail/overlay/handle_colocations.hpp170
-rw-r--r--boost/geometry/algorithms/detail/overlay/handle_touch.hpp336
-rw-r--r--boost/geometry/algorithms/detail/overlay/intersection_insert.hpp10
-rw-r--r--boost/geometry/algorithms/detail/overlay/overlay.hpp31
-rw-r--r--boost/geometry/algorithms/detail/overlay/overlay_type.hpp38
-rw-r--r--boost/geometry/algorithms/detail/overlay/select_rings.hpp6
-rw-r--r--boost/geometry/algorithms/detail/overlay/self_turn_points.hpp2
-rw-r--r--boost/geometry/algorithms/detail/overlay/sort_by_side.hpp188
-rw-r--r--boost/geometry/algorithms/detail/overlay/traversal.hpp672
-rw-r--r--boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp347
-rw-r--r--boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp291
-rw-r--r--boost/geometry/algorithms/detail/overlay/traverse.hpp809
-rw-r--r--boost/geometry/algorithms/detail/overlay/turn_info.hpp13
-rw-r--r--boost/geometry/algorithms/detail/overlay/visit_info.hpp5
-rw-r--r--boost/geometry/algorithms/detail/point_on_border.hpp4
-rw-r--r--boost/geometry/algorithms/detail/recalculate.hpp4
-rw-r--r--boost/geometry/algorithms/detail/relate/interface.hpp4
-rw-r--r--boost/geometry/algorithms/detail/relate/linear_areal.hpp12
-rw-r--r--boost/geometry/algorithms/detail/relation/interface.hpp4
-rw-r--r--boost/geometry/algorithms/detail/ring_identifier.hpp5
-rw-r--r--boost/geometry/algorithms/detail/sections/range_by_section.hpp2
-rw-r--r--boost/geometry/algorithms/detail/sections/sectionalize.hpp59
-rw-r--r--boost/geometry/algorithms/detail/within/point_in_geometry.hpp2
-rw-r--r--boost/geometry/algorithms/difference.hpp20
-rw-r--r--boost/geometry/algorithms/equals.hpp26
-rw-r--r--boost/geometry/algorithms/for_each.hpp4
-rw-r--r--boost/geometry/algorithms/intersects.hpp6
-rw-r--r--boost/geometry/algorithms/is_empty.hpp2
-rw-r--r--boost/geometry/algorithms/length.hpp4
-rw-r--r--boost/geometry/algorithms/make.hpp12
-rw-r--r--boost/geometry/algorithms/num_geometries.hpp2
-rw-r--r--boost/geometry/algorithms/num_interior_rings.hpp2
-rw-r--r--boost/geometry/algorithms/num_points.hpp2
-rw-r--r--boost/geometry/algorithms/num_segments.hpp2
-rw-r--r--boost/geometry/algorithms/overlaps.hpp4
-rw-r--r--boost/geometry/algorithms/perimeter.hpp2
-rw-r--r--boost/geometry/algorithms/point_on_surface.hpp4
-rw-r--r--boost/geometry/algorithms/remove_spikes.hpp2
-rw-r--r--boost/geometry/algorithms/reverse.hpp2
-rw-r--r--boost/geometry/algorithms/simplify.hpp14
-rw-r--r--boost/geometry/algorithms/sym_difference.hpp20
-rw-r--r--boost/geometry/algorithms/touches.hpp8
-rw-r--r--boost/geometry/algorithms/transform.hpp4
-rw-r--r--boost/geometry/algorithms/union.hpp14
-rw-r--r--boost/geometry/algorithms/unique.hpp2
-rw-r--r--boost/geometry/algorithms/within.hpp6
-rw-r--r--boost/geometry/arithmetic/arithmetic.hpp30
-rw-r--r--boost/geometry/arithmetic/cross_product.hpp128
-rw-r--r--boost/geometry/arithmetic/determinant.hpp4
-rw-r--r--boost/geometry/arithmetic/dot_product.hpp4
-rw-r--r--boost/geometry/formulas/spherical.hpp96
-rw-r--r--boost/geometry/geometries/box.hpp2
-rw-r--r--boost/geometry/geometries/concepts/box_concept.hpp4
-rw-r--r--boost/geometry/geometries/concepts/check.hpp40
-rw-r--r--boost/geometry/geometries/concepts/linestring_concept.hpp8
-rw-r--r--boost/geometry/geometries/concepts/multi_linestring_concept.hpp8
-rw-r--r--boost/geometry/geometries/concepts/multi_point_concept.hpp8
-rw-r--r--boost/geometry/geometries/concepts/multi_polygon_concept.hpp8
-rw-r--r--boost/geometry/geometries/concepts/point_concept.hpp4
-rw-r--r--boost/geometry/geometries/concepts/polygon_concept.hpp12
-rw-r--r--boost/geometry/geometries/concepts/ring_concept.hpp8
-rw-r--r--boost/geometry/geometries/concepts/segment_concept.hpp8
-rw-r--r--boost/geometry/geometries/linestring.hpp2
-rw-r--r--boost/geometry/geometries/multi_linestring.hpp2
-rw-r--r--boost/geometry/geometries/multi_point.hpp2
-rw-r--r--boost/geometry/geometries/multi_polygon.hpp2
-rw-r--r--boost/geometry/geometries/pointing_segment.hpp4
-rw-r--r--boost/geometry/geometries/polygon.hpp2
-rw-r--r--boost/geometry/geometries/ring.hpp2
-rw-r--r--boost/geometry/geometries/segment.hpp6
-rw-r--r--boost/geometry/geometry.hpp6
-rw-r--r--boost/geometry/index/detail/algorithms/bounds.hpp2
-rw-r--r--boost/geometry/index/detail/algorithms/intersection_content.hpp4
-rw-r--r--boost/geometry/index/detail/predicates.hpp4
-rw-r--r--boost/geometry/io/dsv/write.hpp2
-rw-r--r--boost/geometry/io/io.hpp2
-rw-r--r--boost/geometry/io/svg/svg_mapper.hpp175
-rw-r--r--boost/geometry/io/svg/write.hpp418
-rw-r--r--boost/geometry/io/svg/write_svg.hpp281
-rw-r--r--boost/geometry/io/svg/write_svg_multi.hpp86
-rw-r--r--boost/geometry/io/wkt/read.hpp2
-rw-r--r--boost/geometry/io/wkt/write.hpp2
-rw-r--r--boost/geometry/policies/relate/intersection_points.hpp60
-rw-r--r--boost/geometry/policies/robustness/segment_ratio.hpp6
-rw-r--r--boost/geometry/strategies/cartesian/cart_intersect.hpp134
-rw-r--r--boost/geometry/strategies/cartesian/distance_pythagoras.hpp4
-rw-r--r--boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp4
-rw-r--r--boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp4
-rw-r--r--boost/geometry/strategies/concepts/area_concept.hpp4
-rw-r--r--boost/geometry/strategies/concepts/centroid_concept.hpp4
-rw-r--r--boost/geometry/strategies/concepts/convex_hull_concept.hpp4
-rw-r--r--boost/geometry/strategies/concepts/distance_concept.hpp4
-rw-r--r--boost/geometry/strategies/concepts/segment_intersect_concept.hpp4
-rw-r--r--boost/geometry/strategies/concepts/simplify_concept.hpp6
-rw-r--r--boost/geometry/strategies/concepts/within_concept.hpp18
-rw-r--r--boost/geometry/strategies/intersection.hpp96
-rw-r--r--boost/geometry/strategies/intersection_result.hpp18
-rw-r--r--boost/geometry/strategies/intersection_strategies.hpp100
-rw-r--r--boost/geometry/strategies/spherical/distance_cross_track.hpp4
-rw-r--r--boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp2
-rw-r--r--boost/geometry/strategies/spherical/intersection.hpp701
-rw-r--r--boost/geometry/strategies/strategies.hpp6
-rw-r--r--boost/geometry/util/for_each_coordinate.hpp4
-rw-r--r--boost/graph/bc_clustering.hpp2
-rw-r--r--boost/graph/buffer_concepts.hpp3
-rw-r--r--boost/graph/copy.hpp4
-rw-r--r--boost/graph/depth_first_search.hpp20
-rw-r--r--boost/graph/detail/adjacency_list.hpp45
-rw-r--r--boost/graph/detail/array_binary_tree.hpp3
-rw-r--r--boost/graph/detail/edge.hpp2
-rw-r--r--boost/graph/detail/list_base.hpp12
-rw-r--r--boost/graph/directed_graph.hpp4
-rw-r--r--boost/graph/distributed/adjlist/serialization.hpp2
-rw-r--r--boost/graph/distributed/detail/mpi_process_group.ipp1
-rw-r--r--boost/graph/distributed/hohberg_biconnected_components.hpp4
-rw-r--r--boost/graph/dominator_tree.hpp16
-rw-r--r--boost/graph/filtered_graph.hpp20
-rw-r--r--boost/graph/find_flow_cost.hpp6
-rw-r--r--boost/graph/graph_concepts.hpp2
-rw-r--r--boost/graph/graphml.hpp4
-rw-r--r--boost/graph/kamada_kawai_spring_layout.hpp2
-rw-r--r--boost/graph/labeled_graph.hpp7
-rw-r--r--boost/graph/metis.hpp3
-rw-r--r--boost/graph/metric_tsp_approx.hpp6
-rw-r--r--boost/graph/named_function_params.hpp10
-rw-r--r--boost/graph/parallel/properties.hpp6
-rw-r--r--boost/graph/planar_canonical_ordering.hpp2
-rw-r--r--boost/graph/planar_detail/boyer_myrvold_impl.hpp653
-rw-r--r--boost/graph/r_c_shortest_paths.hpp1
-rw-r--r--boost/graph/strong_components.hpp1
-rw-r--r--boost/graph/tree_traits.hpp2
-rw-r--r--boost/hana/basic_tuple.hpp2
-rw-r--r--boost/hana/comparing.hpp5
-rw-r--r--boost/hana/detail/algorithm.hpp8
-rw-r--r--boost/hana/detail/concepts.hpp2
-rw-r--r--boost/hana/detail/index_if.hpp2
-rw-r--r--boost/hana/detail/std_common_type.hpp4
-rw-r--r--boost/hana/experimental/printable.hpp2
-rw-r--r--boost/hana/experimental/types.hpp2
-rw-r--r--boost/hana/experimental/view.hpp4
-rw-r--r--boost/hana/ext/std/tuple.hpp3
-rw-r--r--boost/hana/functional/curry.hpp3
-rw-r--r--boost/hana/functional/infix.hpp3
-rw-r--r--boost/hana/functional/lockstep.hpp8
-rw-r--r--boost/hana/functional/overload_linearly.hpp11
-rw-r--r--boost/hana/functional/partial.hpp2
-rw-r--r--boost/hana/functional/reverse_partial.hpp2
-rw-r--r--boost/hana/fuse.hpp5
-rw-r--r--boost/hana/fwd/at.hpp8
-rw-r--r--boost/hana/fwd/at_key.hpp8
-rw-r--r--boost/hana/fwd/cartesian_product.hpp8
-rw-r--r--boost/hana/fwd/count_if.hpp7
-rw-r--r--boost/hana/fwd/difference.hpp8
-rw-r--r--boost/hana/fwd/filter.hpp7
-rw-r--r--boost/hana/fwd/find_if.hpp7
-rw-r--r--boost/hana/fwd/fold_left.hpp8
-rw-r--r--boost/hana/fwd/fold_right.hpp8
-rw-r--r--boost/hana/fwd/intersection.hpp8
-rw-r--r--boost/hana/fwd/is_disjoint.hpp8
-rw-r--r--boost/hana/fwd/is_subset.hpp8
-rw-r--r--boost/hana/fwd/lexicographical_compare.hpp8
-rw-r--r--boost/hana/fwd/map.hpp8
-rw-r--r--boost/hana/fwd/partition.hpp8
-rw-r--r--boost/hana/fwd/product.hpp8
-rw-r--r--boost/hana/fwd/set.hpp8
-rw-r--r--boost/hana/fwd/sort.hpp7
-rw-r--r--boost/hana/fwd/symmetric_difference.hpp8
-rw-r--r--boost/hana/fwd/transform.hpp7
-rw-r--r--boost/hana/fwd/type.hpp48
-rw-r--r--boost/hana/fwd/union.hpp8
-rw-r--r--boost/hana/fwd/unpack.hpp8
-rw-r--r--boost/hana/map.hpp2
-rw-r--r--boost/hana/monadic_fold_left.hpp3
-rw-r--r--boost/hana/monadic_fold_right.hpp3
-rw-r--r--boost/hana/optional.hpp3
-rw-r--r--boost/hana/ordering.hpp5
-rw-r--r--boost/hana/type.hpp24
-rw-r--r--boost/hana/version.hpp2
-rwxr-xr-x[-rw-r--r--]boost/interprocess/detail/managed_memory_impl.hpp4
-rwxr-xr-x[-rw-r--r--]boost/interprocess/detail/managed_multi_shared_memory.hpp4
-rwxr-xr-x[-rw-r--r--]boost/interprocess/detail/managed_open_or_create_impl.hpp0
-rw-r--r--boost/interprocess/detail/mpl.hpp36
-rw-r--r--boost/interprocess/detail/named_proxy.hpp10
-rw-r--r--boost/interprocess/detail/win32_api.hpp14
-rw-r--r--boost/interprocess/mapped_region.hpp2
-rw-r--r--boost/interprocess/offset_ptr.hpp10
-rw-r--r--boost/interprocess/sync/shm/named_creation_functor.hpp2
-rw-r--r--boost/intrusive/any_hook.hpp6
-rw-r--r--boost/intrusive/avl_set.hpp62
-rw-r--r--boost/intrusive/avl_set_hook.hpp6
-rw-r--r--boost/intrusive/avltree.hpp17
-rw-r--r--boost/intrusive/avltree_algorithms.hpp43
-rw-r--r--boost/intrusive/bs_set.hpp62
-rw-r--r--boost/intrusive/bs_set_hook.hpp6
-rw-r--r--boost/intrusive/bstree.hpp245
-rw-r--r--boost/intrusive/bstree_algorithms.hpp103
-rw-r--r--boost/intrusive/circular_list_algorithms.hpp22
-rw-r--r--boost/intrusive/circular_slist_algorithms.hpp12
-rw-r--r--boost/intrusive/detail/algo_type.hpp5
-rw-r--r--boost/intrusive/detail/any_node_and_algorithms.hpp14
-rw-r--r--boost/intrusive/detail/common_slist_algorithms.hpp14
-rw-r--r--boost/intrusive/detail/ebo_functor_holder.hpp2
-rw-r--r--boost/intrusive/detail/generic_hook.hpp16
-rw-r--r--boost/intrusive/detail/has_member_function_callable_with.hpp141
-rw-r--r--boost/intrusive/detail/key_nodeptr_comp.hpp110
-rw-r--r--boost/intrusive/detail/size_holder.hpp5
-rw-r--r--boost/intrusive/detail/tree_value_compare.hpp129
-rw-r--r--boost/intrusive/hashtable.hpp474
-rw-r--r--boost/intrusive/linear_slist_algorithms.hpp4
-rw-r--r--boost/intrusive/list.hpp6
-rw-r--r--boost/intrusive/list_hook.hpp6
-rw-r--r--boost/intrusive/options.hpp8
-rw-r--r--boost/intrusive/priority_compare.hpp19
-rw-r--r--boost/intrusive/rbtree.hpp17
-rw-r--r--boost/intrusive/rbtree_algorithms.hpp56
-rw-r--r--boost/intrusive/set.hpp62
-rw-r--r--boost/intrusive/set_hook.hpp6
-rw-r--r--boost/intrusive/sg_set.hpp59
-rw-r--r--boost/intrusive/sgtree.hpp76
-rw-r--r--boost/intrusive/sgtree_algorithms.hpp52
-rw-r--r--boost/intrusive/slist.hpp11
-rw-r--r--boost/intrusive/slist_hook.hpp11
-rw-r--r--boost/intrusive/splay_set.hpp62
-rw-r--r--boost/intrusive/splaytree.hpp17
-rw-r--r--boost/intrusive/splaytree_algorithms.hpp27
-rw-r--r--boost/intrusive/treap.hpp60
-rw-r--r--boost/intrusive/treap_algorithms.hpp28
-rw-r--r--boost/intrusive/treap_set.hpp62
-rw-r--r--boost/intrusive/unordered_set.hpp6
-rw-r--r--boost/intrusive/unordered_set_hook.hpp44
-rw-r--r--boost/iostreams/categories.hpp2
-rw-r--r--boost/iostreams/chain.hpp30
-rw-r--r--[-rwxr-xr-x]boost/iostreams/char_traits.hpp2
-rw-r--r--boost/iostreams/close.hpp8
-rw-r--r--boost/iostreams/code_converter.hpp10
-rw-r--r--boost/iostreams/combine.hpp2
-rw-r--r--boost/iostreams/compose.hpp5
-rw-r--r--[-rwxr-xr-x]boost/iostreams/concepts.hpp10
-rw-r--r--[-rwxr-xr-x]boost/iostreams/constants.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/copy.hpp6
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/access_control.hpp2
-rw-r--r--boost/iostreams/detail/adapter/direct_adapter.hpp2
-rw-r--r--boost/iostreams/detail/adapter/mode_adapter.hpp22
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/adapter/output_iterator_adapter.hpp2
-rw-r--r--boost/iostreams/detail/adapter/range_adapter.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/add_facet.hpp2
-rw-r--r--boost/iostreams/detail/buffer.hpp27
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/call_traits.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/char_traits.hpp2
-rw-r--r--boost/iostreams/detail/codecvt_helper.hpp25
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/codecvt_holder.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/auto_link.hpp4
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/bzip2.hpp4
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/codecvt.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/dyn_link.hpp2
-rw-r--r--boost/iostreams/detail/config/fpos.hpp2
-rw-r--r--boost/iostreams/detail/config/gcc.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/overload_resolution.hpp6
-rw-r--r--boost/iostreams/detail/config/unreachable_return.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/wide_streams.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/config/zlib.hpp4
-rwxr-xr-xboost/iostreams/detail/counted_array.hpp20
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/default_arg.hpp10
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/dispatch.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/double_object.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/enable_if_stream.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/error.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/execute.hpp2
-rw-r--r--boost/iostreams/detail/forward.hpp43
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/fstream.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/functional.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/ios.hpp5
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/iostream.hpp2
-rw-r--r--boost/iostreams/detail/is_dereferenceable.hpp9
-rw-r--r--boost/iostreams/detail/is_iterator_range.hpp15
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/newline.hpp2
-rw-r--r--boost/iostreams/detail/optional.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/param_type.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/push.hpp5
-rw-r--r--boost/iostreams/detail/push_params.hpp2
-rw-r--r--boost/iostreams/detail/resolve.hpp19
-rw-r--r--boost/iostreams/detail/restrict_impl.hpp3
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/select.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/streambuf.hpp2
-rw-r--r--boost/iostreams/detail/streambuf/chainbuf.hpp5
-rw-r--r--boost/iostreams/detail/streambuf/direct_streambuf.hpp4
-rw-r--r--boost/iostreams/detail/streambuf/indirect_streambuf.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/streambuf/linked_streambuf.hpp2
-rw-r--r--boost/iostreams/detail/system_failure.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/translate_int_type.hpp2
-rwxr-xr-xboost/iostreams/detail/vc6/close.hpp129
-rwxr-xr-xboost/iostreams/detail/vc6/read.hpp238
-rwxr-xr-xboost/iostreams/detail/vc6/write.hpp159
-rw-r--r--[-rwxr-xr-x]boost/iostreams/detail/wrap_unwrap.hpp31
-rw-r--r--[-rwxr-xr-x]boost/iostreams/device/array.hpp19
-rw-r--r--[-rwxr-xr-x]boost/iostreams/device/back_inserter.hpp2
-rw-r--r--boost/iostreams/device/file.hpp2
-rw-r--r--boost/iostreams/device/file_descriptor.hpp9
-rw-r--r--boost/iostreams/device/mapped_file.hpp9
-rw-r--r--[-rwxr-xr-x]boost/iostreams/device/null.hpp2
-rw-r--r--boost/iostreams/filter/aggregate.hpp2
-rw-r--r--boost/iostreams/filter/bzip2.hpp14
-rw-r--r--boost/iostreams/filter/counter.hpp2
-rw-r--r--boost/iostreams/filter/grep.hpp2
-rw-r--r--boost/iostreams/filter/gzip.hpp20
-rw-r--r--boost/iostreams/filter/line.hpp10
-rw-r--r--boost/iostreams/filter/newline.hpp3
-rw-r--r--[-rwxr-xr-x]boost/iostreams/filter/regex.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/filter/stdio.hpp2
-rw-r--r--boost/iostreams/filter/symmetric.hpp2
-rw-r--r--boost/iostreams/filter/test.hpp33
-rw-r--r--boost/iostreams/filter/zlib.hpp16
-rw-r--r--[-rwxr-xr-x]boost/iostreams/filtering_stream.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/filtering_streambuf.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/flush.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/get.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/imbue.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/input_sequence.hpp2
-rw-r--r--boost/iostreams/invert.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/operations.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/operations_fwd.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/optimal_buffer_size.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/output_sequence.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/pipeline.hpp16
-rw-r--r--boost/iostreams/positioning.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/put.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/putback.hpp2
-rw-r--r--[-rwxr-xr-x]boost/iostreams/read.hpp8
-rw-r--r--[-rwxr-xr-x]boost/iostreams/seek.hpp2
-rw-r--r--boost/iostreams/skip.hpp2
-rw-r--r--boost/iostreams/stream.hpp2
-rw-r--r--boost/iostreams/stream_buffer.hpp2
-rw-r--r--boost/iostreams/tee.hpp2
-rw-r--r--boost/iostreams/traits.hpp34
-rw-r--r--[-rwxr-xr-x]boost/iostreams/traits_fwd.hpp2
-rw-r--r--boost/iostreams/write.hpp8
-rw-r--r--boost/lexical_cast/detail/converter_lexical_streams.hpp4
-rw-r--r--boost/lockfree/detail/atomic.hpp6
-rw-r--r--boost/lockfree/detail/copy_payload.hpp2
-rw-r--r--boost/lockfree/detail/freelist.hpp8
-rw-r--r--boost/lockfree/detail/parameter.hpp7
-rw-r--r--boost/lockfree/detail/prefix.hpp40
-rw-r--r--boost/lockfree/detail/tagged_ptr.hpp2
-rw-r--r--boost/lockfree/detail/tagged_ptr_dcas.hpp11
-rw-r--r--boost/lockfree/detail/tagged_ptr_ptrcompression.hpp6
-rw-r--r--boost/lockfree/lockfree_forward.hpp72
-rw-r--r--boost/lockfree/policies.hpp4
-rw-r--r--boost/lockfree/queue.hpp19
-rw-r--r--boost/lockfree/spsc_queue.hpp30
-rw-r--r--boost/lockfree/stack.hpp239
-rw-r--r--boost/log/attributes/attribute_value_impl.hpp2
-rw-r--r--boost/log/attributes/constant.hpp2
-rw-r--r--boost/log/attributes/mutable_constant.hpp2
-rw-r--r--boost/log/attributes/scoped_attribute.hpp4
-rw-r--r--boost/log/attributes/value_extraction.hpp6
-rw-r--r--boost/log/core/record.hpp6
-rw-r--r--boost/log/core/record_view.hpp16
-rw-r--r--boost/log/detail/adaptive_mutex.hpp19
-rw-r--r--boost/log/detail/attachable_sstream_buf.hpp236
-rw-r--r--boost/log/detail/c_str.hpp55
-rw-r--r--boost/log/detail/code_conversion.hpp83
-rw-r--r--boost/log/detail/config.hpp18
-rw-r--r--boost/log/detail/decomposed_time.hpp39
-rw-r--r--boost/log/detail/enqueued_record.hpp2
-rw-r--r--boost/log/detail/format.hpp58
-rw-r--r--boost/log/detail/light_function.hpp16
-rw-r--r--boost/log/detail/light_function_pp.hpp12
-rw-r--r--boost/log/detail/locks.hpp31
-rw-r--r--boost/log/detail/parameter_tools.hpp43
-rw-r--r--boost/log/detail/pause.hpp61
-rw-r--r--boost/log/detail/sfinae_tools.hpp44
-rw-r--r--boost/log/detail/sink_init_helpers.hpp10
-rw-r--r--boost/log/detail/snprintf.hpp29
-rw-r--r--boost/log/detail/tagged_integer.hpp24
-rw-r--r--boost/log/detail/threadsafe_queue.hpp2
-rw-r--r--boost/log/exceptions.hpp102
-rw-r--r--boost/log/expressions/attr.hpp2
-rw-r--r--boost/log/expressions/filter.hpp12
-rw-r--r--boost/log/expressions/formatter.hpp10
-rw-r--r--boost/log/expressions/formatters.hpp1
-rw-r--r--boost/log/expressions/formatters/char_decorator.hpp20
-rw-r--r--boost/log/expressions/formatters/date_time.hpp8
-rw-r--r--boost/log/expressions/formatters/format.hpp2
-rw-r--r--boost/log/expressions/formatters/if.hpp4
-rw-r--r--boost/log/expressions/formatters/max_size_decorator.hpp561
-rw-r--r--boost/log/expressions/formatters/named_scope.hpp8
-rw-r--r--boost/log/expressions/formatters/wrap_formatter.hpp10
-rw-r--r--boost/log/expressions/predicates/channel_severity_filter.hpp2
-rw-r--r--boost/log/keywords/block_size.hpp40
-rw-r--r--boost/log/keywords/capacity.hpp40
-rw-r--r--boost/log/keywords/name.hpp40
-rw-r--r--boost/log/keywords/overflow_policy.hpp40
-rw-r--r--boost/log/keywords/permissions.hpp40
-rw-r--r--boost/log/sinks.hpp1
-rw-r--r--boost/log/sinks/async_frontend.hpp50
-rw-r--r--boost/log/sinks/attribute_mapping.hpp2
-rw-r--r--boost/log/sinks/basic_sink_frontend.hpp41
-rw-r--r--boost/log/sinks/sync_frontend.hpp25
-rw-r--r--boost/log/sinks/text_ipc_message_queue_backend.hpp172
-rw-r--r--boost/log/sinks/text_multifile_backend.hpp3
-rw-r--r--boost/log/sinks/unlocked_frontend.hpp25
-rw-r--r--boost/log/sources/basic_logger.hpp4
-rw-r--r--boost/log/sources/channel_feature.hpp2
-rw-r--r--boost/log/sources/exception_handler_feature.hpp2
-rw-r--r--boost/log/sources/global_logger_storage.hpp19
-rw-r--r--boost/log/sources/record_ostream.hpp4
-rw-r--r--boost/log/sources/severity_feature.hpp2
-rw-r--r--boost/log/support/date_time.hpp2
-rw-r--r--boost/log/support/exception.hpp12
-rw-r--r--boost/log/support/spirit_classic.hpp2
-rw-r--r--boost/log/support/spirit_qi.hpp4
-rw-r--r--boost/log/utility/exception_handler.hpp10
-rw-r--r--boost/log/utility/formatting_ostream.hpp49
-rw-r--r--boost/log/utility/ipc/object_name.hpp271
-rw-r--r--boost/log/utility/ipc/reliable_message_queue.hpp776
-rw-r--r--boost/log/utility/manipulators/dump.hpp4
-rw-r--r--boost/log/utility/open_mode.hpp46
-rw-r--r--boost/log/utility/permissions.hpp213
-rw-r--r--boost/log/utility/record_ordering.hpp6
-rw-r--r--boost/log/utility/setup/filter_parser.hpp6
-rw-r--r--boost/log/utility/setup/formatter_parser.hpp6
-rw-r--r--boost/log/utility/setup/from_settings.hpp10
-rw-r--r--boost/log/utility/setup/settings.hpp4
-rw-r--r--boost/log/utility/strictest_lock.hpp5
-rw-r--r--boost/log/utility/string_literal.hpp192
-rw-r--r--boost/log/utility/type_dispatch/static_type_dispatcher.hpp2
-rw-r--r--boost/log/utility/value_ref.hpp96
-rw-r--r--boost/math/common_factor_rt.hpp766
-rw-r--r--boost/math/constants/constants.hpp58
-rw-r--r--boost/math/cstdfloat/cstdfloat_types.hpp8
-rw-r--r--boost/math/distributions/non_central_chi_squared.hpp7
-rw-r--r--boost/math/policies/error_handling.hpp88
-rw-r--r--boost/math/policies/policy.hpp4
-rw-r--r--boost/math/special_functions/detail/bernoulli_details.hpp65
-rw-r--r--boost/math/special_functions/detail/bessel_k0.hpp6
-rw-r--r--boost/math/special_functions/detail/bessel_k1.hpp6
-rw-r--r--boost/math/special_functions/detail/bessel_y0.hpp6
-rw-r--r--boost/math/special_functions/detail/bessel_y1.hpp6
-rw-r--r--boost/math/special_functions/detail/erf_inv.hpp55
-rw-r--r--boost/math/special_functions/detail/lanczos_sse2.hpp16
-rw-r--r--boost/math/special_functions/detail/polygamma.hpp24
-rw-r--r--boost/math/special_functions/detail/unchecked_factorial.hpp367
-rw-r--r--boost/math/special_functions/digamma.hpp9
-rw-r--r--boost/math/special_functions/ellint_1.hpp2
-rw-r--r--boost/math/special_functions/ellint_2.hpp8
-rw-r--r--boost/math/special_functions/ellint_3.hpp14
-rw-r--r--boost/math/special_functions/expint.hpp6
-rw-r--r--boost/math/special_functions/gamma.hpp101
-rw-r--r--boost/math/special_functions/lanczos.hpp2
-rw-r--r--boost/math/special_functions/log1p.hpp6
-rw-r--r--boost/math/special_functions/powm1.hpp6
-rw-r--r--boost/math/special_functions/zeta.hpp12
-rw-r--r--boost/math/tools/config.hpp10
-rw-r--r--boost/math/tools/convert_from_string.hpp51
-rw-r--r--boost/math/tools/polynomial.hpp136
-rw-r--r--boost/math/tools/precision.hpp25
-rw-r--r--boost/math/tools/toms748_solve.hpp4
-rw-r--r--boost/math/tools/tuple.hpp2
-rw-r--r--boost/math_fwd.hpp11
-rw-r--r--boost/move/adl_move_swap.hpp4
-rw-r--r--boost/move/algo/adaptive_merge.hpp2
-rw-r--r--boost/move/algo/detail/adaptive_sort_merge.hpp1308
-rw-r--r--boost/move/algo/detail/basic_op.hpp18
-rw-r--r--boost/move/algo/detail/merge.hpp165
-rw-r--r--boost/move/algo/detail/merge_sort.hpp15
-rw-r--r--boost/move/algo/move.hpp4
-rw-r--r--boost/move/core.hpp4
-rw-r--r--boost/move/detail/fwd_macros.hpp259
-rw-r--r--boost/move/detail/meta_utils_core.hpp12
-rw-r--r--boost/move/detail/reverse_iterator.hpp171
-rw-r--r--boost/move/detail/type_traits.hpp34
-rw-r--r--boost/mpi/config.hpp10
-rw-r--r--boost/mpl/print.hpp3
-rw-r--r--boost/multiprecision/cpp_bin_float.hpp203
-rw-r--r--boost/multiprecision/cpp_bin_float/io.hpp12
-rw-r--r--boost/multiprecision/cpp_dec_float.hpp38
-rw-r--r--boost/multiprecision/cpp_int.hpp46
-rw-r--r--boost/multiprecision/cpp_int/add.hpp21
-rw-r--r--boost/multiprecision/cpp_int/bitwise.hpp1
-rw-r--r--boost/multiprecision/cpp_int/divide.hpp8
-rw-r--r--boost/multiprecision/cpp_int/import_export.hpp8
-rw-r--r--boost/multiprecision/cpp_int/limits.hpp8
-rw-r--r--boost/multiprecision/cpp_int/misc.hpp78
-rw-r--r--boost/multiprecision/cpp_int/multiply.hpp57
-rw-r--r--boost/multiprecision/debug_adaptor.hpp33
-rw-r--r--boost/multiprecision/detail/big_lanczos.hpp4
-rw-r--r--boost/multiprecision/detail/default_ops.hpp151
-rw-r--r--boost/multiprecision/detail/functions/constants.hpp33
-rw-r--r--boost/multiprecision/detail/functions/pow.hpp43
-rw-r--r--boost/multiprecision/detail/functions/trig.hpp58
-rw-r--r--boost/multiprecision/detail/generic_interconvert.hpp23
-rw-r--r--boost/multiprecision/detail/number_base.hpp66
-rw-r--r--boost/multiprecision/detail/ublas_interop.hpp12
-rw-r--r--boost/multiprecision/float128.hpp27
-rw-r--r--boost/multiprecision/gmp.hpp211
-rw-r--r--boost/multiprecision/logged_adaptor.hpp22
-rw-r--r--boost/multiprecision/miller_rabin.hpp2
-rw-r--r--boost/multiprecision/mpfi.hpp160
-rw-r--r--boost/multiprecision/mpfr.hpp249
-rw-r--r--boost/multiprecision/number.hpp64
-rw-r--r--boost/multiprecision/rational_adaptor.hpp10
-rw-r--r--boost/multiprecision/tommath.hpp11
-rw-r--r--boost/multiprecision/traits/explicit_conversion.hpp92
-rw-r--r--boost/optional/optional_fwd.hpp2
-rw-r--r--boost/phoenix/config.hpp34
-rw-r--r--boost/phoenix/core/detail/argument.hpp4
-rw-r--r--boost/phoenix/core/nothing.hpp4
-rw-r--r--boost/phoenix/core/preprocessed/argument_10.hpp23
-rw-r--r--boost/phoenix/core/preprocessed/argument_no_predefined_10.hpp8
-rw-r--r--boost/phoenix/core/preprocessed/argument_no_predefined_20.hpp8
-rw-r--r--boost/phoenix/core/preprocessed/argument_no_predefined_30.hpp8
-rw-r--r--boost/phoenix/core/preprocessed/argument_no_predefined_40.hpp8
-rw-r--r--boost/phoenix/core/preprocessed/argument_no_predefined_50.hpp8
-rw-r--r--boost/phoenix/core/preprocessed/argument_predefined_10.hpp16
-rw-r--r--boost/phoenix/core/preprocessed/argument_predefined_20.hpp16
-rw-r--r--boost/phoenix/core/preprocessed/argument_predefined_30.hpp16
-rw-r--r--boost/phoenix/core/preprocessed/argument_predefined_40.hpp16
-rw-r--r--boost/phoenix/core/preprocessed/argument_predefined_50.hpp16
-rw-r--r--boost/phoenix/function/detail/function_result_of.hpp57
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of.hpp25
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of_10.hpp167
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of_20.hpp327
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of_30.hpp487
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of_40.hpp647
-rw-r--r--boost/phoenix/function/detail/preprocessed/function_result_of_50.hpp807
-rw-r--r--boost/phoenix/function/lazy_list.hpp1
-rw-r--r--boost/phoenix/scope/local_variable.hpp56
-rw-r--r--boost/phoenix/scope/scoped_environment.hpp2
-rw-r--r--boost/phoenix/stl/algorithm/detail/std_unordered_set_or_map_fwd.hpp9
-rw-r--r--boost/phoenix/stl/algorithm/querying.hpp16
-rw-r--r--boost/phoenix/stl/algorithm/transformation.hpp6
-rw-r--r--boost/phoenix/stl/cmath.hpp40
-rw-r--r--boost/phoenix/stl/container/container.hpp2
-rw-r--r--boost/predef/hardware/simd/x86_amd/versions.h6
-rwxr-xr-xboost/python/cast.hpp2
-rw-r--r--boost/python/class.hpp4
-rw-r--r--boost/python/def.hpp2
-rw-r--r--boost/python/detail/config.hpp4
-rw-r--r--boost/python/detail/defaults_gen.hpp4
-rw-r--r--boost/python/init.hpp6
-rw-r--r--boost/python/make_constructor.hpp2
-rw-r--r--boost/python/make_function.hpp2
-rw-r--r--boost/python/object/pickle_support.hpp2
-rw-r--r--boost/python/signature.hpp18
-rw-r--r--boost/python/slice.hpp4
-rw-r--r--boost/qvm/all.hpp31
-rw-r--r--boost/qvm/assert.hpp9
-rw-r--r--boost/qvm/deduce_mat.hpp90
-rw-r--r--boost/qvm/deduce_quat.hpp63
-rw-r--r--boost/qvm/deduce_scalar.hpp131
-rw-r--r--boost/qvm/deduce_vec.hpp85
-rw-r--r--boost/qvm/detail/cofactor_impl.hpp64
-rw-r--r--boost/qvm/detail/determinant_impl.hpp79
-rw-r--r--boost/qvm/detail/remove_const.hpp35
-rw-r--r--boost/qvm/detail/swizzle_traits.hpp265
-rw-r--r--boost/qvm/detail/transp_impl.hpp128
-rw-r--r--boost/qvm/enable_if.hpp24
-rw-r--r--boost/qvm/error.hpp40
-rw-r--r--boost/qvm/gen/mat_operations2.hpp1649
-rw-r--r--boost/qvm/gen/mat_operations3.hpp1838
-rw-r--r--boost/qvm/gen/mat_operations4.hpp2044
-rw-r--r--boost/qvm/gen/swizzle2.hpp624
-rw-r--r--boost/qvm/gen/swizzle3.hpp3816
-rw-r--r--boost/qvm/gen/swizzle4.hpp23160
-rw-r--r--boost/qvm/gen/vec_mat_operations2.hpp113
-rw-r--r--boost/qvm/gen/vec_mat_operations3.hpp127
-rw-r--r--boost/qvm/gen/vec_mat_operations4.hpp145
-rw-r--r--boost/qvm/gen/vec_operations2.hpp632
-rw-r--r--boost/qvm/gen/vec_operations3.hpp653
-rw-r--r--boost/qvm/gen/vec_operations4.hpp674
-rw-r--r--boost/qvm/inline.hpp34
-rw-r--r--boost/qvm/map.hpp13
-rw-r--r--boost/qvm/map_mat_mat.hpp895
-rw-r--r--boost/qvm/map_mat_vec.hpp537
-rw-r--r--boost/qvm/map_vec_mat.hpp591
-rw-r--r--boost/qvm/mat.hpp98
-rw-r--r--boost/qvm/mat_access.hpp258
-rw-r--r--boost/qvm/mat_index.hpp145
-rw-r--r--boost/qvm/mat_operations.hpp1962
-rw-r--r--boost/qvm/mat_operations2.hpp6
-rw-r--r--boost/qvm/mat_operations3.hpp6
-rw-r--r--boost/qvm/mat_operations4.hpp6
-rw-r--r--boost/qvm/mat_traits.hpp33
-rw-r--r--boost/qvm/mat_traits_array.hpp118
-rw-r--r--boost/qvm/math.hpp87
-rw-r--r--boost/qvm/operations.hpp15
-rw-r--r--boost/qvm/quat.hpp68
-rw-r--r--boost/qvm/quat_access.hpp128
-rw-r--r--boost/qvm/quat_operations.hpp1508
-rw-r--r--boost/qvm/quat_traits.hpp49
-rw-r--r--boost/qvm/quat_traits_array.hpp130
-rw-r--r--boost/qvm/quat_vec_operations.hpp62
-rw-r--r--boost/qvm/scalar_traits.hpp91
-rw-r--r--boost/qvm/static_assert.hpp9
-rw-r--r--boost/qvm/swizzle.hpp13
-rw-r--r--boost/qvm/swizzle2.hpp6
-rw-r--r--boost/qvm/swizzle3.hpp6
-rw-r--r--boost/qvm/swizzle4.hpp6
-rw-r--r--boost/qvm/throw_exception.hpp9
-rw-r--r--boost/qvm/to_string.hpp31
-rw-r--r--boost/qvm/vec.hpp89
-rw-r--r--boost/qvm/vec_access.hpp82
-rw-r--r--boost/qvm/vec_index.hpp145
-rw-r--r--boost/qvm/vec_mat_operations.hpp168
-rw-r--r--boost/qvm/vec_mat_operations2.hpp6
-rw-r--r--boost/qvm/vec_mat_operations3.hpp6
-rw-r--r--boost/qvm/vec_mat_operations4.hpp6
-rw-r--r--boost/qvm/vec_operations.hpp986
-rw-r--r--boost/qvm/vec_operations2.hpp6
-rw-r--r--boost/qvm/vec_operations3.hpp6
-rw-r--r--boost/qvm/vec_operations4.hpp6
-rw-r--r--boost/qvm/vec_traits.hpp32
-rw-r--r--boost/qvm/vec_traits_array.hpp108
-rw-r--r--boost/rational.hpp18
-rw-r--r--boost/regex/concepts.hpp32
-rw-r--r--boost/regex/icu.hpp18
-rw-r--r--boost/regex/v4/basic_regex_parser.hpp53
-rw-r--r--boost/regex/v4/cpp_regex_traits.hpp8
-rw-r--r--boost/regex/v4/instances.hpp2
-rw-r--r--boost/regex/v4/perl_matcher.hpp2
-rw-r--r--boost/regex/v4/perl_matcher_common.hpp17
-rw-r--r--boost/regex/v4/perl_matcher_non_recursive.hpp43
-rw-r--r--boost/regex/v4/perl_matcher_recursive.hpp16
-rw-r--r--boost/regex/v4/regex_format.hpp4
-rw-r--r--boost/regex/v4/regex_traits.hpp2
-rw-r--r--boost/regex/v4/regex_traits_defaults.hpp6
-rw-r--r--boost/regex/v4/w32_regex_traits.hpp4
-rw-r--r--boost/signals2/detail/foreign_ptr.hpp5
-rw-r--r--boost/signals2/detail/signal_template.hpp2
-rw-r--r--boost/signals2/detail/slot_call_iterator.hpp18
-rw-r--r--boost/signals2/last_value.hpp14
-rw-r--r--boost/signals2/optional_last_value.hpp11
-rw-r--r--boost/signals2/slot_base.hpp2
-rw-r--r--boost/smart_ptr/enable_shared_from_raw.hpp2
-rw-r--r--boost/smart_ptr/intrusive_ptr.hpp26
-rw-r--r--boost/smart_ptr/intrusive_ref_counter.hpp2
-rw-r--r--boost/smart_ptr/shared_ptr.hpp19
-rw-r--r--boost/test/data/for_each_sample.hpp4
-rw-r--r--boost/test/data/test_case.hpp55
-rw-r--r--boost/test/detail/global_typedef.hpp9
-rw-r--r--boost/test/detail/throw_exception.hpp1
-rw-r--r--boost/test/execution_monitor.hpp15
-rw-r--r--boost/test/framework.hpp1
-rw-r--r--boost/test/impl/execution_monitor.ipp30
-rw-r--r--boost/test/impl/framework.ipp242
-rw-r--r--boost/test/impl/junit_log_formatter.ipp627
-rw-r--r--boost/test/impl/results_collector.ipp11
-rw-r--r--boost/test/impl/test_tools.ipp156
-rw-r--r--boost/test/impl/unit_test_log.ipp434
-rw-r--r--boost/test/impl/unit_test_main.ipp4
-rw-r--r--boost/test/impl/unit_test_parameters.ipp56
-rw-r--r--boost/test/included/test_exec_monitor.hpp1
-rw-r--r--boost/test/included/unit_test.hpp2
-rw-r--r--boost/test/output/compiler_log_formatter.hpp8
-rw-r--r--boost/test/output/junit_log_formatter.hpp135
-rw-r--r--boost/test/results_collector.hpp78
-rw-r--r--boost/test/tools/output_test_stream.hpp33
-rw-r--r--boost/test/tree/global_fixture.hpp7
-rw-r--r--boost/test/tree/observer.hpp56
-rw-r--r--boost/test/tree/test_case_counter.hpp8
-rw-r--r--boost/test/unit_test_log.hpp103
-rw-r--r--boost/test/unit_test_log_formatter.hpp122
-rw-r--r--boost/test/unit_test_parameters.hpp32
-rw-r--r--boost/test/utils/algorithm.hpp98
-rw-r--r--boost/test/utils/runtime/argument_factory.hpp2
-rw-r--r--boost/test/utils/runtime/errors.hpp68
-rw-r--r--boost/test/utils/runtime/modifier.hpp13
-rw-r--r--boost/thread/barrier.hpp9
-rw-r--r--boost/thread/completion_latch.hpp1
-rw-r--r--boost/thread/concurrent_queues/queue_views.hpp11
-rw-r--r--boost/thread/concurrent_queues/sync_timed_queue.hpp10
-rw-r--r--boost/thread/detail/config.hpp11
-rw-r--r--boost/thread/executors/generic_executor_ref.hpp8
-rw-r--r--boost/thread/future.hpp77
-rw-r--r--boost/thread/lock_types.hpp18
-rw-r--r--boost/thread/locks.hpp1
-rw-r--r--boost/thread/pthread/condition_variable_fwd.hpp3
-rw-r--r--boost/thread/pthread/shared_mutex.hpp4
-rw-r--r--boost/thread/pthread/thread_data.hpp10
-rw-r--r--boost/thread/thread_functors.hpp2
-rw-r--r--boost/thread/win32/thread_primitives.hpp7
-rw-r--r--boost/type_index.hpp4
-rw-r--r--boost/type_index/ctti_type_index.hpp73
-rw-r--r--boost/type_index/detail/compile_time_type_info.hpp193
-rw-r--r--boost/type_index/type_index_facade.hpp16
-rw-r--r--boost/type_traits/extent.hpp1
-rw-r--r--boost/type_traits/has_nothrow_assign.hpp1
-rw-r--r--boost/type_traits/has_nothrow_constructor.hpp1
-rw-r--r--boost/type_traits/has_nothrow_destructor.hpp2
-rw-r--r--boost/type_traits/has_trivial_assign.hpp1
-rw-r--r--boost/type_traits/has_trivial_copy.hpp1
-rw-r--r--boost/type_traits/has_trivial_move_assign.hpp1
-rw-r--r--boost/type_traits/has_trivial_move_constructor.hpp1
-rw-r--r--boost/type_traits/is_abstract.hpp1
-rw-r--r--boost/type_traits/is_array.hpp2
-rw-r--r--boost/type_traits/is_assignable.hpp1
-rw-r--r--boost/type_traits/is_const.hpp3
-rw-r--r--boost/type_traits/is_default_constructible.hpp1
-rw-r--r--boost/type_traits/is_destructible.hpp1
-rw-r--r--boost/type_traits/is_nothrow_move_constructible.hpp1
-rw-r--r--boost/type_traits/is_pod.hpp1
-rw-r--r--boost/type_traits/is_virtual_base_of.hpp2
-rw-r--r--boost/type_traits/is_volatile.hpp3
-rw-r--r--boost/type_traits/rank.hpp1
-rw-r--r--boost/type_traits/remove_all_extents.hpp2
-rw-r--r--boost/type_traits/remove_const.hpp2
-rw-r--r--boost/type_traits/remove_cv.hpp2
-rw-r--r--boost/type_traits/remove_extent.hpp2
-rw-r--r--boost/type_traits/remove_pointer.hpp2
-rw-r--r--boost/type_traits/remove_volatile.hpp2
-rw-r--r--boost/type_traits/type_with_alignment.hpp2
-rw-r--r--boost/unordered/detail/allocate.hpp224
-rw-r--r--boost/unordered/detail/buckets.hpp227
-rw-r--r--boost/unordered/detail/equivalent.hpp173
-rw-r--r--boost/unordered/detail/map.hpp61
-rw-r--r--boost/unordered/detail/set.hpp57
-rw-r--r--boost/unordered/detail/table.hpp172
-rw-r--r--boost/unordered/detail/unique.hpp210
-rw-r--r--boost/unordered/detail/util.hpp25
-rw-r--r--boost/unordered/unordered_map.hpp4
-rw-r--r--boost/unordered/unordered_set.hpp5
-rw-r--r--boost/utility/base_from_member.hpp13
-rw-r--r--boost/utility/string_ref.hpp50
-rw-r--r--boost/utility/string_view.hpp103
-rw-r--r--boost/uuid/detail/uuid_x86.hpp2
-rw-r--r--boost/uuid/uuid_io.hpp6
-rw-r--r--boost/variant.hpp14
-rw-r--r--boost/variant/apply_visitor.hpp6
-rw-r--r--boost/variant/detail/apply_visitor_binary.hpp16
-rw-r--r--boost/variant/detail/apply_visitor_delayed.hpp10
-rw-r--r--boost/variant/detail/apply_visitor_unary.hpp14
-rw-r--r--boost/variant/detail/backup_holder.hpp4
-rw-r--r--boost/variant/detail/cast_storage.hpp2
-rw-r--r--boost/variant/detail/config.hpp26
-rw-r--r--boost/variant/detail/element_index.hpp12
-rw-r--r--boost/variant/detail/enable_recursive.hpp28
-rw-r--r--boost/variant/detail/enable_recursive_fwd.hpp6
-rw-r--r--boost/variant/detail/forced_return.hpp90
-rw-r--r--boost/variant/detail/generic_result_type.hpp2
-rw-r--r--boost/variant/detail/has_result_type.hpp4
-rw-r--r--boost/variant/detail/initializer.hpp34
-rw-r--r--boost/variant/detail/make_variant_list.hpp8
-rw-r--r--boost/variant/detail/move.hpp8
-rw-r--r--boost/variant/detail/multivisitors_cpp11_based.hpp2
-rw-r--r--boost/variant/detail/over_sequence.hpp2
-rw-r--r--boost/variant/detail/substitute.hpp28
-rw-r--r--boost/variant/detail/substitute_fwd.hpp10
-rw-r--r--boost/variant/detail/variant_io.hpp6
-rw-r--r--boost/variant/detail/visitation_impl.hpp46
-rw-r--r--boost/variant/get.hpp30
-rw-r--r--boost/variant/multivisitors.hpp2
-rw-r--r--boost/variant/polymorphic_get.hpp22
-rw-r--r--boost/variant/recursive_variant.hpp42
-rw-r--r--boost/variant/recursive_wrapper.hpp6
-rw-r--r--boost/variant/recursive_wrapper_fwd.hpp36
-rw-r--r--boost/variant/static_visitor.hpp8
-rw-r--r--boost/variant/variant.hpp325
-rw-r--r--boost/variant/variant_fwd.hpp39
-rw-r--r--boost/variant/visitor_ptr.hpp18
-rw-r--r--boost/version.hpp4
1489 files changed, 81070 insertions, 13294 deletions
diff --git a/boost/algorithm/algorithm.hpp b/boost/algorithm/algorithm.hpp
index 0cf6c4505f..ab0d4aff58 100644
--- a/boost/algorithm/algorithm.hpp
+++ b/boost/algorithm/algorithm.hpp
@@ -17,6 +17,8 @@
#ifndef BOOST_ALGORITHM_HPP
#define BOOST_ALGORITHM_HPP
+#include <functional> // for plus and multiplies
+
#include <boost/utility/enable_if.hpp> // for boost::disable_if
#include <boost/type_traits/is_integral.hpp>
@@ -56,7 +58,7 @@ power (T x, Integer n) {
/// \fn power ( T x, Integer n, Operation op )
/// \return the value "x" raised to the power "n"
-/// using the operaton "op".
+/// using the operation "op".
///
/// \param x The value to be exponentiated
/// \param n The exponent (must be >= 0)
diff --git a/boost/algorithm/cxx11/all_of.hpp b/boost/algorithm/cxx11/all_of.hpp
index 39cab39dd7..8280b18d62 100644
--- a/boost/algorithm/cxx11/all_of.hpp
+++ b/boost/algorithm/cxx11/all_of.hpp
@@ -12,7 +12,6 @@
#ifndef BOOST_ALGORITHM_ALL_OF_HPP
#define BOOST_ALGORITHM_ALL_OF_HPP
-#include <algorithm> // for std::all_of, if available
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -27,8 +26,6 @@ namespace boost { namespace algorithm {
/// \param p A predicate for testing the elements of the sequence
///
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template<typename InputIterator, typename Predicate>
bool all_of ( InputIterator first, InputIterator last, Predicate p )
{
diff --git a/boost/algorithm/cxx11/any_of.hpp b/boost/algorithm/cxx11/any_of.hpp
index cf69348c08..e68135a2b3 100644
--- a/boost/algorithm/cxx11/any_of.hpp
+++ b/boost/algorithm/cxx11/any_of.hpp
@@ -14,7 +14,6 @@
#ifndef BOOST_ALGORITHM_ANY_OF_HPP
#define BOOST_ALGORITHM_ANY_OF_HPP
-#include <algorithm> // for std::any_of, if available
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
diff --git a/boost/algorithm/cxx11/copy_if.hpp b/boost/algorithm/cxx11/copy_if.hpp
index d869cafcd2..73e85d99c6 100644
--- a/boost/algorithm/cxx11/copy_if.hpp
+++ b/boost/algorithm/cxx11/copy_if.hpp
@@ -12,7 +12,7 @@
#ifndef BOOST_ALGORITHM_COPY_IF_HPP
#define BOOST_ALGORITHM_COPY_IF_HPP
-#include <algorithm> // for std::copy_if, if available
+#include <utility> // for std::pair, std::make_pair
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -28,8 +28,6 @@ namespace boost { namespace algorithm {
/// \param result An output iterator to write the results into
/// \param p A predicate for testing the elements of the range
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template<typename InputIterator, typename OutputIterator, typename Predicate>
OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p )
{
diff --git a/boost/algorithm/cxx11/copy_n.hpp b/boost/algorithm/cxx11/copy_n.hpp
index ebfe889ff5..ac880856db 100644
--- a/boost/algorithm/cxx11/copy_n.hpp
+++ b/boost/algorithm/cxx11/copy_n.hpp
@@ -12,8 +12,6 @@
#ifndef BOOST_ALGORITHM_COPY_N_HPP
#define BOOST_ALGORITHM_COPY_N_HPP
-#include <algorithm> // for std::copy_n, if available
-
namespace boost { namespace algorithm {
/// \fn copy_n ( InputIterator first, Size n, OutputIterator result )
@@ -25,8 +23,6 @@ namespace boost { namespace algorithm {
/// \param n The number of elements to copy
/// \param result An output iterator to write the results into
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template <typename InputIterator, typename Size, typename OutputIterator>
OutputIterator copy_n ( InputIterator first, Size n, OutputIterator result )
{
diff --git a/boost/algorithm/cxx11/find_if_not.hpp b/boost/algorithm/cxx11/find_if_not.hpp
index 414697cdd8..02ff4dce7b 100644
--- a/boost/algorithm/cxx11/find_if_not.hpp
+++ b/boost/algorithm/cxx11/find_if_not.hpp
@@ -12,8 +12,6 @@
#ifndef BOOST_ALGORITHM_FIND_IF_NOT_HPP
#define BOOST_ALGORITHM_FIND_IF_NOT_HPP
-#include <algorithm> // for std::find_if_not, if it exists
-
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -27,8 +25,6 @@ namespace boost { namespace algorithm {
/// \param last One past the end of the input sequence
/// \param p A predicate for testing the elements of the range
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template<typename InputIterator, typename Predicate>
InputIterator find_if_not ( InputIterator first, InputIterator last, Predicate p )
{
diff --git a/boost/algorithm/cxx11/iota.hpp b/boost/algorithm/cxx11/iota.hpp
index 2e638ec9e2..675093f02d 100644
--- a/boost/algorithm/cxx11/iota.hpp
+++ b/boost/algorithm/cxx11/iota.hpp
@@ -12,8 +12,6 @@
#ifndef BOOST_ALGORITHM_IOTA_HPP
#define BOOST_ALGORITHM_IOTA_HPP
-#include <numeric>
-
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -26,8 +24,6 @@ namespace boost { namespace algorithm {
/// \param last One past the end of the input sequence
/// \param value The initial value of the sequence to be generated
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template <typename ForwardIterator, typename T>
void iota ( ForwardIterator first, ForwardIterator last, T value )
{
diff --git a/boost/algorithm/cxx11/is_partitioned.hpp b/boost/algorithm/cxx11/is_partitioned.hpp
index cdabd97505..cb6c71e33b 100644
--- a/boost/algorithm/cxx11/is_partitioned.hpp
+++ b/boost/algorithm/cxx11/is_partitioned.hpp
@@ -12,8 +12,6 @@
#ifndef BOOST_ALGORITHM_IS_PARTITIONED_HPP
#define BOOST_ALGORITHM_IS_PARTITIONED_HPP
-#include <algorithm> // for std::is_partitioned, if available
-
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -26,8 +24,6 @@ namespace boost { namespace algorithm {
/// \param last One past the end of the input sequence
/// \param p The predicate to test the values with
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template <typename InputIterator, typename UnaryPredicate>
bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
{
diff --git a/boost/algorithm/cxx11/is_permutation.hpp b/boost/algorithm/cxx11/is_permutation.hpp
index ec902dc49f..0098cd53fe 100644
--- a/boost/algorithm/cxx11/is_permutation.hpp
+++ b/boost/algorithm/cxx11/is_permutation.hpp
@@ -12,8 +12,8 @@
#ifndef BOOST_ALGORITHM_IS_PERMUTATION11_HPP
#define BOOST_ALGORITHM_IS_PERMUTATION11_HPP
-#include <algorithm> // for std::less, tie, mismatch and is_permutation (if available)
-#include <utility> // for std::make_pair
+#include <algorithm> // for std::find_if, count_if, mismatch
+#include <utility> // for std::pair
#include <functional> // for std::equal_to
#include <iterator>
@@ -108,8 +108,6 @@ namespace detail {
/// \param p The predicate to compare elements with
///
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate >
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, BinaryPredicate p )
@@ -135,8 +133,6 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
/// \param last2 One past the end of the input sequence
/// \param first2 The start of the second sequence
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template< class ForwardIterator1, class ForwardIterator2 >
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2 )
{
diff --git a/boost/algorithm/cxx11/is_sorted.hpp b/boost/algorithm/cxx11/is_sorted.hpp
index f6062da6d3..f4dbb38c08 100644
--- a/boost/algorithm/cxx11/is_sorted.hpp
+++ b/boost/algorithm/cxx11/is_sorted.hpp
@@ -13,7 +13,6 @@
#ifndef BOOST_ALGORITHM_ORDERED_HPP
#define BOOST_ALGORITHM_ORDERED_HPP
-#include <algorithm>
#include <functional>
#include <iterator>
diff --git a/boost/algorithm/cxx11/none_of.hpp b/boost/algorithm/cxx11/none_of.hpp
index 67be3d1f73..ba13144fb8 100644
--- a/boost/algorithm/cxx11/none_of.hpp
+++ b/boost/algorithm/cxx11/none_of.hpp
@@ -12,7 +12,6 @@
#ifndef BOOST_ALGORITHM_NONE_OF_HPP
#define BOOST_ALGORITHM_NONE_OF_HPP
-#include <algorithm> // for std::none_of, if available
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -29,9 +28,9 @@ namespace boost { namespace algorithm {
template<typename InputIterator, typename Predicate>
bool none_of ( InputIterator first, InputIterator last, Predicate p )
{
-for ( ; first != last; ++first )
- if ( p(*first))
- return false;
+ for ( ; first != last; ++first )
+ if ( p(*first))
+ return false;
return true;
}
diff --git a/boost/algorithm/cxx11/partition_copy.hpp b/boost/algorithm/cxx11/partition_copy.hpp
index 2d8c3e9bff..f347f2128f 100644
--- a/boost/algorithm/cxx11/partition_copy.hpp
+++ b/boost/algorithm/cxx11/partition_copy.hpp
@@ -12,8 +12,7 @@
#ifndef BOOST_ALGORITHM_PARTITION_COPY_HPP
#define BOOST_ALGORITHM_PARTITION_COPY_HPP
-#include <algorithm> // for std::partition_copy, if available
-#include <utility> // for make_pair
+#include <utility> // for std::pair
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -34,8 +33,6 @@ namespace boost { namespace algorithm {
/// \param p A predicate for dividing the elements of the input sequence.
///
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template <typename InputIterator,
typename OutputIterator1, typename OutputIterator2, typename UnaryPredicate>
std::pair<OutputIterator1, OutputIterator2>
diff --git a/boost/algorithm/cxx11/partition_point.hpp b/boost/algorithm/cxx11/partition_point.hpp
index f1310c38c6..2c2767ae5a 100644
--- a/boost/algorithm/cxx11/partition_point.hpp
+++ b/boost/algorithm/cxx11/partition_point.hpp
@@ -12,7 +12,7 @@
#ifndef BOOST_ALGORITHM_PARTITION_POINT_HPP
#define BOOST_ALGORITHM_PARTITION_POINT_HPP
-#include <algorithm> // for std::partition_point, if available
+#include <iterator> // for std::distance, advance
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@@ -27,8 +27,6 @@ namespace boost { namespace algorithm {
/// \param last One past the end of the input sequence
/// \param p The predicate to test the values with
/// \note This function is part of the C++2011 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template <typename ForwardIterator, typename Predicate>
ForwardIterator partition_point ( ForwardIterator first, ForwardIterator last, Predicate p )
{
diff --git a/boost/algorithm/cxx14/equal.hpp b/boost/algorithm/cxx14/equal.hpp
index cfc62d5f10..f1539f885c 100644
--- a/boost/algorithm/cxx14/equal.hpp
+++ b/boost/algorithm/cxx14/equal.hpp
@@ -13,7 +13,8 @@
#define BOOST_ALGORITHM_EQUAL_HPP
#include <algorithm> // for std::equal
-#include <functional> // for std::equal_to
+#include <functional> // for std::binary_function
+#include <iterator>
namespace boost { namespace algorithm {
diff --git a/boost/algorithm/cxx14/is_permutation.hpp b/boost/algorithm/cxx14/is_permutation.hpp
index 9346881af5..639446bf37 100644
--- a/boost/algorithm/cxx14/is_permutation.hpp
+++ b/boost/algorithm/cxx14/is_permutation.hpp
@@ -12,8 +12,7 @@
#ifndef BOOST_ALGORITHM_IS_PERMUTATION14_HPP
#define BOOST_ALGORITHM_IS_PERMUTATION14_HPP
-#include <algorithm> // for std::less, tie, mismatch and is_permutation (if available)
-#include <utility> // for std::make_pair
+#include <utility> // for std::pair
#include <functional> // for std::equal_to
#include <iterator>
@@ -31,8 +30,6 @@ namespace boost { namespace algorithm {
/// \param first2 The start of the second sequence
/// \param last1 One past the end of the second sequence
/// \note This function is part of the C++2014 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template< class ForwardIterator1, class ForwardIterator2 >
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2 )
@@ -62,8 +59,6 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
/// \param pred The predicate to compare elements with
///
/// \note This function is part of the C++2014 standard library.
-/// We will use the standard one if it is available,
-/// otherwise we have our own implementation.
template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate >
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
diff --git a/boost/algorithm/cxx14/mismatch.hpp b/boost/algorithm/cxx14/mismatch.hpp
index 926ab1944b..c3de418222 100644
--- a/boost/algorithm/cxx14/mismatch.hpp
+++ b/boost/algorithm/cxx14/mismatch.hpp
@@ -12,7 +12,6 @@
#ifndef BOOST_ALGORITHM_MISMATCH_HPP
#define BOOST_ALGORITHM_MISMATCH_HPP
-#include <algorithm> // for std::mismatch
#include <utility> // for std::pair
namespace boost { namespace algorithm {
diff --git a/boost/algorithm/hex.hpp b/boost/algorithm/hex.hpp
index 145a414f00..739e89f2f0 100644
--- a/boost/algorithm/hex.hpp
+++ b/boost/algorithm/hex.hpp
@@ -1,9 +1,9 @@
-/*
+/*
Copyright (c) Marshall Clow 2011-2012.
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
+
Thanks to Nevin for his comments/help.
*/
@@ -13,7 +13,7 @@
*/
/// \file hex.hpp
-/// \brief Convert sequence of integral types into a sequence of hexadecimal
+/// \brief Convert sequence of integral types into a sequence of hexadecimal
/// characters and back. Based on the MySQL functions HEX and UNHEX
/// \author Marshall Clow
@@ -25,7 +25,9 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
-#include <boost/exception/all.hpp>
+#include <boost/exception/exception.hpp>
+#include <boost/exception/info.hpp>
+#include <boost/throw_exception.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_integral.hpp>
@@ -33,17 +35,17 @@
namespace boost { namespace algorithm {
-/*!
- \struct hex_decode_error
- \brief Base exception class for all hex decoding errors
+/*!
+ \struct hex_decode_error
+ \brief Base exception class for all hex decoding errors
*/ /*!
- \struct non_hex_input
+ \struct non_hex_input
\brief Thrown when a non-hex value (0-9, A-F) encountered when decoding.
Contains the offending character
-*/ /*!
- \struct not_enough_input
+*/ /*!
+ \struct not_enough_input
\brief Thrown when the input sequence unexpectedly ends
-
+
*/
struct hex_decode_error : virtual boost::exception, virtual std::exception {};
struct not_enough_input : virtual hex_decode_error {};
@@ -54,12 +56,12 @@ namespace detail {
/// \cond DOXYGEN_HIDE
template <typename T, typename OutputIterator>
- OutputIterator encode_one ( T val, OutputIterator out ) {
+ OutputIterator encode_one ( T val, OutputIterator out, const char * hexDigits ) {
const std::size_t num_hex_digits = 2 * sizeof ( T );
char res [ num_hex_digits ];
char *p = res + num_hex_digits;
for ( std::size_t i = 0; i < num_hex_digits; ++i, val >>= 4 )
- *--p = "0123456789ABCDEF" [ val & 0x0F ];
+ *--p = hexDigits [ val & 0x0F ];
return std::copy ( res, res + num_hex_digits, out );
}
@@ -106,12 +108,12 @@ namespace detail {
typedef T value_type;
};
- template <typename Iterator>
+ template <typename Iterator>
bool iter_end ( Iterator current, Iterator last ) { return current == last; }
-
+
template <typename T>
bool ptr_end ( const T* ptr, const T* /*end*/ ) { return *ptr == '\0'; }
-
+
// What can we assume here about the inputs?
// is std::iterator_traits<InputIterator>::value_type always 'char' ?
// Could it be wchar_t, say? Does it matter?
@@ -124,11 +126,11 @@ namespace detail {
// Need to make sure that we get can read that many chars here.
for ( std::size_t i = 0; i < 2 * sizeof ( T ); ++i, ++first ) {
- if ( pred ( first, last ))
+ if ( pred ( first, last ))
BOOST_THROW_EXCEPTION (not_enough_input ());
res = ( 16 * res ) + hex_char_to_int (*first);
}
-
+
*out = res;
return ++out;
}
@@ -138,7 +140,7 @@ namespace detail {
/// \fn hex ( InputIterator first, InputIterator last, OutputIterator out )
/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters.
-///
+///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param out An output iterator to the results into
@@ -148,14 +150,31 @@ template <typename InputIterator, typename OutputIterator>
typename boost::enable_if<boost::is_integral<typename detail::hex_iterator_traits<InputIterator>::value_type>, OutputIterator>::type
hex ( InputIterator first, InputIterator last, OutputIterator out ) {
for ( ; first != last; ++first )
- out = detail::encode_one ( *first, out );
+ out = detail::encode_one ( *first, out, "0123456789ABCDEF" );
+ return out;
+ }
+
+
+/// \fn hex_lower ( InputIterator first, InputIterator last, OutputIterator out )
+/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
+///
+/// \param first The start of the input sequence
+/// \param last One past the end of the input sequence
+/// \param out An output iterator to the results into
+/// \return The updated output iterator
+/// \note Based on the MySQL function of the same name
+template <typename InputIterator, typename OutputIterator>
+typename boost::enable_if<boost::is_integral<typename detail::hex_iterator_traits<InputIterator>::value_type>, OutputIterator>::type
+hex_lower ( InputIterator first, InputIterator last, OutputIterator out ) {
+ for ( ; first != last; ++first )
+ out = detail::encode_one ( *first, out, "0123456789abcdef" );
return out;
}
-
+
/// \fn hex ( const T *ptr, OutputIterator out )
/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters.
-///
+///
/// \param ptr A pointer to a 0-terminated sequence of data.
/// \param out An output iterator to the results into
/// \return The updated output iterator
@@ -164,13 +183,30 @@ template <typename T, typename OutputIterator>
typename boost::enable_if<boost::is_integral<T>, OutputIterator>::type
hex ( const T *ptr, OutputIterator out ) {
while ( *ptr )
- out = detail::encode_one ( *ptr++, out );
+ out = detail::encode_one ( *ptr++, out, "0123456789ABCDEF" );
+ return out;
+ }
+
+
+/// \fn hex_lower ( const T *ptr, OutputIterator out )
+/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
+///
+/// \param ptr A pointer to a 0-terminated sequence of data.
+/// \param out An output iterator to the results into
+/// \return The updated output iterator
+/// \note Based on the MySQL function of the same name
+template <typename T, typename OutputIterator>
+typename boost::enable_if<boost::is_integral<T>, OutputIterator>::type
+hex_lower ( const T *ptr, OutputIterator out ) {
+ while ( *ptr )
+ out = detail::encode_one ( *ptr++, out, "0123456789abcdef" );
return out;
}
+
/// \fn hex ( const Range &r, OutputIterator out )
/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters.
-///
+///
/// \param r The input range
/// \param out An output iterator to the results into
/// \return The updated output iterator
@@ -182,9 +218,23 @@ hex ( const Range &r, OutputIterator out ) {
}
+/// \fn hex_lower ( const Range &r, OutputIterator out )
+/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
+///
+/// \param r The input range
+/// \param out An output iterator to the results into
+/// \return The updated output iterator
+/// \note Based on the MySQL function of the same name
+template <typename Range, typename OutputIterator>
+typename boost::enable_if<boost::is_integral<typename detail::hex_iterator_traits<typename Range::iterator>::value_type>, OutputIterator>::type
+hex_lower ( const Range &r, OutputIterator out ) {
+ return hex_lower (boost::begin(r), boost::end(r), out);
+}
+
+
/// \fn unhex ( InputIterator first, InputIterator last, OutputIterator out )
/// \brief Converts a sequence of hexadecimal characters into a sequence of integers.
-///
+///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param out An output iterator to the results into
@@ -200,7 +250,7 @@ OutputIterator unhex ( InputIterator first, InputIterator last, OutputIterator o
/// \fn unhex ( const T *ptr, OutputIterator out )
/// \brief Converts a sequence of hexadecimal characters into a sequence of integers.
-///
+///
/// \param ptr A pointer to a null-terminated input sequence.
/// \param out An output iterator to the results into
/// \return The updated output iterator
@@ -218,7 +268,7 @@ OutputIterator unhex ( const T *ptr, OutputIterator out ) {
/// \fn OutputIterator unhex ( const Range &r, OutputIterator out )
/// \brief Converts a sequence of hexadecimal characters into a sequence of integers.
-///
+///
/// \param r The input range
/// \param out An output iterator to the results into
/// \return The updated output iterator
@@ -231,7 +281,7 @@ OutputIterator unhex ( const Range &r, OutputIterator out ) {
/// \fn String hex ( const String &input )
/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters.
-///
+///
/// \param input A container to be converted
/// \return A container with the encoded text
template<typename String>
@@ -242,9 +292,24 @@ String hex ( const String &input ) {
return output;
}
+
+/// \fn String hex_lower ( const String &input )
+/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters.
+///
+/// \param input A container to be converted
+/// \return A container with the encoded text
+template<typename String>
+String hex_lower ( const String &input ) {
+ String output;
+ output.reserve (input.size () * (2 * sizeof (typename String::value_type)));
+ (void) hex_lower (input, std::back_inserter (output));
+ return output;
+ }
+
+
/// \fn String unhex ( const String &input )
/// \brief Converts a sequence of hexadecimal characters into a sequence of characters.
-///
+///
/// \param input A container to be converted
/// \return A container with the decoded text
template<typename String>
diff --git a/boost/algorithm/is_palindrome.hpp b/boost/algorithm/is_palindrome.hpp
new file mode 100644
index 0000000000..cc63e18075
--- /dev/null
+++ b/boost/algorithm/is_palindrome.hpp
@@ -0,0 +1,161 @@
+/*
+ Copyright (c) Alexander Zaitsev <zamazan4ik@gmail.com>, 2016
+
+ Distributed under the 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 latest version.
+*/
+
+/// \file is_palindrome.hpp
+/// \brief Checks the input sequence on palindrome.
+/// \author Alexander Zaitsev
+
+#ifndef BOOST_ALGORITHM_IS_PALINDROME_HPP
+#define BOOST_ALGORITHM_IS_PALINDROME_HPP
+
+#include <iterator>
+#include <functional>
+#include <cstring>
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost { namespace algorithm {
+
+/// \fn is_palindrome ( BidirectionalIterator begin, BidirectionalIterator end, Predicate p )
+/// \return true if the entire sequence is palindrome
+///
+/// \param begin The start of the input sequence
+/// \param end One past the end of the input sequence
+/// \param p A predicate used to compare the values.
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+template <typename BidirectionalIterator, typename Predicate>
+bool is_palindrome(BidirectionalIterator begin, BidirectionalIterator end, Predicate p )
+{
+ if(begin == end)
+ {
+ return true;
+ }
+
+ --end;
+ while(begin != end)
+ {
+ if(!p(*begin, *end))
+ {
+ return false;
+ }
+ ++begin;
+ if(begin == end)
+ {
+ break;
+ }
+ --end;
+ }
+ return true;
+}
+
+/// \fn is_palindrome ( BidirectionalIterator begin, BidirectionalIterator end )
+/// \return true if the entire sequence is palindrome
+///
+/// \param begin The start of the input sequence
+/// \param end One past the end of the input sequence
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+template <typename BidirectionalIterator>
+bool is_palindrome(BidirectionalIterator begin, BidirectionalIterator end)
+{
+ if(begin == end)
+ {
+ return true;
+ }
+
+ --end;
+ while(begin != end)
+ {
+ if(!(*begin == *end))
+ {
+ return false;
+ }
+ ++begin;
+ if(begin == end)
+ {
+ break;
+ }
+ --end;
+ }
+ return true;
+}
+
+/// \fn is_palindrome ( const R& range )
+/// \return true if the entire sequence is palindrome
+///
+/// \param range The range to be tested.
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+template <typename R>
+bool is_palindrome(const R& range)
+{
+ return is_palindrome(boost::begin(range), boost::end(range));
+}
+
+/// \fn is_palindrome ( const R& range, Predicate p )
+/// \return true if the entire sequence is palindrome
+///
+/// \param range The range to be tested.
+/// \param p A predicate used to compare the values.
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+template <typename R, typename Predicate>
+bool is_palindrome(const R& range, Predicate p)
+{
+ return is_palindrome(boost::begin(range), boost::end(range), p);
+}
+
+
+/// \fn is_palindrome ( const char* str )
+/// \return true if the entire sequence is palindrome
+///
+/// \param str C-string to be tested.
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+bool is_palindrome(const char* str)
+{
+ if(!str)
+ return true;
+ return is_palindrome(str, str + strlen(str));
+}
+
+
+/// \fn is_palindrome ( const char* str, Predicate p )
+/// \return true if the entire sequence is palindrome
+///
+/// \param str C-string to be tested.
+/// \param p A predicate used to compare the values.
+///
+/// \note This function will return true for empty sequences and for palindromes.
+/// For other sequences function will return false.
+/// Complexity: O(N).
+template<typename Predicate>
+bool is_palindrome(const char* str, Predicate p)
+{
+ if(!str)
+ return true;
+ return is_palindrome(str, str + strlen(str), p);
+}
+
+}}
+
+#endif // BOOST_ALGORITHM_IS_PALINDROME_HPP
diff --git a/boost/algorithm/searching/boyer_moore.hpp b/boost/algorithm/searching/boyer_moore.hpp
index c5fe9fa255..65a809dd4f 100644
--- a/boost/algorithm/searching/boyer_moore.hpp
+++ b/boost/algorithm/searching/boyer_moore.hpp
@@ -75,25 +75,27 @@ Requirements:
/// \param corpus_last One past the end of the data to search
///
template <typename corpusIter>
- corpusIter operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
+ std::pair<corpusIter, corpusIter>
+ operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
BOOST_STATIC_ASSERT (( boost::is_same<
typename std::iterator_traits<patIter>::value_type,
typename std::iterator_traits<corpusIter>::value_type>::value ));
- if ( corpus_first == corpus_last ) return corpus_last; // if nothing to search, we didn't find it!
- if ( pat_first == pat_last ) return corpus_first; // empty pattern matches at start
+ if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it!
+ if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start
const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last );
// If the pattern is larger than the corpus, we can't find it!
if ( k_corpus_length < k_pattern_length )
- return corpus_last;
+ return std::make_pair(corpus_last, corpus_last);
// Do the search
- return this->do_search ( corpus_first, corpus_last );
+ return this->do_search ( corpus_first, corpus_last );
}
template <typename Range>
- typename boost::range_iterator<Range>::type operator () ( Range &r ) const {
+ std::pair<typename boost::range_iterator<Range>::type, typename boost::range_iterator<Range>::type>
+ operator () ( Range &r ) const {
return (*this) (boost::begin(r), boost::end(r));
}
@@ -112,7 +114,8 @@ Requirements:
/// \param p A predicate used for the search comparisons.
///
template <typename corpusIter>
- corpusIter do_search ( corpusIter corpus_first, corpusIter corpus_last ) const {
+ std::pair<corpusIter, corpusIter>
+ do_search ( corpusIter corpus_first, corpusIter corpus_last ) const {
/* ---- Do the matching ---- */
corpusIter curPos = corpus_first;
const corpusIter lastPos = corpus_last - k_pattern_length;
@@ -126,7 +129,7 @@ Requirements:
j--;
// We matched - we're done!
if ( j == 0 )
- return curPos;
+ return std::make_pair(curPos, curPos + k_pattern_length);
}
// Since we didn't match, figure out how far to skip forward
@@ -138,7 +141,7 @@ Requirements:
curPos += suffix_ [ j ];
}
- return corpus_last; // We didn't find anything
+ return std::make_pair(corpus_last, corpus_last); // We didn't find anything
}
@@ -211,7 +214,7 @@ Requirements:
/// \param pat_last One past the end of the data to search for
///
template <typename patIter, typename corpusIter>
- corpusIter boyer_moore_search (
+ std::pair<corpusIter, corpusIter> boyer_moore_search (
corpusIter corpus_first, corpusIter corpus_last,
patIter pat_first, patIter pat_last )
{
@@ -220,7 +223,7 @@ Requirements:
}
template <typename PatternRange, typename corpusIter>
- corpusIter boyer_moore_search (
+ std::pair<corpusIter, corpusIter> boyer_moore_search (
corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
@@ -229,8 +232,9 @@ Requirements:
}
template <typename patIter, typename CorpusRange>
- typename boost::lazy_disable_if_c<
- boost::is_same<CorpusRange, patIter>::value, typename boost::range_iterator<CorpusRange> >
+ typename boost::disable_if_c<
+ boost::is_same<CorpusRange, patIter>::value,
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type> >
::type
boyer_moore_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last )
{
@@ -239,7 +243,7 @@ Requirements:
}
template <typename PatternRange, typename CorpusRange>
- typename boost::range_iterator<CorpusRange>::type
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type>
boyer_moore_search ( CorpusRange &corpus, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
diff --git a/boost/algorithm/searching/boyer_moore_horspool.hpp b/boost/algorithm/searching/boyer_moore_horspool.hpp
index 758ded206b..aacb5cb833 100644
--- a/boost/algorithm/searching/boyer_moore_horspool.hpp
+++ b/boost/algorithm/searching/boyer_moore_horspool.hpp
@@ -64,33 +64,34 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
~boyer_moore_horspool () {}
- /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p )
+ /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last)
/// \brief Searches the corpus for the pattern that was passed into the constructor
///
/// \param corpus_first The start of the data to search (Random Access Iterator)
/// \param corpus_last One past the end of the data to search
- /// \param p A predicate used for the search comparisons.
///
template <typename corpusIter>
- corpusIter operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
+ std::pair<corpusIter, corpusIter>
+ operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
BOOST_STATIC_ASSERT (( boost::is_same<
typename std::iterator_traits<patIter>::value_type,
typename std::iterator_traits<corpusIter>::value_type>::value ));
- if ( corpus_first == corpus_last ) return corpus_last; // if nothing to search, we didn't find it!
- if ( pat_first == pat_last ) return corpus_first; // empty pattern matches at start
+ if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it!
+ if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start
const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last );
// If the pattern is larger than the corpus, we can't find it!
if ( k_corpus_length < k_pattern_length )
- return corpus_last;
+ return std::make_pair(corpus_last, corpus_last);
// Do the search
return this->do_search ( corpus_first, corpus_last );
}
template <typename Range>
- typename boost::range_iterator<Range>::type operator () ( Range &r ) const {
+ std::pair<typename boost::range_iterator<Range>::type, typename boost::range_iterator<Range>::type>
+ operator () ( Range &r ) const {
return (*this) (boost::begin(r), boost::end(r));
}
@@ -108,7 +109,8 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
/// \param k_corpus_length The length of the corpus to search
///
template <typename corpusIter>
- corpusIter do_search ( corpusIter corpus_first, corpusIter corpus_last ) const {
+ std::pair<corpusIter, corpusIter>
+ do_search ( corpusIter corpus_first, corpusIter corpus_last ) const {
corpusIter curPos = corpus_first;
const corpusIter lastPos = corpus_last - k_pattern_length;
while ( curPos <= lastPos ) {
@@ -117,14 +119,14 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
while ( pat_first [j] == curPos [j] ) {
// We matched - we're done!
if ( j == 0 )
- return curPos;
+ return std::make_pair(curPos, curPos + k_pattern_length);
j--;
}
curPos += skip_ [ curPos [ k_pattern_length - 1 ]];
}
- return corpus_last;
+ return std::make_pair(corpus_last, corpus_last);
}
// \endcond
};
@@ -142,7 +144,7 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
/// \param pat_last One past the end of the data to search for
///
template <typename patIter, typename corpusIter>
- corpusIter boyer_moore_horspool_search (
+ std::pair<corpusIter, corpusIter> boyer_moore_horspool_search (
corpusIter corpus_first, corpusIter corpus_last,
patIter pat_first, patIter pat_last )
{
@@ -151,7 +153,7 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
}
template <typename PatternRange, typename corpusIter>
- corpusIter boyer_moore_horspool_search (
+ std::pair<corpusIter, corpusIter> boyer_moore_horspool_search (
corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
@@ -160,8 +162,9 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
}
template <typename patIter, typename CorpusRange>
- typename boost::lazy_disable_if_c<
- boost::is_same<CorpusRange, patIter>::value, typename boost::range_iterator<CorpusRange> >
+ typename boost::disable_if_c<
+ boost::is_same<CorpusRange, patIter>::value,
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type> >
::type
boyer_moore_horspool_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last )
{
@@ -170,7 +173,7 @@ http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html
}
template <typename PatternRange, typename CorpusRange>
- typename boost::range_iterator<CorpusRange>::type
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type>
boyer_moore_horspool_search ( CorpusRange &corpus, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
diff --git a/boost/algorithm/searching/detail/bm_traits.hpp b/boost/algorithm/searching/detail/bm_traits.hpp
index b39e5391c0..12143636be 100644
--- a/boost/algorithm/searching/detail/bm_traits.hpp
+++ b/boost/algorithm/searching/detail/bm_traits.hpp
@@ -79,7 +79,7 @@ namespace boost { namespace algorithm { namespace detail {
skip_map skip_;
const value_type k_default_value;
public:
- skip_table ( std::size_t patSize, value_type default_value ) : k_default_value ( default_value ) {
+ skip_table ( std::size_t /*patSize*/, value_type default_value ) : k_default_value ( default_value ) {
std::fill_n ( skip_.begin(), skip_.size(), default_value );
}
diff --git a/boost/algorithm/searching/knuth_morris_pratt.hpp b/boost/algorithm/searching/knuth_morris_pratt.hpp
index aaeeb51ccb..c890c9cac0 100644
--- a/boost/algorithm/searching/knuth_morris_pratt.hpp
+++ b/boost/algorithm/searching/knuth_morris_pratt.hpp
@@ -69,23 +69,26 @@ namespace boost { namespace algorithm {
/// \param p A predicate used for the search comparisons.
///
template <typename corpusIter>
- corpusIter operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
+ std::pair<corpusIter, corpusIter>
+ operator () ( corpusIter corpus_first, corpusIter corpus_last ) const {
BOOST_STATIC_ASSERT (( boost::is_same<
typename std::iterator_traits<patIter>::value_type,
typename std::iterator_traits<corpusIter>::value_type>::value ));
- if ( corpus_first == corpus_last ) return corpus_last; // if nothing to search, we didn't find it!
- if ( pat_first == pat_last ) return corpus_first; // empty pattern matches at start
+
+ if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it!
+ if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start
const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last );
// If the pattern is larger than the corpus, we can't find it!
if ( k_corpus_length < k_pattern_length )
- return corpus_last;
+ return std::make_pair(corpus_last, corpus_last);
- return do_search ( corpus_first, corpus_last, k_corpus_length );
+ return do_search ( corpus_first, corpus_last, k_corpus_length );
}
template <typename Range>
- typename boost::range_iterator<Range>::type operator () ( Range &r ) const {
+ std::pair<typename boost::range_iterator<Range>::type, typename boost::range_iterator<Range>::type>
+ operator () ( Range &r ) const {
return (*this) (boost::begin(r), boost::end(r));
}
@@ -103,7 +106,8 @@ namespace boost { namespace algorithm {
/// \param p A predicate used for the search comparisons.
///
template <typename corpusIter>
- corpusIter do_search ( corpusIter corpus_first, corpusIter corpus_last,
+ std::pair<corpusIter, corpusIter>
+ do_search ( corpusIter corpus_first, corpusIter corpus_last,
difference_type k_corpus_length ) const {
difference_type match_start = 0; // position in the corpus that we're matching
@@ -135,7 +139,7 @@ namespace boost { namespace algorithm {
while ( match_start <= last_match ) {
while ( pat_first [ idx ] == corpus_first [ match_start + idx ] ) {
if ( ++idx == k_pattern_length )
- return corpus_first + match_start;
+ return std::make_pair(corpus_first + match_start, corpus_first + match_start + k_pattern_length);
}
// Figure out where to start searching again
// assert ( idx - skip_ [ idx ] > 0 ); // we're always moving forward
@@ -146,7 +150,7 @@ namespace boost { namespace algorithm {
#endif
// We didn't find anything
- return corpus_last;
+ return std::make_pair(corpus_last, corpus_last);
}
@@ -202,7 +206,7 @@ namespace boost { namespace algorithm {
/// \param pat_last One past the end of the data to search for
///
template <typename patIter, typename corpusIter>
- corpusIter knuth_morris_pratt_search (
+ std::pair<corpusIter, corpusIter> knuth_morris_pratt_search (
corpusIter corpus_first, corpusIter corpus_last,
patIter pat_first, patIter pat_last )
{
@@ -211,7 +215,7 @@ namespace boost { namespace algorithm {
}
template <typename PatternRange, typename corpusIter>
- corpusIter knuth_morris_pratt_search (
+ std::pair<corpusIter, corpusIter> knuth_morris_pratt_search (
corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
@@ -220,8 +224,9 @@ namespace boost { namespace algorithm {
}
template <typename patIter, typename CorpusRange>
- typename boost::lazy_disable_if_c<
- boost::is_same<CorpusRange, patIter>::value, typename boost::range_iterator<CorpusRange> >
+ typename boost::disable_if_c<
+ boost::is_same<CorpusRange, patIter>::value,
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type> >
::type
knuth_morris_pratt_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last )
{
@@ -230,7 +235,7 @@ namespace boost { namespace algorithm {
}
template <typename PatternRange, typename CorpusRange>
- typename boost::range_iterator<CorpusRange>::type
+ std::pair<typename boost::range_iterator<CorpusRange>::type, typename boost::range_iterator<CorpusRange>::type>
knuth_morris_pratt_search ( CorpusRange &corpus, const PatternRange &pattern )
{
typedef typename boost::range_iterator<const PatternRange>::type pattern_iterator;
diff --git a/boost/algorithm/sort_subrange.hpp b/boost/algorithm/sort_subrange.hpp
new file mode 100644
index 0000000000..7fb2cb55d0
--- /dev/null
+++ b/boost/algorithm/sort_subrange.hpp
@@ -0,0 +1,109 @@
+/*
+ Copyright (c) Marshall Clow 2008-2012.
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ Revision history:
+ 28 Sep 2015 mtc First version
+
+*/
+
+/// \file sort_subrange.hpp
+/// \brief Sort a subrange
+/// \author Marshall Clow
+///
+/// Suggested by Sean Parent in his CppCon 2015 keynote
+
+#ifndef BOOST_ALGORITHM_SORT_SUBRANGE_HPP
+#define BOOST_ALGORITHM_SORT_SUBRANGE_HPP
+
+#include <functional> // For std::less
+#include <iterator> // For std::iterator_traits
+#include <algorithm> // For nth_element and partial_sort
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost { namespace algorithm {
+
+/// \fn sort_subrange ( T const& val,
+/// Iterator first, Iterator last,
+/// Iterator sub_first, Iterator sub_last,
+/// Pred p )
+/// \brief Sort the subrange [sub_first, sub_last) that is inside
+/// the range [first, last) as if you had sorted the entire range.
+///
+/// \param first The start of the larger range
+/// \param last The end of the larger range
+/// \param sub_first The start of the sub range
+/// \param sub_last The end of the sub range
+/// \param p A predicate to use to compare the values.
+/// p ( a, b ) returns a boolean.
+///
+ template<typename Iterator, typename Pred>
+ void sort_subrange (
+ Iterator first, Iterator last,
+ Iterator sub_first, Iterator sub_last,
+ Pred p)
+ {
+ if (sub_first == sub_last) return; // the empty sub-range is already sorted.
+
+ if (sub_first != first) { // sub-range is at the start, don't need to partition
+ (void) std::nth_element(first, sub_first, last, p);
+ ++sub_first;
+ }
+ std::partial_sort(sub_first, sub_last, last, p);
+ }
+
+
+
+ template<typename Iterator>
+ void sort_subrange (Iterator first, Iterator last, Iterator sub_first, Iterator sub_last)
+ {
+ typedef typename std::iterator_traits<Iterator>::value_type value_type;
+ return sort_subrange(first, last, sub_first, sub_last, std::less<value_type>());
+ }
+
+/// range versions?
+
+
+/// \fn partition_subrange ( T const& val,
+/// Iterator first, Iterator last,
+/// Iterator sub_first, Iterator sub_last,
+/// Pred p )
+/// \brief Gather the elements of the subrange [sub_first, sub_last) that is
+/// inside the range [first, last) as if you had sorted the entire range.
+///
+/// \param first The start of the larger range
+/// \param last The end of the larger range
+/// \param sub_first The start of the sub range
+/// \param sub_last The end of the sub range
+/// \param p A predicate to use to compare the values.
+/// p ( a, b ) returns a boolean.
+///
+ template<typename Iterator, typename Pred>
+ void partition_subrange (
+ Iterator first, Iterator last,
+ Iterator sub_first, Iterator sub_last,
+ Pred p)
+ {
+ if (sub_first != first) {
+ (void) std::nth_element(first, sub_first, last, p);
+ ++sub_first;
+ }
+
+ if (sub_last != last)
+ (void) std::nth_element(sub_first, sub_last, last, p);
+ }
+
+ template<typename Iterator>
+ void partition_subrange (Iterator first, Iterator last, Iterator sub_first, Iterator sub_last)
+ {
+ typedef typename std::iterator_traits<Iterator>::value_type value_type;
+ return partition_subrange(first, last, sub_first, sub_last, std::less<value_type>());
+ }
+
+}}
+
+#endif // BOOST_ALGORITHM_SORT_SUBRANGE_HPP
diff --git a/boost/algorithm/string/replace.hpp b/boost/algorithm/string/replace.hpp
index 0c04e47e1e..2adb031c59 100644
--- a/boost/algorithm/string/replace.hpp
+++ b/boost/algorithm/string/replace.hpp
@@ -401,7 +401,6 @@ namespace boost {
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
- \return A reference to the modified input
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void ireplace_last(
@@ -643,7 +642,6 @@ namespace boost {
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
- \return A reference to the modified input
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void replace_all(
diff --git a/boost/align/aligned_allocator.hpp b/boost/align/aligned_allocator.hpp
index 83af070c7a..b70ed54230 100644
--- a/boost/align/aligned_allocator.hpp
+++ b/boost/align/aligned_allocator.hpp
@@ -58,14 +58,12 @@ public:
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
aligned_allocator() = default;
#else
- aligned_allocator() BOOST_NOEXCEPT {
- }
+ aligned_allocator() BOOST_NOEXCEPT { }
#endif
template<class U>
aligned_allocator(const aligned_allocator<U, Alignment>&)
- BOOST_NOEXCEPT {
- }
+ BOOST_NOEXCEPT { }
pointer address(reference value) const BOOST_NOEXCEPT {
return detail::addressof(value);
@@ -80,14 +78,14 @@ public:
if (size > 0) {
p = aligned_alloc(min_align, sizeof(T) * size);
if (!p) {
- ::boost::throw_exception(std::bad_alloc());
+ boost::throw_exception(std::bad_alloc());
}
}
return static_cast<T*>(p);
}
void deallocate(pointer ptr, size_type) {
- ::boost::alignment::aligned_free(ptr);
+ boost::alignment::aligned_free(ptr);
}
BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT {
@@ -98,24 +96,24 @@ public:
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
void construct(U* ptr, Args&&... args) {
- ::new(static_cast<void*>(ptr)) U(std::forward<Args>(args)...);
+ ::new((void*)ptr) U(std::forward<Args>(args)...);
}
#else
template<class U, class V>
void construct(U* ptr, V&& value) {
- ::new(static_cast<void*>(ptr)) U(std::forward<V>(value));
+ ::new((void*)ptr) U(std::forward<V>(value));
}
#endif
#else
template<class U, class V>
void construct(U* ptr, const V& value) {
- ::new(static_cast<void*>(ptr)) U(value);
+ ::new((void*)ptr) U(value);
}
#endif
template<class U>
void construct(U* ptr) {
- ::new(static_cast<void*>(ptr)) U();
+ ::new((void*)ptr) U();
}
template<class U>
diff --git a/boost/align/aligned_allocator_adaptor.hpp b/boost/align/aligned_allocator_adaptor.hpp
index 29d13874ad..b6ddd9c369 100644
--- a/boost/align/aligned_allocator_adaptor.hpp
+++ b/boost/align/aligned_allocator_adaptor.hpp
@@ -1,5 +1,5 @@
/*
-(c) 2014-2015 Glen Joseph Fernandes
+(c) 2014-2016 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
Distributed under the Boost Software
@@ -90,28 +90,23 @@ public:
aligned_allocator_adaptor() = default;
#else
aligned_allocator_adaptor()
- : Allocator() {
- }
+ : Allocator() { }
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class A>
explicit aligned_allocator_adaptor(A&& alloc) BOOST_NOEXCEPT
- : Allocator(std::forward<A>(alloc)) {
- }
+ : Allocator(std::forward<A>(alloc)) { }
#else
template<class A>
- explicit aligned_allocator_adaptor(const A& alloc)
- BOOST_NOEXCEPT
- : Allocator(alloc) {
- }
+ explicit aligned_allocator_adaptor(const A& alloc) BOOST_NOEXCEPT
+ : Allocator(alloc) { }
#endif
template<class U>
aligned_allocator_adaptor(const aligned_allocator_adaptor<U,
Alignment>& other) BOOST_NOEXCEPT
- : Allocator(other.base()) {
- }
+ : Allocator(other.base()) { }
Allocator& base() BOOST_NOEXCEPT {
return static_cast<Allocator&>(*this);
@@ -128,8 +123,7 @@ public:
char_ptr p = a.allocate(sizeof p + n);
void* r = detail::addressof(*p) + sizeof p;
(void)align(min_align, s, r, n);
- ::new(static_cast<void*>(static_cast<char_ptr*>(r) -
- 1)) char_ptr(p);
+ ::new((void*)(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
return static_cast<pointer>(r);
}
@@ -148,13 +142,12 @@ public:
#endif
void* r = detail::addressof(*p) + sizeof p;
(void)align(min_align, s, r, n);
- ::new(static_cast<void*>(static_cast<char_ptr*>(r) -
- 1)) char_ptr(p);
+ ::new((void*)(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
return static_cast<pointer>(r);
}
void deallocate(pointer ptr, size_type size) {
- char_ptr* p = reinterpret_cast<char_ptr*>(ptr) - 1;
+ char_ptr* p = (char_ptr*)ptr - 1;
char_ptr r = *p;
p->~char_ptr();
char_alloc a(base());
diff --git a/boost/align/aligned_delete.hpp b/boost/align/aligned_delete.hpp
index 6db2bd80d0..97b1c4b6ad 100644
--- a/boost/align/aligned_delete.hpp
+++ b/boost/align/aligned_delete.hpp
@@ -21,7 +21,7 @@ struct aligned_delete {
BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) {
if (ptr) {
ptr->~T();
- ::boost::alignment::aligned_free(ptr);
+ boost::alignment::aligned_free(ptr);
}
}
};
diff --git a/boost/align/alignment_of.hpp b/boost/align/alignment_of.hpp
index fee91838af..3dd2eb5b41 100644
--- a/boost/align/alignment_of.hpp
+++ b/boost/align/alignment_of.hpp
@@ -1,5 +1,5 @@
/*
-(c) 2014-2015 Glen Joseph Fernandes
+(c) 2014-2016 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
Distributed under the Boost Software
@@ -39,9 +39,7 @@ namespace alignment {
template<class T>
struct alignment_of
- : detail::alignment_of<typename
- detail::element_type<T>::type>::type {
-};
+ : detail::alignment_of<typename detail::element_type<T>::type> { };
#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
template<class T>
diff --git a/boost/align/detail/align.hpp b/boost/align/detail/align.hpp
index 0828c58365..77055e0328 100644
--- a/boost/align/detail/align.hpp
+++ b/boost/align/detail/align.hpp
@@ -1,5 +1,5 @@
/*
-(c) 2014 Glen Joseph Fernandes
+(c) 2014-2016 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
Distributed under the Boost Software
@@ -20,12 +20,12 @@ inline void* align(std::size_t alignment, std::size_t size,
{
BOOST_ASSERT(detail::is_alignment(alignment));
if (size <= space) {
- char* p = reinterpret_cast<char*>((reinterpret_cast<std::
- size_t>(ptr) + alignment - 1) & ~(alignment - 1));
- std::ptrdiff_t n = p - static_cast<char*>(ptr);
- if (size <= space - n) {
+ char* p = (char*)(((std::size_t)ptr + alignment - 1) &
+ ~(alignment - 1));
+ std::size_t n = space - (p - static_cast<char*>(ptr));
+ if (size <= n) {
ptr = p;
- space -= n;
+ space = n;
return p;
}
}
diff --git a/boost/align/detail/align_down.hpp b/boost/align/detail/align_down.hpp
index a7a72efaf9..97e1c1d3eb 100644
--- a/boost/align/detail/align_down.hpp
+++ b/boost/align/detail/align_down.hpp
@@ -19,8 +19,7 @@ namespace alignment {
inline void* align_down(void* ptr, std::size_t alignment) BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- return reinterpret_cast<void*>(align_down(reinterpret_cast<std::
- size_t>(ptr), alignment));
+ return (void*)(align_down((std::size_t)ptr, alignment));
}
} /* .alignment */
diff --git a/boost/align/detail/align_up.hpp b/boost/align/detail/align_up.hpp
index d52e0993ce..e956f7a046 100644
--- a/boost/align/detail/align_up.hpp
+++ b/boost/align/detail/align_up.hpp
@@ -19,8 +19,7 @@ namespace alignment {
inline void* align_up(void* ptr, std::size_t alignment) BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- return reinterpret_cast<void*>(align_up(reinterpret_cast<std::
- size_t>(ptr), alignment));
+ return (void*)(align_up((std::size_t)ptr, alignment));
}
} /* .alignment */
diff --git a/boost/align/detail/alignment_of.hpp b/boost/align/detail/alignment_of.hpp
index 2a630e9784..f3f6192899 100644
--- a/boost/align/detail/alignment_of.hpp
+++ b/boost/align/detail/alignment_of.hpp
@@ -23,9 +23,7 @@ struct alignof_helper {
template<class T>
struct alignment_of
- : min_size<sizeof(T),
- sizeof(alignof_helper<T>) - sizeof(T)>::type {
-};
+ : min_size<sizeof(T), sizeof(alignof_helper<T>) - sizeof(T)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/alignment_of_clang.hpp b/boost/align/detail/alignment_of_clang.hpp
index a8e2a349d6..f550156d73 100644
--- a/boost/align/detail/alignment_of_clang.hpp
+++ b/boost/align/detail/alignment_of_clang.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<class T>
struct alignment_of
- : integral_constant<std::size_t, __alignof(T)> {
-};
+ : integral_constant<std::size_t, __alignof(T)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/alignment_of_codegear.hpp b/boost/align/detail/alignment_of_codegear.hpp
index 8875e6c424..8948309d88 100644
--- a/boost/align/detail/alignment_of_codegear.hpp
+++ b/boost/align/detail/alignment_of_codegear.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<class T>
struct alignment_of
- : integral_constant<std::size_t, alignof(T)> {
-};
+ : integral_constant<std::size_t, alignof(T)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/alignment_of_gcc.hpp b/boost/align/detail/alignment_of_gcc.hpp
index 0812fde8e4..ffd8294fe3 100644
--- a/boost/align/detail/alignment_of_gcc.hpp
+++ b/boost/align/detail/alignment_of_gcc.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<class T>
struct alignment_of
- : integral_constant<std::size_t, __alignof__(T)> {
-};
+ : integral_constant<std::size_t, __alignof__(T)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/alignment_of_msvc.hpp b/boost/align/detail/alignment_of_msvc.hpp
index df6912f411..cdd7c477ce 100644
--- a/boost/align/detail/alignment_of_msvc.hpp
+++ b/boost/align/detail/alignment_of_msvc.hpp
@@ -25,8 +25,7 @@ struct alignof_helper {
template<class T>
struct alignment_of
: min_size<sizeof(T),
- sizeof(alignof_helper<T>) - (sizeof(T) << 1)>::type {
-};
+ sizeof(alignof_helper<T>) - (sizeof(T) << 1)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/assume_aligned_clang.hpp b/boost/align/detail/assume_aligned_clang.hpp
index 76046efd6d..d57cf4f8e5 100644
--- a/boost/align/detail/assume_aligned_clang.hpp
+++ b/boost/align/detail/assume_aligned_clang.hpp
@@ -11,7 +11,7 @@ http://boost.org/LICENSE_1_0.txt
#if __has_builtin(__builtin_assume_aligned)
#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \
-(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n)))
+(p) = (__typeof__(p))(__builtin_assume_aligned((p), (n)))
#else
#define BOOST_ALIGN_ASSUME_ALIGNED(p, n)
#endif
diff --git a/boost/align/detail/assume_aligned_gcc.hpp b/boost/align/detail/assume_aligned_gcc.hpp
index 38fab66175..fc6d76a07f 100644
--- a/boost/align/detail/assume_aligned_gcc.hpp
+++ b/boost/align/detail/assume_aligned_gcc.hpp
@@ -13,6 +13,6 @@ http://boost.org/LICENSE_1_0.txt
#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP
#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \
-(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n)))
+(p) = (__typeof__(p))(__builtin_assume_aligned((p), (n)))
#endif
diff --git a/boost/align/detail/assume_aligned_msvc.hpp b/boost/align/detail/assume_aligned_msvc.hpp
index 84c4d59220..e953333b02 100644
--- a/boost/align/detail/assume_aligned_msvc.hpp
+++ b/boost/align/detail/assume_aligned_msvc.hpp
@@ -15,6 +15,6 @@ http://boost.org/LICENSE_1_0.txt
#include <cstddef>
#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \
-__assume((reinterpret_cast<std::size_t>(p) & ((n) - 1)) == 0)
+__assume(((std::size_t)(p) & ((n) - 1)) == 0)
#endif
diff --git a/boost/align/detail/element_type.hpp b/boost/align/detail/element_type.hpp
index 793e25ed39..69995e1613 100644
--- a/boost/align/detail/element_type.hpp
+++ b/boost/align/detail/element_type.hpp
@@ -22,14 +22,9 @@ namespace alignment {
namespace detail {
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
-template<class T>
-struct element_type {
- typedef typename
- std::remove_cv<typename
- std::remove_all_extents<typename
- std::remove_reference<T>::
- type>::type>::type type;
-};
+using std::remove_reference;
+using std::remove_all_extents;
+using std::remove_cv;
#else
template<class T>
struct remove_reference {
@@ -54,14 +49,12 @@ struct remove_all_extents {
};
template<class T>
-struct remove_all_extents<T[]> {
- typedef typename remove_all_extents<T>::type type;
-};
+struct remove_all_extents<T[]>
+ : remove_all_extents<T> { };
template<class T, std::size_t N>
-struct remove_all_extents<T[N]> {
- typedef typename remove_all_extents<T>::type type;
-};
+struct remove_all_extents<T[N]>
+ : remove_all_extents<T> { };
template<class T>
struct remove_const {
@@ -84,20 +77,14 @@ struct remove_volatile<volatile T> {
};
template<class T>
-struct remove_cv {
- typedef typename remove_volatile<typename
- remove_const<T>::type>::type type;
-};
+struct remove_cv
+ : remove_volatile<typename remove_const<T>::type> { };
+#endif
template<class T>
-struct element_type {
- typedef typename
- remove_cv<typename
- remove_all_extents<typename
- remove_reference<T>::
- type>::type>::type type;
-};
-#endif
+struct element_type
+ : remove_cv<typename remove_all_extents<typename
+ remove_reference<T>::type>::type> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/integral_constant.hpp b/boost/align/detail/integral_constant.hpp
index 3f8bf0a8d9..1ad67e330f 100644
--- a/boost/align/detail/integral_constant.hpp
+++ b/boost/align/detail/integral_constant.hpp
@@ -1,5 +1,5 @@
/*
-(c) 2014-2015 Glen Joseph Fernandes
+(c) 2014-2016 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
Distributed under the Boost Software
@@ -27,11 +27,15 @@ struct integral_constant {
typedef T value_type;
typedef integral_constant type;
- BOOST_CONSTEXPR operator value_type() const {
+ BOOST_CONSTEXPR operator value_type() const BOOST_NOEXCEPT {
return Value;
}
- static BOOST_CONSTEXPR_OR_CONST T value = Value;
+ BOOST_CONSTEXPR value_type operator()() const BOOST_NOEXCEPT {
+ return Value;
+ }
+
+ BOOST_STATIC_CONSTEXPR T value = Value;
};
#endif
diff --git a/boost/align/detail/is_aligned.hpp b/boost/align/detail/is_aligned.hpp
index e9c97ec711..e7c7dd60a0 100644
--- a/boost/align/detail/is_aligned.hpp
+++ b/boost/align/detail/is_aligned.hpp
@@ -20,14 +20,14 @@ inline bool is_aligned(const void* ptr, std::size_t alignment)
BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- return is_aligned(reinterpret_cast<std::size_t>(ptr), alignment);
+ return is_aligned((std::size_t)ptr, alignment);
}
inline bool is_aligned(std::size_t alignment, const void* ptr)
BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- return is_aligned(reinterpret_cast<std::size_t>(ptr), alignment);
+ return is_aligned((std::size_t)ptr, alignment);
}
} /* .alignment */
diff --git a/boost/align/detail/is_alignment_constant.hpp b/boost/align/detail/is_alignment_constant.hpp
index 2c29343b2d..eb709b7bc2 100644
--- a/boost/align/detail/is_alignment_constant.hpp
+++ b/boost/align/detail/is_alignment_constant.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<std::size_t N>
struct is_alignment_constant
- : integral_constant<bool, (N > 0) && ((N & (N - 1)) == 0)> {
-};
+ : integral_constant<bool, (N > 0) && ((N & (N - 1)) == 0)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/max_align.hpp b/boost/align/detail/max_align.hpp
index 8ae6901c19..d91de0dab5 100644
--- a/boost/align/detail/max_align.hpp
+++ b/boost/align/detail/max_align.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<class A, class B>
struct max_align
- : max_size<alignment_of<A>::value, alignment_of<B>::value>::type {
-};
+ : max_size<alignment_of<A>::value, alignment_of<B>::value> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/max_objects.hpp b/boost/align/detail/max_objects.hpp
index eb56d6fe66..27d377c5c2 100644
--- a/boost/align/detail/max_objects.hpp
+++ b/boost/align/detail/max_objects.hpp
@@ -19,8 +19,7 @@ namespace detail {
template<class T>
struct max_objects
: integral_constant<std::size_t,
- ~static_cast<std::size_t>(0) / sizeof(T)> {
-};
+ ~static_cast<std::size_t>(0) / sizeof(T)> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/max_size.hpp b/boost/align/detail/max_size.hpp
index 48fc45e2ee..555aa2c258 100644
--- a/boost/align/detail/max_size.hpp
+++ b/boost/align/detail/max_size.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<std::size_t A, std::size_t B>
struct max_size
- : integral_constant<std::size_t, (A > B) ? A : B> {
-};
+ : integral_constant<std::size_t, (A > B) ? A : B> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/align/detail/min_size.hpp b/boost/align/detail/min_size.hpp
index 8ed3e87ab6..b20d3cdeaf 100644
--- a/boost/align/detail/min_size.hpp
+++ b/boost/align/detail/min_size.hpp
@@ -18,8 +18,7 @@ namespace detail {
template<std::size_t A, std::size_t B>
struct min_size
- : integral_constant<std::size_t, (A < B) ? A : B> {
-};
+ : integral_constant<std::size_t, (A < B) ? A : B> { };
} /* .detail */
} /* .alignment */
diff --git a/boost/asio.hpp b/boost/asio.hpp
index 67658a827c..6523d60fe1 100644
--- a/boost/asio.hpp
+++ b/boost/asio.hpp
@@ -2,7 +2,7 @@
// asio.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/async_result.hpp b/boost/asio/async_result.hpp
index 013fd9e162..e5717b4159 100644
--- a/boost/asio/async_result.hpp
+++ b/boost/asio/async_result.hpp
@@ -2,7 +2,7 @@
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_datagram_socket.hpp b/boost/asio/basic_datagram_socket.hpp
index f0ffe15e24..d898a7f14b 100644
--- a/boost/asio/basic_datagram_socket.hpp
+++ b/boost/asio/basic_datagram_socket.hpp
@@ -2,7 +2,7 @@
// basic_datagram_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_deadline_timer.hpp b/boost/asio/basic_deadline_timer.hpp
index 27a75f3b64..b6c83f527e 100644
--- a/boost/asio/basic_deadline_timer.hpp
+++ b/boost/asio/basic_deadline_timer.hpp
@@ -2,7 +2,7 @@
// basic_deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_io_object.hpp b/boost/asio/basic_io_object.hpp
index 568ec6a726..5912228ec7 100644
--- a/boost/asio/basic_io_object.hpp
+++ b/boost/asio/basic_io_object.hpp
@@ -2,7 +2,7 @@
// basic_io_object.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the 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,12 +35,13 @@ namespace detail
typedef typename service_type::implementation_type implementation_type;
template <typename T, typename U>
- static auto eval(T* t, U* u) -> decltype(t->move_construct(*u, *u), char());
- static char (&eval(...))[2];
+ static auto asio_service_has_move_eval(T* t, U* u)
+ -> decltype(t->move_construct(*u, *u), char());
+ static char (&asio_service_has_move_eval(...))[2];
public:
static const bool value =
- sizeof(service_has_move::eval(
+ sizeof(asio_service_has_move_eval(
static_cast<service_type*>(0),
static_cast<implementation_type*>(0))) == 1;
};
diff --git a/boost/asio/basic_raw_socket.hpp b/boost/asio/basic_raw_socket.hpp
index 1f12827367..2fe3e608b8 100644
--- a/boost/asio/basic_raw_socket.hpp
+++ b/boost/asio/basic_raw_socket.hpp
@@ -2,7 +2,7 @@
// basic_raw_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_seq_packet_socket.hpp b/boost/asio/basic_seq_packet_socket.hpp
index 5a7d920e11..4a2fec7556 100644
--- a/boost/asio/basic_seq_packet_socket.hpp
+++ b/boost/asio/basic_seq_packet_socket.hpp
@@ -2,7 +2,7 @@
// basic_seq_packet_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_serial_port.hpp b/boost/asio/basic_serial_port.hpp
index d318963a12..7914457b62 100644
--- a/boost/asio/basic_serial_port.hpp
+++ b/boost/asio/basic_serial_port.hpp
@@ -2,7 +2,7 @@
// basic_serial_port.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/basic_signal_set.hpp b/boost/asio/basic_signal_set.hpp
index 48e28caa16..cc26d6fab4 100644
--- a/boost/asio/basic_signal_set.hpp
+++ b/boost/asio/basic_signal_set.hpp
@@ -2,7 +2,7 @@
// basic_signal_set.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_socket.hpp b/boost/asio/basic_socket.hpp
index 7b6ac08560..64aef6fb2b 100644
--- a/boost/asio/basic_socket.hpp
+++ b/boost/asio/basic_socket.hpp
@@ -2,7 +2,7 @@
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_socket_acceptor.hpp b/boost/asio/basic_socket_acceptor.hpp
index a1a1f8a350..f39c407133 100644
--- a/boost/asio/basic_socket_acceptor.hpp
+++ b/boost/asio/basic_socket_acceptor.hpp
@@ -2,7 +2,7 @@
// basic_socket_acceptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_socket_iostream.hpp b/boost/asio/basic_socket_iostream.hpp
index a0031cbf39..fd291f0f14 100644
--- a/boost/asio/basic_socket_iostream.hpp
+++ b/boost/asio/basic_socket_iostream.hpp
@@ -2,7 +2,7 @@
// basic_socket_iostream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_socket_streambuf.hpp b/boost/asio/basic_socket_streambuf.hpp
index 5595e99cf7..34052e47e4 100644
--- a/boost/asio/basic_socket_streambuf.hpp
+++ b/boost/asio/basic_socket_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_socket_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_stream_socket.hpp b/boost/asio/basic_stream_socket.hpp
index 44ce016ca1..423a5c3de9 100644
--- a/boost/asio/basic_stream_socket.hpp
+++ b/boost/asio/basic_stream_socket.hpp
@@ -2,7 +2,7 @@
// basic_stream_socket.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_streambuf.hpp b/boost/asio/basic_streambuf.hpp
index d8cb477be8..5c575dd676 100644
--- a/boost/asio/basic_streambuf.hpp
+++ b/boost/asio/basic_streambuf.hpp
@@ -2,7 +2,7 @@
// basic_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_streambuf_fwd.hpp b/boost/asio/basic_streambuf_fwd.hpp
index 5026aba851..88e9549430 100644
--- a/boost/asio/basic_streambuf_fwd.hpp
+++ b/boost/asio/basic_streambuf_fwd.hpp
@@ -2,7 +2,7 @@
// basic_streambuf_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/basic_waitable_timer.hpp b/boost/asio/basic_waitable_timer.hpp
index 3f63c78008..a7293ee1dd 100644
--- a/boost/asio/basic_waitable_timer.hpp
+++ b/boost/asio/basic_waitable_timer.hpp
@@ -2,7 +2,7 @@
// basic_waitable_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffer.hpp b/boost/asio/buffer.hpp
index 729a31b906..4dd02d1125 100644
--- a/boost/asio/buffer.hpp
+++ b/boost/asio/buffer.hpp
@@ -2,7 +2,7 @@
// buffer.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_read_stream.hpp b/boost/asio/buffered_read_stream.hpp
index dea896d999..90e135e661 100644
--- a/boost/asio/buffered_read_stream.hpp
+++ b/boost/asio/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_read_stream_fwd.hpp b/boost/asio/buffered_read_stream_fwd.hpp
index 9c2a742c21..5c2af0db3b 100644
--- a/boost/asio/buffered_read_stream_fwd.hpp
+++ b/boost/asio/buffered_read_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_read_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_stream.hpp b/boost/asio/buffered_stream.hpp
index d28620f3ad..3c25b5f420 100644
--- a/boost/asio/buffered_stream.hpp
+++ b/boost/asio/buffered_stream.hpp
@@ -2,7 +2,7 @@
// buffered_stream.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_stream_fwd.hpp b/boost/asio/buffered_stream_fwd.hpp
index d3754db588..83498c043e 100644
--- a/boost/asio/buffered_stream_fwd.hpp
+++ b/boost/asio/buffered_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_write_stream.hpp b/boost/asio/buffered_write_stream.hpp
index 4b6c620292..f1b951cded 100644
--- a/boost/asio/buffered_write_stream.hpp
+++ b/boost/asio/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffered_write_stream_fwd.hpp b/boost/asio/buffered_write_stream_fwd.hpp
index 7f57107880..97b5a3e508 100644
--- a/boost/asio/buffered_write_stream_fwd.hpp
+++ b/boost/asio/buffered_write_stream_fwd.hpp
@@ -2,7 +2,7 @@
// buffered_write_stream_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/buffers_iterator.hpp b/boost/asio/buffers_iterator.hpp
index bdf835e3c5..70dc8741a6 100644
--- a/boost/asio/buffers_iterator.hpp
+++ b/boost/asio/buffers_iterator.hpp
@@ -2,7 +2,7 @@
// buffers_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/completion_condition.hpp b/boost/asio/completion_condition.hpp
index 58c7d95bec..7fbd0485aa 100644
--- a/boost/asio/completion_condition.hpp
+++ b/boost/asio/completion_condition.hpp
@@ -2,7 +2,7 @@
// completion_condition.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/connect.hpp b/boost/asio/connect.hpp
index 8557cc0884..6275a5d0ec 100644
--- a/boost/asio/connect.hpp
+++ b/boost/asio/connect.hpp
@@ -2,7 +2,7 @@
// connect.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/coroutine.hpp b/boost/asio/coroutine.hpp
index cc760ad5f7..642b484bb1 100644
--- a/boost/asio/coroutine.hpp
+++ b/boost/asio/coroutine.hpp
@@ -2,7 +2,7 @@
// coroutine.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/datagram_socket_service.hpp b/boost/asio/datagram_socket_service.hpp
index 3c7bb08bc8..04a53671fc 100644
--- a/boost/asio/datagram_socket_service.hpp
+++ b/boost/asio/datagram_socket_service.hpp
@@ -2,7 +2,7 @@
// datagram_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/deadline_timer.hpp b/boost/asio/deadline_timer.hpp
index 91bc2fb4aa..849ff65a29 100644
--- a/boost/asio/deadline_timer.hpp
+++ b/boost/asio/deadline_timer.hpp
@@ -2,7 +2,7 @@
// deadline_timer.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/deadline_timer_service.hpp b/boost/asio/deadline_timer_service.hpp
index 142d625145..20ae802658 100644
--- a/boost/asio/deadline_timer_service.hpp
+++ b/boost/asio/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
// deadline_timer_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/addressof.hpp b/boost/asio/detail/addressof.hpp
index 2791c56f74..972c1f1285 100644
--- a/boost/asio/detail/addressof.hpp
+++ b/boost/asio/detail/addressof.hpp
@@ -2,7 +2,7 @@
// detail/addressof.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/array.hpp b/boost/asio/detail/array.hpp
index 5a58413de8..2165e60438 100644
--- a/boost/asio/detail/array.hpp
+++ b/boost/asio/detail/array.hpp
@@ -2,7 +2,7 @@
// detail/array.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/array_fwd.hpp b/boost/asio/detail/array_fwd.hpp
index 7f6c6128c6..6ba840a4e5 100644
--- a/boost/asio/detail/array_fwd.hpp
+++ b/boost/asio/detail/array_fwd.hpp
@@ -2,7 +2,7 @@
// detail/array_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/assert.hpp b/boost/asio/detail/assert.hpp
index 8847ea1ac9..1254b8878c 100644
--- a/boost/asio/detail/assert.hpp
+++ b/boost/asio/detail/assert.hpp
@@ -2,7 +2,7 @@
// detail/assert.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/atomic_count.hpp b/boost/asio/detail/atomic_count.hpp
index ce0ef73e36..12e1ae9da7 100644
--- a/boost/asio/detail/atomic_count.hpp
+++ b/boost/asio/detail/atomic_count.hpp
@@ -2,7 +2,7 @@
// detail/atomic_count.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/base_from_completion_cond.hpp b/boost/asio/detail/base_from_completion_cond.hpp
index 3570899022..b92c6992bb 100644
--- a/boost/asio/detail/base_from_completion_cond.hpp
+++ b/boost/asio/detail/base_from_completion_cond.hpp
@@ -2,7 +2,7 @@
// detail/base_from_completion_cond.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/bind_handler.hpp b/boost/asio/detail/bind_handler.hpp
index 9219910edb..e73180474f 100644
--- a/boost/asio/detail/bind_handler.hpp
+++ b/boost/asio/detail/bind_handler.hpp
@@ -2,7 +2,7 @@
// detail/bind_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/buffer_resize_guard.hpp b/boost/asio/detail/buffer_resize_guard.hpp
index 8bb0e73952..88b931519b 100644
--- a/boost/asio/detail/buffer_resize_guard.hpp
+++ b/boost/asio/detail/buffer_resize_guard.hpp
@@ -2,7 +2,7 @@
// detail/buffer_resize_guard.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/buffer_sequence_adapter.hpp b/boost/asio/detail/buffer_sequence_adapter.hpp
index 8cf8980455..fdca995413 100644
--- a/boost/asio/detail/buffer_sequence_adapter.hpp
+++ b/boost/asio/detail/buffer_sequence_adapter.hpp
@@ -2,7 +2,7 @@
// detail/buffer_sequence_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/buffered_stream_storage.hpp b/boost/asio/detail/buffered_stream_storage.hpp
index f4fc5ccc74..862c3526db 100644
--- a/boost/asio/detail/buffered_stream_storage.hpp
+++ b/boost/asio/detail/buffered_stream_storage.hpp
@@ -2,7 +2,7 @@
// detail/buffered_stream_storage.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/call_stack.hpp b/boost/asio/detail/call_stack.hpp
index 65f71221b9..148b19c98b 100644
--- a/boost/asio/detail/call_stack.hpp
+++ b/boost/asio/detail/call_stack.hpp
@@ -2,7 +2,7 @@
// detail/call_stack.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/chrono_time_traits.hpp b/boost/asio/detail/chrono_time_traits.hpp
index c0e073b00e..f6bfed628c 100644
--- a/boost/asio/detail/chrono_time_traits.hpp
+++ b/boost/asio/detail/chrono_time_traits.hpp
@@ -2,7 +2,7 @@
// detail/chrono_time_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/completion_handler.hpp b/boost/asio/detail/completion_handler.hpp
index 3ad0ae8041..3cfb1662f2 100644
--- a/boost/asio/detail/completion_handler.hpp
+++ b/boost/asio/detail/completion_handler.hpp
@@ -2,7 +2,7 @@
// detail/completion_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/config.hpp b/boost/asio/detail/config.hpp
index a39d85d600..319f94fe38 100644
--- a/boost/asio/detail/config.hpp
+++ b/boost/asio/detail/config.hpp
@@ -2,7 +2,7 @@
// detail/config.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -802,15 +802,25 @@
// Can use getaddrinfo() and getnameinfo().
#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# elif defined(UNDER_CE)
+# if !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# elif defined(UNDER_CE)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // defined(UNDER_CE)
+# elif defined(__MACH__) && defined(__APPLE__)
+# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+# else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# else // defined(__MACH__) && defined(__APPLE__)
# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // defined(UNDER_CE)
-# elif !(defined(__MACH__) && defined(__APPLE__))
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // !(defined(__MACH__) && defined(__APPLE__))
+# endif // defined(__MACH__) && defined(__APPLE__)
+# endif // !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
// Whether standard iostreams are disabled.
diff --git a/boost/asio/detail/consuming_buffers.hpp b/boost/asio/detail/consuming_buffers.hpp
index 7a022713ae..8d7fc16c70 100644
--- a/boost/asio/detail/consuming_buffers.hpp
+++ b/boost/asio/detail/consuming_buffers.hpp
@@ -2,7 +2,7 @@
// detail/consuming_buffers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/cstdint.hpp b/boost/asio/detail/cstdint.hpp
index 1dfa6e0181..262d3a93c0 100644
--- a/boost/asio/detail/cstdint.hpp
+++ b/boost/asio/detail/cstdint.hpp
@@ -2,7 +2,7 @@
// detail/cstdint.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/date_time_fwd.hpp b/boost/asio/detail/date_time_fwd.hpp
index 9c8a515dbc..c8756837fe 100644
--- a/boost/asio/detail/date_time_fwd.hpp
+++ b/boost/asio/detail/date_time_fwd.hpp
@@ -2,7 +2,7 @@
// detail/date_time_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/deadline_timer_service.hpp b/boost/asio/detail/deadline_timer_service.hpp
index 74a322655f..df22ec42b4 100644
--- a/boost/asio/detail/deadline_timer_service.hpp
+++ b/boost/asio/detail/deadline_timer_service.hpp
@@ -2,7 +2,7 @@
// detail/deadline_timer_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/dependent_type.hpp b/boost/asio/detail/dependent_type.hpp
index fb697d2b71..1a03a82820 100644
--- a/boost/asio/detail/dependent_type.hpp
+++ b/boost/asio/detail/dependent_type.hpp
@@ -2,7 +2,7 @@
// detail/dependent_type.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/descriptor_ops.hpp b/boost/asio/detail/descriptor_ops.hpp
index 7ea2f07168..d5a6319d2f 100644
--- a/boost/asio/detail/descriptor_ops.hpp
+++ b/boost/asio/detail/descriptor_ops.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/descriptor_read_op.hpp b/boost/asio/detail/descriptor_read_op.hpp
index eaff8a2536..2fc643db5e 100644
--- a/boost/asio/detail/descriptor_read_op.hpp
+++ b/boost/asio/detail/descriptor_read_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/descriptor_write_op.hpp b/boost/asio/detail/descriptor_write_op.hpp
index 5e6a776494..6ca79a6f16 100644
--- a/boost/asio/detail/descriptor_write_op.hpp
+++ b/boost/asio/detail/descriptor_write_op.hpp
@@ -2,7 +2,7 @@
// detail/descriptor_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/dev_poll_reactor.hpp b/boost/asio/detail/dev_poll_reactor.hpp
index 1b4d071986..e18a44a24c 100644
--- a/boost/asio/detail/dev_poll_reactor.hpp
+++ b/boost/asio/detail/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/epoll_reactor.hpp b/boost/asio/detail/epoll_reactor.hpp
index 5b80cd9f62..fe82481c65 100644
--- a/boost/asio/detail/epoll_reactor.hpp
+++ b/boost/asio/detail/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/event.hpp b/boost/asio/detail/event.hpp
index e6cf2c3543..a6616b11a1 100644
--- a/boost/asio/detail/event.hpp
+++ b/boost/asio/detail/event.hpp
@@ -2,7 +2,7 @@
// detail/event.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/eventfd_select_interrupter.hpp b/boost/asio/detail/eventfd_select_interrupter.hpp
index d0d38b620c..0b1fcabdc2 100644
--- a/boost/asio/detail/eventfd_select_interrupter.hpp
+++ b/boost/asio/detail/eventfd_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/eventfd_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/fd_set_adapter.hpp b/boost/asio/detail/fd_set_adapter.hpp
index 0a28dc42a0..38464dc6dc 100644
--- a/boost/asio/detail/fd_set_adapter.hpp
+++ b/boost/asio/detail/fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/fenced_block.hpp b/boost/asio/detail/fenced_block.hpp
index ea30c65e5f..ad8667238e 100644
--- a/boost/asio/detail/fenced_block.hpp
+++ b/boost/asio/detail/fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/function.hpp b/boost/asio/detail/function.hpp
index 191615b59a..475efcb49a 100644
--- a/boost/asio/detail/function.hpp
+++ b/boost/asio/detail/function.hpp
@@ -2,7 +2,7 @@
// detail/function.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/gcc_arm_fenced_block.hpp b/boost/asio/detail/gcc_arm_fenced_block.hpp
index c1b3348b8a..2f6cae4091 100644
--- a/boost/asio/detail/gcc_arm_fenced_block.hpp
+++ b/boost/asio/detail/gcc_arm_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/gcc_arm_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/gcc_hppa_fenced_block.hpp b/boost/asio/detail/gcc_hppa_fenced_block.hpp
index 9f3a0bbc30..b31e48bbf8 100644
--- a/boost/asio/detail/gcc_hppa_fenced_block.hpp
+++ b/boost/asio/detail/gcc_hppa_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/gcc_hppa_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/gcc_sync_fenced_block.hpp b/boost/asio/detail/gcc_sync_fenced_block.hpp
index 570f7eaa65..9db9f6413a 100644
--- a/boost/asio/detail/gcc_sync_fenced_block.hpp
+++ b/boost/asio/detail/gcc_sync_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/gcc_sync_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/gcc_x86_fenced_block.hpp b/boost/asio/detail/gcc_x86_fenced_block.hpp
index 81d517909c..07354f6fb8 100644
--- a/boost/asio/detail/gcc_x86_fenced_block.hpp
+++ b/boost/asio/detail/gcc_x86_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/gcc_x86_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/handler_alloc_helpers.hpp b/boost/asio/detail/handler_alloc_helpers.hpp
index a602d8e315..16b7e268cd 100644
--- a/boost/asio/detail/handler_alloc_helpers.hpp
+++ b/boost/asio/detail/handler_alloc_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_alloc_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/handler_cont_helpers.hpp b/boost/asio/detail/handler_cont_helpers.hpp
index ec3abb78b5..90ae8a0f67 100644
--- a/boost/asio/detail/handler_cont_helpers.hpp
+++ b/boost/asio/detail/handler_cont_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_cont_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/handler_invoke_helpers.hpp b/boost/asio/detail/handler_invoke_helpers.hpp
index fed4c4eef6..f5447abc1e 100644
--- a/boost/asio/detail/handler_invoke_helpers.hpp
+++ b/boost/asio/detail/handler_invoke_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_invoke_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/handler_tracking.hpp b/boost/asio/detail/handler_tracking.hpp
index f1a89fe91f..5f935f83e7 100644
--- a/boost/asio/detail/handler_tracking.hpp
+++ b/boost/asio/detail/handler_tracking.hpp
@@ -2,7 +2,7 @@
// detail/handler_tracking.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/handler_type_requirements.hpp b/boost/asio/detail/handler_type_requirements.hpp
index 228e93c69f..eb1908aa82 100644
--- a/boost/asio/detail/handler_type_requirements.hpp
+++ b/boost/asio/detail/handler_type_requirements.hpp
@@ -2,7 +2,7 @@
// detail/handler_type_requirements.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/hash_map.hpp b/boost/asio/detail/hash_map.hpp
index 20b3332602..da59857ce7 100644
--- a/boost/asio/detail/hash_map.hpp
+++ b/boost/asio/detail/hash_map.hpp
@@ -2,7 +2,7 @@
// detail/hash_map.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/buffer_sequence_adapter.ipp b/boost/asio/detail/impl/buffer_sequence_adapter.ipp
index c5a1f3d67d..b53258293b 100644
--- a/boost/asio/detail/impl/buffer_sequence_adapter.ipp
+++ b/boost/asio/detail/impl/buffer_sequence_adapter.ipp
@@ -2,7 +2,7 @@
// detail/impl/buffer_sequence_adapter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/descriptor_ops.ipp b/boost/asio/detail/impl/descriptor_ops.ipp
index d700b22b8b..0984b4b5c6 100644
--- a/boost/asio/detail/impl/descriptor_ops.ipp
+++ b/boost/asio/detail/impl/descriptor_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/descriptor_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/dev_poll_reactor.hpp b/boost/asio/detail/impl/dev_poll_reactor.hpp
index 5ca682244e..3e19406ba8 100644
--- a/boost/asio/detail/impl/dev_poll_reactor.hpp
+++ b/boost/asio/detail/impl/dev_poll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/dev_poll_reactor.ipp b/boost/asio/detail/impl/dev_poll_reactor.ipp
index aa276d3daf..521dc0b8da 100644
--- a/boost/asio/detail/impl/dev_poll_reactor.ipp
+++ b/boost/asio/detail/impl/dev_poll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/dev_poll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/epoll_reactor.hpp b/boost/asio/detail/impl/epoll_reactor.hpp
index dea5225b3e..c579da59e6 100644
--- a/boost/asio/detail/impl/epoll_reactor.hpp
+++ b/boost/asio/detail/impl/epoll_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/epoll_reactor.ipp b/boost/asio/detail/impl/epoll_reactor.ipp
index accb0dac27..25eb005b32 100644
--- a/boost/asio/detail/impl/epoll_reactor.ipp
+++ b/boost/asio/detail/impl/epoll_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/epoll_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
index cde54b9a02..e245014a82 100644
--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/eventfd_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/handler_tracking.ipp b/boost/asio/detail/impl/handler_tracking.ipp
index 4a07911c82..88cd1e9a33 100644
--- a/boost/asio/detail/impl/handler_tracking.ipp
+++ b/boost/asio/detail/impl/handler_tracking.ipp
@@ -2,7 +2,7 @@
// detail/impl/handler_tracking.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/kqueue_reactor.hpp b/boost/asio/detail/impl/kqueue_reactor.hpp
index 807c121f70..3025d559a4 100644
--- a/boost/asio/detail/impl/kqueue_reactor.hpp
+++ b/boost/asio/detail/impl/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/kqueue_reactor.ipp b/boost/asio/detail/impl/kqueue_reactor.ipp
index 70aeb38b88..8aecd9b29b 100644
--- a/boost/asio/detail/impl/kqueue_reactor.ipp
+++ b/boost/asio/detail/impl/kqueue_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/kqueue_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/pipe_select_interrupter.ipp b/boost/asio/detail/impl/pipe_select_interrupter.ipp
index c48e61d7ec..65eb233061 100644
--- a/boost/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/boost/asio/detail/impl/pipe_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/pipe_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/posix_event.ipp b/boost/asio/detail/impl/posix_event.ipp
index 9514972c5a..62368c1f15 100644
--- a/boost/asio/detail/impl/posix_event.ipp
+++ b/boost/asio/detail/impl/posix_event.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_event.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/posix_mutex.ipp b/boost/asio/detail/impl/posix_mutex.ipp
index e470cfa89c..bb96260d14 100644
--- a/boost/asio/detail/impl/posix_mutex.ipp
+++ b/boost/asio/detail/impl/posix_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/posix_thread.ipp b/boost/asio/detail/impl/posix_thread.ipp
index 5253cd965d..c85c2ec82d 100644
--- a/boost/asio/detail/impl/posix_thread.ipp
+++ b/boost/asio/detail/impl/posix_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/posix_tss_ptr.ipp b/boost/asio/detail/impl/posix_tss_ptr.ipp
index 042b014cb6..143600383e 100644
--- a/boost/asio/detail/impl/posix_tss_ptr.ipp
+++ b/boost/asio/detail/impl/posix_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/posix_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/reactive_descriptor_service.ipp b/boost/asio/detail/impl/reactive_descriptor_service.ipp
index cf6547fddd..c7ad818080 100644
--- a/boost/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/boost/asio/detail/impl/reactive_descriptor_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/reactive_descriptor_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/reactive_serial_port_service.ipp b/boost/asio/detail/impl/reactive_serial_port_service.ipp
index d4f615714a..64172844d2 100644
--- a/boost/asio/detail/impl/reactive_serial_port_service.ipp
+++ b/boost/asio/detail/impl/reactive_serial_port_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/reactive_serial_port_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/reactive_socket_service_base.ipp b/boost/asio/detail/impl/reactive_socket_service_base.ipp
index 2ef23a17be..b15d085f59 100644
--- a/boost/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/boost/asio/detail/impl/reactive_socket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/resolver_service_base.ipp b/boost/asio/detail/impl/resolver_service_base.ipp
index 484aeadf61..3f4a410f10 100644
--- a/boost/asio/detail/impl/resolver_service_base.ipp
+++ b/boost/asio/detail/impl/resolver_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/resolver_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/select_reactor.hpp b/boost/asio/detail/impl/select_reactor.hpp
index 4461681f7a..2c89c64ce0 100644
--- a/boost/asio/detail/impl/select_reactor.hpp
+++ b/boost/asio/detail/impl/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/select_reactor.ipp b/boost/asio/detail/impl/select_reactor.ipp
index 9269f94568..df81051e3a 100644
--- a/boost/asio/detail/impl/select_reactor.ipp
+++ b/boost/asio/detail/impl/select_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/service_registry.hpp b/boost/asio/detail/impl/service_registry.hpp
index 9e0a8b484f..89ecd24069 100644
--- a/boost/asio/detail/impl/service_registry.hpp
+++ b/boost/asio/detail/impl/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/service_registry.ipp b/boost/asio/detail/impl/service_registry.ipp
index 00deec9dc2..1023d289e3 100644
--- a/boost/asio/detail/impl/service_registry.ipp
+++ b/boost/asio/detail/impl/service_registry.ipp
@@ -2,7 +2,7 @@
// detail/impl/service_registry.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/signal_set_service.ipp b/boost/asio/detail/impl/signal_set_service.ipp
index 8fde0a8637..d05fa4c5dd 100644
--- a/boost/asio/detail/impl/signal_set_service.ipp
+++ b/boost/asio/detail/impl/signal_set_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/signal_set_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/socket_ops.ipp b/boost/asio/detail/impl/socket_ops.ipp
index 976eaa42db..1017aafb44 100644
--- a/boost/asio/detail/impl/socket_ops.ipp
+++ b/boost/asio/detail/impl/socket_ops.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_ops.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/socket_select_interrupter.ipp b/boost/asio/detail/impl/socket_select_interrupter.ipp
index 83c2208dab..3ff6665289 100644
--- a/boost/asio/detail/impl/socket_select_interrupter.ipp
+++ b/boost/asio/detail/impl/socket_select_interrupter.ipp
@@ -2,7 +2,7 @@
// detail/impl/socket_select_interrupter.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -72,7 +72,8 @@ void socket_select_interrupter::open_descriptors()
// Some broken firewalls on Windows will intermittently cause getsockname to
// return 0.0.0.0 when the socket is actually bound to 127.0.0.1. We
// explicitly specify the target address here to work around this problem.
- addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
+ if (addr.sin_addr.s_addr == socket_ops::host_to_network_long(INADDR_ANY))
+ addr.sin_addr.s_addr = socket_ops::host_to_network_long(INADDR_LOOPBACK);
if (socket_ops::listen(acceptor.get(),
SOMAXCONN, ec) == socket_error_retval)
diff --git a/boost/asio/detail/impl/strand_service.hpp b/boost/asio/detail/impl/strand_service.hpp
index 824e296b13..45189a3710 100644
--- a/boost/asio/detail/impl/strand_service.hpp
+++ b/boost/asio/detail/impl/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/strand_service.ipp b/boost/asio/detail/impl/strand_service.ipp
index 9281714433..7545559fff 100644
--- a/boost/asio/detail/impl/strand_service.ipp
+++ b/boost/asio/detail/impl/strand_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/strand_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/task_io_service.hpp b/boost/asio/detail/impl/task_io_service.hpp
index cecdb6d441..5a19a01466 100644
--- a/boost/asio/detail/impl/task_io_service.hpp
+++ b/boost/asio/detail/impl/task_io_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/task_io_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/task_io_service.ipp b/boost/asio/detail/impl/task_io_service.ipp
index 129dd64d34..756e1889fe 100644
--- a/boost/asio/detail/impl/task_io_service.ipp
+++ b/boost/asio/detail/impl/task_io_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/task_io_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/throw_error.ipp b/boost/asio/detail/impl/throw_error.ipp
index fa3b4e2e68..e95e071920 100644
--- a/boost/asio/detail/impl/throw_error.ipp
+++ b/boost/asio/detail/impl/throw_error.ipp
@@ -2,7 +2,7 @@
// detail/impl/throw_error.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/timer_queue_ptime.ipp b/boost/asio/detail/impl/timer_queue_ptime.ipp
index a2c52786b2..f665a5188e 100644
--- a/boost/asio/detail/impl/timer_queue_ptime.ipp
+++ b/boost/asio/detail/impl/timer_queue_ptime.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_ptime.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/timer_queue_set.ipp b/boost/asio/detail/impl/timer_queue_set.ipp
index 5a84926e91..81f7b62f68 100644
--- a/boost/asio/detail/impl/timer_queue_set.ipp
+++ b/boost/asio/detail/impl/timer_queue_set.ipp
@@ -2,7 +2,7 @@
// detail/impl/timer_queue_set.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_event.ipp b/boost/asio/detail/impl/win_event.ipp
index 40f3f641eb..1280f00757 100644
--- a/boost/asio/detail/impl/win_event.ipp
+++ b/boost/asio/detail/impl/win_event.ipp
@@ -2,7 +2,7 @@
// detail/win_event.ipp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_iocp_handle_service.ipp b/boost/asio/detail/impl/win_iocp_handle_service.ipp
index 24820a55b0..09604439e2 100644
--- a/boost/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/boost/asio/detail/impl/win_iocp_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/win_iocp_io_service.hpp b/boost/asio/detail/impl/win_iocp_io_service.hpp
index ac53cbed89..92344888bc 100644
--- a/boost/asio/detail/impl/win_iocp_io_service.hpp
+++ b/boost/asio/detail/impl/win_iocp_io_service.hpp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_iocp_io_service.ipp b/boost/asio/detail/impl/win_iocp_io_service.ipp
index ca7848b75c..c26c3722b8 100644
--- a/boost/asio/detail/impl/win_iocp_io_service.ipp
+++ b/boost/asio/detail/impl/win_iocp_io_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_iocp_io_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
index cb8a64ebc2..1c48465dd9 100644
--- a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ b/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-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
index a9361cc1d3..36fff850c2 100644
--- a/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/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-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_mutex.ipp b/boost/asio/detail/impl/win_mutex.ipp
index be1d1b8111..6946fd1402 100644
--- a/boost/asio/detail/impl/win_mutex.ipp
+++ b/boost/asio/detail/impl/win_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_object_handle_service.ipp b/boost/asio/detail/impl/win_object_handle_service.ipp
index 58eefe5fe7..16f7992f5c 100644
--- a/boost/asio/detail/impl/win_object_handle_service.ipp
+++ b/boost/asio/detail/impl/win_object_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_object_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/detail/impl/win_static_mutex.ipp b/boost/asio/detail/impl/win_static_mutex.ipp
index 14a08efd90..18bb679eba 100644
--- a/boost/asio/detail/impl/win_static_mutex.ipp
+++ b/boost/asio/detail/impl/win_static_mutex.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_static_mutex.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_thread.ipp b/boost/asio/detail/impl/win_thread.ipp
index 5ebd0e68a0..95689df9e5 100644
--- a/boost/asio/detail/impl/win_thread.ipp
+++ b/boost/asio/detail/impl/win_thread.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_thread.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/win_tss_ptr.ipp b/boost/asio/detail/impl/win_tss_ptr.ipp
index bd4dc23771..0f4312c3e3 100644
--- a/boost/asio/detail/impl/win_tss_ptr.ipp
+++ b/boost/asio/detail/impl/win_tss_ptr.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_tss_ptr.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
index b578f90e39..e1ba90e8e4 100644
--- a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_ssocket_service_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.hpp b/boost/asio/detail/impl/winrt_timer_scheduler.hpp
index 2de1566988..bcc71733ba 100644
--- a/boost/asio/detail/impl/winrt_timer_scheduler.hpp
+++ b/boost/asio/detail/impl/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.ipp b/boost/asio/detail/impl/winrt_timer_scheduler.ipp
index dc65bdcd2e..07d24efa60 100644
--- a/boost/asio/detail/impl/winrt_timer_scheduler.ipp
+++ b/boost/asio/detail/impl/winrt_timer_scheduler.ipp
@@ -2,7 +2,7 @@
// detail/impl/winrt_timer_scheduler.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/impl/winsock_init.ipp b/boost/asio/detail/impl/winsock_init.ipp
index af6294041a..4ad204174d 100644
--- a/boost/asio/detail/impl/winsock_init.ipp
+++ b/boost/asio/detail/impl/winsock_init.ipp
@@ -2,7 +2,7 @@
// detail/impl/winsock_init.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/io_control.hpp b/boost/asio/detail/io_control.hpp
index e7b70dd3f3..9c4a54bb2b 100644
--- a/boost/asio/detail/io_control.hpp
+++ b/boost/asio/detail/io_control.hpp
@@ -2,7 +2,7 @@
// detail/io_control.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/keyword_tss_ptr.hpp b/boost/asio/detail/keyword_tss_ptr.hpp
index dd36d31ac1..26cb12c106 100644
--- a/boost/asio/detail/keyword_tss_ptr.hpp
+++ b/boost/asio/detail/keyword_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/keyword_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/kqueue_reactor.hpp b/boost/asio/detail/kqueue_reactor.hpp
index 7addc4ae46..8ed8f78634 100644
--- a/boost/asio/detail/kqueue_reactor.hpp
+++ b/boost/asio/detail/kqueue_reactor.hpp
@@ -2,7 +2,7 @@
// detail/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/local_free_on_block_exit.hpp b/boost/asio/detail/local_free_on_block_exit.hpp
index a3b597e836..e3a59bb754 100644
--- a/boost/asio/detail/local_free_on_block_exit.hpp
+++ b/boost/asio/detail/local_free_on_block_exit.hpp
@@ -2,7 +2,7 @@
// detail/local_free_on_block_exit.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/macos_fenced_block.hpp b/boost/asio/detail/macos_fenced_block.hpp
index 69849b5e08..4a98543c08 100644
--- a/boost/asio/detail/macos_fenced_block.hpp
+++ b/boost/asio/detail/macos_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/macos_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/mutex.hpp b/boost/asio/detail/mutex.hpp
index e8ce002629..81bada1f41 100644
--- a/boost/asio/detail/mutex.hpp
+++ b/boost/asio/detail/mutex.hpp
@@ -2,7 +2,7 @@
// detail/mutex.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/noncopyable.hpp b/boost/asio/detail/noncopyable.hpp
index 0214bffa6d..fd35836efc 100644
--- a/boost/asio/detail/noncopyable.hpp
+++ b/boost/asio/detail/noncopyable.hpp
@@ -2,7 +2,7 @@
// detail/noncopyable.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_event.hpp b/boost/asio/detail/null_event.hpp
index 310cd52f24..62a86566c2 100644
--- a/boost/asio/detail/null_event.hpp
+++ b/boost/asio/detail/null_event.hpp
@@ -2,7 +2,7 @@
// detail/null_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_fenced_block.hpp b/boost/asio/detail/null_fenced_block.hpp
index a975b86c82..237874fc12 100644
--- a/boost/asio/detail/null_fenced_block.hpp
+++ b/boost/asio/detail/null_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/null_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_mutex.hpp b/boost/asio/detail/null_mutex.hpp
index f00bd66b5a..82a69d38ec 100644
--- a/boost/asio/detail/null_mutex.hpp
+++ b/boost/asio/detail/null_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_reactor.hpp b/boost/asio/detail/null_reactor.hpp
index 59a48de0ab..dee00d0332 100644
--- a/boost/asio/detail/null_reactor.hpp
+++ b/boost/asio/detail/null_reactor.hpp
@@ -2,7 +2,7 @@
// detail/null_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_signal_blocker.hpp b/boost/asio/detail/null_signal_blocker.hpp
index f3af24d8d8..8e73e78e03 100644
--- a/boost/asio/detail/null_signal_blocker.hpp
+++ b/boost/asio/detail/null_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/null_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_socket_service.hpp b/boost/asio/detail/null_socket_service.hpp
index 942eb82821..9dbccba535 100644
--- a/boost/asio/detail/null_socket_service.hpp
+++ b/boost/asio/detail/null_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/null_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_static_mutex.hpp b/boost/asio/detail/null_static_mutex.hpp
index c13f9bcf85..9945c6d19e 100644
--- a/boost/asio/detail/null_static_mutex.hpp
+++ b/boost/asio/detail/null_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/null_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_thread.hpp b/boost/asio/detail/null_thread.hpp
index e87917a0e8..54e79a9c81 100644
--- a/boost/asio/detail/null_thread.hpp
+++ b/boost/asio/detail/null_thread.hpp
@@ -2,7 +2,7 @@
// detail/null_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/null_tss_ptr.hpp b/boost/asio/detail/null_tss_ptr.hpp
index 016c17d450..70a3a1af1c 100644
--- a/boost/asio/detail/null_tss_ptr.hpp
+++ b/boost/asio/detail/null_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/null_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/object_pool.hpp b/boost/asio/detail/object_pool.hpp
index 188a81477f..9fd389d497 100644
--- a/boost/asio/detail/object_pool.hpp
+++ b/boost/asio/detail/object_pool.hpp
@@ -2,7 +2,7 @@
// detail/object_pool.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/old_win_sdk_compat.hpp b/boost/asio/detail/old_win_sdk_compat.hpp
index 216cd891af..85b98bb2ce 100644
--- a/boost/asio/detail/old_win_sdk_compat.hpp
+++ b/boost/asio/detail/old_win_sdk_compat.hpp
@@ -2,7 +2,7 @@
// detail/old_win_sdk_compat.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/op_queue.hpp b/boost/asio/detail/op_queue.hpp
index be54b9a2f2..13208357cc 100644
--- a/boost/asio/detail/op_queue.hpp
+++ b/boost/asio/detail/op_queue.hpp
@@ -2,7 +2,7 @@
// detail/op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/operation.hpp b/boost/asio/detail/operation.hpp
index dac89f9907..44f5a0f812 100644
--- a/boost/asio/detail/operation.hpp
+++ b/boost/asio/detail/operation.hpp
@@ -2,7 +2,7 @@
// detail/operation.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/pipe_select_interrupter.hpp b/boost/asio/detail/pipe_select_interrupter.hpp
index b5efdfc286..977aa38a98 100644
--- a/boost/asio/detail/pipe_select_interrupter.hpp
+++ b/boost/asio/detail/pipe_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/pipe_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/pop_options.hpp b/boost/asio/detail/pop_options.hpp
index 4f56152904..c6ba5e2ae8 100644
--- a/boost/asio/detail/pop_options.hpp
+++ b/boost/asio/detail/pop_options.hpp
@@ -2,7 +2,7 @@
// detail/pop_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_event.hpp b/boost/asio/detail/posix_event.hpp
index 3b905ba5ad..750ec82c8d 100644
--- a/boost/asio/detail/posix_event.hpp
+++ b/boost/asio/detail/posix_event.hpp
@@ -2,7 +2,7 @@
// detail/posix_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_fd_set_adapter.hpp b/boost/asio/detail/posix_fd_set_adapter.hpp
index cf580da666..3808059eba 100644
--- a/boost/asio/detail/posix_fd_set_adapter.hpp
+++ b/boost/asio/detail/posix_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/posix_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_mutex.hpp b/boost/asio/detail/posix_mutex.hpp
index 7ce1cc2755..8683c71edb 100644
--- a/boost/asio/detail/posix_mutex.hpp
+++ b/boost/asio/detail/posix_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_signal_blocker.hpp b/boost/asio/detail/posix_signal_blocker.hpp
index b27dd1c621..a9933ef9e0 100644
--- a/boost/asio/detail/posix_signal_blocker.hpp
+++ b/boost/asio/detail/posix_signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/posix_signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_static_mutex.hpp b/boost/asio/detail/posix_static_mutex.hpp
index 7077bf31cf..1b76651ea9 100644
--- a/boost/asio/detail/posix_static_mutex.hpp
+++ b/boost/asio/detail/posix_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/posix_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_thread.hpp b/boost/asio/detail/posix_thread.hpp
index f862162355..4ef1e0ea69 100644
--- a/boost/asio/detail/posix_thread.hpp
+++ b/boost/asio/detail/posix_thread.hpp
@@ -2,7 +2,7 @@
// detail/posix_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/posix_tss_ptr.hpp b/boost/asio/detail/posix_tss_ptr.hpp
index 95d56f0697..b765e52ca4 100644
--- a/boost/asio/detail/posix_tss_ptr.hpp
+++ b/boost/asio/detail/posix_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/posix_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/push_options.hpp b/boost/asio/detail/push_options.hpp
index f8e9f32345..a24a267573 100644
--- a/boost/asio/detail/push_options.hpp
+++ b/boost/asio/detail/push_options.hpp
@@ -2,7 +2,7 @@
// detail/push_options.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_descriptor_service.hpp b/boost/asio/detail/reactive_descriptor_service.hpp
index 6bf4af7039..88f82ae857 100644
--- a/boost/asio/detail/reactive_descriptor_service.hpp
+++ b/boost/asio/detail/reactive_descriptor_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_descriptor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_null_buffers_op.hpp b/boost/asio/detail/reactive_null_buffers_op.hpp
index 7e6f7b180c..6b1f47c854 100644
--- a/boost/asio/detail/reactive_null_buffers_op.hpp
+++ b/boost/asio/detail/reactive_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_serial_port_service.hpp b/boost/asio/detail/reactive_serial_port_service.hpp
index d8ca699505..898d432fe4 100644
--- a/boost/asio/detail/reactive_serial_port_service.hpp
+++ b/boost/asio/detail/reactive_serial_port_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/reactive_socket_accept_op.hpp b/boost/asio/detail/reactive_socket_accept_op.hpp
index b6165c4c5c..63bc4c0beb 100644
--- a/boost/asio/detail/reactive_socket_accept_op.hpp
+++ b/boost/asio/detail/reactive_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_connect_op.hpp b/boost/asio/detail/reactive_socket_connect_op.hpp
index ff7422fe81..7a0afd01c3 100644
--- a/boost/asio/detail/reactive_socket_connect_op.hpp
+++ b/boost/asio/detail/reactive_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_recv_op.hpp b/boost/asio/detail/reactive_socket_recv_op.hpp
index 32e783706a..bf9fd5865f 100644
--- a/boost/asio/detail/reactive_socket_recv_op.hpp
+++ b/boost/asio/detail/reactive_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_recvfrom_op.hpp b/boost/asio/detail/reactive_socket_recvfrom_op.hpp
index 1c2234017b..a2b50f8aaa 100644
--- a/boost/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/boost/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_recvmsg_op.hpp b/boost/asio/detail/reactive_socket_recvmsg_op.hpp
index abd70a7f47..4c3672484c 100644
--- a/boost/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/boost/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_recvmsg_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_send_op.hpp b/boost/asio/detail/reactive_socket_send_op.hpp
index 7f811277d0..d9775db3e3 100644
--- a/boost/asio/detail/reactive_socket_send_op.hpp
+++ b/boost/asio/detail/reactive_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_sendto_op.hpp b/boost/asio/detail/reactive_socket_sendto_op.hpp
index 1abded437e..6e8595b669 100644
--- a/boost/asio/detail/reactive_socket_sendto_op.hpp
+++ b/boost/asio/detail/reactive_socket_sendto_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_sendto_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_service.hpp b/boost/asio/detail/reactive_socket_service.hpp
index 1e53c0a9f5..bbb6ddba87 100644
--- a/boost/asio/detail/reactive_socket_service.hpp
+++ b/boost/asio/detail/reactive_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactive_socket_service_base.hpp b/boost/asio/detail/reactive_socket_service_base.hpp
index 58b178d3e1..2a429e7aee 100644
--- a/boost/asio/detail/reactive_socket_service_base.hpp
+++ b/boost/asio/detail/reactive_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/reactive_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactor.hpp b/boost/asio/detail/reactor.hpp
index 057933a6d1..9314321baf 100644
--- a/boost/asio/detail/reactor.hpp
+++ b/boost/asio/detail/reactor.hpp
@@ -2,7 +2,7 @@
// detail/reactor.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactor_fwd.hpp b/boost/asio/detail/reactor_fwd.hpp
index 82be114202..a9132e2b0f 100644
--- a/boost/asio/detail/reactor_fwd.hpp
+++ b/boost/asio/detail/reactor_fwd.hpp
@@ -2,7 +2,7 @@
// detail/reactor_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactor_op.hpp b/boost/asio/detail/reactor_op.hpp
index 240a06a862..dd6c4ddabb 100644
--- a/boost/asio/detail/reactor_op.hpp
+++ b/boost/asio/detail/reactor_op.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/reactor_op_queue.hpp b/boost/asio/detail/reactor_op_queue.hpp
index 11887a844b..379a4a2940 100644
--- a/boost/asio/detail/reactor_op_queue.hpp
+++ b/boost/asio/detail/reactor_op_queue.hpp
@@ -2,7 +2,7 @@
// detail/reactor_op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/regex_fwd.hpp b/boost/asio/detail/regex_fwd.hpp
index 9eed6e042f..a0aa6510c4 100644
--- a/boost/asio/detail/regex_fwd.hpp
+++ b/boost/asio/detail/regex_fwd.hpp
@@ -2,7 +2,7 @@
// detail/regex_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/resolve_endpoint_op.hpp b/boost/asio/detail/resolve_endpoint_op.hpp
index 989017bff0..bc6828f9bb 100644
--- a/boost/asio/detail/resolve_endpoint_op.hpp
+++ b/boost/asio/detail/resolve_endpoint_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_endpoint_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/resolve_op.hpp b/boost/asio/detail/resolve_op.hpp
index 5e77a57f66..3c5a43afce 100644
--- a/boost/asio/detail/resolve_op.hpp
+++ b/boost/asio/detail/resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/resolver_service.hpp b/boost/asio/detail/resolver_service.hpp
index cd0d6a7c94..3a43ff320f 100644
--- a/boost/asio/detail/resolver_service.hpp
+++ b/boost/asio/detail/resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/resolver_service_base.hpp b/boost/asio/detail/resolver_service_base.hpp
index 6031315275..f47df9fe8d 100644
--- a/boost/asio/detail/resolver_service_base.hpp
+++ b/boost/asio/detail/resolver_service_base.hpp
@@ -2,7 +2,7 @@
// detail/resolver_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/scoped_lock.hpp b/boost/asio/detail/scoped_lock.hpp
index 574cbf0aac..ca8bf0698a 100644
--- a/boost/asio/detail/scoped_lock.hpp
+++ b/boost/asio/detail/scoped_lock.hpp
@@ -2,7 +2,7 @@
// detail/scoped_lock.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/scoped_ptr.hpp b/boost/asio/detail/scoped_ptr.hpp
index b24320eb98..24c5b72647 100644
--- a/boost/asio/detail/scoped_ptr.hpp
+++ b/boost/asio/detail/scoped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/scoped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/select_interrupter.hpp b/boost/asio/detail/select_interrupter.hpp
index 5abe1a0c87..885014ae78 100644
--- a/boost/asio/detail/select_interrupter.hpp
+++ b/boost/asio/detail/select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/select_reactor.hpp b/boost/asio/detail/select_reactor.hpp
index 6a260fc53e..48c944e405 100644
--- a/boost/asio/detail/select_reactor.hpp
+++ b/boost/asio/detail/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/service_registry.hpp b/boost/asio/detail/service_registry.hpp
index 06ec28c5a3..51d9f601dd 100644
--- a/boost/asio/detail/service_registry.hpp
+++ b/boost/asio/detail/service_registry.hpp
@@ -2,7 +2,7 @@
// detail/service_registry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/shared_ptr.hpp b/boost/asio/detail/shared_ptr.hpp
index fc1facf0ef..f37dcc40cd 100644
--- a/boost/asio/detail/shared_ptr.hpp
+++ b/boost/asio/detail/shared_ptr.hpp
@@ -2,7 +2,7 @@
// detail/shared_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/signal_blocker.hpp b/boost/asio/detail/signal_blocker.hpp
index dfc19f8d79..bfed3fcd8d 100644
--- a/boost/asio/detail/signal_blocker.hpp
+++ b/boost/asio/detail/signal_blocker.hpp
@@ -2,7 +2,7 @@
// detail/signal_blocker.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/signal_handler.hpp b/boost/asio/detail/signal_handler.hpp
index 66518051ce..00d9c9e992 100644
--- a/boost/asio/detail/signal_handler.hpp
+++ b/boost/asio/detail/signal_handler.hpp
@@ -2,7 +2,7 @@
// detail/signal_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/signal_init.hpp b/boost/asio/detail/signal_init.hpp
index 8950ee2b17..67eefe2e1f 100644
--- a/boost/asio/detail/signal_init.hpp
+++ b/boost/asio/detail/signal_init.hpp
@@ -2,7 +2,7 @@
// detail/signal_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/signal_op.hpp b/boost/asio/detail/signal_op.hpp
index f894805523..5faab9813e 100644
--- a/boost/asio/detail/signal_op.hpp
+++ b/boost/asio/detail/signal_op.hpp
@@ -2,7 +2,7 @@
// detail/signal_op.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/signal_set_service.hpp b/boost/asio/detail/signal_set_service.hpp
index 34137f5c98..bfb2280186 100644
--- a/boost/asio/detail/signal_set_service.hpp
+++ b/boost/asio/detail/signal_set_service.hpp
@@ -2,7 +2,7 @@
// detail/signal_set_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/socket_holder.hpp b/boost/asio/detail/socket_holder.hpp
index 87af6b0044..9e8389e767 100644
--- a/boost/asio/detail/socket_holder.hpp
+++ b/boost/asio/detail/socket_holder.hpp
@@ -2,7 +2,7 @@
// detail/socket_holder.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/socket_ops.hpp b/boost/asio/detail/socket_ops.hpp
index 60b64cd8b6..cf213ecb74 100644
--- a/boost/asio/detail/socket_ops.hpp
+++ b/boost/asio/detail/socket_ops.hpp
@@ -2,7 +2,7 @@
// detail/socket_ops.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/socket_option.hpp b/boost/asio/detail/socket_option.hpp
index 0cbf00fb5b..e3bc274469 100644
--- a/boost/asio/detail/socket_option.hpp
+++ b/boost/asio/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/socket_select_interrupter.hpp b/boost/asio/detail/socket_select_interrupter.hpp
index de8b7930b0..0dd5fc2e3f 100644
--- a/boost/asio/detail/socket_select_interrupter.hpp
+++ b/boost/asio/detail/socket_select_interrupter.hpp
@@ -2,7 +2,7 @@
// detail/socket_select_interrupter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
index e8c71093a0..d0c255032d 100644
--- a/boost/asio/detail/socket_types.hpp
+++ b/boost/asio/detail/socket_types.hpp
@@ -2,7 +2,7 @@
// detail/socket_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/solaris_fenced_block.hpp b/boost/asio/detail/solaris_fenced_block.hpp
index 31ccf5013f..28da41c3a2 100644
--- a/boost/asio/detail/solaris_fenced_block.hpp
+++ b/boost/asio/detail/solaris_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/solaris_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/static_mutex.hpp b/boost/asio/detail/static_mutex.hpp
index ea671c9b11..3625c41ffc 100644
--- a/boost/asio/detail/static_mutex.hpp
+++ b/boost/asio/detail/static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/std_event.hpp b/boost/asio/detail/std_event.hpp
index 2bc609493b..1d28bf57aa 100644
--- a/boost/asio/detail/std_event.hpp
+++ b/boost/asio/detail/std_event.hpp
@@ -2,7 +2,7 @@
// detail/std_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/std_mutex.hpp b/boost/asio/detail/std_mutex.hpp
index e9cc4bda69..45ce252c6e 100644
--- a/boost/asio/detail/std_mutex.hpp
+++ b/boost/asio/detail/std_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/std_static_mutex.hpp b/boost/asio/detail/std_static_mutex.hpp
index 2c4063e9de..a7c4274511 100644
--- a/boost/asio/detail/std_static_mutex.hpp
+++ b/boost/asio/detail/std_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/std_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/std_thread.hpp b/boost/asio/detail/std_thread.hpp
index a1934ffa21..25dc64bc8d 100644
--- a/boost/asio/detail/std_thread.hpp
+++ b/boost/asio/detail/std_thread.hpp
@@ -2,7 +2,7 @@
// detail/std_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/strand_service.hpp b/boost/asio/detail/strand_service.hpp
index 51d3211c87..4fe7ed4cb8 100644
--- a/boost/asio/detail/strand_service.hpp
+++ b/boost/asio/detail/strand_service.hpp
@@ -2,7 +2,7 @@
// detail/strand_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/task_io_service.hpp b/boost/asio/detail/task_io_service.hpp
index 8c4617c497..933548ed20 100644
--- a/boost/asio/detail/task_io_service.hpp
+++ b/boost/asio/detail/task_io_service.hpp
@@ -2,7 +2,7 @@
// detail/task_io_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/task_io_service_operation.hpp b/boost/asio/detail/task_io_service_operation.hpp
index 0822bccde5..e63ca2d956 100644
--- a/boost/asio/detail/task_io_service_operation.hpp
+++ b/boost/asio/detail/task_io_service_operation.hpp
@@ -2,7 +2,7 @@
// detail/task_io_service_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/task_io_service_thread_info.hpp b/boost/asio/detail/task_io_service_thread_info.hpp
index c17e1010cb..f0e9b62ee4 100644
--- a/boost/asio/detail/task_io_service_thread_info.hpp
+++ b/boost/asio/detail/task_io_service_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/task_io_service_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/thread.hpp b/boost/asio/detail/thread.hpp
index 1076e6452c..05137375bf 100644
--- a/boost/asio/detail/thread.hpp
+++ b/boost/asio/detail/thread.hpp
@@ -2,7 +2,7 @@
// detail/thread.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/thread_info_base.hpp b/boost/asio/detail/thread_info_base.hpp
index b2b900bee2..bd564e8540 100644
--- a/boost/asio/detail/thread_info_base.hpp
+++ b/boost/asio/detail/thread_info_base.hpp
@@ -2,7 +2,7 @@
// detail/thread_info_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/throw_error.hpp b/boost/asio/detail/throw_error.hpp
index 43e1a69f83..0c3effea9c 100644
--- a/boost/asio/detail/throw_error.hpp
+++ b/boost/asio/detail/throw_error.hpp
@@ -2,7 +2,7 @@
// detail/throw_error.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/throw_exception.hpp b/boost/asio/detail/throw_exception.hpp
index f4cccaa23f..18f7081267 100644
--- a/boost/asio/detail/throw_exception.hpp
+++ b/boost/asio/detail/throw_exception.hpp
@@ -2,7 +2,7 @@
// detail/throw_exception.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_queue.hpp b/boost/asio/detail/timer_queue.hpp
index 3ad6a86919..8c8df3e1b5 100644
--- a/boost/asio/detail/timer_queue.hpp
+++ b/boost/asio/detail/timer_queue.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_queue_base.hpp b/boost/asio/detail/timer_queue_base.hpp
index 4d4898bcaa..f17119804a 100644
--- a/boost/asio/detail/timer_queue_base.hpp
+++ b/boost/asio/detail/timer_queue_base.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_queue_ptime.hpp b/boost/asio/detail/timer_queue_ptime.hpp
index ecde27eb8a..e1a7eff272 100644
--- a/boost/asio/detail/timer_queue_ptime.hpp
+++ b/boost/asio/detail/timer_queue_ptime.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_ptime.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_queue_set.hpp b/boost/asio/detail/timer_queue_set.hpp
index c0d8d1e59b..25d575a628 100644
--- a/boost/asio/detail/timer_queue_set.hpp
+++ b/boost/asio/detail/timer_queue_set.hpp
@@ -2,7 +2,7 @@
// detail/timer_queue_set.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_scheduler.hpp b/boost/asio/detail/timer_scheduler.hpp
index f723cef5c1..74a9c26b3f 100644
--- a/boost/asio/detail/timer_scheduler.hpp
+++ b/boost/asio/detail/timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/timer_scheduler_fwd.hpp b/boost/asio/detail/timer_scheduler_fwd.hpp
index 98d0781dc7..bd1710ec50 100644
--- a/boost/asio/detail/timer_scheduler_fwd.hpp
+++ b/boost/asio/detail/timer_scheduler_fwd.hpp
@@ -2,7 +2,7 @@
// detail/timer_scheduler_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/tss_ptr.hpp b/boost/asio/detail/tss_ptr.hpp
index fa04a4902f..085a3cf64e 100644
--- a/boost/asio/detail/tss_ptr.hpp
+++ b/boost/asio/detail/tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/type_traits.hpp b/boost/asio/detail/type_traits.hpp
index 8bed3d55cd..2d05563645 100644
--- a/boost/asio/detail/type_traits.hpp
+++ b/boost/asio/detail/type_traits.hpp
@@ -2,7 +2,7 @@
// detail/type_traits.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/variadic_templates.hpp b/boost/asio/detail/variadic_templates.hpp
index 890f54c17a..bc6e2078fe 100644
--- a/boost/asio/detail/variadic_templates.hpp
+++ b/boost/asio/detail/variadic_templates.hpp
@@ -2,7 +2,7 @@
// detail/variadic_templates.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/wait_handler.hpp b/boost/asio/detail/wait_handler.hpp
index ed0aeb68aa..016d9ad4fc 100644
--- a/boost/asio/detail/wait_handler.hpp
+++ b/boost/asio/detail/wait_handler.hpp
@@ -2,7 +2,7 @@
// detail/wait_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/wait_op.hpp b/boost/asio/detail/wait_op.hpp
index 8a5dd7fec5..596c529c49 100644
--- a/boost/asio/detail/wait_op.hpp
+++ b/boost/asio/detail/wait_op.hpp
@@ -2,7 +2,7 @@
// detail/wait_op.hpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/weak_ptr.hpp b/boost/asio/detail/weak_ptr.hpp
index 08bc1dd4b9..5a07ad179b 100644
--- a/boost/asio/detail/weak_ptr.hpp
+++ b/boost/asio/detail/weak_ptr.hpp
@@ -2,7 +2,7 @@
// detail/weak_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_event.hpp b/boost/asio/detail/win_event.hpp
index d9aba6cbec..0efc31ee8b 100644
--- a/boost/asio/detail/win_event.hpp
+++ b/boost/asio/detail/win_event.hpp
@@ -2,7 +2,7 @@
// detail/win_event.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_fd_set_adapter.hpp b/boost/asio/detail/win_fd_set_adapter.hpp
index 7687476b5a..bcbc39be6f 100644
--- a/boost/asio/detail/win_fd_set_adapter.hpp
+++ b/boost/asio/detail/win_fd_set_adapter.hpp
@@ -2,7 +2,7 @@
// detail/win_fd_set_adapter.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_fenced_block.hpp b/boost/asio/detail/win_fenced_block.hpp
index a1a82e519a..c6b94c5795 100644
--- a/boost/asio/detail/win_fenced_block.hpp
+++ b/boost/asio/detail/win_fenced_block.hpp
@@ -2,7 +2,7 @@
// detail/win_fenced_block.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_handle_read_op.hpp b/boost/asio/detail/win_iocp_handle_read_op.hpp
index 5f8b8c2494..23a0437ca9 100644
--- a/boost/asio/detail/win_iocp_handle_read_op.hpp
+++ b/boost/asio/detail/win_iocp_handle_read_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/win_iocp_handle_service.hpp b/boost/asio/detail/win_iocp_handle_service.hpp
index f6ca634dc2..aeb42449d4 100644
--- a/boost/asio/detail/win_iocp_handle_service.hpp
+++ b/boost/asio/detail/win_iocp_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/win_iocp_handle_write_op.hpp b/boost/asio/detail/win_iocp_handle_write_op.hpp
index b03fb8bacb..284d02f53d 100644
--- a/boost/asio/detail/win_iocp_handle_write_op.hpp
+++ b/boost/asio/detail/win_iocp_handle_write_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_handle_write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/win_iocp_io_service.hpp b/boost/asio/detail/win_iocp_io_service.hpp
index 9e44c2d1e0..812545f6ee 100644
--- a/boost/asio/detail/win_iocp_io_service.hpp
+++ b/boost/asio/detail/win_iocp_io_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_io_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_null_buffers_op.hpp b/boost/asio/detail/win_iocp_null_buffers_op.hpp
index 91118fb72b..f113dcf664 100644
--- a/boost/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/boost/asio/detail/win_iocp_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_null_buffers_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_operation.hpp b/boost/asio/detail/win_iocp_operation.hpp
index b3b4ae77f5..738e060258 100644
--- a/boost/asio/detail/win_iocp_operation.hpp
+++ b/boost/asio/detail/win_iocp_operation.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_operation.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_overlapped_op.hpp b/boost/asio/detail/win_iocp_overlapped_op.hpp
index da292388db..758954bd87 100644
--- a/boost/asio/detail/win_iocp_overlapped_op.hpp
+++ b/boost/asio/detail/win_iocp_overlapped_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/boost/asio/detail/win_iocp_overlapped_ptr.hpp
index 9177e312bb..822db2084c 100644
--- a/boost/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/boost/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_serial_port_service.hpp b/boost/asio/detail/win_iocp_serial_port_service.hpp
index 96dfa1070e..e127307769 100644
--- a/boost/asio/detail/win_iocp_serial_port_service.hpp
+++ b/boost/asio/detail/win_iocp_serial_port_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/detail/win_iocp_socket_accept_op.hpp b/boost/asio/detail/win_iocp_socket_accept_op.hpp
index 4011c02fc3..8ea3cebafb 100644
--- a/boost/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_accept_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_accept_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_connect_op.hpp b/boost/asio/detail/win_iocp_socket_connect_op.hpp
index c9c5d2ac5b..66b4cbf9d8 100644
--- a/boost/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_recv_op.hpp b/boost/asio/detail/win_iocp_socket_recv_op.hpp
index a5a6a51160..fca5a5f76c 100644
--- a/boost/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp b/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
index ee0503a9f8..dd9bf1ef65 100644
--- a/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recvfrom_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp b/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
index e56c87497a..6345cbe977 100644
--- a/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_recvmsg_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_send_op.hpp b/boost/asio/detail/win_iocp_socket_send_op.hpp
index 362b5fd0c5..1c76b786d5 100644
--- a/boost/asio/detail/win_iocp_socket_send_op.hpp
+++ b/boost/asio/detail/win_iocp_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_service.hpp b/boost/asio/detail/win_iocp_socket_service.hpp
index 90ae4ab5ba..1f3f8fcb94 100644
--- a/boost/asio/detail/win_iocp_socket_service.hpp
+++ b/boost/asio/detail/win_iocp_socket_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_socket_service_base.hpp b/boost/asio/detail/win_iocp_socket_service_base.hpp
index a5335b1001..18b3fb874a 100644
--- a/boost/asio/detail/win_iocp_socket_service_base.hpp
+++ b/boost/asio/detail/win_iocp_socket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_socket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_iocp_thread_info.hpp b/boost/asio/detail/win_iocp_thread_info.hpp
index 8c9b11a1d2..a954df1538 100644
--- a/boost/asio/detail/win_iocp_thread_info.hpp
+++ b/boost/asio/detail/win_iocp_thread_info.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_thread_info.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_mutex.hpp b/boost/asio/detail/win_mutex.hpp
index c2b150b254..aa6549cecf 100644
--- a/boost/asio/detail/win_mutex.hpp
+++ b/boost/asio/detail/win_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_object_handle_service.hpp b/boost/asio/detail/win_object_handle_service.hpp
index 823a24fe0f..f12a002a92 100644
--- a/boost/asio/detail/win_object_handle_service.hpp
+++ b/boost/asio/detail/win_object_handle_service.hpp
@@ -2,7 +2,7 @@
// detail/win_object_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/detail/win_static_mutex.hpp b/boost/asio/detail/win_static_mutex.hpp
index 306fbf6b52..aa19d4ef97 100644
--- a/boost/asio/detail/win_static_mutex.hpp
+++ b/boost/asio/detail/win_static_mutex.hpp
@@ -2,7 +2,7 @@
// detail/win_static_mutex.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_thread.hpp b/boost/asio/detail/win_thread.hpp
index 44bf8da535..0b42245ce3 100644
--- a/boost/asio/detail/win_thread.hpp
+++ b/boost/asio/detail/win_thread.hpp
@@ -2,7 +2,7 @@
// detail/win_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/win_tss_ptr.hpp b/boost/asio/detail/win_tss_ptr.hpp
index c4ec696f8a..ca7aac0a5e 100644
--- a/boost/asio/detail/win_tss_ptr.hpp
+++ b/boost/asio/detail/win_tss_ptr.hpp
@@ -2,7 +2,7 @@
// detail/win_tss_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winapi_thread.hpp b/boost/asio/detail/winapi_thread.hpp
index ce4050b2d1..b74f18f54f 100644
--- a/boost/asio/detail/winapi_thread.hpp
+++ b/boost/asio/detail/winapi_thread.hpp
@@ -2,7 +2,7 @@
// detail/winapi_thread.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/wince_thread.hpp b/boost/asio/detail/wince_thread.hpp
deleted file mode 100644
index 59a9341463..0000000000
--- a/boost/asio/detail/wince_thread.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// detail/wince_thread.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_WINCE_THREAD_HPP
-#define BOOST_ASIO_DETAIL_WINCE_THREAD_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
-
-#include <memory>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-DWORD WINAPI wince_thread_function(LPVOID arg);
-
-class wince_thread
- : private noncopyable
-{
-public:
- // Constructor.
- template <typename Function>
- wince_thread(Function f, unsigned int = 0)
- {
- std::auto_ptr<func_base> arg(new func<Function>(f));
- DWORD thread_id = 0;
- thread_ = ::CreateThread(0, 0, wince_thread_function,
- arg.get(), 0, &thread_id);
- if (!thread_)
- {
- DWORD last_error = ::GetLastError();
- boost::system::error_code ec(last_error,
- boost::asio::error::get_system_category());
- boost::asio::detail::throw_error(ec, "thread");
- }
- arg.release();
- }
-
- // Destructor.
- ~wince_thread()
- {
- ::CloseHandle(thread_);
- }
-
- // Wait for the thread to exit.
- void join()
- {
- ::WaitForSingleObject(thread_, INFINITE);
- }
-
-private:
- friend DWORD WINAPI wince_thread_function(LPVOID arg);
-
- class func_base
- {
- public:
- virtual ~func_base() {}
- virtual void run() = 0;
- };
-
- template <typename Function>
- class func
- : public func_base
- {
- public:
- func(Function f)
- : f_(f)
- {
- }
-
- virtual void run()
- {
- f_();
- }
-
- private:
- Function f_;
- };
-
- ::HANDLE thread_;
-};
-
-inline DWORD WINAPI wince_thread_function(LPVOID arg)
-{
- std::auto_ptr<wince_thread::func_base> func(
- static_cast<wince_thread::func_base*>(arg));
- func->run();
- return 0;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_WINDOWS) && defined(UNDER_CE)
-
-#endif // BOOST_ASIO_DETAIL_WINCE_THREAD_HPP
diff --git a/boost/asio/detail/winrt_async_manager.hpp b/boost/asio/detail/winrt_async_manager.hpp
index 6ae9253f27..1838a8973d 100644
--- a/boost/asio/detail/winrt_async_manager.hpp
+++ b/boost/asio/detail/winrt_async_manager.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_manager.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_async_op.hpp b/boost/asio/detail/winrt_async_op.hpp
index 95e47a38df..012c6eaad6 100644
--- a/boost/asio/detail/winrt_async_op.hpp
+++ b/boost/asio/detail/winrt_async_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_async_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_resolve_op.hpp b/boost/asio/detail/winrt_resolve_op.hpp
index d563e04d31..0f255b1bbf 100644
--- a/boost/asio/detail/winrt_resolve_op.hpp
+++ b/boost/asio/detail/winrt_resolve_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolve_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_resolver_service.hpp b/boost/asio/detail/winrt_resolver_service.hpp
index e6ce7dd357..f476bec963 100644
--- a/boost/asio/detail/winrt_resolver_service.hpp
+++ b/boost/asio/detail/winrt_resolver_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_socket_connect_op.hpp b/boost/asio/detail/winrt_socket_connect_op.hpp
index 6c9dc993d0..f2472c53f5 100644
--- a/boost/asio/detail/winrt_socket_connect_op.hpp
+++ b/boost/asio/detail/winrt_socket_connect_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_socket_recv_op.hpp b/boost/asio/detail/winrt_socket_recv_op.hpp
index 57e80b8bf5..46de1f96a6 100644
--- a/boost/asio/detail/winrt_socket_recv_op.hpp
+++ b/boost/asio/detail/winrt_socket_recv_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_recv_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_socket_send_op.hpp b/boost/asio/detail/winrt_socket_send_op.hpp
index cadfcc4271..77b19517fe 100644
--- a/boost/asio/detail/winrt_socket_send_op.hpp
+++ b/boost/asio/detail/winrt_socket_send_op.hpp
@@ -2,7 +2,7 @@
// detail/winrt_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_ssocket_service.hpp b/boost/asio/detail/winrt_ssocket_service.hpp
index 9897cacd98..a39cf96b2b 100644
--- a/boost/asio/detail/winrt_ssocket_service.hpp
+++ b/boost/asio/detail/winrt_ssocket_service.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_ssocket_service_base.hpp b/boost/asio/detail/winrt_ssocket_service_base.hpp
index 54a435562b..8bc9852d72 100644
--- a/boost/asio/detail/winrt_ssocket_service_base.hpp
+++ b/boost/asio/detail/winrt_ssocket_service_base.hpp
@@ -2,7 +2,7 @@
// detail/winrt_ssocket_service_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_timer_scheduler.hpp b/boost/asio/detail/winrt_timer_scheduler.hpp
index 07b41fa01a..a83aae3331 100644
--- a/boost/asio/detail/winrt_timer_scheduler.hpp
+++ b/boost/asio/detail/winrt_timer_scheduler.hpp
@@ -2,7 +2,7 @@
// detail/winrt_timer_scheduler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winrt_utils.hpp b/boost/asio/detail/winrt_utils.hpp
index d06e7c66aa..07c64626cb 100644
--- a/boost/asio/detail/winrt_utils.hpp
+++ b/boost/asio/detail/winrt_utils.hpp
@@ -2,7 +2,7 @@
// detail/winrt_utils.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/winsock_init.hpp b/boost/asio/detail/winsock_init.hpp
index 46fcd3d79f..4f56988bf6 100644
--- a/boost/asio/detail/winsock_init.hpp
+++ b/boost/asio/detail/winsock_init.hpp
@@ -2,7 +2,7 @@
// detail/winsock_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/detail/wrapped_handler.hpp b/boost/asio/detail/wrapped_handler.hpp
index 6489d6dcec..14056eb953 100644
--- a/boost/asio/detail/wrapped_handler.hpp
+++ b/boost/asio/detail/wrapped_handler.hpp
@@ -2,7 +2,7 @@
// detail/wrapped_handler.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/error.hpp b/boost/asio/error.hpp
index 4252c15b9c..830d2818d2 100644
--- a/boost/asio/error.hpp
+++ b/boost/asio/error.hpp
@@ -2,7 +2,7 @@
// error.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/basic_endpoint.hpp b/boost/asio/generic/basic_endpoint.hpp
index 9b1702ea1b..10bbd629d6 100644
--- a/boost/asio/generic/basic_endpoint.hpp
+++ b/boost/asio/generic/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// generic/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/datagram_protocol.hpp b/boost/asio/generic/datagram_protocol.hpp
index daafb6c39d..cd46ed5b63 100644
--- a/boost/asio/generic/datagram_protocol.hpp
+++ b/boost/asio/generic/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// generic/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/detail/endpoint.hpp b/boost/asio/generic/detail/endpoint.hpp
index 69080a01c5..f28e5349ad 100644
--- a/boost/asio/generic/detail/endpoint.hpp
+++ b/boost/asio/generic/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// generic/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/detail/impl/endpoint.ipp b/boost/asio/generic/detail/impl/endpoint.ipp
index af1950c284..27f33d47fc 100644
--- a/boost/asio/generic/detail/impl/endpoint.ipp
+++ b/boost/asio/generic/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// generic/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/raw_protocol.hpp b/boost/asio/generic/raw_protocol.hpp
index 62f930b588..f85b5499c4 100644
--- a/boost/asio/generic/raw_protocol.hpp
+++ b/boost/asio/generic/raw_protocol.hpp
@@ -2,7 +2,7 @@
// generic/raw_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/seq_packet_protocol.hpp b/boost/asio/generic/seq_packet_protocol.hpp
index 13090fedc0..f320acb90e 100644
--- a/boost/asio/generic/seq_packet_protocol.hpp
+++ b/boost/asio/generic/seq_packet_protocol.hpp
@@ -2,7 +2,7 @@
// generic/seq_packet_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/generic/stream_protocol.hpp b/boost/asio/generic/stream_protocol.hpp
index 5113040c14..63c31d9754 100644
--- a/boost/asio/generic/stream_protocol.hpp
+++ b/boost/asio/generic/stream_protocol.hpp
@@ -2,7 +2,7 @@
// generic/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/handler_alloc_hook.hpp b/boost/asio/handler_alloc_hook.hpp
index 8658683d6f..8f7fb7f65d 100644
--- a/boost/asio/handler_alloc_hook.hpp
+++ b/boost/asio/handler_alloc_hook.hpp
@@ -2,7 +2,7 @@
// handler_alloc_hook.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/handler_continuation_hook.hpp b/boost/asio/handler_continuation_hook.hpp
index dd3d782278..8b660ec3bb 100644
--- a/boost/asio/handler_continuation_hook.hpp
+++ b/boost/asio/handler_continuation_hook.hpp
@@ -2,7 +2,7 @@
// handler_continuation_hook.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/handler_invoke_hook.hpp b/boost/asio/handler_invoke_hook.hpp
index b97a79ce8c..8d28a739c3 100644
--- a/boost/asio/handler_invoke_hook.hpp
+++ b/boost/asio/handler_invoke_hook.hpp
@@ -2,7 +2,7 @@
// handler_invoke_hook.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/handler_type.hpp b/boost/asio/handler_type.hpp
index 14b449f67d..e4f2de8817 100644
--- a/boost/asio/handler_type.hpp
+++ b/boost/asio/handler_type.hpp
@@ -2,7 +2,7 @@
// handler_type.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/high_resolution_timer.hpp b/boost/asio/high_resolution_timer.hpp
index 3474c45219..e319fae8c8 100644
--- a/boost/asio/high_resolution_timer.hpp
+++ b/boost/asio/high_resolution_timer.hpp
@@ -2,7 +2,7 @@
// high_resolution_timer.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/buffered_read_stream.hpp b/boost/asio/impl/buffered_read_stream.hpp
index f45230870d..f1fde031c4 100644
--- a/boost/asio/impl/buffered_read_stream.hpp
+++ b/boost/asio/impl/buffered_read_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_read_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/buffered_write_stream.hpp b/boost/asio/impl/buffered_write_stream.hpp
index d49c9d9680..af741067b6 100644
--- a/boost/asio/impl/buffered_write_stream.hpp
+++ b/boost/asio/impl/buffered_write_stream.hpp
@@ -2,7 +2,7 @@
// impl/buffered_write_stream.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/connect.hpp b/boost/asio/impl/connect.hpp
index b434f7f5d3..e1c0775203 100644
--- a/boost/asio/impl/connect.hpp
+++ b/boost/asio/impl/connect.hpp
@@ -2,7 +2,7 @@
// impl/connect.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -123,6 +123,8 @@ Iterator connect(basic_socket<Protocol, SocketService>& s,
if (!ec)
return iter;
}
+ else
+ break;
}
if (!ec)
diff --git a/boost/asio/impl/error.ipp b/boost/asio/impl/error.ipp
index 635734fcd5..12ccf6f285 100644
--- a/boost/asio/impl/error.ipp
+++ b/boost/asio/impl/error.ipp
@@ -2,7 +2,7 @@
// impl/error.ipp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/handler_alloc_hook.ipp b/boost/asio/impl/handler_alloc_hook.ipp
index 68b7912a78..c60ea51a96 100644
--- a/boost/asio/impl/handler_alloc_hook.ipp
+++ b/boost/asio/impl/handler_alloc_hook.ipp
@@ -2,7 +2,7 @@
// impl/handler_alloc_hook.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/io_service.hpp b/boost/asio/impl/io_service.hpp
index 120d76caa9..1e76497b3b 100644
--- a/boost/asio/impl/io_service.hpp
+++ b/boost/asio/impl/io_service.hpp
@@ -2,7 +2,7 @@
// impl/io_service.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/io_service.ipp b/boost/asio/impl/io_service.ipp
index b6daa0f588..5f287a0d5e 100644
--- a/boost/asio/impl/io_service.ipp
+++ b/boost/asio/impl/io_service.ipp
@@ -2,7 +2,7 @@
// impl/io_service.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/read.hpp b/boost/asio/impl/read.hpp
index d5021a27c8..6ee7e41c4e 100644
--- a/boost/asio/impl/read.hpp
+++ b/boost/asio/impl/read.hpp
@@ -2,7 +2,7 @@
// impl/read.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/read_at.hpp b/boost/asio/impl/read_at.hpp
index c2dbb3b070..783cfc8d54 100644
--- a/boost/asio/impl/read_at.hpp
+++ b/boost/asio/impl/read_at.hpp
@@ -2,7 +2,7 @@
// impl/read_at.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/read_until.hpp b/boost/asio/impl/read_until.hpp
index e516c1f0d6..ade51a2bb6 100644
--- a/boost/asio/impl/read_until.hpp
+++ b/boost/asio/impl/read_until.hpp
@@ -2,7 +2,7 @@
// impl/read_until.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/serial_port_base.hpp b/boost/asio/impl/serial_port_base.hpp
index 247de48bc3..8826acb524 100644
--- a/boost/asio/impl/serial_port_base.hpp
+++ b/boost/asio/impl/serial_port_base.hpp
@@ -2,7 +2,7 @@
// impl/serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/impl/serial_port_base.ipp b/boost/asio/impl/serial_port_base.ipp
index 0c4fdbacd9..fae804bd0e 100644
--- a/boost/asio/impl/serial_port_base.ipp
+++ b/boost/asio/impl/serial_port_base.ipp
@@ -2,7 +2,7 @@
// impl/serial_port_base.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/impl/spawn.hpp b/boost/asio/impl/spawn.hpp
index 7c6b2c240b..f8e5a9e435 100644
--- a/boost/asio/impl/spawn.hpp
+++ b/boost/asio/impl/spawn.hpp
@@ -2,7 +2,7 @@
// impl/spawn.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/src.cpp b/boost/asio/impl/src.cpp
index 15c071456c..9c08fb3ea1 100644
--- a/boost/asio/impl/src.cpp
+++ b/boost/asio/impl/src.cpp
@@ -2,7 +2,7 @@
// impl/src.cpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/src.hpp b/boost/asio/impl/src.hpp
index d638e3622f..137e7f6234 100644
--- a/boost/asio/impl/src.hpp
+++ b/boost/asio/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/src.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/use_future.hpp b/boost/asio/impl/use_future.hpp
index 5acc127bfa..92106f4704 100644
--- a/boost/asio/impl/use_future.hpp
+++ b/boost/asio/impl/use_future.hpp
@@ -2,7 +2,7 @@
// impl/use_future.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the 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,10 +34,12 @@ namespace detail {
{
public:
// Construct from use_future special value.
- template <typename Allocator>
- promise_handler(use_future_t<Allocator> uf)
+ template <typename Alloc>
+ promise_handler(use_future_t<Alloc> uf)
: promise_(std::allocate_shared<std::promise<T> >(
- uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
+ typename Alloc::template rebind<char>::other(uf.get_allocator()),
+ std::allocator_arg,
+ typename Alloc::template rebind<char>::other(uf.get_allocator())))
{
}
@@ -66,10 +68,12 @@ namespace detail {
{
public:
// Construct from use_future special value. Used during rebinding.
- template <typename Allocator>
- promise_handler(use_future_t<Allocator> uf)
+ template <typename Alloc>
+ promise_handler(use_future_t<Alloc> uf)
: promise_(std::allocate_shared<std::promise<void> >(
- uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
+ typename Alloc::template rebind<char>::other(uf.get_allocator()),
+ std::allocator_arg,
+ typename Alloc::template rebind<char>::other(uf.get_allocator())))
{
}
diff --git a/boost/asio/impl/write.hpp b/boost/asio/impl/write.hpp
index af3b279abe..ead03d87b7 100644
--- a/boost/asio/impl/write.hpp
+++ b/boost/asio/impl/write.hpp
@@ -2,7 +2,7 @@
// impl/write.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/impl/write_at.hpp b/boost/asio/impl/write_at.hpp
index 85a7610c15..18cf4ab597 100644
--- a/boost/asio/impl/write_at.hpp
+++ b/boost/asio/impl/write_at.hpp
@@ -2,7 +2,7 @@
// impl/write_at.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/io_service.hpp b/boost/asio/io_service.hpp
index ffbd9ce2ab..1226530cfe 100644
--- a/boost/asio/io_service.hpp
+++ b/boost/asio/io_service.hpp
@@ -2,7 +2,7 @@
// io_service.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/address.hpp b/boost/asio/ip/address.hpp
index 01485e9206..858c375373 100644
--- a/boost/asio/ip/address.hpp
+++ b/boost/asio/ip/address.hpp
@@ -2,7 +2,7 @@
// ip/address.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/address_v4.hpp b/boost/asio/ip/address_v4.hpp
index a03dac9f20..a010014807 100644
--- a/boost/asio/ip/address_v4.hpp
+++ b/boost/asio/ip/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/address_v4.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/address_v6.hpp b/boost/asio/ip/address_v6.hpp
index 11dad23e44..35a86e423a 100644
--- a/boost/asio/ip/address_v6.hpp
+++ b/boost/asio/ip/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/basic_endpoint.hpp b/boost/asio/ip/basic_endpoint.hpp
index 347aede689..35075daf7d 100644
--- a/boost/asio/ip/basic_endpoint.hpp
+++ b/boost/asio/ip/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/basic_resolver.hpp b/boost/asio/ip/basic_resolver.hpp
index 743f9d1348..e930c73693 100644
--- a/boost/asio/ip/basic_resolver.hpp
+++ b/boost/asio/ip/basic_resolver.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/basic_resolver_entry.hpp b/boost/asio/ip/basic_resolver_entry.hpp
index bb4111715d..79733dcd64 100644
--- a/boost/asio/ip/basic_resolver_entry.hpp
+++ b/boost/asio/ip/basic_resolver_entry.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_entry.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/basic_resolver_iterator.hpp b/boost/asio/ip/basic_resolver_iterator.hpp
index 9b0f678e10..84c0e94fc1 100644
--- a/boost/asio/ip/basic_resolver_iterator.hpp
+++ b/boost/asio/ip/basic_resolver_iterator.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_iterator.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/basic_resolver_query.hpp b/boost/asio/ip/basic_resolver_query.hpp
index 15f5f2b6ce..0ba6d7b9cb 100644
--- a/boost/asio/ip/basic_resolver_query.hpp
+++ b/boost/asio/ip/basic_resolver_query.hpp
@@ -2,7 +2,7 @@
// ip/basic_resolver_query.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/detail/endpoint.hpp b/boost/asio/ip/detail/endpoint.hpp
index c0e7e1de82..4fea9feb47 100644
--- a/boost/asio/ip/detail/endpoint.hpp
+++ b/boost/asio/ip/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// ip/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/detail/impl/endpoint.ipp b/boost/asio/ip/detail/impl/endpoint.ipp
index 4cd0c2bee2..02a5a82558 100644
--- a/boost/asio/ip/detail/impl/endpoint.ipp
+++ b/boost/asio/ip/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// ip/detail/impl/endpoint.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/detail/socket_option.hpp b/boost/asio/ip/detail/socket_option.hpp
index 125a219c95..597e7e3bc0 100644
--- a/boost/asio/ip/detail/socket_option.hpp
+++ b/boost/asio/ip/detail/socket_option.hpp
@@ -2,7 +2,7 @@
// detail/socket_option.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/host_name.hpp b/boost/asio/ip/host_name.hpp
index f43ad3631d..0050726669 100644
--- a/boost/asio/ip/host_name.hpp
+++ b/boost/asio/ip/host_name.hpp
@@ -2,7 +2,7 @@
// ip/host_name.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/icmp.hpp b/boost/asio/ip/icmp.hpp
index a0f3493e30..901fb0240e 100644
--- a/boost/asio/ip/icmp.hpp
+++ b/boost/asio/ip/icmp.hpp
@@ -2,7 +2,7 @@
// ip/icmp.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address.hpp b/boost/asio/ip/impl/address.hpp
index f55fbfcf39..c25f845139 100644
--- a/boost/asio/ip/impl/address.hpp
+++ b/boost/asio/ip/impl/address.hpp
@@ -2,7 +2,7 @@
// ip/impl/address.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address.ipp b/boost/asio/ip/impl/address.ipp
index e2c9c8d3eb..3fbfbfd04b 100644
--- a/boost/asio/ip/impl/address.ipp
+++ b/boost/asio/ip/impl/address.ipp
@@ -2,7 +2,7 @@
// ip/impl/address.ipp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address_v4.hpp b/boost/asio/ip/impl/address_v4.hpp
index 33ca80c39c..722d000ead 100644
--- a/boost/asio/ip/impl/address_v4.hpp
+++ b/boost/asio/ip/impl/address_v4.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address_v4.ipp b/boost/asio/ip/impl/address_v4.ipp
index b9bdf4deb8..c7fddf5429 100644
--- a/boost/asio/ip/impl/address_v4.ipp
+++ b/boost/asio/ip/impl/address_v4.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v4.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address_v6.hpp b/boost/asio/ip/impl/address_v6.hpp
index dee6a1e915..c1b6bbc986 100644
--- a/boost/asio/ip/impl/address_v6.hpp
+++ b/boost/asio/ip/impl/address_v6.hpp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/address_v6.ipp b/boost/asio/ip/impl/address_v6.ipp
index 1080c99d7d..1b6a6adbd5 100644
--- a/boost/asio/ip/impl/address_v6.ipp
+++ b/boost/asio/ip/impl/address_v6.ipp
@@ -2,7 +2,7 @@
// ip/impl/address_v6.ipp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/basic_endpoint.hpp b/boost/asio/ip/impl/basic_endpoint.hpp
index a92d92a28a..a0ff034a43 100644
--- a/boost/asio/ip/impl/basic_endpoint.hpp
+++ b/boost/asio/ip/impl/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// ip/impl/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/impl/host_name.ipp b/boost/asio/ip/impl/host_name.ipp
index 4ee5639472..aab0f2f472 100644
--- a/boost/asio/ip/impl/host_name.ipp
+++ b/boost/asio/ip/impl/host_name.ipp
@@ -2,7 +2,7 @@
// ip/impl/host_name.ipp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/multicast.hpp b/boost/asio/ip/multicast.hpp
index 677eac28b3..e5c2f07037 100644
--- a/boost/asio/ip/multicast.hpp
+++ b/boost/asio/ip/multicast.hpp
@@ -2,7 +2,7 @@
// ip/multicast.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/resolver_query_base.hpp b/boost/asio/ip/resolver_query_base.hpp
index e220ce4b6b..e894278e72 100644
--- a/boost/asio/ip/resolver_query_base.hpp
+++ b/boost/asio/ip/resolver_query_base.hpp
@@ -2,7 +2,7 @@
// ip/resolver_query_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/resolver_service.hpp b/boost/asio/ip/resolver_service.hpp
index 2695c5d91b..f894ffb8fc 100644
--- a/boost/asio/ip/resolver_service.hpp
+++ b/boost/asio/ip/resolver_service.hpp
@@ -2,7 +2,7 @@
// ip/resolver_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/tcp.hpp b/boost/asio/ip/tcp.hpp
index b00433d053..71c6fb921c 100644
--- a/boost/asio/ip/tcp.hpp
+++ b/boost/asio/ip/tcp.hpp
@@ -2,7 +2,7 @@
// ip/tcp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/udp.hpp b/boost/asio/ip/udp.hpp
index 81ec3cc244..4642b1c7d1 100644
--- a/boost/asio/ip/udp.hpp
+++ b/boost/asio/ip/udp.hpp
@@ -2,7 +2,7 @@
// ip/udp.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/unicast.hpp b/boost/asio/ip/unicast.hpp
index 2286469815..1755a49b74 100644
--- a/boost/asio/ip/unicast.hpp
+++ b/boost/asio/ip/unicast.hpp
@@ -2,7 +2,7 @@
// ip/unicast.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ip/v6_only.hpp b/boost/asio/ip/v6_only.hpp
index a759d5576b..4f9b218686 100644
--- a/boost/asio/ip/v6_only.hpp
+++ b/boost/asio/ip/v6_only.hpp
@@ -2,7 +2,7 @@
// ip/v6_only.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/is_read_buffered.hpp b/boost/asio/is_read_buffered.hpp
index 7cb3643d2c..aea0049145 100644
--- a/boost/asio/is_read_buffered.hpp
+++ b/boost/asio/is_read_buffered.hpp
@@ -2,7 +2,7 @@
// is_read_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/is_write_buffered.hpp b/boost/asio/is_write_buffered.hpp
index 02ce6c25e0..0a3279c934 100644
--- a/boost/asio/is_write_buffered.hpp
+++ b/boost/asio/is_write_buffered.hpp
@@ -2,7 +2,7 @@
// is_write_buffered.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/local/basic_endpoint.hpp b/boost/asio/local/basic_endpoint.hpp
index 753b54ed98..a5dd34f355 100644
--- a/boost/asio/local/basic_endpoint.hpp
+++ b/boost/asio/local/basic_endpoint.hpp
@@ -2,7 +2,7 @@
// local/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/local/connect_pair.hpp b/boost/asio/local/connect_pair.hpp
index dcb9ccdb8b..c3a5bc6627 100644
--- a/boost/asio/local/connect_pair.hpp
+++ b/boost/asio/local/connect_pair.hpp
@@ -2,7 +2,7 @@
// local/connect_pair.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/local/datagram_protocol.hpp b/boost/asio/local/datagram_protocol.hpp
index 53d3809013..faf42ef62a 100644
--- a/boost/asio/local/datagram_protocol.hpp
+++ b/boost/asio/local/datagram_protocol.hpp
@@ -2,7 +2,7 @@
// local/datagram_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/local/detail/endpoint.hpp b/boost/asio/local/detail/endpoint.hpp
index 91eb0f9654..04e077baf5 100644
--- a/boost/asio/local/detail/endpoint.hpp
+++ b/boost/asio/local/detail/endpoint.hpp
@@ -2,7 +2,7 @@
// local/detail/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/local/detail/impl/endpoint.ipp b/boost/asio/local/detail/impl/endpoint.ipp
index 6cf7640d4a..98a0c14f5a 100644
--- a/boost/asio/local/detail/impl/endpoint.ipp
+++ b/boost/asio/local/detail/impl/endpoint.ipp
@@ -2,7 +2,7 @@
// local/detail/impl/endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/local/stream_protocol.hpp b/boost/asio/local/stream_protocol.hpp
index c3f2472729..655a8b306c 100644
--- a/boost/asio/local/stream_protocol.hpp
+++ b/boost/asio/local/stream_protocol.hpp
@@ -2,7 +2,7 @@
// local/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/placeholders.hpp b/boost/asio/placeholders.hpp
index c7650f174e..36a36b0c65 100644
--- a/boost/asio/placeholders.hpp
+++ b/boost/asio/placeholders.hpp
@@ -2,7 +2,7 @@
// placeholders.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/posix/basic_descriptor.hpp b/boost/asio/posix/basic_descriptor.hpp
index 7222722f8e..896d00d8c3 100644
--- a/boost/asio/posix/basic_descriptor.hpp
+++ b/boost/asio/posix/basic_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/posix/basic_stream_descriptor.hpp b/boost/asio/posix/basic_stream_descriptor.hpp
index 2a800d5002..4b8498de67 100644
--- a/boost/asio/posix/basic_stream_descriptor.hpp
+++ b/boost/asio/posix/basic_stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/basic_stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/posix/descriptor_base.hpp b/boost/asio/posix/descriptor_base.hpp
index 6287517efa..d9e8fbd6a4 100644
--- a/boost/asio/posix/descriptor_base.hpp
+++ b/boost/asio/posix/descriptor_base.hpp
@@ -2,7 +2,7 @@
// posix/descriptor_base.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/posix/stream_descriptor.hpp b/boost/asio/posix/stream_descriptor.hpp
index 231cd77ee7..9708489577 100644
--- a/boost/asio/posix/stream_descriptor.hpp
+++ b/boost/asio/posix/stream_descriptor.hpp
@@ -2,7 +2,7 @@
// posix/stream_descriptor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/posix/stream_descriptor_service.hpp b/boost/asio/posix/stream_descriptor_service.hpp
index ab1e72e217..364fbdae31 100644
--- a/boost/asio/posix/stream_descriptor_service.hpp
+++ b/boost/asio/posix/stream_descriptor_service.hpp
@@ -2,7 +2,7 @@
// posix/stream_descriptor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/raw_socket_service.hpp b/boost/asio/raw_socket_service.hpp
index 4849bf41cb..37040956be 100644
--- a/boost/asio/raw_socket_service.hpp
+++ b/boost/asio/raw_socket_service.hpp
@@ -2,7 +2,7 @@
// raw_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/read.hpp b/boost/asio/read.hpp
index 559bc43a57..6e0284011e 100644
--- a/boost/asio/read.hpp
+++ b/boost/asio/read.hpp
@@ -2,7 +2,7 @@
// read.hpp
// ~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/read_at.hpp b/boost/asio/read_at.hpp
index fe85139fd5..95628e602b 100644
--- a/boost/asio/read_at.hpp
+++ b/boost/asio/read_at.hpp
@@ -2,7 +2,7 @@
// read_at.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/read_until.hpp b/boost/asio/read_until.hpp
index ece4ca8998..833fbe700f 100644
--- a/boost/asio/read_until.hpp
+++ b/boost/asio/read_until.hpp
@@ -2,7 +2,7 @@
// read_until.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/seq_packet_socket_service.hpp b/boost/asio/seq_packet_socket_service.hpp
index 31d5165b1b..b48bbc4aab 100644
--- a/boost/asio/seq_packet_socket_service.hpp
+++ b/boost/asio/seq_packet_socket_service.hpp
@@ -2,7 +2,7 @@
// seq_packet_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/serial_port.hpp b/boost/asio/serial_port.hpp
index 64fad65089..6acac7181c 100644
--- a/boost/asio/serial_port.hpp
+++ b/boost/asio/serial_port.hpp
@@ -2,7 +2,7 @@
// serial_port.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/serial_port_base.hpp b/boost/asio/serial_port_base.hpp
index 8132262442..36e454a1ab 100644
--- a/boost/asio/serial_port_base.hpp
+++ b/boost/asio/serial_port_base.hpp
@@ -2,7 +2,7 @@
// serial_port_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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/boost/asio/serial_port_service.hpp b/boost/asio/serial_port_service.hpp
index b648327749..3e3812d28f 100644
--- a/boost/asio/serial_port_service.hpp
+++ b/boost/asio/serial_port_service.hpp
@@ -2,7 +2,7 @@
// serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/signal_set.hpp b/boost/asio/signal_set.hpp
index 549f2b6613..18b5d4440b 100644
--- a/boost/asio/signal_set.hpp
+++ b/boost/asio/signal_set.hpp
@@ -2,7 +2,7 @@
// signal_set.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/signal_set_service.hpp b/boost/asio/signal_set_service.hpp
index 41c7fcec5a..107de75409 100644
--- a/boost/asio/signal_set_service.hpp
+++ b/boost/asio/signal_set_service.hpp
@@ -2,7 +2,7 @@
// signal_set_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/socket_acceptor_service.hpp b/boost/asio/socket_acceptor_service.hpp
index d3f8fe4b51..bcc9c46934 100644
--- a/boost/asio/socket_acceptor_service.hpp
+++ b/boost/asio/socket_acceptor_service.hpp
@@ -2,7 +2,7 @@
// socket_acceptor_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/socket_base.hpp b/boost/asio/socket_base.hpp
index 88889a1c9e..0d28351545 100644
--- a/boost/asio/socket_base.hpp
+++ b/boost/asio/socket_base.hpp
@@ -2,7 +2,7 @@
// socket_base.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/spawn.hpp b/boost/asio/spawn.hpp
index 2854bfad89..f37744235e 100644
--- a/boost/asio/spawn.hpp
+++ b/boost/asio/spawn.hpp
@@ -2,7 +2,7 @@
// spawn.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl.hpp b/boost/asio/ssl.hpp
index ddd2f365de..8e2a4fbe50 100644
--- a/boost/asio/ssl.hpp
+++ b/boost/asio/ssl.hpp
@@ -2,7 +2,7 @@
// ssl.hpp
// ~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/basic_context.hpp b/boost/asio/ssl/basic_context.hpp
index 6b6b1b353c..7a0f727f42 100644
--- a/boost/asio/ssl/basic_context.hpp
+++ b/boost/asio/ssl/basic_context.hpp
@@ -2,7 +2,7 @@
// ssl/basic_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/context.hpp b/boost/asio/ssl/context.hpp
index 2e5b282724..3cf2607737 100644
--- a/boost/asio/ssl/context.hpp
+++ b/boost/asio/ssl/context.hpp
@@ -2,7 +2,7 @@
// ssl/context.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/context_base.hpp b/boost/asio/ssl/context_base.hpp
index 8bf128db66..6ee54cb457 100644
--- a/boost/asio/ssl/context_base.hpp
+++ b/boost/asio/ssl/context_base.hpp
@@ -2,7 +2,7 @@
// ssl/context_base.hpp
// ~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/context_service.hpp b/boost/asio/ssl/context_service.hpp
index 1a1b1797ed..098c403772 100644
--- a/boost/asio/ssl/context_service.hpp
+++ b/boost/asio/ssl/context_service.hpp
@@ -2,7 +2,7 @@
// ssl/context_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/buffered_handshake_op.hpp b/boost/asio/ssl/detail/buffered_handshake_op.hpp
index 74f12f41a8..bd0bc6aac1 100644
--- a/boost/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/boost/asio/ssl/detail/buffered_handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/buffered_handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/engine.hpp b/boost/asio/ssl/detail/engine.hpp
index b84c22c2fd..bd5b821d37 100644
--- a/boost/asio/ssl/detail/engine.hpp
+++ b/boost/asio/ssl/detail/engine.hpp
@@ -2,7 +2,7 @@
// ssl/detail/engine.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/handshake_op.hpp b/boost/asio/ssl/detail/handshake_op.hpp
index d8be283a0d..9e32965fec 100644
--- a/boost/asio/ssl/detail/handshake_op.hpp
+++ b/boost/asio/ssl/detail/handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/impl/engine.ipp b/boost/asio/ssl/detail/impl/engine.ipp
index 3fcfd70d8e..f15f2e3800 100644
--- a/boost/asio/ssl/detail/impl/engine.ipp
+++ b/boost/asio/ssl/detail/impl/engine.ipp
@@ -2,7 +2,7 @@
// ssl/detail/impl/engine.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -203,23 +203,21 @@ const boost::system::error_code& engine::map_error_code(
// If there's data yet to be read, it's an error.
if (BIO_wpending(ext_bio_))
{
- ec = boost::system::error_code(
- ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
- boost::asio::error::get_ssl_category());
+ ec = boost::asio::ssl::error::stream_truncated;
return ec;
}
// SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
// underlying transport is passed through.
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
if (ssl_->version == SSL2_VERSION)
return ec;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
// Otherwise, the peer should have negotiated a proper shutdown.
if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0)
{
- ec = boost::system::error_code(
- ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
- boost::asio::error::get_ssl_category());
+ ec = boost::asio::ssl::error::stream_truncated;
}
return ec;
diff --git a/boost/asio/ssl/detail/impl/openssl_init.ipp b/boost/asio/ssl/detail/impl/openssl_init.ipp
index 8326c84144..94b67f3792 100644
--- a/boost/asio/ssl/detail/impl/openssl_init.ipp
+++ b/boost/asio/ssl/detail/impl/openssl_init.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the 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,11 +40,15 @@ public:
::SSL_load_error_strings();
::OpenSSL_add_all_algorithms();
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
mutexes_.resize(::CRYPTO_num_locks());
for (size_t i = 0; i < mutexes_.size(); ++i)
mutexes_[i].reset(new boost::asio::detail::mutex);
::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
::CRYPTO_set_id_callback(&do_init::openssl_id_func);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
#if !defined(SSL_OP_NO_COMPRESSION) \
&& (OPENSSL_VERSION_NUMBER >= 0x00908000L)
@@ -61,20 +65,33 @@ public:
#endif // !defined(SSL_OP_NO_COMPRESSION)
// && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
::CRYPTO_set_id_callback(0);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
::CRYPTO_set_locking_callback(0);
::ERR_free_strings();
-#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
- ::ERR_remove_thread_state(NULL);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
- ::ERR_remove_state(0);
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
::EVP_cleanup();
::CRYPTO_cleanup_all_ex_data();
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
+ ::ERR_remove_state(0);
+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::ERR_remove_thread_state(NULL);
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::SSL_COMP_free_compression_methods();
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+ // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if !defined(OPENSSL_IS_BORINGSSL)
::CONF_modules_unload(1);
-#if !defined(OPENSSL_NO_ENGINE)
+#endif // !defined(OPENSSL_IS_BORINGSSL)
+#if !defined(OPENSSL_NO_ENGINE) \
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L)
::ENGINE_cleanup();
#endif // !defined(OPENSSL_NO_ENGINE)
+ // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
}
#if !defined(SSL_OP_NO_COMPRESSION) \
@@ -87,19 +104,20 @@ public:
// && (OPENSSL_VERSION_NUMBER >= 0x00908000L)
private:
+#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
static unsigned long openssl_id_func()
{
#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
return ::GetCurrentThreadId();
#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- void* id = instance()->thread_id_;
- if (id == 0)
- instance()->thread_id_ = id = &id; // Ugh.
+ void* id = &errno;
BOOST_ASIO_ASSERT(sizeof(unsigned long) >= sizeof(void*));
return reinterpret_cast<unsigned long>(id);
#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
}
+#endif // (OPENSSL_VERSION_NUMBER < 0x10000000L)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
static void openssl_locking_func(int mode, int n,
const char* /*file*/, int /*line*/)
{
@@ -112,11 +130,7 @@ private:
// Mutexes to be used in locking callbacks.
std::vector<boost::asio::detail::shared_ptr<
boost::asio::detail::mutex> > mutexes_;
-
-#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
- // The thread identifiers to be used by openssl.
- boost::asio::detail::tss_ptr<void> thread_id_;
-#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
#if !defined(SSL_OP_NO_COMPRESSION) \
&& (OPENSSL_VERSION_NUMBER >= 0x00908000L)
diff --git a/boost/asio/ssl/detail/io.hpp b/boost/asio/ssl/detail/io.hpp
index 2e889ec8b0..13494ad6b1 100644
--- a/boost/asio/ssl/detail/io.hpp
+++ b/boost/asio/ssl/detail/io.hpp
@@ -2,7 +2,7 @@
// ssl/detail/io.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/openssl_init.hpp b/boost/asio/ssl/detail/openssl_init.hpp
index 221709aa03..447dbf628a 100644
--- a/boost/asio/ssl/detail/openssl_init.hpp
+++ b/boost/asio/ssl/detail/openssl_init.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/openssl_types.hpp b/boost/asio/ssl/detail/openssl_types.hpp
index c83d110b2a..d616d7a5f9 100644
--- a/boost/asio/ssl/detail/openssl_types.hpp
+++ b/boost/asio/ssl/detail/openssl_types.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +21,9 @@
#if !defined(OPENSSL_NO_ENGINE)
# include <openssl/engine.h>
#endif // !defined(OPENSSL_NO_ENGINE)
+#include <openssl/dh.h>
#include <openssl/err.h>
+#include <openssl/rsa.h>
#include <openssl/x509v3.h>
#include <boost/asio/detail/socket_types.hpp>
diff --git a/boost/asio/ssl/detail/password_callback.hpp b/boost/asio/ssl/detail/password_callback.hpp
index 1ba89900bd..07f1bd6058 100644
--- a/boost/asio/ssl/detail/password_callback.hpp
+++ b/boost/asio/ssl/detail/password_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/password_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/read_op.hpp b/boost/asio/ssl/detail/read_op.hpp
index df50540e63..7708e8f0e7 100644
--- a/boost/asio/ssl/detail/read_op.hpp
+++ b/boost/asio/ssl/detail/read_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/shutdown_op.hpp b/boost/asio/ssl/detail/shutdown_op.hpp
index 1a206c1643..f9b20533c9 100644
--- a/boost/asio/ssl/detail/shutdown_op.hpp
+++ b/boost/asio/ssl/detail/shutdown_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/shutdown_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/stream_core.hpp b/boost/asio/ssl/detail/stream_core.hpp
index 2ef4110fc7..a0a5aaf2d5 100644
--- a/boost/asio/ssl/detail/stream_core.hpp
+++ b/boost/asio/ssl/detail/stream_core.hpp
@@ -2,7 +2,7 @@
// ssl/detail/stream_core.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/verify_callback.hpp b/boost/asio/ssl/detail/verify_callback.hpp
index 5ddc89a9e1..159c1da028 100644
--- a/boost/asio/ssl/detail/verify_callback.hpp
+++ b/boost/asio/ssl/detail/verify_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/verify_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/write_op.hpp b/boost/asio/ssl/detail/write_op.hpp
index d7b49c936b..c9bf877930 100644
--- a/boost/asio/ssl/detail/write_op.hpp
+++ b/boost/asio/ssl/detail/write_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/error.hpp b/boost/asio/ssl/error.hpp
index eb95e8c140..7f85fbd04f 100644
--- a/boost/asio/ssl/error.hpp
+++ b/boost/asio/ssl/error.hpp
@@ -2,7 +2,7 @@
// ssl/error.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -26,6 +26,7 @@ namespace error {
enum ssl_errors
{
+ // Error numbers are those produced by openssl.
};
extern BOOST_ASIO_DECL
@@ -35,6 +36,29 @@ static const boost::system::error_category& ssl_category
= boost::asio::error::get_ssl_category();
} // namespace error
+namespace ssl {
+namespace error {
+
+enum stream_errors
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The underlying stream closed before the ssl stream gracefully shut down.
+ stream_truncated
+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+ stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)
+#else
+ stream_truncated = 1
+#endif
+};
+
+extern BOOST_ASIO_DECL
+const boost::system::error_category& get_stream_category();
+
+static const boost::system::error_category& stream_category
+ = boost::asio::ssl::error::get_stream_category();
+
+} // namespace error
+} // namespace ssl
} // namespace asio
} // namespace boost
@@ -46,6 +70,11 @@ template<> struct is_error_code_enum<boost::asio::error::ssl_errors>
static const bool value = true;
};
+template<> struct is_error_code_enum<boost::asio::ssl::error::stream_errors>
+{
+ static const bool value = true;
+};
+
} // namespace system
} // namespace boost
@@ -60,6 +89,17 @@ inline boost::system::error_code make_error_code(ssl_errors e)
}
} // namespace error
+namespace ssl {
+namespace error {
+
+inline boost::system::error_code make_error_code(stream_errors e)
+{
+ return boost::system::error_code(
+ static_cast<int>(e), get_stream_category());
+}
+
+} // namespace error
+} // namespace ssl
} // namespace asio
} // namespace boost
diff --git a/boost/asio/ssl/impl/context.hpp b/boost/asio/ssl/impl/context.hpp
index c4a751e8ff..797a9e1c78 100644
--- a/boost/asio/ssl/impl/context.hpp
+++ b/boost/asio/ssl/impl/context.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/impl/context.ipp b/boost/asio/ssl/impl/context.ipp
index acb191a706..aea2cbd528 100644
--- a/boost/asio/ssl/impl/context.ipp
+++ b/boost/asio/ssl/impl/context.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -71,7 +71,8 @@ context::context(context::method m)
switch (m)
{
-#if defined(OPENSSL_NO_SSL2)
+#if defined(OPENSSL_NO_SSL2) \
+ || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
case context::sslv2:
case context::sslv2_client:
case context::sslv2_server:
@@ -79,6 +80,7 @@ context::context(context::method m)
boost::asio::error::invalid_argument, "context");
break;
#else // defined(OPENSSL_NO_SSL2)
+ // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
case context::sslv2:
handle_ = ::SSL_CTX_new(::SSLv2_method());
break;
@@ -89,6 +91,7 @@ context::context(context::method m)
handle_ = ::SSL_CTX_new(::SSLv2_server_method());
break;
#endif // defined(OPENSSL_NO_SSL2)
+ // || (OPENSSL_VERSION_NUMBER >= 0x10100000L)
#if defined(OPENSSL_NO_SSL3)
case context::sslv3:
case context::sslv3_client:
@@ -107,6 +110,7 @@ context::context(context::method m)
handle_ = ::SSL_CTX_new(::SSLv3_server_method());
break;
#endif // defined(OPENSSL_NO_SSL3)
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
case context::tlsv1:
handle_ = ::SSL_CTX_new(::TLSv1_method());
break;
@@ -116,6 +120,7 @@ context::context(context::method m)
case context::tlsv1_server:
handle_ = ::SSL_CTX_new(::TLSv1_server_method());
break;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
case context::sslv23:
handle_ = ::SSL_CTX_new(::SSLv23_method());
break;
@@ -125,6 +130,7 @@ context::context(context::method m)
case context::sslv23_server:
handle_ = ::SSL_CTX_new(::SSLv23_server_method());
break;
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
#if defined(SSL_TXT_TLSV1_1)
case context::tlsv11:
handle_ = ::SSL_CTX_new(::TLSv1_1_method());
@@ -161,6 +167,23 @@ context::context(context::method m)
boost::asio::error::invalid_argument, "context");
break;
#endif // defined(SSL_TXT_TLSV1_2)
+#else // (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ case context::tlsv1:
+ case context::tlsv11:
+ case context::tlsv12:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ break;
+ case context::tlsv1_client:
+ case context::tlsv11_client:
+ case context::tlsv12_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ break;
+ case context::tlsv1_server:
+ case context::tlsv11_server:
+ case context::tlsv12_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ break;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
default:
handle_ = ::SSL_CTX_new(0);
break;
@@ -205,13 +228,22 @@ context::~context()
{
if (handle_)
{
- if (handle_->default_passwd_callback_userdata)
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ if (cb_userdata)
{
detail::password_callback_base* callback =
static_cast<detail::password_callback_base*>(
- handle_->default_passwd_callback_userdata);
+ cb_userdata);
delete callback;
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
handle_->default_passwd_callback_userdata = 0;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
}
if (SSL_CTX_get_app_data(handle_))
@@ -546,10 +578,17 @@ boost::system::error_code context::use_certificate_chain(
bio_cleanup bio = { make_buffer_bio(chain) };
if (bio.p)
{
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
x509_cleanup cert = {
::PEM_read_bio_X509_AUX(bio.p, 0,
- handle_->default_passwd_callback,
- handle_->default_passwd_callback_userdata) };
+ callback,
+ cb_userdata) };
if (!cert.p)
{
ec = boost::system::error_code(ERR_R_PEM_LIB,
@@ -577,8 +616,8 @@ boost::system::error_code context::use_certificate_chain(
#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0,
- handle_->default_passwd_callback,
- handle_->default_passwd_callback_userdata))
+ callback,
+ cb_userdata))
{
if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
{
@@ -643,6 +682,14 @@ boost::system::error_code context::use_private_key(
{
::ERR_clear_error();
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
bio_cleanup bio = { make_buffer_bio(private_key) };
if (bio.p)
{
@@ -654,8 +701,8 @@ boost::system::error_code context::use_private_key(
break;
case context_base::pem:
evp_private_key.p = ::PEM_read_bio_PrivateKey(
- bio.p, 0, handle_->default_passwd_callback,
- handle_->default_passwd_callback_userdata);
+ bio.p, 0, callback,
+ cb_userdata);
break;
default:
{
@@ -702,6 +749,14 @@ boost::system::error_code context::use_rsa_private_key(
{
::ERR_clear_error();
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
bio_cleanup bio = { make_buffer_bio(private_key) };
if (bio.p)
{
@@ -713,8 +768,8 @@ boost::system::error_code context::use_rsa_private_key(
break;
case context_base::pem:
rsa_private_key.p = ::PEM_read_bio_RSAPrivateKey(
- bio.p, 0, handle_->default_passwd_callback,
- handle_->default_passwd_callback_userdata);
+ bio.p, 0, callback,
+ cb_userdata);
break;
default:
{
@@ -933,11 +988,17 @@ int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx)
boost::system::error_code context::do_set_password_callback(
detail::password_callback_base* callback, boost::system::error_code& ec)
{
- if (handle_->default_passwd_callback_userdata)
- delete static_cast<detail::password_callback_base*>(
- handle_->default_passwd_callback_userdata);
-
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+ ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* old_callback = handle_->default_passwd_callback_userdata;
handle_->default_passwd_callback_userdata = callback;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+ if (old_callback)
+ delete static_cast<detail::password_callback_base*>(
+ old_callback);
SSL_CTX_set_default_passwd_cb(handle_, &context::password_callback_function);
diff --git a/boost/asio/ssl/impl/error.ipp b/boost/asio/ssl/impl/error.ipp
index 503b7481ff..e82afba615 100644
--- a/boost/asio/ssl/impl/error.ipp
+++ b/boost/asio/ssl/impl/error.ipp
@@ -2,7 +2,7 @@
// ssl/impl/error.ipp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,6 @@
namespace boost {
namespace asio {
namespace error {
-
namespace detail {
class ssl_category : public boost::system::error_category
@@ -51,6 +50,50 @@ const boost::system::error_category& get_ssl_category()
}
} // namespace error
+namespace ssl {
+namespace error {
+
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)
+
+const boost::system::error_category& get_stream_category()
+{
+ return boost::asio::error::get_ssl_category();
+}
+
+#else
+
+namespace detail {
+
+class stream_category : public boost::system::error_category
+{
+public:
+ const char* name() const BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+ {
+ return "asio.ssl.stream";
+ }
+
+ std::string message(int value) const
+ {
+ switch (value)
+ {
+ case stream_truncated: return "stream truncated";
+ default: return "asio.ssl.stream error";
+ }
+ }
+};
+
+} // namespace detail
+
+const boost::system::error_category& get_stream_category()
+{
+ static detail::stream_category instance;
+ return instance;
+}
+
+#endif
+
+} // namespace error
+} // namespace ssl
} // namespace asio
} // namespace boost
diff --git a/boost/asio/ssl/impl/rfc2818_verification.ipp b/boost/asio/ssl/impl/rfc2818_verification.ipp
index b6784435be..8b5ae3d2a8 100644
--- a/boost/asio/ssl/impl/rfc2818_verification.ipp
+++ b/boost/asio/ssl/impl/rfc2818_verification.ipp
@@ -2,7 +2,7 @@
// ssl/impl/rfc2818_verification.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/impl/src.hpp b/boost/asio/ssl/impl/src.hpp
index 172fb1a93b..63c0286711 100644
--- a/boost/asio/ssl/impl/src.hpp
+++ b/boost/asio/ssl/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/ssl/src.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/basic_context.hpp b/boost/asio/ssl/old/basic_context.hpp
index 6d2353933b..70643c315c 100644
--- a/boost/asio/ssl/old/basic_context.hpp
+++ b/boost/asio/ssl/old/basic_context.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/context_service.hpp b/boost/asio/ssl/old/context_service.hpp
index 9c3e9c7e2c..fd87f080b8 100644
--- a/boost/asio/ssl/old/context_service.hpp
+++ b/boost/asio/ssl/old/context_service.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/detail/openssl_context_service.hpp b/boost/asio/ssl/old/detail/openssl_context_service.hpp
index 61eac6efc5..e88eedff89 100644
--- a/boost/asio/ssl/old/detail/openssl_context_service.hpp
+++ b/boost/asio/ssl/old/detail/openssl_context_service.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/detail/openssl_stream_service.hpp b/boost/asio/ssl/old/detail/openssl_stream_service.hpp
index 2206ca010d..1cf4fcb982 100644
--- a/boost/asio/ssl/old/detail/openssl_stream_service.hpp
+++ b/boost/asio/ssl/old/detail/openssl_stream_service.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/stream.hpp b/boost/asio/ssl/old/stream.hpp
index ddf4d17468..d5defa6c23 100644
--- a/boost/asio/ssl/old/stream.hpp
+++ b/boost/asio/ssl/old/stream.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/old/stream_service.hpp b/boost/asio/ssl/old/stream_service.hpp
index e046f7c43d..684d529d35 100644
--- a/boost/asio/ssl/old/stream_service.hpp
+++ b/boost/asio/ssl/old/stream_service.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/rfc2818_verification.hpp b/boost/asio/ssl/rfc2818_verification.hpp
index 502a41ee68..837cdfdbd0 100644
--- a/boost/asio/ssl/rfc2818_verification.hpp
+++ b/boost/asio/ssl/rfc2818_verification.hpp
@@ -2,7 +2,7 @@
// ssl/rfc2818_verification.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/stream.hpp b/boost/asio/ssl/stream.hpp
index 17f6e15bbb..02c5f66fca 100644
--- a/boost/asio/ssl/stream.hpp
+++ b/boost/asio/ssl/stream.hpp
@@ -2,7 +2,7 @@
// ssl/stream.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/stream_base.hpp b/boost/asio/ssl/stream_base.hpp
index 264fba9bae..41c77f0368 100644
--- a/boost/asio/ssl/stream_base.hpp
+++ b/boost/asio/ssl/stream_base.hpp
@@ -2,7 +2,7 @@
// ssl/stream_base.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/stream_service.hpp b/boost/asio/ssl/stream_service.hpp
index 4a295eb268..8dc6a7bcfc 100644
--- a/boost/asio/ssl/stream_service.hpp
+++ b/boost/asio/ssl/stream_service.hpp
@@ -2,7 +2,7 @@
// ssl/stream_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/verify_context.hpp b/boost/asio/ssl/verify_context.hpp
index 26b712cd50..fd4bc97c26 100644
--- a/boost/asio/ssl/verify_context.hpp
+++ b/boost/asio/ssl/verify_context.hpp
@@ -2,7 +2,7 @@
// ssl/verify_context.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/verify_mode.hpp b/boost/asio/ssl/verify_mode.hpp
index a99553b3bf..bb1a42274b 100644
--- a/boost/asio/ssl/verify_mode.hpp
+++ b/boost/asio/ssl/verify_mode.hpp
@@ -2,7 +2,7 @@
// ssl/verify_mode.hpp
// ~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/steady_timer.hpp b/boost/asio/steady_timer.hpp
index f16b07da43..5fb512e259 100644
--- a/boost/asio/steady_timer.hpp
+++ b/boost/asio/steady_timer.hpp
@@ -2,7 +2,7 @@
// steady_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/strand.hpp b/boost/asio/strand.hpp
index 8c6d94509b..72f8f30d2b 100644
--- a/boost/asio/strand.hpp
+++ b/boost/asio/strand.hpp
@@ -2,7 +2,7 @@
// strand.hpp
// ~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/stream_socket_service.hpp b/boost/asio/stream_socket_service.hpp
index 2657fefb4a..3c6f470af3 100644
--- a/boost/asio/stream_socket_service.hpp
+++ b/boost/asio/stream_socket_service.hpp
@@ -2,7 +2,7 @@
// stream_socket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/streambuf.hpp b/boost/asio/streambuf.hpp
index 1e77750d2d..e4037d4a09 100644
--- a/boost/asio/streambuf.hpp
+++ b/boost/asio/streambuf.hpp
@@ -2,7 +2,7 @@
// streambuf.hpp
// ~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/system_timer.hpp b/boost/asio/system_timer.hpp
index 53b9f7129c..3bd9416b04 100644
--- a/boost/asio/system_timer.hpp
+++ b/boost/asio/system_timer.hpp
@@ -2,7 +2,7 @@
// system_timer.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/time_traits.hpp b/boost/asio/time_traits.hpp
index d27b80d592..35e701942c 100644
--- a/boost/asio/time_traits.hpp
+++ b/boost/asio/time_traits.hpp
@@ -2,7 +2,7 @@
// time_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/unyield.hpp b/boost/asio/unyield.hpp
index 50ff8cf111..ccbb043547 100644
--- a/boost/asio/unyield.hpp
+++ b/boost/asio/unyield.hpp
@@ -2,7 +2,7 @@
// unyield.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/use_future.hpp b/boost/asio/use_future.hpp
index 66a9f6a9b8..d0ef0edfde 100644
--- a/boost/asio/use_future.hpp
+++ b/boost/asio/use_future.hpp
@@ -2,7 +2,7 @@
// use_future.hpp
// ~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/version.hpp b/boost/asio/version.hpp
index 8d506405c2..a8e546e611 100644
--- a/boost/asio/version.hpp
+++ b/boost/asio/version.hpp
@@ -2,7 +2,7 @@
// version.hpp
// ~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the 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 101007 // 1.10.7
+#define BOOST_ASIO_VERSION 101008 // 1.10.8
#endif // BOOST_ASIO_VERSION_HPP
diff --git a/boost/asio/wait_traits.hpp b/boost/asio/wait_traits.hpp
index dc7d3a33b2..806cf18435 100644
--- a/boost/asio/wait_traits.hpp
+++ b/boost/asio/wait_traits.hpp
@@ -2,7 +2,7 @@
// wait_traits.hpp
// ~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/waitable_timer_service.hpp b/boost/asio/waitable_timer_service.hpp
index f1709051d6..913a45b837 100644
--- a/boost/asio/waitable_timer_service.hpp
+++ b/boost/asio/waitable_timer_service.hpp
@@ -2,7 +2,7 @@
// waitable_timer_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/basic_handle.hpp b/boost/asio/windows/basic_handle.hpp
index 3545f0f477..17895e62c3 100644
--- a/boost/asio/windows/basic_handle.hpp
+++ b/boost/asio/windows/basic_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/basic_object_handle.hpp b/boost/asio/windows/basic_object_handle.hpp
index c7a5fcd80e..7d3672d7e2 100644
--- a/boost/asio/windows/basic_object_handle.hpp
+++ b/boost/asio/windows/basic_object_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/windows/basic_random_access_handle.hpp b/boost/asio/windows/basic_random_access_handle.hpp
index 9aebd24485..c1410be117 100644
--- a/boost/asio/windows/basic_random_access_handle.hpp
+++ b/boost/asio/windows/basic_random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/basic_stream_handle.hpp b/boost/asio/windows/basic_stream_handle.hpp
index 25916accac..9e34c86c6f 100644
--- a/boost/asio/windows/basic_stream_handle.hpp
+++ b/boost/asio/windows/basic_stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/object_handle.hpp b/boost/asio/windows/object_handle.hpp
index 843b8bb98c..38d80543a1 100644
--- a/boost/asio/windows/object_handle.hpp
+++ b/boost/asio/windows/object_handle.hpp
@@ -2,7 +2,7 @@
// windows/object_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/windows/object_handle_service.hpp b/boost/asio/windows/object_handle_service.hpp
index 7087ea9fe5..e3207ad6ba 100644
--- a/boost/asio/windows/object_handle_service.hpp
+++ b/boost/asio/windows/object_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/object_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
diff --git a/boost/asio/windows/overlapped_ptr.hpp b/boost/asio/windows/overlapped_ptr.hpp
index f6f2d6d397..87d75d5adf 100644
--- a/boost/asio/windows/overlapped_ptr.hpp
+++ b/boost/asio/windows/overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/random_access_handle.hpp b/boost/asio/windows/random_access_handle.hpp
index 48e4cfe29e..c65f60b756 100644
--- a/boost/asio/windows/random_access_handle.hpp
+++ b/boost/asio/windows/random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/random_access_handle_service.hpp b/boost/asio/windows/random_access_handle_service.hpp
index 33fbf9f945..07fc2367ce 100644
--- a/boost/asio/windows/random_access_handle_service.hpp
+++ b/boost/asio/windows/random_access_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/stream_handle.hpp b/boost/asio/windows/stream_handle.hpp
index ffe0e03d94..5d4bb067b8 100644
--- a/boost/asio/windows/stream_handle.hpp
+++ b/boost/asio/windows/stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/windows/stream_handle_service.hpp b/boost/asio/windows/stream_handle_service.hpp
index 13dc476d59..33ddd3dc37 100644
--- a/boost/asio/windows/stream_handle_service.hpp
+++ b/boost/asio/windows/stream_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/write.hpp b/boost/asio/write.hpp
index b5d7051d82..39ab773ff1 100644
--- a/boost/asio/write.hpp
+++ b/boost/asio/write.hpp
@@ -2,7 +2,7 @@
// write.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/write_at.hpp b/boost/asio/write_at.hpp
index b1a6ac79f3..ce7db694bf 100644
--- a/boost/asio/write_at.hpp
+++ b/boost/asio/write_at.hpp
@@ -2,7 +2,7 @@
// write_at.hpp
// ~~~~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/yield.hpp b/boost/asio/yield.hpp
index d4c3f2f032..fc54d23b8e 100644
--- a/boost/asio/yield.hpp
+++ b/boost/asio/yield.hpp
@@ -2,7 +2,7 @@
// yield.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/atomic/detail/caps_gcc_x86.hpp b/boost/atomic/detail/caps_gcc_x86.hpp
index 0696bf1d2f..7485b010c7 100644
--- a/boost/atomic/detail/caps_gcc_x86.hpp
+++ b/boost/atomic/detail/caps_gcc_x86.hpp
@@ -22,6 +22,8 @@
#pragma once
#endif
+#if defined(__GNUC__)
+
#if defined(__i386__) &&\
(\
defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\
@@ -35,6 +37,27 @@
#define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
#endif
+#if defined(__x86_64__) || defined(__SSE2__)
+// Use mfence only if SSE2 is available
+#define BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE 1
+#endif
+
+#else // defined(__GNUC__)
+
+#if defined(__i386__) && !defined(BOOST_ATOMIC_NO_CMPXCHG8B)
+#define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1
+#endif
+
+#if defined(__x86_64__) && !defined(BOOST_ATOMIC_NO_CMPXCHG16B)
+#define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
+#endif
+
+#if !defined(BOOST_ATOMIC_NO_MFENCE)
+#define BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE 1
+#endif
+
+#endif // defined(__GNUC__)
+
#define BOOST_ATOMIC_INT8_LOCK_FREE 2
#define BOOST_ATOMIC_INT16_LOCK_FREE 2
#define BOOST_ATOMIC_INT32_LOCK_FREE 2
diff --git a/boost/atomic/detail/caps_msvc_x86.hpp b/boost/atomic/detail/caps_msvc_x86.hpp
index 5661a5b7ab..2ee4c92111 100644
--- a/boost/atomic/detail/caps_msvc_x86.hpp
+++ b/boost/atomic/detail/caps_msvc_x86.hpp
@@ -30,6 +30,11 @@
#define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
#endif
+#if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2))
+// Use mfence only if SSE2 is available
+#define BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE 1
+#endif
+
#define BOOST_ATOMIC_INT8_LOCK_FREE 2
#define BOOST_ATOMIC_INT16_LOCK_FREE 2
#define BOOST_ATOMIC_INT32_LOCK_FREE 2
diff --git a/boost/atomic/detail/ops_gcc_sparc.hpp b/boost/atomic/detail/ops_gcc_sparc.hpp
index 020882bbfa..faefecaf76 100644
--- a/boost/atomic/detail/ops_gcc_sparc.hpp
+++ b/boost/atomic/detail/ops_gcc_sparc.hpp
@@ -66,7 +66,7 @@ struct gcc_sparc_cas32 :
static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
{
- fence_before_store(order);
+ fence_before(order);
storage = v;
fence_after_store(order);
}
@@ -107,7 +107,7 @@ struct gcc_sparc_cas32 :
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
{
- base_type::fence_before(order);
+ fence_before(order);
__asm__ __volatile__
(
"swap [%1], %0"
@@ -115,7 +115,7 @@ struct gcc_sparc_cas32 :
: "r" (&storage)
: "memory"
);
- base_type::fence_after(order);
+ fence_after(order);
return v;
}
@@ -152,7 +152,7 @@ struct gcc_sparc_cas64 :
static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
{
- fence_before_store(order);
+ fence_before(order);
storage = v;
fence_after_store(order);
}
diff --git a/boost/atomic/detail/ops_gcc_x86.hpp b/boost/atomic/detail/ops_gcc_x86.hpp
index f68125c491..a4e4af3660 100644
--- a/boost/atomic/detail/ops_gcc_x86.hpp
+++ b/boost/atomic/detail/ops_gcc_x86.hpp
@@ -485,7 +485,7 @@ BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
{
__asm__ __volatile__
(
-#if defined(__x86_64__) || defined(__SSE2__)
+#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE)
"mfence\n"
#else
"lock; addl $0, (%%esp)\n"
diff --git a/boost/atomic/detail/ops_msvc_x86.hpp b/boost/atomic/detail/ops_msvc_x86.hpp
index 589c029864..04b496efb6 100644
--- a/boost/atomic/detail/ops_msvc_x86.hpp
+++ b/boost/atomic/detail/ops_msvc_x86.hpp
@@ -42,7 +42,7 @@
#pragma warning(disable: 4731)
#endif
-#if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2))
+#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE)
extern "C" void _mm_mfence(void);
#if defined(BOOST_MSVC)
#pragma intrinsic(_mm_mfence)
@@ -74,8 +74,7 @@ struct msvc_x86_operations_base
{
static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT
{
-#if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2))
- // Use mfence only if SSE2 is available
+#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE)
_mm_mfence();
#else
long tmp;
diff --git a/boost/atomic/detail/platform.hpp b/boost/atomic/detail/platform.hpp
index b6c48ef0f9..34be8e6a0a 100644
--- a/boost/atomic/detail/platform.hpp
+++ b/boost/atomic/detail/platform.hpp
@@ -43,7 +43,7 @@
#define BOOST_ATOMIC_DETAIL_PLATFORM gcc_atomic
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#elif (defined(__GNUC__) || defined(__SUNPRO_CC)) && (defined(__i386__) || defined(__x86_64__))
#define BOOST_ATOMIC_DETAIL_PLATFORM gcc_x86
@@ -65,7 +65,7 @@
#define BOOST_ATOMIC_DETAIL_PLATFORM gcc_arm
-#elif defined(__GNUC__) && defined(__sparc_v9__)
+#elif (defined(__GNUC__) || defined(__SUNPRO_CC)) && (defined(__sparcv8plus) || defined(__sparc_v9__))
#define BOOST_ATOMIC_DETAIL_PLATFORM gcc_sparc
diff --git a/boost/bind/bind.hpp b/boost/bind/bind.hpp
index f793551d1a..85d675a0e3 100644
--- a/boost/bind/bind.hpp
+++ b/boost/bind/bind.hpp
@@ -887,9 +887,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist1<A1&> a( a1_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist1<A1&> a( a1_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2 > class rrlist2
@@ -915,9 +923,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist2<A1&, A2&> a( a1_, a2_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist2<A1&, A2&> a( a1_, a2_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3 > class rrlist3
@@ -946,9 +962,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist3<A1&, A2&, A3&> a( a1_, a2_, a3_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist3<A1&, A2&, A3&> a( a1_, a2_, a3_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4 > class rrlist4
@@ -980,9 +1004,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist4<A1&, A2&, A3&, A4&> a( a1_, a2_, a3_, a4_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist4<A1&, A2&, A3&, A4&> a( a1_, a2_, a3_, a4_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4, class A5 > class rrlist5
@@ -1017,9 +1049,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist5<A1&, A2&, A3&, A4&, A5&> a( a1_, a2_, a3_, a4_, a5_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist5<A1&, A2&, A3&, A4&, A5&> a( a1_, a2_, a3_, a4_, a5_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrlist6
@@ -1057,9 +1097,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist6<A1&, A2&, A3&, A4&, A5&, A6&> a( a1_, a2_, a3_, a4_, a5_, a6_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist6<A1&, A2&, A3&, A4&, A5&, A6&> a( a1_, a2_, a3_, a4_, a5_, a6_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class rrlist7
@@ -1100,9 +1148,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist7<A1&, A2&, A3&, A4&, A5&, A6&, A7&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist7<A1&, A2&, A3&, A4&, A5&, A6&, A7&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class rrlist8
@@ -1146,9 +1202,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist8<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist8<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ );
+ return b.eval( a );
+ }
};
template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > class rrlist9
@@ -1195,9 +1259,17 @@ public:
template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+ {
+ rrlist9<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&, A9&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ );
+ return b.eval( a );
+ }
- template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+ template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+ {
+ rrlist9<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&, A9&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ );
+ return b.eval( a );
+ }
};
template<class R, class F, class L> class bind_t
diff --git a/boost/chrono/detail/inlined/chrono.hpp b/boost/chrono/detail/inlined/chrono.hpp
index 027884365e..3bad546d4c 100644
--- a/boost/chrono/detail/inlined/chrono.hpp
+++ b/boost/chrono/detail/inlined/chrono.hpp
@@ -11,7 +11,9 @@
#include <boost/version.hpp>
#include <boost/chrono/chrono.hpp>
+#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
+#endif
#include <boost/throw_exception.hpp>
#include <boost/chrono/detail/system.hpp>
diff --git a/boost/chrono/detail/inlined/mac/chrono.hpp b/boost/chrono/detail/inlined/mac/chrono.hpp
index 5c32a8e176..0bd3400a25 100644
--- a/boost/chrono/detail/inlined/mac/chrono.hpp
+++ b/boost/chrono/detail/inlined/mac/chrono.hpp
@@ -13,6 +13,7 @@
#include <sys/time.h> //for gettimeofday and timeval
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
+#include <boost/assert.hpp>
namespace boost
{
diff --git a/boost/chrono/detail/inlined/mac/thread_clock.hpp b/boost/chrono/detail/inlined/mac/thread_clock.hpp
index 1a4406b83d..690458f41c 100644
--- a/boost/chrono/detail/inlined/mac/thread_clock.hpp
+++ b/boost/chrono/detail/inlined/mac/thread_clock.hpp
@@ -14,6 +14,7 @@
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
+#include <boost/assert.hpp>
# include <pthread.h>
# include <mach/thread_act.h>
diff --git a/boost/chrono/detail/inlined/posix/chrono.hpp b/boost/chrono/detail/inlined/posix/chrono.hpp
index e35a7ce267..c4c8a6add7 100644
--- a/boost/chrono/detail/inlined/posix/chrono.hpp
+++ b/boost/chrono/detail/inlined/posix/chrono.hpp
@@ -11,6 +11,7 @@
//----------------------------------------------------------------------------//
#include <time.h> // for clock_gettime
+#include <boost/assert.hpp>
namespace boost
{
@@ -38,9 +39,9 @@ namespace chrono
if (BOOST_CHRONO_IS_THROWS(ec))
{
boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
+ system::system_error(
+ errno,
+ BOOST_CHRONO_SYSTEM_CATEGORY,
"chrono::system_clock" ));
}
else
@@ -50,7 +51,7 @@ namespace chrono
}
}
- if (!BOOST_CHRONO_IS_THROWS(ec))
+ if (!BOOST_CHRONO_IS_THROWS(ec))
{
ec.clear();
}
@@ -92,9 +93,9 @@ namespace chrono
if (BOOST_CHRONO_IS_THROWS(ec))
{
boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
+ system::system_error(
+ errno,
+ BOOST_CHRONO_SYSTEM_CATEGORY,
"chrono::steady_clock" ));
}
else
@@ -104,7 +105,7 @@ namespace chrono
}
}
- if (!BOOST_CHRONO_IS_THROWS(ec))
+ if (!BOOST_CHRONO_IS_THROWS(ec))
{
ec.clear();
}
diff --git a/boost/chrono/detail/inlined/posix/thread_clock.hpp b/boost/chrono/detail/inlined/posix/thread_clock.hpp
index a1012240ec..a42b3c8a15 100644
--- a/boost/chrono/detail/inlined/posix/thread_clock.hpp
+++ b/boost/chrono/detail/inlined/posix/thread_clock.hpp
@@ -13,6 +13,7 @@
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
+#include <boost/assert.hpp>
#if !defined(__VXWORKS__)
# include <sys/times.h>
diff --git a/boost/chrono/detail/inlined/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/process_cpu_clocks.hpp
index d37f6754cb..fad60361a3 100644
--- a/boost/chrono/detail/inlined/process_cpu_clocks.hpp
+++ b/boost/chrono/detail/inlined/process_cpu_clocks.hpp
@@ -18,8 +18,9 @@
#include <boost/version.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/throw_exception.hpp>
+#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
-
+#endif
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
diff --git a/boost/chrono/detail/inlined/thread_clock.hpp b/boost/chrono/detail/inlined/thread_clock.hpp
index 16d19ef488..e4f8317ec6 100644
--- a/boost/chrono/detail/inlined/thread_clock.hpp
+++ b/boost/chrono/detail/inlined/thread_clock.hpp
@@ -16,7 +16,9 @@
#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
#include <boost/chrono/thread_clock.hpp>
#include <boost/throw_exception.hpp>
+#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
+#endif
#include <boost/throw_exception.hpp>
#include <boost/chrono/detail/system.hpp>
diff --git a/boost/chrono/detail/inlined/win/chrono.hpp b/boost/chrono/detail/inlined/win/chrono.hpp
index 16e8c51426..e61f11e7ce 100644
--- a/boost/chrono/detail/inlined/win/chrono.hpp
+++ b/boost/chrono/detail/inlined/win/chrono.hpp
@@ -14,7 +14,8 @@
#include <boost/detail/winapi/time.hpp>
#include <boost/detail/winapi/timers.hpp>
-#include <boost/detail/winapi/GetLastError.hpp>
+#include <boost/detail/winapi/get_last_error.hpp>
+#include <boost/assert.hpp>
namespace boost
{
diff --git a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
index e97bfe590c..7169f8020a 100644
--- a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
+++ b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
@@ -14,15 +14,15 @@
#define BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
#include <boost/chrono/config.hpp>
-//#include <boost/chrono/system_clocks.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <cassert>
#include <time.h>
+#include <boost/assert.hpp>
-#include <boost/detail/winapi/GetLastError.hpp>
-#include <boost/detail/winapi/GetCurrentProcess.hpp>
+#include <boost/detail/winapi/get_last_error.hpp>
+#include <boost/detail/winapi/get_current_process.hpp>
#if BOOST_PLAT_WINDOWS_DESKTOP
-#include <boost/detail/winapi/GetProcessTimes.hpp>
+#include <boost/detail/winapi/get_process_times.hpp>
#endif
namespace boost
diff --git a/boost/chrono/detail/inlined/win/thread_clock.hpp b/boost/chrono/detail/inlined/win/thread_clock.hpp
index e47c481473..037ccbee3e 100644
--- a/boost/chrono/detail/inlined/win/thread_clock.hpp
+++ b/boost/chrono/detail/inlined/win/thread_clock.hpp
@@ -14,10 +14,11 @@
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
+#include <boost/assert.hpp>
-#include <boost/detail/winapi/GetLastError.hpp>
-#include <boost/detail/winapi/GetCurrentThread.hpp>
-#include <boost/detail/winapi/GetThreadTimes.hpp>
+#include <boost/detail/winapi/get_last_error.hpp>
+#include <boost/detail/winapi/get_current_thread.hpp>
+#include <boost/detail/winapi/get_thread_times.hpp>
namespace boost
{
@@ -42,7 +43,7 @@ thread_clock::time_point thread_clock::now( system::error_code & ec )
((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
| system_time.dwLowDateTime) * 100 );
- if (!BOOST_CHRONO_IS_THROWS(ec))
+ if (!BOOST_CHRONO_IS_THROWS(ec))
{
ec.clear();
}
@@ -51,15 +52,15 @@ thread_clock::time_point thread_clock::now( system::error_code & ec )
}
else
{
- if (BOOST_CHRONO_IS_THROWS(ec))
+ if (BOOST_CHRONO_IS_THROWS(ec))
{
boost::throw_exception(
- system::system_error(
- boost::detail::winapi::GetLastError(),
- BOOST_CHRONO_SYSTEM_CATEGORY,
+ system::system_error(
+ boost::detail::winapi::GetLastError(),
+ BOOST_CHRONO_SYSTEM_CATEGORY,
"chrono::thread_clock" ));
- }
- else
+ }
+ else
{
ec.assign( boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY );
return thread_clock::time_point(duration(0));
@@ -74,7 +75,7 @@ thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
- if ( boost::detail::winapi::GetThreadTimes(
+ if ( boost::detail::winapi::GetThreadTimes(
boost::detail::winapi::GetCurrentThread (), &creation, &exit,
&system_time, &user_time ) )
{
diff --git a/boost/chrono/duration.hpp b/boost/chrono/duration.hpp
index ac4cfb425b..737328c418 100644
--- a/boost/chrono/duration.hpp
+++ b/boost/chrono/duration.hpp
@@ -438,7 +438,7 @@ namespace chrono {
BOOST_FORCEINLINE BOOST_CONSTEXPR
duration() : rep_(duration_values<rep>::zero()) { }
#else
- BOOST_CONSTEXPR duration() BOOST_NOEXCEPT {};
+ BOOST_CONSTEXPR duration() BOOST_NOEXCEPT : rep_() {};
#endif
template <class Rep2>
BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR
diff --git a/boost/chrono/io/ios_base_state.hpp b/boost/chrono/io/ios_base_state.hpp
index 6e320a5678..1393e2e699 100644
--- a/boost/chrono/io/ios_base_state.hpp
+++ b/boost/chrono/io/ios_base_state.hpp
@@ -113,9 +113,10 @@ namespace boost
std::basic_string<CharT> duration_fmt;
public:
- ios_base_data_aux() :
- time_fmt(""),
- duration_fmt("")
+ ios_base_data_aux()
+ //:
+ // time_fmt(""),
+ // duration_fmt("")
{
}
};
diff --git a/boost/chrono/io/time_point_get.hpp b/boost/chrono/io/time_point_get.hpp
index 5e4acd39cc..44c641e6da 100644
--- a/boost/chrono/io/time_point_get.hpp
+++ b/boost/chrono/io/time_point_get.hpp
@@ -279,12 +279,12 @@ namespace boost
if (std::has_facet<time_point_units<CharT> >(is.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc());
- return get_epoch(facet, i, e, is, err);
+ return get_epoch<Clock>(facet, i, e, is, err);
}
else
{
time_point_units_default<CharT> facet;
- return get_epoch(facet, i, e, is, err);
+ return get_epoch<Clock>(facet, i, e, is, err);
}
}
diff --git a/boost/chrono/io/time_point_io.hpp b/boost/chrono/io/time_point_io.hpp
index ec4ba13aeb..0cbc275c0e 100644
--- a/boost/chrono/io/time_point_io.hpp
+++ b/boost/chrono/io/time_point_io.hpp
@@ -125,9 +125,9 @@ namespace boost
std::ios_base::iostate& err,
const std::ctype<char_type>& ct) const
{
- int t = get_up_to_n_digits(b, e, err, ct, 2) - 1;
- if (!(err & std::ios_base::failbit) && t <= 11)
- m = t;
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
+ m = --t;
else
err |= std::ios_base::failbit;
}
@@ -224,8 +224,8 @@ namespace boost
const std::ctype<char_type>& ct) const
{
int t = get_up_to_n_digits(b, e, err, ct, 3);
- if (!(err & std::ios_base::failbit) && t <= 365)
- d = t;
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 366)
+ d = --t;
else
err |= std::ios_base::failbit;
}
diff --git a/boost/chrono/io/utility/ios_base_state_ptr.hpp b/boost/chrono/io/utility/ios_base_state_ptr.hpp
index f7dfdddca0..15c8ac4d66 100644
--- a/boost/chrono/io/utility/ios_base_state_ptr.hpp
+++ b/boost/chrono/io/utility/ios_base_state_ptr.hpp
@@ -164,9 +164,10 @@ namespace boost
*/
T * release() BOOST_NOEXCEPT
{
- T const* f = get();
- reset();
- return f;
+ void*& pw = ios_.pword(index());
+ T* ptr = static_cast<T*> (pw);
+ pw = 0;
+ return ptr;
}
/**
diff --git a/boost/chrono/process_cpu_clocks.hpp b/boost/chrono/process_cpu_clocks.hpp
index 248837506e..ca6bef38e9 100644
--- a/boost/chrono/process_cpu_clocks.hpp
+++ b/boost/chrono/process_cpu_clocks.hpp
@@ -193,7 +193,7 @@ namespace boost { namespace chrono {
typedef std::istreambuf_iterator<CharT, Traits> in_iterator;
in_iterator i(is);
in_iterator e;
- if (i == e || *i != '{') // mandatory '{'
+ if (i == e || *i++ != '{') // mandatory '{'
{
is.setstate(is.failbit | is.eofbit);
return;
@@ -244,7 +244,8 @@ namespace chrono
const duration<process_times<Rep2>, Period2>& rhs)
{
return boost::chrono::detail::duration_eq<
- duration<process_times<Rep1>, Period1>, duration<process_times<Rep2>, Period2> >()(lhs, rhs);
+ duration<Rep1, Period1>, duration<Rep2, Period2>
+ >()(duration<Rep1, Period1>(lhs.count().real), duration<Rep2, Period2>(rhs.count().real));
}
template <class Rep1, class Period1, class Rep2, class Period2>
@@ -285,7 +286,8 @@ namespace chrono
operator< (const duration<Rep1, Period1>& lhs,
const duration<process_times<Rep2>, Period2>& rhs)
{
- return rhs < lhs;
+ return boost::chrono::detail::duration_lt<
+ duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, duration<Rep2, Period2>(rhs.count().real));
}
template <class Rep1, class Period1, class Rep2, class Period2>
@@ -295,7 +297,8 @@ namespace chrono
const duration<process_times<Rep2>, Period2>& rhs)
{
return boost::chrono::detail::duration_lt<
- duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
+ duration<Rep1, Period1>, duration<Rep2, Period2>
+ >()(duration<Rep1, Period1>(lhs.count().real), duration<Rep2, Period2>(rhs.count().real));
}
@@ -412,7 +415,7 @@ namespace chrono
{
static const CharT
u[] =
- { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'y', 's', 't', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
+ { 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
static const std::basic_string<CharT> str(u, u + sizeof(u)
/ sizeof(u[0]));
return str;
diff --git a/boost/circular_buffer.hpp b/boost/circular_buffer.hpp
index f5eff60f08..7cf8928bc0 100644
--- a/boost/circular_buffer.hpp
+++ b/boost/circular_buffer.hpp
@@ -20,10 +20,8 @@
#include <boost/static_assert.hpp>
// BOOST_CB_ENABLE_DEBUG: Debug support control.
-#if defined(NDEBUG) || defined(BOOST_CB_DISABLE_DEBUG)
+#if !defined(BOOST_CB_ENABLE_DEBUG)
#define BOOST_CB_ENABLE_DEBUG 0
-#else
- #define BOOST_CB_ENABLE_DEBUG 1
#endif
// BOOST_CB_ASSERT: Runtime assertion.
@@ -60,6 +58,5 @@
#undef BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS
#undef BOOST_CB_IS_CONVERTIBLE
#undef BOOST_CB_ASSERT
-#undef BOOST_CB_ENABLE_DEBUG
#endif // #if !defined(BOOST_CIRCULAR_BUFFER_HPP)
diff --git a/boost/circular_buffer/base.hpp b/boost/circular_buffer/base.hpp
index 3efa8de145..1dec2f2136 100644
--- a/boost/circular_buffer/base.hpp
+++ b/boost/circular_buffer/base.hpp
@@ -30,6 +30,7 @@
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
#include <boost/type_traits/is_copy_constructible.hpp>
#include <boost/type_traits/conditional.hpp>
+#include <boost/move/adl_move_swap.hpp>
#include <boost/move/move.hpp>
#include <boost/utility/addressof.hpp>
#include <algorithm>
@@ -1399,11 +1400,11 @@ public:
*/
void swap(circular_buffer<T, Alloc>& cb) BOOST_NOEXCEPT {
swap_allocator(cb, is_stateless<allocator_type>());
- std::swap(m_buff, cb.m_buff);
- std::swap(m_end, cb.m_end);
- std::swap(m_first, cb.m_first);
- std::swap(m_last, cb.m_last);
- std::swap(m_size, cb.m_size);
+ adl_move_swap(m_buff, cb.m_buff);
+ adl_move_swap(m_end, cb.m_end);
+ adl_move_swap(m_first, cb.m_first);
+ adl_move_swap(m_last, cb.m_last);
+ adl_move_swap(m_size, cb.m_size);
#if BOOST_CB_ENABLE_DEBUG
invalidate_all_iterators();
cb.invalidate_all_iterators();
@@ -2627,7 +2628,7 @@ private:
//! Specialized method for swapping the allocator.
void swap_allocator(circular_buffer<T, Alloc>& cb, const false_type&) {
- std::swap(m_alloc, cb.m_alloc);
+ adl_move_swap(m_alloc, cb.m_alloc);
}
//! Specialized assign method.
diff --git a/boost/circular_buffer/details.hpp b/boost/circular_buffer/details.hpp
index 44ca9c9689..3262386acf 100644
--- a/boost/circular_buffer/details.hpp
+++ b/boost/circular_buffer/details.hpp
@@ -14,7 +14,6 @@
#pragma once
#endif
-#include <boost/iterator.hpp>
#include <boost/throw_exception.hpp>
#include <boost/container/allocator_traits.hpp>
#include <boost/move/move.hpp>
@@ -196,7 +195,7 @@ public:
*/
template <class Buff, class Traits>
struct iterator :
- public boost::iterator<
+ public std::iterator<
std::random_access_iterator_tag,
typename Traits::value_type,
typename Traits::difference_type,
@@ -209,7 +208,7 @@ struct iterator :
// Helper types
//! Base iterator.
- typedef boost::iterator<
+ typedef std::iterator<
std::random_access_iterator_tag,
typename Traits::value_type,
typename Traits::difference_type,
diff --git a/boost/circular_buffer/space_optimized.hpp b/boost/circular_buffer/space_optimized.hpp
index 688ab95796..3d001730b3 100644
--- a/boost/circular_buffer/space_optimized.hpp
+++ b/boost/circular_buffer/space_optimized.hpp
@@ -740,7 +740,7 @@ public:
\par Iterator Invalidation
Invalidates all iterators of both <code>circular_buffer_space_optimized</code> containers. (On the other
hand the iterators still point to the same elements but within another container. If you want to rely on
- this feature you have to turn the __debug_support off by defining macro BOOST_CB_DISABLE_DEBUG,
+ this feature you have to turn the __debug_support off,
otherwise an assertion will report an error if such invalidated iterator is used.)
\par Complexity
Constant (in the size of the <code>circular_buffer_space_optimized</code>).
diff --git a/boost/compute/algorithm/adjacent_difference.hpp b/boost/compute/algorithm/adjacent_difference.hpp
index a8f84e020e..ef13970754 100644
--- a/boost/compute/algorithm/adjacent_difference.hpp
+++ b/boost/compute/algorithm/adjacent_difference.hpp
@@ -23,33 +23,17 @@
namespace boost {
namespace compute {
-/// Stores the difference of each pair of consecutive values in the range
-/// [\p first, \p last) to the range beginning at \p result. If \p op is not
-/// provided, \c minus<T> is used.
-///
-/// \param first first element in the input range
-/// \param last last element in the input range
-/// \param result first element in the output range
-/// \param op binary difference function
-/// \param queue command queue to perform the operation
-///
-/// \return \c OutputIterator to the end of the result range
-///
-/// \see adjacent_find()
+namespace detail {
+
template<class InputIterator, class OutputIterator, class BinaryFunction>
inline OutputIterator
-adjacent_difference(InputIterator first,
- InputIterator last,
- OutputIterator result,
- BinaryFunction op,
- command_queue &queue = system::default_queue())
+dispatch_adjacent_difference(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ BinaryFunction op,
+ command_queue &queue = system::default_queue())
{
- if(first == last){
- return result;
- }
-
size_t count = detail::iterator_range_size(first, last);
-
detail::meta_kernel k("adjacent_difference");
k << "const uint i = get_global_id(0);\n"
@@ -66,32 +50,66 @@ adjacent_difference(InputIterator first,
return result + count;
}
-/// \overload
-template<class InputIterator, class OutputIterator>
+} // end detail namespace
+
+/// Stores the difference of each pair of consecutive values in the range
+/// [\p first, \p last) to the range beginning at \p result. If \p op is not
+/// provided, \c minus<T> is used.
+///
+/// \param first first element in the input range
+/// \param last last element in the input range
+/// \param result first element in the output range
+/// \param op binary difference function
+/// \param queue command queue to perform the operation
+///
+/// \return \c OutputIterator to the end of the result range
+///
+/// \see adjacent_find()
+template<class InputIterator, class OutputIterator, class BinaryFunction>
inline OutputIterator
adjacent_difference(InputIterator first,
InputIterator last,
OutputIterator result,
+ BinaryFunction op,
command_queue &queue = system::default_queue())
{
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
+ if(first == last) {
+ return result;
+ }
+
if (first == result) {
vector<value_type> temp(detail::iterator_range_size(first, last),
queue.get_context());
copy(first, last, temp.begin(), queue);
- return ::boost::compute::adjacent_difference(
- temp.begin(), temp.end(), result, ::boost::compute::minus<value_type>(), queue
+ return ::boost::compute::detail::dispatch_adjacent_difference(
+ temp.begin(), temp.end(), result, op, queue
);
}
else {
- return ::boost::compute::adjacent_difference(
- first, last, result, ::boost::compute::minus<value_type>(), queue
+ return ::boost::compute::detail::dispatch_adjacent_difference(
+ first, last, result, op, queue
);
}
}
+/// \overload
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+adjacent_difference(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue = system::default_queue())
+{
+ typedef typename std::iterator_traits<InputIterator>::value_type value_type;
+
+ return ::boost::compute::adjacent_difference(
+ first, last, result, ::boost::compute::minus<value_type>(), queue
+ );
+}
+
} // end compute namespace
} // end boost namespace
diff --git a/boost/compute/algorithm/copy.hpp b/boost/compute/algorithm/copy.hpp
index 2a25059bba..7779277b82 100644
--- a/boost/compute/algorithm/copy.hpp
+++ b/boost/compute/algorithm/copy.hpp
@@ -18,6 +18,7 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
+#include <boost/mpl/or.hpp>
#include <boost/compute/buffer.hpp>
#include <boost/compute/system.hpp>
@@ -26,9 +27,13 @@
#include <boost/compute/algorithm/detail/copy_to_device.hpp>
#include <boost/compute/algorithm/detail/copy_to_host.hpp>
#include <boost/compute/async/future.hpp>
+#include <boost/compute/container/mapped_view.hpp>
+#include <boost/compute/detail/device_ptr.hpp>
#include <boost/compute/detail/is_contiguous_iterator.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/detail/parameter_cache.hpp>
#include <boost/compute/iterator/buffer_iterator.hpp>
+#include <boost/compute/type_traits/type_name.hpp>
#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
@@ -42,13 +47,25 @@ namespace mpl = boost::mpl;
template<class InputIterator, class OutputIterator>
struct can_copy_with_copy_buffer :
mpl::and_<
- boost::is_same<
- InputIterator,
- buffer_iterator<typename InputIterator::value_type>
+ mpl::or_<
+ boost::is_same<
+ InputIterator,
+ buffer_iterator<typename InputIterator::value_type>
+ >,
+ boost::is_same<
+ InputIterator,
+ detail::device_ptr<typename InputIterator::value_type>
+ >
>,
- boost::is_same<
- OutputIterator,
- buffer_iterator<typename OutputIterator::value_type>
+ mpl::or_<
+ boost::is_same<
+ OutputIterator,
+ buffer_iterator<typename OutputIterator::value_type>
+ >,
+ boost::is_same<
+ OutputIterator,
+ detail::device_ptr<typename OutputIterator::value_type>
+ >
>,
boost::is_same<
typename InputIterator::value_type,
@@ -56,40 +73,72 @@ struct can_copy_with_copy_buffer :
>
>::type {};
-// host -> device
+// meta-function returning true if value_types of HostIterator and
+// DeviceIterator are same
+template<class HostIterator, class DeviceIterator>
+struct is_same_value_type :
+ boost::is_same<
+ typename boost::remove_cv<
+ typename std::iterator_traits<HostIterator>::value_type
+ >::type,
+ typename boost::remove_cv<
+ typename DeviceIterator::value_type
+ >::type
+ >::type {};
+
+// meta-function returning true if value_type of HostIterator is bool
+template<class HostIterator>
+struct is_bool_value_type :
+ boost::is_same<
+ typename boost::remove_cv<
+ typename std::iterator_traits<HostIterator>::value_type
+ >::type,
+ bool
+ >::type {};
+
+// host -> device (async)
template<class InputIterator, class OutputIterator>
-inline OutputIterator
-dispatch_copy(InputIterator first,
- InputIterator last,
- OutputIterator result,
- command_queue &queue,
- typename boost::enable_if_c<
- !is_device_iterator<InputIterator>::value &&
- is_device_iterator<OutputIterator>::value
- >::type* = 0)
+inline future<OutputIterator>
+dispatch_copy_async(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ mpl::not_<
+ is_device_iterator<InputIterator>
+ >,
+ is_device_iterator<OutputIterator>,
+ is_same_value_type<InputIterator, OutputIterator>
+ >
+ >::type* = 0)
{
- if(is_contiguous_iterator<InputIterator>::value){
- return copy_to_device(first, last, result, queue);
- }
- else {
- // for non-contiguous input we first copy the values to
- // a temporary std::vector and then copy from there
- typedef typename std::iterator_traits<InputIterator>::value_type T;
- std::vector<T> vector(first, last);
- return copy_to_device(vector.begin(), vector.end(), result, queue);
- }
+ BOOST_STATIC_ASSERT_MSG(
+ is_contiguous_iterator<InputIterator>::value,
+ "copy_async() is only supported for contiguous host iterators"
+ );
+
+ return copy_to_device_async(first, last, result, queue);
}
// host -> device (async)
+// Type mismatch between InputIterator and OutputIterator value_types
template<class InputIterator, class OutputIterator>
inline future<OutputIterator>
dispatch_copy_async(InputIterator first,
InputIterator last,
OutputIterator result,
command_queue &queue,
- typename boost::enable_if_c<
- !is_device_iterator<InputIterator>::value &&
- is_device_iterator<OutputIterator>::value
+ typename boost::enable_if<
+ mpl::and_<
+ mpl::not_<
+ is_device_iterator<InputIterator>
+ >,
+ is_device_iterator<OutputIterator>,
+ mpl::not_<
+ is_same_value_type<InputIterator, OutputIterator>
+ >
+ >
>::type* = 0)
{
BOOST_STATIC_ASSERT_MSG(
@@ -97,32 +146,211 @@ dispatch_copy_async(InputIterator first,
"copy_async() is only supported for contiguous host iterators"
);
- return copy_to_device_async(first, last, result, queue);
+ typedef typename std::iterator_traits<InputIterator>::value_type input_type;
+
+ const context &context = queue.get_context();
+ size_t count = iterator_range_size(first, last);
+
+ if(count < size_t(1)) {
+ return future<OutputIterator>();
+ }
+
+ // map [first; last) to device and run copy kernel
+ // on device for copying & casting
+ ::boost::compute::mapped_view<input_type> mapped_host(
+ // make sure it's a pointer to constant data
+ // to force read only mapping
+ const_cast<const input_type*>(
+ ::boost::addressof(*first)
+ ),
+ count,
+ context
+ );
+ return copy_on_device_async(
+ mapped_host.begin(), mapped_host.end(), result, queue
+ );
}
-// device -> host
+// host -> device
+// InputIterator is a contiguous iterator
template<class InputIterator, class OutputIterator>
inline OutputIterator
dispatch_copy(InputIterator first,
InputIterator last,
OutputIterator result,
command_queue &queue,
- typename boost::enable_if_c<
- is_device_iterator<InputIterator>::value &&
- !is_device_iterator<OutputIterator>::value
+ typename boost::enable_if<
+ mpl::and_<
+ mpl::not_<
+ is_device_iterator<InputIterator>
+ >,
+ is_device_iterator<OutputIterator>,
+ is_same_value_type<InputIterator, OutputIterator>,
+ is_contiguous_iterator<InputIterator>
+ >
+ >::type* = 0)
+{
+ return copy_to_device(first, last, result, queue);
+}
+
+// host -> device
+// Type mismatch between InputIterator and OutputIterator value_types
+// InputIterator is a contiguous iterator
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+dispatch_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ mpl::not_<
+ is_device_iterator<InputIterator>
+ >,
+ is_device_iterator<OutputIterator>,
+ mpl::not_<
+ is_same_value_type<InputIterator, OutputIterator>
+ >,
+ is_contiguous_iterator<InputIterator>
+ >
>::type* = 0)
{
- if(is_contiguous_iterator<OutputIterator>::value){
- return copy_to_host(first, last, result, queue);
+ typedef typename OutputIterator::value_type output_type;
+ typedef typename std::iterator_traits<InputIterator>::value_type input_type;
+
+ const device &device = queue.get_device();
+
+ // loading parameters
+ std::string cache_key =
+ std::string("__boost_compute_copy_to_device_")
+ + type_name<input_type>() + "_" + type_name<output_type>();
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ size_t map_copy_threshold;
+ size_t direct_copy_threshold;
+
+ // calculate default values of thresholds
+ if (device.type() & device::gpu) {
+ // GPUs
+ map_copy_threshold = 524288; // 0.5 MB
+ direct_copy_threshold = 52428800; // 50 MB
}
else {
- // for non-contiguous input we first copy the values to
- // a temporary std::vector and then copy from there
- typedef typename std::iterator_traits<InputIterator>::value_type T;
- std::vector<T> vector(iterator_range_size(first, last));
- copy_to_host(first, last, vector.begin(), queue);
- return std::copy(vector.begin(), vector.end(), result);
+ // CPUs and other devices
+ map_copy_threshold = 134217728; // 128 MB
+ direct_copy_threshold = 0; // it's never efficient for CPUs
}
+
+ // load thresholds
+ map_copy_threshold =
+ parameters->get(
+ cache_key, "map_copy_threshold", map_copy_threshold
+ );
+ direct_copy_threshold =
+ parameters->get(
+ cache_key, "direct_copy_threshold", direct_copy_threshold
+ );
+
+ // select copy method based on thresholds & input_size_bytes
+ size_t count = iterator_range_size(first, last);
+ size_t input_size_bytes = count * sizeof(input_type);
+
+ // [0; map_copy_threshold) -> copy_to_device_map()
+ if(input_size_bytes < map_copy_threshold) {
+ return copy_to_device_map(first, last, result, queue);
+ }
+ // [map_copy_threshold; direct_copy_threshold) -> convert [first; last)
+ // on host and then perform copy_to_device()
+ else if(input_size_bytes < direct_copy_threshold) {
+ std::vector<output_type> vector(first, last);
+ return copy_to_device(vector.begin(), vector.end(), result, queue);
+ }
+
+ // [direct_copy_threshold; inf) -> map [first; last) to device and
+ // run copy kernel on device for copying & casting
+ // At this point we are sure that count > 1 (first != last).
+
+ // Perform async copy to device, wait for it to be finished and
+ // return the result.
+ // At this point we are sure that count > 1 (first != last), so event
+ // returned by dispatch_copy_async() must be valid.
+ return dispatch_copy_async(first, last, result, queue).get();
+}
+
+// host -> device
+// InputIterator is NOT a contiguous iterator
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+dispatch_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ mpl::not_<
+ is_device_iterator<InputIterator>
+ >,
+ is_device_iterator<OutputIterator>,
+ mpl::not_<
+ is_contiguous_iterator<InputIterator>
+ >
+ >
+ >::type* = 0)
+{
+ typedef typename OutputIterator::value_type output_type;
+ typedef typename std::iterator_traits<InputIterator>::value_type input_type;
+
+ const device &device = queue.get_device();
+
+ // loading parameters
+ std::string cache_key =
+ std::string("__boost_compute_copy_to_device_")
+ + type_name<input_type>() + "_" + type_name<output_type>();
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ size_t map_copy_threshold;
+ size_t direct_copy_threshold;
+
+ // calculate default values of thresholds
+ if (device.type() & device::gpu) {
+ // GPUs
+ map_copy_threshold = 524288; // 0.5 MB
+ direct_copy_threshold = 52428800; // 50 MB
+ }
+ else {
+ // CPUs and other devices
+ map_copy_threshold = 134217728; // 128 MB
+ direct_copy_threshold = 0; // it's never efficient for CPUs
+ }
+
+ // load thresholds
+ map_copy_threshold =
+ parameters->get(
+ cache_key, "map_copy_threshold", map_copy_threshold
+ );
+ direct_copy_threshold =
+ parameters->get(
+ cache_key, "direct_copy_threshold", direct_copy_threshold
+ );
+
+ // select copy method based on thresholds & input_size_bytes
+ size_t input_size = iterator_range_size(first, last);
+ size_t input_size_bytes = input_size * sizeof(input_type);
+
+ // [0; map_copy_threshold) -> copy_to_device_map()
+ //
+ // if direct_copy_threshold is less than map_copy_threshold
+ // copy_to_device_map() is used for every input
+ if(input_size_bytes < map_copy_threshold
+ || direct_copy_threshold <= map_copy_threshold) {
+ return copy_to_device_map(first, last, result, queue);
+ }
+ // [map_copy_threshold; inf) -> convert [first; last)
+ // on host and then perform copy_to_device()
+ std::vector<output_type> vector(first, last);
+ return copy_to_device(vector.begin(), vector.end(), result, queue);
}
// device -> host (async)
@@ -132,9 +360,14 @@ dispatch_copy_async(InputIterator first,
InputIterator last,
OutputIterator result,
command_queue &queue,
- typename boost::enable_if_c<
- is_device_iterator<InputIterator>::value &&
- !is_device_iterator<OutputIterator>::value
+ typename boost::enable_if<
+ mpl::and_<
+ is_device_iterator<InputIterator>,
+ mpl::not_<
+ is_device_iterator<OutputIterator>
+ >,
+ is_same_value_type<OutputIterator, InputIterator>
+ >
>::type* = 0)
{
BOOST_STATIC_ASSERT_MSG(
@@ -145,6 +378,267 @@ dispatch_copy_async(InputIterator first,
return copy_to_host_async(first, last, result, queue);
}
+// device -> host (async)
+// Type mismatch between InputIterator and OutputIterator value_types
+template<class InputIterator, class OutputIterator>
+inline future<OutputIterator>
+dispatch_copy_async(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ is_device_iterator<InputIterator>,
+ mpl::not_<
+ is_device_iterator<OutputIterator>
+ >,
+ mpl::not_<
+ is_same_value_type<OutputIterator, InputIterator>
+ >
+ >
+ >::type* = 0)
+{
+ BOOST_STATIC_ASSERT_MSG(
+ is_contiguous_iterator<OutputIterator>::value,
+ "copy_async() is only supported for contiguous host iterators"
+ );
+
+ typedef typename std::iterator_traits<OutputIterator>::value_type output_type;
+ const context &context = queue.get_context();
+ size_t count = iterator_range_size(first, last);
+
+ if(count < size_t(1)) {
+ return future<OutputIterator>();
+ }
+
+ // map host memory to device
+ buffer mapped_host(
+ context,
+ count * sizeof(output_type),
+ buffer::write_only | buffer::use_host_ptr,
+ static_cast<void*>(
+ ::boost::addressof(*result)
+ )
+ );
+ // copy async on device
+ ::boost::compute::future<buffer_iterator<output_type> > future =
+ copy_on_device_async(
+ first,
+ last,
+ make_buffer_iterator<output_type>(mapped_host),
+ queue
+ );
+ // update host memory asynchronously by maping and unmaping memory
+ event map_event;
+ void* ptr = queue.enqueue_map_buffer_async(
+ mapped_host,
+ CL_MAP_READ,
+ 0,
+ count * sizeof(output_type),
+ map_event,
+ future.get_event()
+ );
+ event unmap_event =
+ queue.enqueue_unmap_buffer(mapped_host, ptr, map_event);
+ return make_future(result + count, unmap_event);
+}
+
+// device -> host
+// OutputIterator is a contiguous iterator
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+dispatch_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ is_device_iterator<InputIterator>,
+ mpl::not_<
+ is_device_iterator<OutputIterator>
+ >,
+ is_same_value_type<OutputIterator, InputIterator>,
+ is_contiguous_iterator<OutputIterator>,
+ mpl::not_<
+ is_bool_value_type<OutputIterator>
+ >
+ >
+ >::type* = 0)
+{
+ return copy_to_host(first, last, result, queue);
+}
+
+// device -> host
+// Type mismatch between InputIterator and OutputIterator value_types
+// OutputIterator is NOT a contiguous iterator or value_type of OutputIterator
+// is a boolean type.
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+dispatch_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ is_device_iterator<InputIterator>,
+ mpl::not_<
+ is_device_iterator<OutputIterator>
+ >,
+ mpl::or_<
+ mpl::not_<
+ is_contiguous_iterator<OutputIterator>
+ >,
+ is_bool_value_type<OutputIterator>
+ >
+ >
+ >::type* = 0)
+{
+ typedef typename std::iterator_traits<OutputIterator>::value_type output_type;
+ typedef typename InputIterator::value_type input_type;
+
+ const device &device = queue.get_device();
+
+ // loading parameters
+ std::string cache_key =
+ std::string("__boost_compute_copy_to_host_")
+ + type_name<input_type>() + "_" + type_name<output_type>();
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ size_t map_copy_threshold;
+ size_t direct_copy_threshold;
+
+ // calculate default values of thresholds
+ if (device.type() & device::gpu) {
+ // GPUs
+ map_copy_threshold = 33554432; // 30 MB
+ direct_copy_threshold = 0; // it's never efficient for GPUs
+ }
+ else {
+ // CPUs and other devices
+ map_copy_threshold = 134217728; // 128 MB
+ direct_copy_threshold = 0; // it's never efficient for CPUs
+ }
+
+ // load thresholds
+ map_copy_threshold =
+ parameters->get(
+ cache_key, "map_copy_threshold", map_copy_threshold
+ );
+ direct_copy_threshold =
+ parameters->get(
+ cache_key, "direct_copy_threshold", direct_copy_threshold
+ );
+
+ // select copy method based on thresholds & input_size_bytes
+ size_t count = iterator_range_size(first, last);
+ size_t input_size_bytes = count * sizeof(input_type);
+
+ // [0; map_copy_threshold) -> copy_to_host_map()
+ //
+ // if direct_copy_threshold is less than map_copy_threshold
+ // copy_to_host_map() is used for every input
+ if(input_size_bytes < map_copy_threshold
+ || direct_copy_threshold <= map_copy_threshold) {
+ return copy_to_host_map(first, last, result, queue);
+ }
+ // [map_copy_threshold; inf) -> copy [first;last) to temporary vector
+ // then copy (and convert) to result using std::copy()
+ std::vector<input_type> vector(count);
+ copy_to_host(first, last, vector.begin(), queue);
+ return std::copy(vector.begin(), vector.end(), result);
+}
+
+// device -> host
+// Type mismatch between InputIterator and OutputIterator value_types
+// OutputIterator is a contiguous iterator
+// value_type of OutputIterator is NOT a boolean type
+template<class InputIterator, class OutputIterator>
+inline OutputIterator
+dispatch_copy(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue,
+ typename boost::enable_if<
+ mpl::and_<
+ is_device_iterator<InputIterator>,
+ mpl::not_<
+ is_device_iterator<OutputIterator>
+ >,
+ mpl::not_<
+ is_same_value_type<OutputIterator, InputIterator>
+ >,
+ is_contiguous_iterator<OutputIterator>,
+ mpl::not_<
+ is_bool_value_type<OutputIterator>
+ >
+ >
+ >::type* = 0)
+{
+ typedef typename std::iterator_traits<OutputIterator>::value_type output_type;
+ typedef typename InputIterator::value_type input_type;
+
+ const device &device = queue.get_device();
+
+ // loading parameters
+ std::string cache_key =
+ std::string("__boost_compute_copy_to_host_")
+ + type_name<input_type>() + "_" + type_name<output_type>();
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ size_t map_copy_threshold;
+ size_t direct_copy_threshold;
+
+ // calculate default values of thresholds
+ if (device.type() & device::gpu) {
+ // GPUs
+ map_copy_threshold = 524288; // 0.5 MB
+ direct_copy_threshold = 52428800; // 50 MB
+ }
+ else {
+ // CPUs and other devices
+ map_copy_threshold = 134217728; // 128 MB
+ direct_copy_threshold = 0; // it's never efficient for CPUs
+ }
+
+ // load thresholds
+ map_copy_threshold =
+ parameters->get(
+ cache_key, "map_copy_threshold", map_copy_threshold
+ );
+ direct_copy_threshold =
+ parameters->get(
+ cache_key, "direct_copy_threshold", direct_copy_threshold
+ );
+
+ // select copy method based on thresholds & input_size_bytes
+ size_t count = iterator_range_size(first, last);
+ size_t input_size_bytes = count * sizeof(input_type);
+
+ // [0; map_copy_threshold) -> copy_to_host_map()
+ if(input_size_bytes < map_copy_threshold) {
+ return copy_to_host_map(first, last, result, queue);
+ }
+ // [map_copy_threshold; direct_copy_threshold) -> copy [first;last) to
+ // temporary vector then copy (and convert) to result using std::copy()
+ else if(input_size_bytes < direct_copy_threshold) {
+ std::vector<input_type> vector(count);
+ copy_to_host(first, last, vector.begin(), queue);
+ return std::copy(vector.begin(), vector.end(), result);
+ }
+
+ // [direct_copy_threshold; inf) -> map [result; result + input_size) to
+ // device and run copy kernel on device for copying & casting
+ // map host memory to device.
+
+ // Perform async copy to host, wait for it to be finished and
+ // return the result.
+ // At this point we are sure that count > 1 (first != last), so event
+ // returned by dispatch_copy_async() must be valid.
+ return dispatch_copy_async(first, last, result, queue).get();
+}
+
// device -> device
template<class InputIterator, class OutputIterator>
inline OutputIterator
diff --git a/boost/compute/algorithm/detail/copy_on_device.hpp b/boost/compute/algorithm/detail/copy_on_device.hpp
index 0bcee27ed5..8738c8c0b4 100644
--- a/boost/compute/algorithm/detail/copy_on_device.hpp
+++ b/boost/compute/algorithm/detail/copy_on_device.hpp
@@ -22,84 +22,96 @@
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/detail/parameter_cache.hpp>
#include <boost/compute/detail/work_size.hpp>
+#include <boost/compute/detail/vendor.hpp>
namespace boost {
namespace compute {
namespace detail {
-inline size_t pick_copy_work_group_size(size_t n, const device &device)
+template<class InputIterator, class OutputIterator>
+inline event copy_on_device_cpu(InputIterator first,
+ OutputIterator result,
+ size_t count,
+ command_queue &queue)
{
- (void) device;
-
- if(n % 32 == 0) return 32;
- else if(n % 16 == 0) return 16;
- else if(n % 8 == 0) return 8;
- else if(n % 4 == 0) return 4;
- else if(n % 2 == 0) return 2;
- else return 1;
+ meta_kernel k("copy");
+ const device& device = queue.get_device();
+
+ k <<
+ "uint block = " <<
+ "(uint)ceil(((float)count)/get_global_size(0));\n" <<
+ "uint index = get_global_id(0) * block;\n" <<
+ "uint end = min(count, index + block);\n" <<
+ "while(index < end){\n" <<
+ result[k.var<uint_>("index")] << '=' <<
+ first[k.var<uint_>("index")] << ";\n" <<
+ "index++;\n" <<
+ "}\n";
+
+ k.add_set_arg<const uint_>("count", static_cast<uint_>(count));
+
+ size_t global_work_size = device.compute_units();
+ if(count <= 1024) global_work_size = 1;
+ return k.exec_1d(queue, 0, global_work_size);
}
template<class InputIterator, class OutputIterator>
-class copy_kernel : public meta_kernel
+inline event copy_on_device_gpu(InputIterator first,
+ OutputIterator result,
+ size_t count,
+ command_queue &queue)
{
-public:
- copy_kernel(const device &device)
- : meta_kernel("copy")
- {
- m_count = 0;
-
- typedef typename std::iterator_traits<InputIterator>::value_type input_type;
-
- boost::shared_ptr<parameter_cache> parameters =
- detail::parameter_cache::get_global_cache(device);
-
- std::string cache_key =
- "__boost_copy_kernel_" + boost::lexical_cast<std::string>(sizeof(input_type));
+ typedef typename std::iterator_traits<InputIterator>::value_type input_type;
+
+ const device& device = queue.get_device();
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+ std::string cache_key =
+ "__boost_copy_kernel_" + boost::lexical_cast<std::string>(sizeof(input_type));
+
+ uint_ vpt = parameters->get(cache_key, "vpt", 4);
+ uint_ tpb = parameters->get(cache_key, "tpb", 128);
+
+ meta_kernel k("copy");
+ k <<
+ "uint index = get_local_id(0) + " <<
+ "(" << vpt * tpb << " * get_group_id(0));\n" <<
+ "for(uint i = 0; i < " << vpt << "; i++){\n" <<
+ " if(index < count){\n" <<
+ result[k.var<uint_>("index")] << '=' <<
+ first[k.var<uint_>("index")] << ";\n" <<
+ " index += " << tpb << ";\n"
+ " }\n"
+ "}\n";
+
+ k.add_set_arg<const uint_>("count", static_cast<uint_>(count));
+ size_t global_work_size = calculate_work_size(count, vpt, tpb);
+ return k.exec_1d(queue, 0, global_work_size, tpb);
+}
- m_vpt = parameters->get(cache_key, "vpt", 4);
- m_tpb = parameters->get(cache_key, "tpb", 128);
- }
+template<class InputIterator, class OutputIterator>
+inline event dispatch_copy_on_device(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ command_queue &queue)
+{
+ const size_t count = detail::iterator_range_size(first, last);
- void set_range(InputIterator first,
- InputIterator last,
- OutputIterator result)
- {
- m_count_arg = add_arg<uint_>("count");
-
- *this <<
- "uint index = get_local_id(0) + " <<
- "(" << m_vpt * m_tpb << " * get_group_id(0));\n" <<
- "for(uint i = 0; i < " << m_vpt << "; i++){\n" <<
- " if(index < count){\n" <<
- result[expr<uint_>("index")] << '=' <<
- first[expr<uint_>("index")] << ";\n" <<
- " index += " << m_tpb << ";\n"
- " }\n"
- "}\n";
-
- m_count = detail::iterator_range_size(first, last);
+ if(count == 0){
+ // nothing to do
+ return event();
}
- event exec(command_queue &queue)
+ const device& device = queue.get_device();
+ // copy_on_device_cpu() does not work for CPU on Apple platform
+ // due to bug in its compiler.
+ // See https://github.com/boostorg/compute/pull/626
+ if((device.type() & device::cpu) && !is_apple_platform_device(device))
{
- if(m_count == 0){
- // nothing to do
- return event();
- }
-
- size_t global_work_size = calculate_work_size(m_count, m_vpt, m_tpb);
-
- set_arg(m_count_arg, uint_(m_count));
-
- return exec_1d(queue, 0, global_work_size, m_tpb);
+ return copy_on_device_cpu(first, result, count, queue);
}
-
-private:
- size_t m_count;
- size_t m_count_arg;
- uint_ m_vpt;
- uint_ m_tpb;
-};
+ return copy_on_device_gpu(first, result, count, queue);
+}
template<class InputIterator, class OutputIterator>
inline OutputIterator copy_on_device(InputIterator first,
@@ -107,13 +119,7 @@ inline OutputIterator copy_on_device(InputIterator first,
OutputIterator result,
command_queue &queue)
{
- const device &device = queue.get_device();
-
- copy_kernel<InputIterator, OutputIterator> kernel(device);
-
- kernel.set_range(first, last, result);
- kernel.exec(queue);
-
+ dispatch_copy_on_device(first, last, result, queue);
return result + std::distance(first, last);
}
@@ -134,13 +140,7 @@ inline future<OutputIterator> copy_on_device_async(InputIterator first,
OutputIterator result,
command_queue &queue)
{
- const device &device = queue.get_device();
-
- copy_kernel<InputIterator, OutputIterator> kernel(device);
-
- kernel.set_range(first, last, result);
- event event_ = kernel.exec(queue);
-
+ event event_ = dispatch_copy_on_device(first, last, result, queue);
return make_future(result + std::distance(first, last), event_);
}
@@ -172,7 +172,7 @@ inline future<svm_ptr<T> > copy_on_device_async(svm_ptr<T> first,
{
size_t count = iterator_range_size(first, last);
if(count == 0){
- return result;
+ return future<svm_ptr<T> >();
}
event event_ = queue.enqueue_svm_memcpy_async(
diff --git a/boost/compute/algorithm/detail/copy_to_device.hpp b/boost/compute/algorithm/detail/copy_to_device.hpp
index 90545fb4ed..bce5975f53 100644
--- a/boost/compute/algorithm/detail/copy_to_device.hpp
+++ b/boost/compute/algorithm/detail/copy_to_device.hpp
@@ -53,6 +53,49 @@ inline DeviceIterator copy_to_device(HostIterator first,
}
template<class HostIterator, class DeviceIterator>
+inline DeviceIterator copy_to_device_map(HostIterator first,
+ HostIterator last,
+ DeviceIterator result,
+ command_queue &queue)
+{
+ typedef typename
+ std::iterator_traits<DeviceIterator>::value_type
+ value_type;
+ typedef typename
+ std::iterator_traits<DeviceIterator>::difference_type
+ difference_type;
+
+ size_t count = iterator_range_size(first, last);
+ if(count == 0){
+ return result;
+ }
+
+ size_t offset = result.get_index();
+
+ // map result buffer to host
+ value_type *pointer = static_cast<value_type*>(
+ queue.enqueue_map_buffer(
+ result.get_buffer(),
+ CL_MAP_WRITE,
+ offset * sizeof(value_type),
+ count * sizeof(value_type)
+ )
+ );
+
+ // copy [first; last) to result buffer
+ std::copy(first, last, pointer);
+
+ // unmap result buffer
+ boost::compute::event unmap_event = queue.enqueue_unmap_buffer(
+ result.get_buffer(),
+ static_cast<void*>(pointer)
+ );
+ unmap_event.wait();
+
+ return result + static_cast<difference_type>(count);
+}
+
+template<class HostIterator, class DeviceIterator>
inline future<DeviceIterator> copy_to_device_async(HostIterator first,
HostIterator last,
DeviceIterator result,
@@ -109,7 +152,7 @@ inline future<svm_ptr<T> > copy_to_device_async(HostIterator first,
{
size_t count = iterator_range_size(first, last);
if(count == 0){
- return result;
+ return future<svm_ptr<T> >();
}
event event_ = queue.enqueue_svm_memcpy_async(
@@ -118,6 +161,29 @@ inline future<svm_ptr<T> > copy_to_device_async(HostIterator first,
return make_future(result + count, event_);
}
+
+template<class HostIterator, class T>
+inline svm_ptr<T> copy_to_device_map(HostIterator first,
+ HostIterator last,
+ svm_ptr<T> result,
+ command_queue &queue)
+{
+ size_t count = iterator_range_size(first, last);
+ if(count == 0){
+ return result;
+ }
+
+ // map
+ queue.enqueue_svm_map(result.get(), count * sizeof(T), CL_MAP_WRITE);
+
+ // copy [first; last) to result buffer
+ std::copy(first, last, static_cast<T*>(result.get()));
+
+ // unmap result
+ queue.enqueue_svm_unmap(result.get()).wait();
+
+ return result + count;
+}
#endif // CL_VERSION_2_0
} // end detail namespace
diff --git a/boost/compute/algorithm/detail/copy_to_host.hpp b/boost/compute/algorithm/detail/copy_to_host.hpp
index b889e0c871..d770a996ef 100644
--- a/boost/compute/algorithm/detail/copy_to_host.hpp
+++ b/boost/compute/algorithm/detail/copy_to_host.hpp
@@ -51,17 +51,51 @@ inline HostIterator copy_to_host(DeviceIterator first,
return iterator_plus_distance(result, count);
}
-// copy_to_host() specialization for std::vector<bool>
-template<class DeviceIterator>
-inline std::vector<bool>::iterator
-copy_to_host(DeviceIterator first,
- DeviceIterator last,
- std::vector<bool>::iterator result,
- command_queue &queue)
+template<class DeviceIterator, class HostIterator>
+inline HostIterator copy_to_host_map(DeviceIterator first,
+ DeviceIterator last,
+ HostIterator result,
+ command_queue &queue)
{
- std::vector<uint8_t> temp(std::distance(first, last));
- copy_to_host(first, last, temp.begin(), queue);
- return std::copy(temp.begin(), temp.end(), result);
+ typedef typename
+ std::iterator_traits<DeviceIterator>::value_type
+ value_type;
+ typedef typename
+ std::iterator_traits<DeviceIterator>::difference_type
+ difference_type;
+
+ size_t count = iterator_range_size(first, last);
+ if(count == 0){
+ return result;
+ }
+
+ size_t offset = first.get_index();
+
+ // map [first; last) buffer to host
+ value_type *pointer = static_cast<value_type*>(
+ queue.enqueue_map_buffer(
+ first.get_buffer(),
+ CL_MAP_READ,
+ offset * sizeof(value_type),
+ count * sizeof(value_type)
+ )
+ );
+
+ // copy [first; last) to result buffer
+ std::copy(
+ pointer,
+ pointer + static_cast<difference_type>(count),
+ result
+ );
+
+ // unmap [first; last)
+ boost::compute::event unmap_event = queue.enqueue_unmap_buffer(
+ first.get_buffer(),
+ static_cast<void*>(pointer)
+ );
+ unmap_event.wait();
+
+ return iterator_plus_distance(result, count);
}
template<class DeviceIterator, class HostIterator>
@@ -119,7 +153,7 @@ inline future<HostIterator> copy_to_host_async(svm_ptr<T> first,
{
size_t count = iterator_range_size(first, last);
if(count == 0){
- return result;
+ return future<HostIterator>();
}
event event_ = queue.enqueue_svm_memcpy_async(
@@ -128,6 +162,33 @@ inline future<HostIterator> copy_to_host_async(svm_ptr<T> first,
return make_future(iterator_plus_distance(result, count), event_);
}
+
+template<class T, class HostIterator>
+inline HostIterator copy_to_host_map(svm_ptr<T> first,
+ svm_ptr<T> last,
+ HostIterator result,
+ command_queue &queue)
+{
+ size_t count = iterator_range_size(first, last);
+ if(count == 0){
+ return result;
+ }
+
+ // map
+ queue.enqueue_svm_map(first.get(), count * sizeof(T), CL_MAP_READ);
+
+ // copy [first; last) to result
+ std::copy(
+ static_cast<T*>(first.get()),
+ static_cast<T*>(last.get()),
+ result
+ );
+
+ // unmap [first; last)
+ queue.enqueue_svm_unmap(first.get()).wait();
+
+ return iterator_plus_distance(result, count);
+}
#endif // CL_VERSION_2_0
} // end detail namespace
diff --git a/boost/compute/algorithm/detail/find_extrema.hpp b/boost/compute/algorithm/detail/find_extrema.hpp
index 6e756c3904..eef2e36c3c 100644
--- a/boost/compute/algorithm/detail/find_extrema.hpp
+++ b/boost/compute/algorithm/detail/find_extrema.hpp
@@ -12,6 +12,7 @@
#define BOOST_COMPUTE_ALGORITHM_DETAIL_FIND_EXTREMA_HPP
#include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/algorithm/detail/find_extrema_on_cpu.hpp>
#include <boost/compute/algorithm/detail/find_extrema_with_reduce.hpp>
#include <boost/compute/algorithm/detail/find_extrema_with_atomics.hpp>
#include <boost/compute/algorithm/detail/serial_find_extrema.hpp>
@@ -36,12 +37,17 @@ inline InputIterator find_extrema(InputIterator first,
const device &device = queue.get_device();
+ // CPU
+ if(device.type() & device::cpu) {
+ return find_extrema_on_cpu(first, last, compare, find_minimum, queue);
+ }
+
+ // GPU
// use serial method for small inputs
- // and when device is a CPU
- if(count < 512 || (device.type() & device::cpu)){
+ if(count < 512)
+ {
return serial_find_extrema(first, last, compare, find_minimum, queue);
}
-
// find_extrema_with_reduce() is used only if requirements are met
if(find_extrema_with_reduce_requirements_met(first, last, queue))
{
diff --git a/boost/compute/algorithm/detail/find_extrema_on_cpu.hpp b/boost/compute/algorithm/detail/find_extrema_on_cpu.hpp
new file mode 100644
index 0000000000..9363ad5837
--- /dev/null
+++ b/boost/compute/algorithm/detail/find_extrema_on_cpu.hpp
@@ -0,0 +1,138 @@
+//---------------------------------------------------------------------------//
+// Copyright (c) 2016 Jakub Szuppe <j.szuppe@gmail.com>
+//
+// Distributed under the 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://boostorg.github.com/compute for more information.
+//---------------------------------------------------------------------------//
+
+#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_FIND_EXTREMA_ON_CPU_HPP
+#define BOOST_COMPUTE_ALGORITHM_DETAIL_FIND_EXTREMA_ON_CPU_HPP
+
+#include <algorithm>
+
+#include <boost/compute/algorithm/detail/find_extrema_with_reduce.hpp>
+#include <boost/compute/algorithm/detail/find_extrema_with_atomics.hpp>
+#include <boost/compute/algorithm/detail/serial_find_extrema.hpp>
+#include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/iterator/buffer_iterator.hpp>
+
+namespace boost {
+namespace compute {
+namespace detail {
+
+template<class InputIterator, class Compare>
+inline InputIterator find_extrema_on_cpu(InputIterator first,
+ InputIterator last,
+ Compare compare,
+ const bool find_minimum,
+ command_queue &queue)
+{
+ typedef typename std::iterator_traits<InputIterator>::value_type input_type;
+ typedef typename std::iterator_traits<InputIterator>::difference_type difference_type;
+ size_t count = iterator_range_size(first, last);
+
+ const device &device = queue.get_device();
+ const uint_ compute_units = queue.get_device().compute_units();
+
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+ std::string cache_key =
+ "__boost_find_extrema_cpu_"
+ + boost::lexical_cast<std::string>(sizeof(input_type));
+
+ // for inputs smaller than serial_find_extrema_threshold
+ // serial_find_extrema algorithm is used
+ uint_ serial_find_extrema_threshold = parameters->get(
+ cache_key,
+ "serial_find_extrema_threshold",
+ 16384 * sizeof(input_type)
+ );
+ serial_find_extrema_threshold =
+ (std::max)(serial_find_extrema_threshold, uint_(2 * compute_units));
+
+ const context &context = queue.get_context();
+ if(count < serial_find_extrema_threshold) {
+ return serial_find_extrema(first, last, compare, find_minimum, queue);
+ }
+
+ meta_kernel k("find_extrema_on_cpu");
+ buffer output(context, sizeof(input_type) * compute_units);
+ buffer output_idx(
+ context, sizeof(uint_) * compute_units,
+ buffer::read_write | buffer::alloc_host_ptr
+ );
+
+ size_t count_arg = k.add_arg<uint_>("count");
+ size_t output_arg =
+ k.add_arg<input_type *>(memory_object::global_memory, "output");
+ size_t output_idx_arg =
+ k.add_arg<uint_ *>(memory_object::global_memory, "output_idx");
+
+ k <<
+ "uint block = " <<
+ "(uint)ceil(((float)count)/get_global_size(0));\n" <<
+ "uint index = get_global_id(0) * block;\n" <<
+ "uint end = min(count, index + block);\n" <<
+
+ "uint value_index = index;\n" <<
+ k.decl<input_type>("value") << " = " << first[k.var<uint_>("index")] << ";\n" <<
+
+ "index++;\n" <<
+ "while(index < end){\n" <<
+ k.decl<input_type>("candidate") <<
+ " = " << first[k.var<uint_>("index")] << ";\n" <<
+ "#ifndef BOOST_COMPUTE_FIND_MAXIMUM\n" <<
+ "bool compare = " << compare(k.var<input_type>("candidate"),
+ k.var<input_type>("value")) << ";\n" <<
+ "#else\n" <<
+ "bool compare = " << compare(k.var<input_type>("value"),
+ k.var<input_type>("candidate")) << ";\n" <<
+ "#endif\n" <<
+ "value = compare ? candidate : value;\n" <<
+ "value_index = compare ? index : value_index;\n" <<
+ "index++;\n" <<
+ "}\n" <<
+ "output[get_global_id(0)] = value;\n" <<
+ "output_idx[get_global_id(0)] = value_index;\n";
+
+ size_t global_work_size = compute_units;
+ std::string options;
+ if(!find_minimum){
+ options = "-DBOOST_COMPUTE_FIND_MAXIMUM";
+ }
+ kernel kernel = k.compile(context, options);
+
+ kernel.set_arg(count_arg, static_cast<uint_>(count));
+ kernel.set_arg(output_arg, output);
+ kernel.set_arg(output_idx_arg, output_idx);
+ queue.enqueue_1d_range_kernel(kernel, 0, global_work_size, 0);
+
+ buffer_iterator<input_type> result = serial_find_extrema(
+ make_buffer_iterator<input_type>(output),
+ make_buffer_iterator<input_type>(output, global_work_size),
+ compare,
+ find_minimum,
+ queue
+ );
+
+ uint_* output_idx_host_ptr =
+ static_cast<uint_*>(
+ queue.enqueue_map_buffer(
+ output_idx, command_queue::map_read,
+ 0, global_work_size * sizeof(uint_)
+ )
+ );
+
+ difference_type extremum_idx =
+ static_cast<difference_type>(*(output_idx_host_ptr + result.get_index()));
+ return first + extremum_idx;
+}
+
+} // end detail namespace
+} // end compute namespace
+} // end boost namespace
+
+#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_FIND_EXTREMA_ON_CPU_HPP
diff --git a/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp b/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp
index 1fbb7dee19..8f2a83c38b 100644
--- a/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp
+++ b/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp
@@ -128,7 +128,7 @@ inline void find_extrema_with_reduce(InputIterator input,
// Next element
k.decl<input_type>("next") << " = " << input[k.var<uint_>("idx")] << ";\n" <<
"#ifdef BOOST_COMPUTE_USE_INPUT_IDX\n" <<
- k.decl<input_type>("next_idx") << " = " << input_idx[k.var<uint_>("idx")] << ";\n" <<
+ k.decl<uint_>("next_idx") << " = " << input_idx[k.var<uint_>("idx")] << ";\n" <<
"#endif\n" <<
// Comparison between currently best element (acc) and next element
diff --git a/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp b/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp
new file mode 100644
index 0000000000..e62c6beb8d
--- /dev/null
+++ b/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp
@@ -0,0 +1,590 @@
+//---------------------------------------------------------------------------//
+// Copyright (c) 2016 Jakub Szuppe <j.szuppe@gmail.com>
+//
+// Distributed under the 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://boostorg.github.com/compute for more information.
+//---------------------------------------------------------------------------//
+
+#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_MERGE_SORT_ON_GPU_HPP_
+#define BOOST_COMPUTE_ALGORITHM_DETAIL_MERGE_SORT_ON_GPU_HPP_
+
+#include <algorithm>
+
+#include <boost/compute/kernel.hpp>
+#include <boost/compute/program.hpp>
+#include <boost/compute/command_queue.hpp>
+#include <boost/compute/container/vector.hpp>
+#include <boost/compute/memory/local_buffer.hpp>
+#include <boost/compute/detail/meta_kernel.hpp>
+#include <boost/compute/detail/iterator_range_size.hpp>
+
+namespace boost {
+namespace compute {
+namespace detail {
+
+template<class KeyType, class ValueType>
+inline size_t pick_bitonic_block_sort_block_size(size_t proposed_wg,
+ size_t lmem_size,
+ bool sort_by_key)
+{
+ size_t n = proposed_wg;
+
+ size_t lmem_required = n * sizeof(KeyType);
+ if(sort_by_key) {
+ lmem_required += n * sizeof(ValueType);
+ }
+
+ // try to force at least 4 work-groups of >64 elements
+ // for better occupancy
+ while(lmem_size < (lmem_required * 4) && (n > 64)) {
+ n /= 2;
+ lmem_required = n * sizeof(KeyType);
+ }
+ while(lmem_size < lmem_required && (n != 1)) {
+ n /= 2;
+ if(n < 1) n = 1;
+ lmem_required = n * sizeof(KeyType);
+ }
+
+ if(n < 2) { return 1; }
+ else if(n < 4) { return 2; }
+ else if(n < 8) { return 4; }
+ else if(n < 16) { return 8; }
+ else if(n < 32) { return 16; }
+ else if(n < 64) { return 32; }
+ else if(n < 128) { return 64; }
+ else if(n < 256) { return 128; }
+ else { return 256; }
+}
+
+
+/// Performs bitonic block sort according to \p compare.
+///
+/// Since bitonic sort can be only performed when input size is equal to 2^n,
+/// in this case input size is block size (\p work_group_size), we would have
+/// to require \p count be a exact multiple of block size. That would not be
+/// great.
+/// Instead, bitonic sort kernel is merged with odd-even merge sort so if the
+/// last block is not equal to 2^n (where n is some natural number) the odd-even
+/// sort is performed for that block. That way bitonic_block_sort() works for
+/// input of any size. Block size (\p work_group_size) still have to be equal
+/// to 2^n.
+///
+/// This is NOT stable.
+///
+/// \param keys_first first key element in the range to sort
+/// \param values_first first value element in the range to sort
+/// \param compare comparison function for keys
+/// \param count number of elements in the range; count > 0
+/// \param work_group_size size of the work group, also the block size; must be
+/// equal to n^2 where n is natural number
+/// \param queue command queue to perform the operation
+template<class KeyIterator, class ValueIterator, class Compare>
+inline size_t bitonic_block_sort(KeyIterator keys_first,
+ ValueIterator values_first,
+ Compare compare,
+ const size_t count,
+ const bool sort_by_key,
+ command_queue &queue)
+{
+ typedef typename std::iterator_traits<KeyIterator>::value_type key_type;
+
+ meta_kernel k("bitonic_block_sort");
+ size_t count_arg = k.add_arg<const uint_>("count");
+
+ size_t local_keys_arg = k.add_arg<key_type *>(memory_object::local_memory, "lkeys");
+ size_t local_vals_arg = 0;
+ if(sort_by_key) {
+ local_vals_arg = k.add_arg<uchar_ *>(memory_object::local_memory, "lidx");
+ }
+
+ k <<
+ // Work item global and local ids
+ k.decl<const uint_>("gid") << " = get_global_id(0);\n" <<
+ k.decl<const uint_>("lid") << " = get_local_id(0);\n";
+
+ // declare my_key and my_value
+ k <<
+ k.decl<key_type>("my_key") << ";\n";
+ // Instead of copying values (my_value) in local memory with keys
+ // we save local index (uchar) and copy my_value at the end at
+ // final index. This saves local memory.
+ if(sort_by_key)
+ {
+ k <<
+ k.decl<uchar_>("my_index") << " = (uchar)(lid);\n";
+ }
+
+ // load key
+ k <<
+ "if(gid < count) {\n" <<
+ k.var<key_type>("my_key") << " = " <<
+ keys_first[k.var<const uint_>("gid")] << ";\n" <<
+ "}\n";
+
+ // load key and index to local memory
+ k <<
+ "lkeys[lid] = my_key;\n";
+ if(sort_by_key)
+ {
+ k <<
+ "lidx[lid] = my_index;\n";
+ }
+ k <<
+ k.decl<const uint_>("offset") << " = get_group_id(0) * get_local_size(0);\n" <<
+ k.decl<const uint_>("n") << " = min((uint)(get_local_size(0)),(count - offset));\n";
+
+ // When work group size is a power of 2 bitonic sorter can be used;
+ // otherwise, slower odd-even sort is used.
+
+ k <<
+ // check if n is power of 2
+ "if(((n != 0) && ((n & (~n + 1)) == n))) {\n";
+
+ // bitonic sort, not stable
+ k <<
+ // wait for keys and vals to be stored in local memory
+ "barrier(CLK_LOCAL_MEM_FENCE);\n" <<
+
+ "#pragma unroll\n" <<
+ "for(" <<
+ k.decl<uint_>("length") << " = 1; " <<
+ "length < n; " <<
+ "length <<= 1" <<
+ ") {\n" <<
+ // direction of sort: false -> asc, true -> desc
+ k.decl<bool>("direction") << "= ((lid & (length<<1)) != 0);\n" <<
+ "for(" <<
+ k.decl<uint_>("k") << " = length; " <<
+ "k > 0; " <<
+ "k >>= 1" <<
+ ") {\n" <<
+
+ // sibling to compare with my key
+ k.decl<uint_>("sibling_idx") << " = lid ^ k;\n" <<
+ k.decl<key_type>("sibling_key") << " = lkeys[sibling_idx];\n" <<
+ k.decl<bool>("compare") << " = " <<
+ compare(k.var<key_type>("sibling_key"),
+ k.var<key_type>("my_key")) << ";\n" <<
+ k.decl<bool>("swap") <<
+ " = compare ^ (sibling_idx < lid) ^ direction;\n" <<
+ "my_key = swap ? sibling_key : my_key;\n";
+ if(sort_by_key)
+ {
+ k <<
+ "my_index = swap ? lidx[sibling_idx] : my_index;\n";
+ }
+ k <<
+ "barrier(CLK_LOCAL_MEM_FENCE);\n" <<
+ "lkeys[lid] = my_key;\n";
+ if(sort_by_key)
+ {
+ k <<
+ "lidx[lid] = my_index;\n";
+ }
+ k <<
+ "barrier(CLK_LOCAL_MEM_FENCE);\n" <<
+ "}\n" <<
+ "}\n";
+
+ // end of bitonic sort
+
+ // odd-even sort, not stable
+ k <<
+ "}\n" <<
+ "else { \n";
+
+ k <<
+ k.decl<bool>("lid_is_even") << " = (lid%2) == 0;\n" <<
+ k.decl<uint_>("oddsibling_idx") << " = " <<
+ "(lid_is_even) ? max(lid,(uint)(1)) - 1 : min(lid+1,n-1);\n" <<
+ k.decl<uint_>("evensibling_idx") << " = " <<
+ "(lid_is_even) ? min(lid+1,n-1) : max(lid,(uint)(1)) - 1;\n" <<
+
+ // wait for keys and vals to be stored in local memory
+ "barrier(CLK_LOCAL_MEM_FENCE);\n" <<
+
+ "#pragma unroll\n" <<
+ "for(" <<
+ k.decl<uint_>("i") << " = 0; " <<
+ "i < n; " <<
+ "i++" <<
+ ") {\n" <<
+ k.decl<uint_>("sibling_idx") <<
+ " = i%2 == 0 ? evensibling_idx : oddsibling_idx;\n" <<
+ k.decl<key_type>("sibling_key") << " = lkeys[sibling_idx];\n" <<
+ k.decl<bool>("compare") << " = " <<
+ compare(k.var<key_type>("sibling_key"),
+ k.var<key_type>("my_key")) << ";\n" <<
+ k.decl<bool>("swap") <<
+ " = compare ^ (sibling_idx < lid);\n" <<
+ "my_key = swap ? sibling_key : my_key;\n";
+ if(sort_by_key)
+ {
+ k <<
+ "my_index = swap ? lidx[sibling_idx] : my_index;\n";
+ }
+ k <<
+ "barrier(CLK_LOCAL_MEM_FENCE);\n" <<
+ "lkeys[lid] = my_key;\n";
+ if(sort_by_key)
+ {
+ k <<
+ "lidx[lid] = my_index;\n";
+ }
+ k <<
+ "barrier(CLK_LOCAL_MEM_FENCE);\n"
+ "}\n" << // for
+
+ "}\n"; // else
+ // end of odd-even sort
+
+ // save key and value
+ k <<
+ "if(gid < count) {\n" <<
+ keys_first[k.var<const uint_>("gid")] << " = " <<
+ k.var<key_type>("my_key") << ";\n";
+ if(sort_by_key)
+ {
+ k << values_first[k.var<const uint_>("gid")] << " = " <<
+ values_first[k.var<const uint_>("offset + my_index")] << ";\n";
+ }
+ k <<
+ // end if
+ "}\n";
+
+ const context &context = queue.get_context();
+ const device &device = queue.get_device();
+ ::boost::compute::kernel kernel = k.compile(context);
+
+ const size_t work_group_size =
+ pick_bitonic_block_sort_block_size<key_type, uchar_>(
+ kernel.get_work_group_info<size_t>(
+ device, CL_KERNEL_WORK_GROUP_SIZE
+ ),
+ device.get_info<size_t>(CL_DEVICE_LOCAL_MEM_SIZE),
+ sort_by_key
+ );
+
+ const size_t global_size =
+ work_group_size * static_cast<size_t>(
+ std::ceil(float(count) / work_group_size)
+ );
+
+ kernel.set_arg(count_arg, static_cast<uint_>(count));
+ kernel.set_arg(local_keys_arg, local_buffer<key_type>(work_group_size));
+ if(sort_by_key) {
+ kernel.set_arg(local_vals_arg, local_buffer<uchar_>(work_group_size));
+ }
+
+ queue.enqueue_1d_range_kernel(kernel, 0, global_size, work_group_size);
+ // return size of the block
+ return work_group_size;
+}
+
+template<class KeyIterator, class ValueIterator, class Compare>
+inline size_t block_sort(KeyIterator keys_first,
+ ValueIterator values_first,
+ Compare compare,
+ const size_t count,
+ const bool sort_by_key,
+ const bool stable,
+ command_queue &queue)
+{
+ if(stable) {
+ // TODO: Implement stable block sort (stable odd-even merge sort)
+ return size_t(1);
+ }
+ return bitonic_block_sort(
+ keys_first, values_first,
+ compare, count,
+ sort_by_key, queue
+ );
+}
+
+/// space: O(n + m); n - number of keys, m - number of values
+template<class KeyIterator, class ValueIterator, class Compare>
+inline void merge_blocks_on_gpu(KeyIterator keys_first,
+ ValueIterator values_first,
+ KeyIterator out_keys_first,
+ ValueIterator out_values_first,
+ Compare compare,
+ const size_t count,
+ const size_t block_size,
+ const bool sort_by_key,
+ command_queue &queue)
+{
+ typedef typename std::iterator_traits<KeyIterator>::value_type key_type;
+ typedef typename std::iterator_traits<ValueIterator>::value_type value_type;
+
+ meta_kernel k("merge_blocks");
+ size_t count_arg = k.add_arg<const uint_>("count");
+ size_t block_size_arg = k.add_arg<const uint_>("block_size");
+
+ k <<
+ // get global id
+ k.decl<const uint_>("gid") << " = get_global_id(0);\n" <<
+ "if(gid >= count) {\n" <<
+ "return;\n" <<
+ "}\n" <<
+
+ k.decl<const key_type>("my_key") << " = " <<
+ keys_first[k.var<const uint_>("gid")] << ";\n";
+
+ if(sort_by_key) {
+ k <<
+ k.decl<const value_type>("my_value") << " = " <<
+ values_first[k.var<const uint_>("gid")] << ";\n";
+ }
+
+ k <<
+ // get my block idx
+ k.decl<const uint_>("my_block_idx") << " = gid / block_size;\n" <<
+ k.decl<const bool>("my_block_idx_is_odd") << " = " <<
+ "my_block_idx & 0x1;\n" <<
+
+ k.decl<const uint_>("other_block_idx") << " = " <<
+ // if(my_block_idx is odd) {} else {}
+ "my_block_idx_is_odd ? my_block_idx - 1 : my_block_idx + 1;\n" <<
+
+ // get ranges of my block and the other block
+ // [my_block_start; my_block_end)
+ // [other_block_start; other_block_end)
+ k.decl<const uint_>("my_block_start") << " = " <<
+ "min(my_block_idx * block_size, count);\n" << // including
+ k.decl<const uint_>("my_block_end") << " = " <<
+ "min((my_block_idx + 1) * block_size, count);\n" << // excluding
+
+ k.decl<const uint_>("other_block_start") << " = " <<
+ "min(other_block_idx * block_size, count);\n" << // including
+ k.decl<const uint_>("other_block_end") << " = " <<
+ "min((other_block_idx + 1) * block_size, count);\n" << // excluding
+
+ // other block is empty, nothing to merge here
+ "if(other_block_start == count){\n" <<
+ out_keys_first[k.var<uint_>("gid")] << " = my_key;\n";
+ if(sort_by_key) {
+ k <<
+ out_values_first[k.var<uint_>("gid")] << " = my_value;\n";
+ }
+
+ k <<
+ "return;\n" <<
+ "}\n" <<
+
+ // lower bound
+ // left_idx - lower bound
+ k.decl<uint_>("left_idx") << " = other_block_start;\n" <<
+ k.decl<uint_>("right_idx") << " = other_block_end;\n" <<
+ "while(left_idx < right_idx) {\n" <<
+ k.decl<uint_>("mid_idx") << " = (left_idx + right_idx) / 2;\n" <<
+ k.decl<key_type>("mid_key") << " = " <<
+ keys_first[k.var<const uint_>("mid_idx")] << ";\n" <<
+ k.decl<bool>("smaller") << " = " <<
+ compare(k.var<key_type>("mid_key"),
+ k.var<key_type>("my_key")) << ";\n" <<
+ "left_idx = smaller ? mid_idx + 1 : left_idx;\n" <<
+ "right_idx = smaller ? right_idx : mid_idx;\n" <<
+ "}\n" <<
+ // left_idx is found position in other block
+
+ // if my_block is odd we need to get the upper bound
+ "right_idx = other_block_end;\n" <<
+ "if(my_block_idx_is_odd && left_idx != right_idx) {\n" <<
+ k.decl<key_type>("upper_key") << " = " <<
+ keys_first[k.var<const uint_>("left_idx")] << ";\n" <<
+ "while(" <<
+ "!(" << compare(k.var<key_type>("upper_key"),
+ k.var<key_type>("my_key")) <<
+ ") && " <<
+ "!(" << compare(k.var<key_type>("my_key"),
+ k.var<key_type>("upper_key")) <<
+ ") && " <<
+ "left_idx < right_idx" <<
+ ")" <<
+ "{\n" <<
+ k.decl<uint_>("mid_idx") << " = (left_idx + right_idx) / 2;\n" <<
+ k.decl<key_type>("mid_key") << " = " <<
+ keys_first[k.var<const uint_>("mid_idx")] << ";\n" <<
+ k.decl<bool>("equal") << " = " <<
+ "!(" << compare(k.var<key_type>("mid_key"),
+ k.var<key_type>("my_key")) <<
+ ") && " <<
+ "!(" << compare(k.var<key_type>("my_key"),
+ k.var<key_type>("mid_key")) <<
+ ");\n" <<
+ "left_idx = equal ? mid_idx + 1 : left_idx + 1;\n" <<
+ "right_idx = equal ? right_idx : mid_idx;\n" <<
+ "upper_key = equal ? upper_key : " <<
+ keys_first[k.var<const uint_>("left_idx")] << ";\n" <<
+ "}\n" <<
+ "}\n" <<
+
+ k.decl<uint_>("offset") << " = 0;\n" <<
+ "offset += gid - my_block_start;\n" <<
+ "offset += left_idx - other_block_start;\n" <<
+ "offset += min(my_block_start, other_block_start);\n" <<
+ out_keys_first[k.var<uint_>("offset")] << " = my_key;\n";
+ if(sort_by_key) {
+ k <<
+ out_values_first[k.var<uint_>("offset")] << " = my_value;\n";
+ }
+
+ const context &context = queue.get_context();
+ ::boost::compute::kernel kernel = k.compile(context);
+
+ const size_t work_group_size = (std::min)(
+ size_t(256),
+ kernel.get_work_group_info<size_t>(
+ queue.get_device(), CL_KERNEL_WORK_GROUP_SIZE
+ )
+ );
+ const size_t global_size =
+ work_group_size * static_cast<size_t>(
+ std::ceil(float(count) / work_group_size)
+ );
+
+ kernel.set_arg(count_arg, static_cast<uint_>(count));
+ kernel.set_arg(block_size_arg, static_cast<uint_>(block_size));
+ queue.enqueue_1d_range_kernel(kernel, 0, global_size, work_group_size);
+}
+
+template<class KeyIterator, class ValueIterator, class Compare>
+inline void merge_sort_by_key_on_gpu(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ Compare compare,
+ bool stable,
+ command_queue &queue)
+{
+ typedef typename std::iterator_traits<KeyIterator>::value_type key_type;
+ typedef typename std::iterator_traits<ValueIterator>::value_type value_type;
+
+ size_t count = iterator_range_size(keys_first, keys_last);
+ if(count < 2){
+ return;
+ }
+
+ size_t block_size =
+ block_sort(
+ keys_first, values_first,
+ compare, count,
+ true /* sort_by_key */, stable /* stable */,
+ queue
+ );
+
+ // for small input size only block sort is performed
+ if(count <= block_size) {
+ return;
+ }
+
+ const context &context = queue.get_context();
+
+ bool result_in_temporary_buffer = false;
+ ::boost::compute::vector<key_type> temp_keys(count, context);
+ ::boost::compute::vector<value_type> temp_values(count, context);
+
+ for(; block_size < count; block_size *= 2) {
+ result_in_temporary_buffer = !result_in_temporary_buffer;
+ if(result_in_temporary_buffer) {
+ merge_blocks_on_gpu(keys_first, values_first,
+ temp_keys.begin(), temp_values.begin(),
+ compare, count, block_size,
+ true /* sort_by_key */, queue);
+ } else {
+ merge_blocks_on_gpu(temp_keys.begin(), temp_values.begin(),
+ keys_first, values_first,
+ compare, count, block_size,
+ true /* sort_by_key */, queue);
+ }
+ }
+
+ if(result_in_temporary_buffer) {
+ copy_async(temp_keys.begin(), temp_keys.end(), keys_first, queue);
+ copy_async(temp_values.begin(), temp_values.end(), values_first, queue);
+ }
+}
+
+template<class Iterator, class Compare>
+inline void merge_sort_on_gpu(Iterator first,
+ Iterator last,
+ Compare compare,
+ bool stable,
+ command_queue &queue)
+{
+ typedef typename std::iterator_traits<Iterator>::value_type key_type;
+
+ size_t count = iterator_range_size(first, last);
+ if(count < 2){
+ return;
+ }
+
+ Iterator dummy;
+ size_t block_size =
+ block_sort(
+ first, dummy,
+ compare, count,
+ false /* sort_by_key */, stable /* stable */,
+ queue
+ );
+
+ // for small input size only block sort is performed
+ if(count <= block_size) {
+ return;
+ }
+
+ const context &context = queue.get_context();
+
+ bool result_in_temporary_buffer = false;
+ ::boost::compute::vector<key_type> temp_keys(count, context);
+
+ for(; block_size < count; block_size *= 2) {
+ result_in_temporary_buffer = !result_in_temporary_buffer;
+ if(result_in_temporary_buffer) {
+ merge_blocks_on_gpu(first, dummy, temp_keys.begin(), dummy,
+ compare, count, block_size,
+ false /* sort_by_key */, queue);
+ } else {
+ merge_blocks_on_gpu(temp_keys.begin(), dummy, first, dummy,
+ compare, count, block_size,
+ false /* sort_by_key */, queue);
+ }
+ }
+
+ if(result_in_temporary_buffer) {
+ copy_async(temp_keys.begin(), temp_keys.end(), first, queue);
+ }
+}
+
+template<class KeyIterator, class ValueIterator, class Compare>
+inline void merge_sort_by_key_on_gpu(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ Compare compare,
+ command_queue &queue)
+{
+ merge_sort_by_key_on_gpu(
+ keys_first, keys_last, values_first,
+ compare, false /* not stable */, queue
+ );
+}
+
+template<class Iterator, class Compare>
+inline void merge_sort_on_gpu(Iterator first,
+ Iterator last,
+ Compare compare,
+ command_queue &queue)
+{
+ merge_sort_on_gpu(
+ first, last, compare, false /* not stable */, queue
+ );
+}
+
+} // end detail namespace
+} // end compute namespace
+} // end boost namespace
+
+#endif /* BOOST_COMPUTE_ALGORITHM_DETAIL_MERGE_SORT_ON_GPU_HPP_ */
diff --git a/boost/compute/algorithm/detail/radix_sort.hpp b/boost/compute/algorithm/detail/radix_sort.hpp
index c2ba4ed17c..8e6d5f9c0a 100644
--- a/boost/compute/algorithm/detail/radix_sort.hpp
+++ b/boost/compute/algorithm/detail/radix_sort.hpp
@@ -92,6 +92,8 @@ const char radix_sort_source[] =
"#define RADIX_MASK ((((T)(1)) << K_BITS) - 1)\n"
"#define SIGN_BIT ((sizeof(T) * CHAR_BIT) - 1)\n"
+"#if defined(ASC)\n" // asc order
+
"inline uint radix(const T x, const uint low_bit)\n"
"{\n"
"#if defined(IS_FLOATING_POINT)\n"
@@ -104,6 +106,25 @@ const char radix_sort_source[] =
"#endif\n"
"}\n"
+"#else\n" // desc order
+
+// For signed types we just negate the x and for unsigned types we
+// subtract the x from max value of its type ((T)(-1) is a max value
+// of type T when T is an unsigned type).
+"inline uint radix(const T x, const uint low_bit)\n"
+"{\n"
+"#if defined(IS_FLOATING_POINT)\n"
+" const T mask = -(x >> SIGN_BIT) | (((T)(1)) << SIGN_BIT);\n"
+" return (((-x) ^ mask) >> low_bit) & RADIX_MASK;\n"
+"#elif defined(IS_SIGNED)\n"
+" return (((-x) ^ (((T)(1)) << SIGN_BIT)) >> low_bit) & RADIX_MASK;\n"
+"#else\n"
+" return (((T)(-1) - x) >> low_bit) & RADIX_MASK;\n"
+"#endif\n"
+"}\n"
+
+"#endif\n" // #if defined(ASC)
+
"__kernel void count(__global const T *input,\n"
" const uint input_offset,\n"
" const uint input_size,\n"
@@ -227,6 +248,7 @@ template<class T, class T2>
inline void radix_sort_impl(const buffer_iterator<T> first,
const buffer_iterator<T> last,
const buffer_iterator<T2> values_first,
+ const bool ascending,
command_queue &queue)
{
@@ -279,6 +301,10 @@ inline void radix_sort_impl(const buffer_iterator<T> first,
options << enable_double<T2>();
}
+ if(ascending){
+ options << " -DASC";
+ }
+
// load radix sort program
program radix_sort_program = cache->get_or_build(
cache_key, options.str(), radix_sort_source, context
@@ -396,18 +422,38 @@ inline void radix_sort(Iterator first,
Iterator last,
command_queue &queue)
{
- radix_sort_impl(first, last, buffer_iterator<int>(), queue);
+ radix_sort_impl(first, last, buffer_iterator<int>(), true, queue);
+}
+
+template<class KeyIterator, class ValueIterator>
+inline void radix_sort_by_key(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ command_queue &queue)
+{
+ radix_sort_impl(keys_first, keys_last, values_first, true, queue);
+}
+
+template<class Iterator>
+inline void radix_sort(Iterator first,
+ Iterator last,
+ const bool ascending,
+ command_queue &queue)
+{
+ radix_sort_impl(first, last, buffer_iterator<int>(), ascending, queue);
}
template<class KeyIterator, class ValueIterator>
inline void radix_sort_by_key(KeyIterator keys_first,
KeyIterator keys_last,
ValueIterator values_first,
+ const bool ascending,
command_queue &queue)
{
- radix_sort_impl(keys_first, keys_last, values_first, queue);
+ radix_sort_impl(keys_first, keys_last, values_first, ascending, queue);
}
+
} // end detail namespace
} // end compute namespace
} // end boost namespace
diff --git a/boost/compute/algorithm/detail/reduce_on_cpu.hpp b/boost/compute/algorithm/detail/reduce_on_cpu.hpp
new file mode 100644
index 0000000000..490d7d538e
--- /dev/null
+++ b/boost/compute/algorithm/detail/reduce_on_cpu.hpp
@@ -0,0 +1,110 @@
+//---------------------------------------------------------------------------//
+// Copyright (c) 2016 Jakub Szuppe <j.szuppe@gmail.com>
+//
+// Distributed under the 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://boostorg.github.com/compute for more information.
+//---------------------------------------------------------------------------//
+
+#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_REDUCE_ON_CPU_HPP
+#define BOOST_COMPUTE_ALGORITHM_DETAIL_REDUCE_ON_CPU_HPP
+
+#include <algorithm>
+
+#include <boost/compute/buffer.hpp>
+#include <boost/compute/command_queue.hpp>
+#include <boost/compute/detail/meta_kernel.hpp>
+#include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/detail/parameter_cache.hpp>
+#include <boost/compute/iterator/buffer_iterator.hpp>
+#include <boost/compute/type_traits/result_of.hpp>
+#include <boost/compute/algorithm/detail/serial_reduce.hpp>
+
+namespace boost {
+namespace compute {
+namespace detail {
+
+template<class InputIterator, class OutputIterator, class BinaryFunction>
+inline void reduce_on_cpu(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ BinaryFunction function,
+ command_queue &queue)
+{
+ typedef typename
+ std::iterator_traits<InputIterator>::value_type T;
+ typedef typename
+ ::boost::compute::result_of<BinaryFunction(T, T)>::type result_type;
+
+ const device &device = queue.get_device();
+ const uint_ compute_units = queue.get_device().compute_units();
+
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ std::string cache_key =
+ "__boost_reduce_cpu_" + boost::lexical_cast<std::string>(sizeof(T));
+
+ // for inputs smaller than serial_reduce_threshold
+ // serial_reduce algorithm is used
+ uint_ serial_reduce_threshold =
+ parameters->get(cache_key, "serial_reduce_threshold", 16384 * sizeof(T));
+ serial_reduce_threshold =
+ (std::max)(serial_reduce_threshold, uint_(compute_units));
+
+ const context &context = queue.get_context();
+ size_t count = detail::iterator_range_size(first, last);
+ if(count == 0){
+ return;
+ }
+ else if(count < serial_reduce_threshold) {
+ return serial_reduce(first, last, result, function, queue);
+ }
+
+ meta_kernel k("reduce_on_cpu");
+ buffer output(context, sizeof(result_type) * compute_units);
+
+ size_t count_arg = k.add_arg<uint_>("count");
+ size_t output_arg =
+ k.add_arg<result_type *>(memory_object::global_memory, "output");
+
+ k <<
+ "uint block = " <<
+ "(uint)ceil(((float)count)/get_global_size(0));\n" <<
+ "uint index = get_global_id(0) * block;\n" <<
+ "uint end = min(count, index + block);\n" <<
+
+ k.decl<result_type>("result") << " = " << first[k.var<uint_>("index")] << ";\n" <<
+ "index++;\n" <<
+ "while(index < end){\n" <<
+ "result = " << function(k.var<T>("result"),
+ first[k.var<uint_>("index")]) << ";\n" <<
+ "index++;\n" <<
+ "}\n" <<
+ "output[get_global_id(0)] = result;\n";
+
+ size_t global_work_size = compute_units;
+ kernel kernel = k.compile(context);
+
+ // reduction to global_work_size elements
+ kernel.set_arg(count_arg, static_cast<uint_>(count));
+ kernel.set_arg(output_arg, output);
+ queue.enqueue_1d_range_kernel(kernel, 0, global_work_size, 0);
+
+ // final reduction
+ reduce_on_cpu(
+ make_buffer_iterator<result_type>(output),
+ make_buffer_iterator<result_type>(output, global_work_size),
+ result,
+ function,
+ queue
+ );
+}
+
+} // end detail namespace
+} // end compute namespace
+} // end boost namespace
+
+#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_REDUCE_ON_CPU_HPP
diff --git a/boost/compute/algorithm/detail/scan_on_cpu.hpp b/boost/compute/algorithm/detail/scan_on_cpu.hpp
index 6611c0ba3e..d81117c65f 100644
--- a/boost/compute/algorithm/detail/scan_on_cpu.hpp
+++ b/boost/compute/algorithm/detail/scan_on_cpu.hpp
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------//
-// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
+// Copyright (c) 2016 Jakub Szuppe <j.szuppe@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
@@ -16,8 +16,10 @@
#include <boost/compute/device.hpp>
#include <boost/compute/kernel.hpp>
#include <boost/compute/command_queue.hpp>
+#include <boost/compute/algorithm/detail/serial_scan.hpp>
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/detail/parameter_cache.hpp>
namespace boost {
namespace compute {
@@ -32,68 +34,170 @@ inline OutputIterator scan_on_cpu(InputIterator first,
BinaryOperator op,
command_queue &queue)
{
- if(first == last){
- return result;
- }
-
typedef typename
std::iterator_traits<InputIterator>::value_type input_type;
typedef typename
std::iterator_traits<OutputIterator>::value_type output_type;
const context &context = queue.get_context();
+ const device &device = queue.get_device();
+ const size_t compute_units = queue.get_device().compute_units();
+
+ boost::shared_ptr<parameter_cache> parameters =
+ detail::parameter_cache::get_global_cache(device);
+
+ std::string cache_key =
+ "__boost_scan_cpu_" + boost::lexical_cast<std::string>(sizeof(T));
+
+ // for inputs smaller than serial_scan_threshold
+ // serial_scan algorithm is used
+ uint_ serial_scan_threshold =
+ parameters->get(cache_key, "serial_scan_threshold", 16384 * sizeof(T));
+ serial_scan_threshold =
+ (std::max)(serial_scan_threshold, uint_(compute_units));
+
+ size_t count = detail::iterator_range_size(first, last);
+ if(count == 0){
+ return result;
+ }
+ else if(count < serial_scan_threshold) {
+ return serial_scan(first, last, result, exclusive, init, op, queue);
+ }
+
+ buffer block_partial_sums(context, sizeof(output_type) * compute_units );
// create scan kernel
- meta_kernel k("scan_on_cpu");
+ meta_kernel k("scan_on_cpu_block_scan");
// Arguments
- size_t n_arg = k.add_arg<ulong_>("n");
+ size_t count_arg = k.add_arg<uint_>("count");
size_t init_arg = k.add_arg<output_type>("initial_value");
+ size_t block_partial_sums_arg =
+ k.add_arg<output_type *>(memory_object::global_memory, "block_partial_sums");
+
+ k <<
+ "uint block = " <<
+ "(uint)ceil(((float)count)/(get_global_size(0) + 1));\n" <<
+ "uint index = get_global_id(0) * block;\n" <<
+ "uint end = min(count, index + block);\n";
if(!exclusive){
k <<
- k.decl<const ulong_>("start_idx") << " = 1;\n" <<
- k.decl<output_type>("sum") << " = " << first[0] << ";\n" <<
- result[0] << " = sum;\n";
+ k.decl<output_type>("sum") << " = " <<
+ first[k.var<uint_>("index")] << ";\n" <<
+ result[k.var<uint_>("index")] << " = sum;\n" <<
+ "index++;\n";
}
else {
k <<
- k.decl<const ulong_>("start_idx") << " = 0;\n" <<
- k.decl<output_type>("sum") << " = initial_value;\n";
+ k.decl<output_type>("sum") << ";\n" <<
+ "if(index == 0){\n" <<
+ "sum = initial_value;\n" <<
+ "}\n" <<
+ "else {\n" <<
+ "sum = " << first[k.var<uint_>("index")] << ";\n" <<
+ "index++;\n" <<
+ "}\n";
}
k <<
- "for(ulong i = start_idx; i < n; i++){\n" <<
- k.decl<const input_type>("x") << " = "
- << first[k.var<ulong_>("i")] << ";\n";
+ "while(index < end){\n" <<
+ // load next value
+ k.decl<const input_type>("value") << " = "
+ << first[k.var<uint_>("index")] << ";\n";
if(exclusive){
- k << result[k.var<ulong_>("i")] << " = sum;\n";
+ k <<
+ "if(get_global_id(0) == 0){\n" <<
+ result[k.var<uint_>("index")] << " = sum;\n" <<
+ "}\n";
}
-
- k << " sum = "
- << op(k.var<output_type>("sum"), k.var<output_type>("x"))
- << ";\n";
+ k <<
+ "sum = " << op(k.var<output_type>("sum"),
+ k.var<output_type>("value")) << ";\n";
if(!exclusive){
- k << result[k.var<ulong_>("i")] << " = sum;\n";
+ k <<
+ "if(get_global_id(0) == 0){\n" <<
+ result[k.var<uint_>("index")] << " = sum;\n" <<
+ "}\n";
+ }
+
+ k <<
+ "index++;\n" <<
+ "}\n" << // end while
+ "block_partial_sums[get_global_id(0)] = sum;\n";
+
+ // compile scan kernel
+ kernel block_scan_kernel = k.compile(context);
+
+ // setup kernel arguments
+ block_scan_kernel.set_arg(count_arg, static_cast<uint_>(count));
+ block_scan_kernel.set_arg(init_arg, static_cast<output_type>(init));
+ block_scan_kernel.set_arg(block_partial_sums_arg, block_partial_sums);
+
+ // execute the kernel
+ size_t global_work_size = compute_units;
+ queue.enqueue_1d_range_kernel(block_scan_kernel, 0, global_work_size, 0);
+
+ // scan is done
+ if(compute_units < 2) {
+ return result + count;
+ }
+
+ // final scan kernel
+ meta_kernel l("scan_on_cpu_final_scan");
+
+ // Arguments
+ count_arg = l.add_arg<uint_>("count");
+ block_partial_sums_arg =
+ l.add_arg<output_type *>(memory_object::global_memory, "block_partial_sums");
+
+ l <<
+ "uint block = " <<
+ "(uint)ceil(((float)count)/(get_global_size(0) + 1));\n" <<
+ "uint index = block + get_global_id(0) * block;\n" <<
+ "uint end = min(count, index + block);\n" <<
+
+ k.decl<output_type>("sum") << " = block_partial_sums[0];\n" <<
+ "for(uint i = 0; i < get_global_id(0); i++) {\n" <<
+ "sum = " << op(k.var<output_type>("sum"),
+ k.var<output_type>("block_partial_sums[i + 1]")) << ";\n" <<
+ "}\n" <<
+
+ "while(index < end){\n";
+ if(exclusive){
+ l <<
+ l.decl<output_type>("value") << " = "
+ << first[k.var<uint_>("index")] << ";\n" <<
+ result[k.var<uint_>("index")] << " = sum;\n" <<
+ "sum = " << op(k.var<output_type>("sum"),
+ k.var<output_type>("value")) << ";\n";
+ }
+ else {
+ l <<
+ "sum = " << op(k.var<output_type>("sum"),
+ first[k.var<uint_>("index")]) << ";\n" <<
+ result[k.var<uint_>("index")] << " = sum;\n";
}
+ l <<
+ "index++;\n" <<
+ "}\n";
- k << "}\n";
// compile scan kernel
- kernel scan_kernel = k.compile(context);
+ kernel final_scan_kernel = l.compile(context);
// setup kernel arguments
- size_t n = detail::iterator_range_size(first, last);
- scan_kernel.set_arg<ulong_>(n_arg, n);
- scan_kernel.set_arg<output_type>(init_arg, static_cast<output_type>(init));
+ final_scan_kernel.set_arg(count_arg, static_cast<uint_>(count));
+ final_scan_kernel.set_arg(block_partial_sums_arg, block_partial_sums);
// execute the kernel
- queue.enqueue_1d_range_kernel(scan_kernel, 0, 1, 1);
+ global_work_size = compute_units;
+ queue.enqueue_1d_range_kernel(final_scan_kernel, 0, global_work_size, 0);
// return iterator pointing to the end of the result range
- return result + n;
+ return result + count;
}
} // end detail namespace
diff --git a/boost/compute/algorithm/detail/scan_on_gpu.hpp b/boost/compute/algorithm/detail/scan_on_gpu.hpp
index 07c6d6d3c0..dcaff2cdf3 100644
--- a/boost/compute/algorithm/detail/scan_on_gpu.hpp
+++ b/boost/compute/algorithm/detail/scan_on_gpu.hpp
@@ -14,7 +14,6 @@
#include <boost/compute/kernel.hpp>
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/command_queue.hpp>
-#include <boost/compute/algorithm/detail/scan_on_cpu.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/memory/local_buffer.hpp>
diff --git a/boost/compute/algorithm/detail/search_all.hpp b/boost/compute/algorithm/detail/search_all.hpp
index a874bcdebe..b091ec7de5 100644
--- a/boost/compute/algorithm/detail/search_all.hpp
+++ b/boost/compute/algorithm/detail/search_all.hpp
@@ -48,7 +48,7 @@ public:
*this <<
"uint i = get_global_id(0);\n" <<
- "uint i1 = i;\n" <<
+ "const uint i1 = i;\n" <<
"uint j;\n" <<
"for(j = 0; j<p_count; j++,i++)\n" <<
"{\n" <<
diff --git a/boost/compute/algorithm/detail/serial_scan.hpp b/boost/compute/algorithm/detail/serial_scan.hpp
new file mode 100644
index 0000000000..7590fd94fb
--- /dev/null
+++ b/boost/compute/algorithm/detail/serial_scan.hpp
@@ -0,0 +1,103 @@
+//---------------------------------------------------------------------------//
+// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
+//
+// Distributed under the 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://boostorg.github.com/compute for more information.
+//---------------------------------------------------------------------------//
+
+#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_SCAN_HPP
+#define BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_SCAN_HPP
+
+#include <iterator>
+
+#include <boost/compute/device.hpp>
+#include <boost/compute/kernel.hpp>
+#include <boost/compute/command_queue.hpp>
+#include <boost/compute/detail/meta_kernel.hpp>
+#include <boost/compute/detail/iterator_range_size.hpp>
+
+namespace boost {
+namespace compute {
+namespace detail {
+
+template<class InputIterator, class OutputIterator, class T, class BinaryOperator>
+inline OutputIterator serial_scan(InputIterator first,
+ InputIterator last,
+ OutputIterator result,
+ bool exclusive,
+ T init,
+ BinaryOperator op,
+ command_queue &queue)
+{
+ if(first == last){
+ return result;
+ }
+
+ typedef typename
+ std::iterator_traits<InputIterator>::value_type input_type;
+ typedef typename
+ std::iterator_traits<OutputIterator>::value_type output_type;
+
+ const context &context = queue.get_context();
+
+ // create scan kernel
+ meta_kernel k("serial_scan");
+
+ // Arguments
+ size_t n_arg = k.add_arg<ulong_>("n");
+ size_t init_arg = k.add_arg<output_type>("initial_value");
+
+ if(!exclusive){
+ k <<
+ k.decl<const ulong_>("start_idx") << " = 1;\n" <<
+ k.decl<output_type>("sum") << " = " << first[0] << ";\n" <<
+ result[0] << " = sum;\n";
+ }
+ else {
+ k <<
+ k.decl<const ulong_>("start_idx") << " = 0;\n" <<
+ k.decl<output_type>("sum") << " = initial_value;\n";
+ }
+
+ k <<
+ "for(ulong i = start_idx; i < n; i++){\n" <<
+ k.decl<const input_type>("x") << " = "
+ << first[k.var<ulong_>("i")] << ";\n";
+
+ if(exclusive){
+ k << result[k.var<ulong_>("i")] << " = sum;\n";
+ }
+
+ k << " sum = "
+ << op(k.var<output_type>("sum"), k.var<output_type>("x"))
+ << ";\n";
+
+ if(!exclusive){
+ k << result[k.var<ulong_>("i")] << " = sum;\n";
+ }
+
+ k << "}\n";
+
+ // compile scan kernel
+ kernel scan_kernel = k.compile(context);
+
+ // setup kernel arguments
+ size_t n = detail::iterator_range_size(first, last);
+ scan_kernel.set_arg<ulong_>(n_arg, n);
+ scan_kernel.set_arg<output_type>(init_arg, static_cast<output_type>(init));
+
+ // execute the kernel
+ queue.enqueue_1d_range_kernel(scan_kernel, 0, 1, 1);
+
+ // return iterator pointing to the end of the result range
+ return result + n;
+}
+
+} // end detail namespace
+} // end compute namespace
+} // end boost namespace
+
+#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_SCAN_HPP
diff --git a/boost/compute/algorithm/find_end.hpp b/boost/compute/algorithm/find_end.hpp
index 5c40055113..265a1da542 100644
--- a/boost/compute/algorithm/find_end.hpp
+++ b/boost/compute/algorithm/find_end.hpp
@@ -36,6 +36,7 @@ inline InputIterator find_end_helper(InputIterator first,
command_queue &queue)
{
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
+ typedef typename std::iterator_traits<InputIterator>::difference_type difference_type;
size_t count = detail::iterator_range_size(first, last);
if(count == 0){
@@ -65,8 +66,13 @@ inline InputIterator find_end_helper(InputIterator first,
queue.enqueue_1d_range_kernel(kernel, 0, count, 0);
int result = static_cast<int>(index.read(queue));
- if(result == -1) return last;
- else return first + result;
+
+ if(result == -1){
+ return last;
+ }
+ else {
+ return first + static_cast<difference_type>(result);
+ }
}
} // end detail namespace
@@ -92,8 +98,13 @@ inline TextIterator find_end(TextIterator t_first,
command_queue &queue = system::default_queue())
{
const context &context = queue.get_context();
- vector<uint_> matching_indices(detail::iterator_range_size(t_first, t_last),
- context);
+
+ // there is no need to check if pattern starts at last n - 1 indices
+ vector<uint_> matching_indices(
+ detail::iterator_range_size(t_first, t_last)
+ + 1 - detail::iterator_range_size(p_first, p_last),
+ context
+ );
detail::search_kernel<PatternIterator,
TextIterator,
@@ -105,10 +116,16 @@ inline TextIterator find_end(TextIterator t_first,
using boost::compute::_1;
vector<uint_>::iterator index =
- detail::find_end_helper(matching_indices.begin(),
- matching_indices.end(),
- _1 == 1,
- queue);
+ detail::find_end_helper(
+ matching_indices.begin(),
+ matching_indices.end(),
+ _1 == 1,
+ queue
+ );
+
+ // pattern was not found
+ if(index == matching_indices.end())
+ return t_last;
return t_first + detail::iterator_range_size(matching_indices.begin(), index);
}
diff --git a/boost/compute/algorithm/gather.hpp b/boost/compute/algorithm/gather.hpp
index b2f725d54e..24c5c727ae 100644
--- a/boost/compute/algorithm/gather.hpp
+++ b/boost/compute/algorithm/gather.hpp
@@ -36,7 +36,6 @@ public:
OutputIterator result)
{
m_count = iterator_range_size(first, last);
- m_offset = first.get_index();
*this <<
"const uint i = get_global_id(0);\n" <<
@@ -50,12 +49,11 @@ public:
return event();
}
- return exec_1d(queue, m_offset, m_count);
+ return exec_1d(queue, 0, m_count);
}
private:
size_t m_count;
- size_t m_offset;
};
} // end detail namespace
diff --git a/boost/compute/algorithm/minmax_element.hpp b/boost/compute/algorithm/minmax_element.hpp
index bf32c3c989..3f44c09eaf 100644
--- a/boost/compute/algorithm/minmax_element.hpp
+++ b/boost/compute/algorithm/minmax_element.hpp
@@ -49,7 +49,7 @@ minmax_element(InputIterator first,
}
///\overload
-template<class InputIterator, class Compare>
+template<class InputIterator>
inline std::pair<InputIterator, InputIterator>
minmax_element(InputIterator first,
InputIterator last,
diff --git a/boost/compute/algorithm/reduce.hpp b/boost/compute/algorithm/reduce.hpp
index 79624a0e50..19d070019f 100644
--- a/boost/compute/algorithm/reduce.hpp
+++ b/boost/compute/algorithm/reduce.hpp
@@ -22,7 +22,7 @@
#include <boost/compute/algorithm/copy_n.hpp>
#include <boost/compute/algorithm/detail/inplace_reduce.hpp>
#include <boost/compute/algorithm/detail/reduce_on_gpu.hpp>
-#include <boost/compute/algorithm/detail/serial_reduce.hpp>
+#include <boost/compute/algorithm/detail/reduce_on_cpu.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/memory/local_buffer.hpp>
#include <boost/compute/type_traits/result_of.hpp>
@@ -173,8 +173,8 @@ inline void generic_reduce(InputIterator first,
size_t count = detail::iterator_range_size(first, last);
if(device.type() & device::cpu){
- boost::compute::vector<result_type> value(1, context);
- detail::serial_reduce(first, last, value.begin(), function, queue);
+ array<result_type, 1> value(context);
+ detail::reduce_on_cpu(first, last, value.begin(), function, queue);
boost::compute::copy_n(value.begin(), 1, result, queue);
}
else {
@@ -209,16 +209,16 @@ inline void dispatch_reduce(InputIterator first,
const device &device = queue.get_device();
// reduce to temporary buffer on device
- array<T, 1> tmp(context);
+ array<T, 1> value(context);
if(device.type() & device::cpu){
- detail::serial_reduce(first, last, tmp.begin(), function, queue);
+ detail::reduce_on_cpu(first, last, value.begin(), function, queue);
}
else {
- reduce_on_gpu(first, last, tmp.begin(), function, queue);
+ reduce_on_gpu(first, last, value.begin(), function, queue);
}
// copy to result iterator
- copy_n(tmp.begin(), 1, result, queue);
+ copy_n(value.begin(), 1, result, queue);
}
template<class InputIterator, class OutputIterator, class BinaryFunction>
diff --git a/boost/compute/algorithm/sort.hpp b/boost/compute/algorithm/sort.hpp
index b2730b3e2b..7e0a583e3e 100644
--- a/boost/compute/algorithm/sort.hpp
+++ b/boost/compute/algorithm/sort.hpp
@@ -18,6 +18,7 @@
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/detail/merge_sort_on_cpu.hpp>
+#include <boost/compute/algorithm/detail/merge_sort_on_gpu.hpp>
#include <boost/compute/algorithm/detail/radix_sort.hpp>
#include <boost/compute/algorithm/detail/insertion_sort.hpp>
#include <boost/compute/algorithm/reverse.hpp>
@@ -74,11 +75,8 @@ inline void dispatch_gpu_sort(buffer_iterator<T> first,
);
}
else {
- // radix sort in ascending order
- ::boost::compute::detail::radix_sort(first, last, queue);
-
- // reverse range to descending order
- ::boost::compute::reverse(first, last, queue);
+ // radix sorts in descending order
+ ::boost::compute::detail::radix_sort(first, last, false, queue);
}
}
@@ -88,9 +86,22 @@ inline void dispatch_gpu_sort(Iterator first,
Compare compare,
command_queue &queue)
{
- ::boost::compute::detail::serial_insertion_sort(
- first, last, compare, queue
- );
+ size_t count = detail::iterator_range_size(first, last);
+
+ if(count < 2){
+ // nothing to do
+ return;
+ }
+ else if(count <= 32){
+ ::boost::compute::detail::serial_insertion_sort(
+ first, last, compare, queue
+ );
+ }
+ else {
+ ::boost::compute::detail::merge_sort_on_gpu(
+ first, last, compare, queue
+ );
+ }
}
// sort() for device iterators
diff --git a/boost/compute/algorithm/sort_by_key.hpp b/boost/compute/algorithm/sort_by_key.hpp
index 0e3dba81eb..c39bcf9890 100644
--- a/boost/compute/algorithm/sort_by_key.hpp
+++ b/boost/compute/algorithm/sort_by_key.hpp
@@ -18,6 +18,7 @@
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/detail/merge_sort_on_cpu.hpp>
+#include <boost/compute/algorithm/detail/merge_sort_on_gpu.hpp>
#include <boost/compute/algorithm/detail/insertion_sort.hpp>
#include <boost/compute/algorithm/detail/radix_sort.hpp>
#include <boost/compute/algorithm/reverse.hpp>
@@ -76,14 +77,10 @@ dispatch_gpu_sort_by_key(KeyIterator keys_first,
);
}
else {
- // radix sorts in ascending order
+ // radix sorts in descending order
detail::radix_sort_by_key(
- keys_first, keys_last, values_first, queue
+ keys_first, keys_last, values_first, false, queue
);
-
- // Reverse keys, values for descending order
- ::boost::compute::reverse(keys_first, keys_last, queue);
- ::boost::compute::reverse(values_first, values_first + count, queue);
}
}
@@ -94,9 +91,17 @@ inline void dispatch_gpu_sort_by_key(KeyIterator keys_first,
Compare compare,
command_queue &queue)
{
- detail::serial_insertion_sort_by_key(
- keys_first, keys_last, values_first, compare, queue
- );
+ size_t count = detail::iterator_range_size(keys_first, keys_last);
+
+ if(count < 32){
+ detail::serial_insertion_sort_by_key(
+ keys_first, keys_last, values_first, compare, queue
+ );
+ } else {
+ detail::merge_sort_by_key_on_gpu(
+ keys_first, keys_last, values_first, compare, queue
+ );
+ }
}
template<class KeyIterator, class ValueIterator, class Compare>
diff --git a/boost/compute/algorithm/stable_sort.hpp b/boost/compute/algorithm/stable_sort.hpp
index cd82a0a606..381fc81bc0 100644
--- a/boost/compute/algorithm/stable_sort.hpp
+++ b/boost/compute/algorithm/stable_sort.hpp
@@ -16,10 +16,12 @@
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/detail/merge_sort_on_cpu.hpp>
+#include <boost/compute/algorithm/detail/merge_sort_on_gpu.hpp>
#include <boost/compute/algorithm/detail/radix_sort.hpp>
#include <boost/compute/algorithm/detail/insertion_sort.hpp>
#include <boost/compute/algorithm/reverse.hpp>
#include <boost/compute/functional/operator.hpp>
+#include <boost/compute/detail/iterator_range_size.hpp>
namespace boost {
namespace compute {
@@ -31,9 +33,17 @@ inline void dispatch_gpu_stable_sort(Iterator first,
Compare compare,
command_queue &queue)
{
- ::boost::compute::detail::serial_insertion_sort(
- first, last, compare, queue
- );
+ size_t count = detail::iterator_range_size(first, last);
+
+ if(count < 32){
+ detail::serial_insertion_sort(
+ first, last, compare, queue
+ );
+ } else {
+ detail::merge_sort_on_gpu(
+ first, last, compare, true /* stable */, queue
+ );
+ }
}
template<class T>
@@ -53,11 +63,8 @@ dispatch_gpu_stable_sort(buffer_iterator<T> first,
greater<T>,
command_queue &queue)
{
- // radix sort in ascending order
- ::boost::compute::detail::radix_sort(first, last, queue);
-
- // reverse range to descending order
- ::boost::compute::reverse(first, last, queue);
+ // radix sorts in descending order
+ ::boost::compute::detail::radix_sort(first, last, false, queue);
}
} // end detail namespace
@@ -76,6 +83,7 @@ inline void stable_sort(Iterator first,
::boost::compute::detail::dispatch_gpu_stable_sort(
first, last, compare, queue
);
+ return;
}
::boost::compute::detail::merge_sort_on_cpu(first, last, compare, queue);
}
diff --git a/boost/compute/algorithm/stable_sort_by_key.hpp b/boost/compute/algorithm/stable_sort_by_key.hpp
index 8a51372ede..878f999f44 100644
--- a/boost/compute/algorithm/stable_sort_by_key.hpp
+++ b/boost/compute/algorithm/stable_sort_by_key.hpp
@@ -21,6 +21,105 @@
namespace boost {
namespace compute {
+namespace detail {
+
+template<class KeyIterator, class ValueIterator>
+inline void
+dispatch_gpu_ssort_by_key(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ less<typename std::iterator_traits<KeyIterator>::value_type> compare,
+ command_queue &queue,
+ typename boost::enable_if_c<
+ is_radix_sortable<
+ typename std::iterator_traits<KeyIterator>::value_type
+ >::value
+ >::type* = 0)
+{
+ size_t count = detail::iterator_range_size(keys_first, keys_last);
+
+ if(count < 32){
+ detail::serial_insertion_sort_by_key(
+ keys_first, keys_last, values_first, compare, queue
+ );
+ }
+ else {
+ detail::radix_sort_by_key(
+ keys_first, keys_last, values_first, queue
+ );
+ }
+}
+
+template<class KeyIterator, class ValueIterator>
+inline void
+dispatch_gpu_ssort_by_key(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ greater<typename std::iterator_traits<KeyIterator>::value_type> compare,
+ command_queue &queue,
+ typename boost::enable_if_c<
+ is_radix_sortable<
+ typename std::iterator_traits<KeyIterator>::value_type
+ >::value
+ >::type* = 0)
+{
+ size_t count = detail::iterator_range_size(keys_first, keys_last);
+
+ if(count < 32){
+ detail::serial_insertion_sort_by_key(
+ keys_first, keys_last, values_first, compare, queue
+ );
+ }
+ else {
+ // radix sorts in descending order
+ detail::radix_sort_by_key(
+ keys_first, keys_last, values_first, false, queue
+ );
+ }
+}
+
+template<class KeyIterator, class ValueIterator, class Compare>
+inline void dispatch_gpu_ssort_by_key(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ Compare compare,
+ command_queue &queue)
+{
+ size_t count = detail::iterator_range_size(keys_first, keys_last);
+
+ if(count < 32){
+ detail::serial_insertion_sort_by_key(
+ keys_first, keys_last, values_first,
+ compare, queue
+ );
+ } else {
+ detail::merge_sort_by_key_on_gpu(
+ keys_first, keys_last, values_first,
+ compare, true /* stable */, queue
+ );
+ }
+}
+
+template<class KeyIterator, class ValueIterator, class Compare>
+inline void dispatch_ssort_by_key(KeyIterator keys_first,
+ KeyIterator keys_last,
+ ValueIterator values_first,
+ Compare compare,
+ command_queue &queue)
+{
+ if(queue.get_device().type() & device::gpu) {
+ dispatch_gpu_ssort_by_key(
+ keys_first, keys_last, values_first, compare, queue
+ );
+ return;
+ }
+ ::boost::compute::detail::merge_sort_by_key_on_cpu(
+ keys_first, keys_last, values_first, compare, queue
+ );
+}
+
+} // end detail namespace
+
/// Performs a key-value stable sort using the keys in the range [\p keys_first,
/// \p keys_last) on the values in the range [\p values_first,
/// \p values_first \c + (\p keys_last \c - \p keys_first)) using \p compare.
@@ -35,8 +134,7 @@ inline void stable_sort_by_key(KeyIterator keys_first,
Compare compare,
command_queue &queue = system::default_queue())
{
- // sort_by_key is stable
- ::boost::compute::sort_by_key(
+ ::boost::compute::detail::dispatch_ssort_by_key(
keys_first, keys_last, values_first, compare, queue
);
}
diff --git a/boost/compute/algorithm/transform.hpp b/boost/compute/algorithm/transform.hpp
index 022a4988bd..68750a6523 100644
--- a/boost/compute/algorithm/transform.hpp
+++ b/boost/compute/algorithm/transform.hpp
@@ -22,7 +22,7 @@ namespace boost {
namespace compute {
/// Transforms the elements in the range [\p first, \p last) using
-/// \p transform and stores the results in the range beginning at
+/// operator \p op and stores the results in the range beginning at
/// \p result.
///
/// For example, to calculate the absolute value for each element in a vector:
diff --git a/boost/compute/config.hpp b/boost/compute/config.hpp
index 77d0d7b9df..e501ed28c9 100644
--- a/boost/compute/config.hpp
+++ b/boost/compute/config.hpp
@@ -16,14 +16,13 @@
#include <boost/compute/cl.hpp>
// check for minimum required boost version
-#if BOOST_VERSION < 104800
-#error Boost.Compute requires Boost version 1.48 or later
+#if BOOST_VERSION < 105400
+#error Boost.Compute requires Boost version 1.54 or later
#endif
// the BOOST_COMPUTE_NO_VARIADIC_TEMPLATES macro is defined
// if the compiler does not *fully* support variadic templates
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
- defined(BOOST_NO_VARIADIC_TEMPLATES) || \
(defined(__GNUC__) && !defined(__clang__) && \
__GNUC__ == 4 && __GNUC_MINOR__ <= 6)
#define BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
@@ -32,7 +31,6 @@
// the BOOST_COMPUTE_NO_STD_TUPLE macro is defined if the
// compiler/stdlib does not support std::tuple
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
- defined(BOOST_NO_0X_HDR_TUPLE) || \
defined(BOOST_COMPUTE_NO_VARIADIC_TEMPLATES)
#define BOOST_COMPUTE_NO_STD_TUPLE
#endif // BOOST_NO_CXX11_HDR_TUPLE
@@ -53,17 +51,15 @@
#endif
#if !defined(BOOST_COMPUTE_DOXYGEN_INVOKED) && \
- (defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_RVALUE_REFERENCES))
+ defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
# define BOOST_COMPUTE_NO_RVALUE_REFERENCES
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
-#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || \
- defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
# define BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#if defined(BOOST_NO_CXX11_HDR_CHRONO) || \
- defined(BOOST_NO_0X_HDR_CHRONO)
+#if defined(BOOST_NO_CXX11_HDR_CHRONO)
# define BOOST_COMPUTE_NO_HDR_CHRONO
#endif // BOOST_NO_CXX11_HDR_CHRONO
diff --git a/boost/compute/container/array.hpp b/boost/compute/container/array.hpp
index 919be6eeac..2b504be4a8 100644
--- a/boost/compute/container/array.hpp
+++ b/boost/compute/container/array.hpp
@@ -73,20 +73,33 @@ public:
array(const array<T, N> &other)
: m_buffer(other.m_buffer.get_context(), sizeof(T) * N)
{
- boost::compute::copy(other.begin(), other.end(), begin());
+ command_queue queue = default_queue();
+ boost::compute::copy(other.begin(), other.end(), begin(), queue);
+ queue.finish();
}
array(const boost::array<T, N> &array,
const context &context = system::default_context())
: m_buffer(context, sizeof(T) * N)
{
- boost::compute::copy(array.begin(), array.end(), begin());
+ command_queue queue = default_queue();
+ boost::compute::copy(array.begin(), array.end(), begin(), queue);
+ queue.finish();
+ }
+
+ array(const array<T, N> &other,
+ const command_queue &queue)
+ : m_buffer(other.m_buffer.get_context(), sizeof(T) * N)
+ {
+ boost::compute::copy(other.begin(), other.end(), begin(), queue);
}
array<T, N>& operator=(const array<T, N> &other)
{
if(this != &other){
- boost::compute::copy(other.begin(), other.end(), begin());
+ command_queue queue = default_queue();
+ boost::compute::copy(other.begin(), other.end(), begin(), queue);
+ queue.finish();
}
return *this;
@@ -94,7 +107,9 @@ public:
array<T, N>& operator=(const boost::array<T, N> &array)
{
- boost::compute::copy(array.begin(), array.end(), begin());
+ command_queue queue = default_queue();
+ boost::compute::copy(array.begin(), array.end(), begin(), queue);
+ queue.finish();
return *this;
}
@@ -226,14 +241,28 @@ public:
return *(end() - static_cast<difference_type>(1));
}
+ void fill(const value_type &value, const command_queue &queue)
+ {
+ ::boost::compute::fill(begin(), end(), value, queue);
+ }
+
+ void swap(array<T, N> &other, const command_queue &queue)
+ {
+ ::boost::compute::swap_ranges(begin(), end(), other.begin(), queue);
+ }
+
void fill(const value_type &value)
{
- ::boost::compute::fill(begin(), end(), value);
+ command_queue queue = default_queue();
+ ::boost::compute::fill(begin(), end(), value, queue);
+ queue.finish();
}
void swap(array<T, N> &other)
{
- ::boost::compute::swap_ranges(begin(), end(), other.begin());
+ command_queue queue = default_queue();
+ ::boost::compute::swap_ranges(begin(), end(), other.begin(), queue);
+ queue.finish();
}
const buffer& get_buffer() const
@@ -243,6 +272,13 @@ public:
private:
buffer m_buffer;
+
+ command_queue default_queue() const
+ {
+ const context &context = m_buffer.get_context();
+ command_queue queue(context, context.get_device());
+ return queue;
+ }
};
namespace detail {
diff --git a/boost/compute/container/vector.hpp b/boost/compute/container/vector.hpp
index 47d649ad99..aa0eb98ce9 100644
--- a/boost/compute/container/vector.hpp
+++ b/boost/compute/container/vector.hpp
@@ -196,8 +196,15 @@ public:
m_data = m_allocator.allocate((std::max)(m_size, _minimum_capacity()));
if(!other.empty()){
- ::boost::compute::copy(other.begin(), other.end(), begin(), queue);
- queue.finish();
+ if(other.get_buffer().get_context() != queue.get_context()){
+ command_queue other_queue = other.default_queue();
+ ::boost::compute::copy(other.begin(), other.end(), begin(), other_queue);
+ other_queue.finish();
+ }
+ else {
+ ::boost::compute::copy(other.begin(), other.end(), begin(), queue);
+ queue.finish();
+ }
}
}
@@ -253,6 +260,17 @@ public:
}
template<class OtherAlloc>
+ vector& operator=(const vector<T, OtherAlloc> &other)
+ {
+ command_queue queue = default_queue();
+ resize(other.size(), queue);
+ ::boost::compute::copy(other.begin(), other.end(), begin(), queue);
+ queue.finish();
+
+ return *this;
+ }
+
+ template<class OtherAlloc>
vector& operator=(const std::vector<T, OtherAlloc> &vector)
{
command_queue queue = default_queue();
@@ -371,7 +389,7 @@ public:
/// Resizes the vector to \p size.
void resize(size_type size, command_queue &queue)
{
- if(size < capacity()){
+ if(size <= capacity()){
m_size = size;
}
else {
diff --git a/boost/compute/context.hpp b/boost/compute/context.hpp
index 5db39e9d83..61e84e9767 100644
--- a/boost/compute/context.hpp
+++ b/boost/compute/context.hpp
@@ -204,7 +204,7 @@ public:
typename detail::get_object_info_type<context, Enum>::type
get_info() const;
- /// Returns \c true if the context is the same at \p other.
+ /// Returns \c true if the context is the same as \p other.
bool operator==(const context &other) const
{
return m_context == other.m_context;
diff --git a/boost/compute/detail/literal.hpp b/boost/compute/detail/literal.hpp
index 0d23b1d4d2..874830ee49 100644
--- a/boost/compute/detail/literal.hpp
+++ b/boost/compute/detail/literal.hpp
@@ -27,7 +27,15 @@ template<class T>
std::string make_literal(T x)
{
std::stringstream s;
- s << std::setprecision(std::numeric_limits<T>::digits10)
+ s << std::setprecision(
+#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
+ std::numeric_limits<T>::max_digits10
+#else
+ // We don't have max_digits10, so add 3 other digits (this is what is required for
+ // float, and is one more than required for double).
+ 3 + std::numeric_limits<T>::digits10
+#endif
+ )
<< std::scientific
<< x;
diff --git a/boost/compute/detail/meta_kernel.hpp b/boost/compute/detail/meta_kernel.hpp
index 7be778b025..5e6d6e0337 100644
--- a/boost/compute/detail/meta_kernel.hpp
+++ b/boost/compute/detail/meta_kernel.hpp
@@ -34,6 +34,7 @@
#include <boost/compute/image/image2d.hpp>
#include <boost/compute/image/image_sampler.hpp>
#include <boost/compute/memory_object.hpp>
+#include <boost/compute/memory/svm_ptr.hpp>
#include <boost/compute/detail/device_ptr.hpp>
#include <boost/compute/detail/sha1.hpp>
#include <boost/compute/utility/program_cache.hpp>
@@ -203,6 +204,28 @@ struct meta_kernel_buffer_info
size_t index;
};
+struct meta_kernel_svm_info
+{
+ template <class T>
+ meta_kernel_svm_info(const svm_ptr<T> ptr,
+ const std::string &id,
+ memory_object::address_space addr_space,
+ size_t i)
+ : ptr(ptr.get()),
+ identifier(id),
+ address_space(addr_space),
+ index(i)
+ {
+
+ }
+
+ void* ptr;
+ std::string identifier;
+ memory_object::address_space address_space;
+ size_t index;
+};
+
+
class meta_kernel;
template<class Type>
@@ -280,12 +303,14 @@ public:
meta_kernel(const meta_kernel &other)
{
m_source.str(other.m_source.str());
+ m_options = other.m_options;
}
meta_kernel& operator=(const meta_kernel &other)
{
if(this != &other){
m_source.str(other.m_source.str());
+ m_options = other.m_options;
}
return *this;
@@ -342,9 +367,11 @@ public:
boost::shared_ptr<program_cache> cache =
program_cache::get_global_cache(context);
+ std::string compile_options = m_options + options;
+
// load (or build) program from cache
::boost::compute::program program =
- cache->get_or_build(cache_key, options, source, context);
+ cache->get_or_build(cache_key, compile_options, source, context);
// create kernel
::boost::compute::kernel kernel = program.create_kernel(name());
@@ -365,6 +392,13 @@ public:
kernel.set_arg(bi.index, bi.m_mem);
}
+ // bind svm args
+ for(size_t i = 0; i < m_stored_svm_ptrs.size(); i++){
+ const detail::meta_kernel_svm_info &spi = m_stored_svm_ptrs[i];
+
+ kernel.set_arg_svm_ptr(spi.index, spi.ptr);
+ }
+
return kernel;
}
@@ -689,6 +723,45 @@ public:
return identifier;
}
+ template<class T>
+ std::string get_svm_identifier(const svm_ptr<T> &svm_ptr,
+ const memory_object::address_space address_space =
+ memory_object::global_memory)
+ {
+ BOOST_ASSERT(
+ (address_space == memory_object::global_memory)
+ || (address_space == memory_object::constant_memory)
+ );
+
+ // check if we've already seen this pointer
+ for(size_t i = 0; i < m_stored_svm_ptrs.size(); i++){
+ const detail::meta_kernel_svm_info &spi = m_stored_svm_ptrs[i];
+
+ if(spi.ptr == svm_ptr.get() &&
+ spi.address_space == address_space){
+ return spi.identifier;
+ }
+ }
+
+ // create a new binding
+ std::string identifier =
+ "_svm_ptr" + lexical_cast<std::string>(m_stored_svm_ptrs.size());
+ size_t index = add_arg<T *>(address_space, identifier);
+
+ if(m_stored_svm_ptrs.empty()) {
+ m_options += std::string(" -cl-std=CL2.0");
+ }
+
+ // store new svm pointer info
+ m_stored_svm_ptrs.push_back(
+ detail::meta_kernel_svm_info(
+ svm_ptr, identifier, address_space, index
+ )
+ );
+
+ return identifier;
+ }
+
std::string get_image_identifier(const char *qualifiers, const image2d &image)
{
size_t index = add_arg_with_qualifiers<image2d>(qualifiers, "image");
@@ -880,8 +953,10 @@ private:
std::set<std::string> m_external_function_names;
std::vector<std::string> m_args;
std::string m_pragmas;
+ std::string m_options;
std::vector<detail::meta_kernel_stored_arg> m_stored_args;
std::vector<detail::meta_kernel_buffer_info> m_stored_buffers;
+ std::vector<detail::meta_kernel_svm_info> m_stored_svm_ptrs;
};
template<class ResultType, class ArgTuple>
@@ -960,6 +1035,18 @@ inline meta_kernel& operator<<(meta_kernel &kernel,
}
}
+// SVM requires OpenCL 2.0
+#if defined(CL_VERSION_2_0) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
+template<class T, class IndexExpr>
+inline meta_kernel& operator<<(meta_kernel &kernel,
+ const svm_ptr_index_expr<T, IndexExpr> &expr)
+{
+ return kernel <<
+ kernel.get_svm_identifier<T>(expr.m_svm_ptr) <<
+ '[' << expr.m_expr << ']';
+}
+#endif
+
template<class Predicate, class Arg>
inline meta_kernel& operator<<(meta_kernel &kernel,
const invoked_unary_negate_function<Predicate,
diff --git a/boost/compute/detail/parameter_cache.hpp b/boost/compute/detail/parameter_cache.hpp
index 2a856311e1..0a16cd9b0e 100644
--- a/boost/compute/detail/parameter_cache.hpp
+++ b/boost/compute/detail/parameter_cache.hpp
@@ -161,7 +161,7 @@ private:
try {
read_json(m_file_name, pt);
}
- catch(boost::property_tree::json_parser::json_parser_error &e){
+ catch(boost::property_tree::json_parser::json_parser_error&){
// no saved cache file, ignore
return;
}
diff --git a/boost/compute/detail/vendor.hpp b/boost/compute/detail/vendor.hpp
index 0aa9c9c0d4..e2359cb466 100644
--- a/boost/compute/detail/vendor.hpp
+++ b/boost/compute/detail/vendor.hpp
@@ -31,6 +31,18 @@ inline bool is_amd_device(const device &device)
return device.platform().vendor() == "Advanced Micro Devices, Inc.";
}
+// returns true if the platform is Apple OpenCL platform
+inline bool is_apple_platform(const platform &platform)
+{
+ return platform.name() == "Apple";
+}
+
+// returns true if the device is from Apple OpenCL Platform
+inline bool is_apple_platform_device(const device &device)
+{
+ return is_apple_platform(device.platform());
+}
+
} // end detail namespace
} // end compute namespace
} // end boost namespace
diff --git a/boost/compute/exception/context_error.hpp b/boost/compute/exception/context_error.hpp
index eeb387d884..ec8dc7c30f 100644
--- a/boost/compute/exception/context_error.hpp
+++ b/boost/compute/exception/context_error.hpp
@@ -70,7 +70,7 @@ public:
}
/// Returns the size of the private info memory block.
- const size_t get_private_info_size() const throw()
+ size_t get_private_info_size() const throw()
{
return m_private_info_size;
}
diff --git a/boost/compute/function.hpp b/boost/compute/function.hpp
index e83f16808a..b0b893e948 100644
--- a/boost/compute/function.hpp
+++ b/boost/compute/function.hpp
@@ -215,7 +215,7 @@ public:
{
BOOST_STATIC_ASSERT_MSG(
arity == 3,
- "Non-ternary function invoked with two arguments"
+ "Non-ternary function invoked with three arguments"
);
return detail::invoked_function<result_type, boost::tuple<Arg1, Arg2, Arg3> >(
diff --git a/boost/compute/interop/opengl/acquire.hpp b/boost/compute/interop/opengl/acquire.hpp
index 10af4338fb..b9259e0d88 100644
--- a/boost/compute/interop/opengl/acquire.hpp
+++ b/boost/compute/interop/opengl/acquire.hpp
@@ -14,6 +14,7 @@
#include <boost/compute/command_queue.hpp>
#include <boost/compute/interop/opengl/cl_gl.hpp>
#include <boost/compute/interop/opengl/opengl_buffer.hpp>
+#include <boost/compute/types/fundamental.hpp>
#include <boost/compute/utility/wait_list.hpp>
namespace boost {
@@ -22,7 +23,7 @@ namespace compute {
/// Enqueues a command to acquire the specified OpenGL memory objects.
///
/// \see_opencl_ref{clEnqueueAcquireGLObjects}
-inline event opengl_enqueue_acquire_gl_objects(size_t num_objects,
+inline event opengl_enqueue_acquire_gl_objects(const uint_ num_objects,
const cl_mem *mem_objects,
command_queue &queue,
const wait_list &events = wait_list())
@@ -47,7 +48,7 @@ inline event opengl_enqueue_acquire_gl_objects(size_t num_objects,
/// Enqueues a command to release the specified OpenGL memory objects.
///
/// \see_opencl_ref{clEnqueueReleaseGLObjects}
-inline event opengl_enqueue_release_gl_objects(size_t num_objects,
+inline event opengl_enqueue_release_gl_objects(const uint_ num_objects,
const cl_mem *mem_objects,
command_queue &queue,
const wait_list &events = wait_list())
diff --git a/boost/compute/interop/opengl/context.hpp b/boost/compute/interop/opengl/context.hpp
index 754dca2236..c35fedddfa 100644
--- a/boost/compute/interop/opengl/context.hpp
+++ b/boost/compute/interop/opengl/context.hpp
@@ -78,7 +78,7 @@ inline context opengl_create_shared_context()
// load clGetGLContextInfoKHR() extension function
GetGLContextInfoKHRFunction GetGLContextInfoKHR =
reinterpret_cast<GetGLContextInfoKHRFunction>(
- reinterpret_cast<unsigned long>(
+ reinterpret_cast<size_t>(
platform.get_extension_function_address("clGetGLContextInfoKHR")
)
);
diff --git a/boost/compute/kernel.hpp b/boost/compute/kernel.hpp
index 9494e46de2..72f21a0378 100644
--- a/boost/compute/kernel.hpp
+++ b/boost/compute/kernel.hpp
@@ -22,7 +22,6 @@
#include <boost/compute/type_traits/is_fundamental.hpp>
#include <boost/compute/detail/get_object_info.hpp>
#include <boost/compute/detail/assert_cl_success.hpp>
-#include <boost/compute/memory/svm_ptr.hpp>
namespace boost {
namespace compute {
@@ -189,8 +188,15 @@ public:
template<class T>
T get_arg_info(size_t index, cl_kernel_arg_info info) const
{
- return detail::get_object_info<T>(clGetKernelArgInfo, m_kernel, info, index);
+ return detail::get_object_info<T>(
+ clGetKernelArgInfo, m_kernel, info, static_cast<cl_uint>(index)
+ );
}
+
+ /// \overload
+ template<int Enum>
+ typename detail::get_object_info_type<kernel, Enum>::type
+ get_arg_info(size_t index) const;
#endif // CL_VERSION_1_2
/// Returns work-group information for the kernel with \p device.
@@ -258,15 +264,16 @@ public:
}
/// \internal_
- template<class T>
- void set_arg(size_t index, const svm_ptr<T> ptr)
+ void set_arg_svm_ptr(size_t index, void* ptr)
{
#ifdef CL_VERSION_2_0
- cl_int ret = clSetKernelArgSVMPointer(m_kernel, index, ptr.get());
+ cl_int ret = clSetKernelArgSVMPointer(m_kernel, static_cast<cl_uint>(index), ptr);
if(ret != CL_SUCCESS){
BOOST_THROW_EXCEPTION(opencl_error(ret));
}
#else
+ (void) index;
+ (void) ptr;
BOOST_THROW_EXCEPTION(opencl_error(CL_INVALID_ARG_VALUE));
#endif
}
@@ -324,7 +331,7 @@ public:
}
private:
- #ifndef BOOST_NO_VARIADIC_TEMPLATES
+ #ifndef BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
/// \internal_
template<size_t N>
void _set_args()
@@ -338,7 +345,7 @@ private:
set_arg(N, arg);
_set_args<N+1>(rest...);
}
- #endif // BOOST_NO_VARIADIC_TEMPLATES
+ #endif // BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
private:
cl_kernel m_kernel;
@@ -364,6 +371,23 @@ BOOST_COMPUTE_DETAIL_DEFINE_GET_INFO_SPECIALIZATIONS(kernel,
)
#endif // CL_VERSION_1_2
+/// \internal_ define get_arg_info() specializations for kernel
+#ifdef CL_VERSION_1_2
+#define BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(result_type, value) \
+ namespace detail { \
+ template<> struct get_object_info_type<kernel, value> { typedef result_type type; }; \
+ } \
+ template<> inline result_type kernel::get_arg_info<value>(size_t index) const { \
+ return get_arg_info<result_type>(index, value); \
+ }
+
+BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(cl_kernel_arg_address_qualifier, CL_KERNEL_ARG_ADDRESS_QUALIFIER)
+BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(cl_kernel_arg_access_qualifier, CL_KERNEL_ARG_ACCESS_QUALIFIER)
+BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(std::string, CL_KERNEL_ARG_TYPE_NAME)
+BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(cl_kernel_arg_type_qualifier, CL_KERNEL_ARG_TYPE_QUALIFIER)
+BOOST_COMPUTE_DETAIL_DEFINE_KERNEL_GET_ARG_INFO_SPECIALIZATION(std::string, CL_KERNEL_ARG_NAME)
+#endif // CL_VERSION_1_2
+
namespace detail {
// set_kernel_arg implementation for built-in types
diff --git a/boost/compute/memory/svm_ptr.hpp b/boost/compute/memory/svm_ptr.hpp
index 2dbcb8f635..0c9d88035c 100644
--- a/boost/compute/memory/svm_ptr.hpp
+++ b/boost/compute/memory/svm_ptr.hpp
@@ -11,12 +11,67 @@
#ifndef BOOST_COMPUTE_MEMORY_SVM_PTR_HPP
#define BOOST_COMPUTE_MEMORY_SVM_PTR_HPP
+#include <boost/type_traits.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
+
#include <boost/compute/cl.hpp>
+#include <boost/compute/kernel.hpp>
+#include <boost/compute/context.hpp>
+#include <boost/compute/command_queue.hpp>
#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
+// forward declaration for svm_ptr<T>
+template<class T>
+class svm_ptr;
+
+// svm functions require OpenCL 2.0
+#if defined(CL_VERSION_2_0) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
+namespace detail {
+
+template<class T, class IndexExpr>
+struct svm_ptr_index_expr
+{
+ typedef T result_type;
+
+ svm_ptr_index_expr(const svm_ptr<T> &svm_ptr,
+ const IndexExpr &expr)
+ : m_svm_ptr(svm_ptr),
+ m_expr(expr)
+ {
+ }
+
+ operator T() const
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::is_integral<IndexExpr>::value,
+ "Index expression must be integral");
+
+ BOOST_ASSERT(m_svm_ptr.get());
+
+ const context &context = m_svm_ptr.get_context();
+ const device &device = context.get_device();
+ command_queue queue(context, device);
+
+ T value;
+ T* ptr =
+ static_cast<T*>(m_svm_ptr.get()) + static_cast<std::ptrdiff_t>(m_expr);
+ queue.enqueue_svm_map(static_cast<void*>(ptr), sizeof(T), CL_MAP_READ);
+ value = *(ptr);
+ queue.enqueue_svm_unmap(static_cast<void*>(ptr)).wait();
+
+ return value;
+ }
+
+ const svm_ptr<T> &m_svm_ptr;
+ IndexExpr m_expr;
+};
+
+} // end detail namespace
+#endif
+
template<class T>
class svm_ptr
{
@@ -32,19 +87,22 @@ public:
{
}
- explicit svm_ptr(void *ptr)
- : m_ptr(static_cast<T*>(ptr))
+ svm_ptr(void *ptr, const context &context)
+ : m_ptr(static_cast<T*>(ptr)),
+ m_context(context)
{
}
svm_ptr(const svm_ptr<T> &other)
- : m_ptr(other.m_ptr)
+ : m_ptr(other.m_ptr),
+ m_context(other.m_context)
{
}
- svm_ptr& operator=(const svm_ptr<T> &other)
+ svm_ptr<T>& operator=(const svm_ptr<T> &other)
{
m_ptr = other.m_ptr;
+ m_context = other.m_context;
return *this;
}
@@ -59,18 +117,53 @@ public:
svm_ptr<T> operator+(difference_type n)
{
- return svm_ptr<T>(m_ptr + n);
+ return svm_ptr<T>(m_ptr + n, m_context);
}
difference_type operator-(svm_ptr<T> other)
{
+ BOOST_ASSERT(other.m_context == m_context);
return m_ptr - other.m_ptr;
}
+ context& get_context() const
+ {
+ return m_context;
+ }
+
+ // svm functions require OpenCL 2.0
+ #if defined(CL_VERSION_2_0) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
+ /// \internal_
+ template<class Expr>
+ detail::svm_ptr_index_expr<T, Expr>
+ operator[](const Expr &expr) const
+ {
+ BOOST_ASSERT(m_ptr);
+
+ return detail::svm_ptr_index_expr<T, Expr>(*this,
+ expr);
+ }
+ #endif
+
private:
T *m_ptr;
+ context m_context;
};
+namespace detail {
+
+/// \internal_
+template<class T>
+struct set_kernel_arg<svm_ptr<T> >
+{
+ void operator()(kernel &kernel_, size_t index, const svm_ptr<T> &ptr)
+ {
+ kernel_.set_arg_svm_ptr(index, ptr.get());
+ }
+};
+
+} // end detail namespace
+
/// \internal_ (is_device_iterator specialization for svm_ptr)
template<class T>
struct is_device_iterator<svm_ptr<T> > : boost::true_type {};
diff --git a/boost/compute/random/bernoulli_distribution.hpp b/boost/compute/random/bernoulli_distribution.hpp
index edd1125090..50bf27f591 100644
--- a/boost/compute/random/bernoulli_distribution.hpp
+++ b/boost/compute/random/bernoulli_distribution.hpp
@@ -11,6 +11,9 @@
#ifndef BOOST_COMPUTE_RANDOM_BERNOULLI_DISTRIBUTION_HPP
#define BOOST_COMPUTE_RANDOM_BERNOULLI_DISTRIBUTION_HPP
+#include <boost/assert.hpp>
+#include <boost/type_traits.hpp>
+
#include <boost/compute/command_queue.hpp>
#include <boost/compute/function.hpp>
#include <boost/compute/types/fundamental.hpp>
@@ -84,6 +87,11 @@ public:
private:
RealType m_p;
+
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_floating_point<RealType>::value,
+ "Template argument must be a floating point type"
+ );
};
} // end compute namespace
diff --git a/boost/compute/random/discrete_distribution.hpp b/boost/compute/random/discrete_distribution.hpp
index 3707928f98..86249538ac 100644
--- a/boost/compute/random/discrete_distribution.hpp
+++ b/boost/compute/random/discrete_distribution.hpp
@@ -11,6 +11,12 @@
#ifndef BOOST_COMPUTE_RANDOM_DISCRETE_DISTRIBUTION_HPP
#define BOOST_COMPUTE_RANDOM_DISCRETE_DISTRIBUTION_HPP
+#include <numeric>
+
+#include <boost/config.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/static_assert.hpp>
+
#include <boost/compute/command_queue.hpp>
#include <boost/compute/function.hpp>
#include <boost/compute/algorithm/accumulate.hpp>
@@ -38,23 +44,42 @@ class discrete_distribution
public:
typedef IntType result_type;
+ /// Creates a new discrete distribution with a single weight p = { 1 }.
+ /// This distribution produces only zeroes.
+ discrete_distribution()
+ : m_probabilities(1, double(1)),
+ m_scanned_probabilities(1, double(1))
+ {
+
+ }
+
/// Creates a new discrete distribution with weights given by
- /// the range [\p first, \p last)
+ /// the range [\p first, \p last).
template<class InputIterator>
discrete_distribution(InputIterator first, InputIterator last)
- : m_n(std::distance(first, last)),
- m_probabilities(std::distance(first, last))
+ : m_probabilities(first, last),
+ m_scanned_probabilities(std::distance(first, last))
{
- double sum = 0;
-
- for(InputIterator iter = first; iter!=last; iter++)
- {
- sum += *iter;
+ if(first != last) {
+ // after this m_scanned_probabilities.back() is a sum of all
+ // weights from the range [first, last)
+ std::partial_sum(first, last, m_scanned_probabilities.begin());
+
+ std::vector<double>::iterator i = m_probabilities.begin();
+ std::vector<double>::iterator j = m_scanned_probabilities.begin();
+ for(; i != m_probabilities.end(); ++i, ++j)
+ {
+ // dividing each weight by sum of all weights to
+ // get probabilities
+ *i = *i / m_scanned_probabilities.back();
+ // dividing each partial sum of weights by sum of
+ // all weights to get partial sums of probabilities
+ *j = *j / m_scanned_probabilities.back();
+ }
}
-
- for(size_t i=0; i<m_n; i++)
- {
- m_probabilities[i] = m_probabilities[i-1] + first[i]/sum;
+ else {
+ m_probabilities.push_back(double(1));
+ m_scanned_probabilities.push_back(double(1));
}
}
@@ -63,19 +88,31 @@ public:
{
}
- /// Returns the value of n
- result_type n() const
- {
- return m_n;
- }
-
/// Returns the probabilities
::std::vector<double> probabilities() const
{
return m_probabilities;
}
- /// Generates uniformily distributed integers and stores
+ /// Returns the minimum potentially generated value.
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ {
+ return result_type(0);
+ }
+
+ /// Returns the maximum potentially generated value.
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ {
+ size_t type_max = static_cast<size_t>(
+ (std::numeric_limits<result_type>::max)()
+ );
+ if(m_probabilities.size() - 1 > type_max) {
+ return (std::numeric_limits<result_type>::max)();
+ }
+ return static_cast<result_type>(m_probabilities.size() - 1);
+ }
+
+ /// Generates uniformly distributed integers and stores
/// them to the range [\p first, \p last).
template<class OutputIterator, class Generator>
void generate(OutputIterator first,
@@ -83,32 +120,38 @@ public:
Generator &generator,
command_queue &queue)
{
- std::string source = "inline uint scale_random(uint x)\n";
+ std::string source = "inline IntType scale_random(uint x)\n";
source = source +
"{\n" +
"float rno = convert_float(x) / UINT_MAX;\n";
- for(size_t i=0; i<m_n; i++)
+ for(size_t i = 0; i < m_scanned_probabilities.size() - 1; i++)
{
source = source +
- "if(rno <= " + detail::make_literal<float>(m_probabilities[i]) + ")\n" +
+ "if(rno <= " + detail::make_literal<float>(m_scanned_probabilities[i]) + ")\n" +
" return " + detail::make_literal(i) + ";\n";
}
source = source +
- "return " + detail::make_literal(m_n - 1) + ";\n" +
+ "return " + detail::make_literal(m_scanned_probabilities.size() - 1) + ";\n" +
"}\n";
BOOST_COMPUTE_FUNCTION(IntType, scale_random, (const uint_ x), {});
scale_random.set_source(source);
+ scale_random.define("IntType", type_name<IntType>());
generator.generate(first, last, scale_random, queue);
}
private:
- size_t m_n;
::std::vector<double> m_probabilities;
+ ::std::vector<double> m_scanned_probabilities;
+
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_integral<IntType>::value,
+ "Template argument must be integral"
+ );
};
} // end compute namespace
diff --git a/boost/compute/random/normal_distribution.hpp b/boost/compute/random/normal_distribution.hpp
index d025faeb2e..4693e4fffe 100644
--- a/boost/compute/random/normal_distribution.hpp
+++ b/boost/compute/random/normal_distribution.hpp
@@ -13,6 +13,9 @@
#include <limits>
+#include <boost/assert.hpp>
+#include <boost/type_traits.hpp>
+
#include <boost/compute/command_queue.hpp>
#include <boost/compute/function.hpp>
#include <boost/compute/types/fundamental.hpp>
@@ -90,11 +93,19 @@ public:
BOOST_COMPUTE_FUNCTION(RealType2, box_muller, (const uint2_ x),
{
- const RealType x1 = x.x / (RealType) (UINT_MAX - 1);
- const RealType x2 = x.y / (RealType) (UINT_MAX - 1);
+ const RealType one = 1;
+ const RealType two = 2;
+
+ // Use nextafter to push values down into [0,1) range; without this, floating point rounding can
+ // lead to have x1 = 1, but that would lead to taking the log of 0, which would result in negative
+ // infinities; by pushing the values off 1 towards 0, we ensure this won't happen.
+ const RealType x1 = nextafter(x.x / (RealType) UINT_MAX, (RealType) 0);
+ const RealType x2 = x.y / (RealType) UINT_MAX;
- const RealType z1 = sqrt(-2.f * log2(x1)) * cos(2.f * M_PI_F * x2);
- const RealType z2 = sqrt(-2.f * log2(x1)) * sin(2.f * M_PI_F * x2);
+ const RealType rho = sqrt(-two * log(one-x1));
+
+ const RealType z1 = rho * cos(two * M_PI_F * x2);
+ const RealType z2 = rho * sin(two * M_PI_F * x2);
return (RealType2)(MEAN, MEAN) + (RealType2)(z1, z2) * (RealType2)(STDDEV, STDDEV);
});
@@ -116,6 +127,11 @@ public:
private:
RealType m_mean;
RealType m_stddev;
+
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_floating_point<RealType>::value,
+ "Template argument must be a floating point type"
+ );
};
} // end compute namespace
diff --git a/boost/compute/random/uniform_int_distribution.hpp b/boost/compute/random/uniform_int_distribution.hpp
index 92e8b3305f..20448afec0 100644
--- a/boost/compute/random/uniform_int_distribution.hpp
+++ b/boost/compute/random/uniform_int_distribution.hpp
@@ -13,6 +13,9 @@
#include <limits>
+#include <boost/type_traits.hpp>
+#include <boost/static_assert.hpp>
+
#include <boost/compute/command_queue.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/function.hpp>
@@ -103,6 +106,11 @@ public:
private:
IntType m_a;
IntType m_b;
+
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_integral<IntType>::value,
+ "Template argument must be integral"
+ );
};
} // end compute namespace
diff --git a/boost/compute/random/uniform_real_distribution.hpp b/boost/compute/random/uniform_real_distribution.hpp
index 231b0dba01..75d9659d6a 100644
--- a/boost/compute/random/uniform_real_distribution.hpp
+++ b/boost/compute/random/uniform_real_distribution.hpp
@@ -11,6 +11,9 @@
#ifndef BOOST_COMPUTE_RANDOM_UNIFORM_REAL_DISTRIBUTION_HPP
#define BOOST_COMPUTE_RANDOM_UNIFORM_REAL_DISTRIBUTION_HPP
+#include <boost/assert.hpp>
+#include <boost/type_traits.hpp>
+
#include <boost/compute/command_queue.hpp>
#include <boost/compute/function.hpp>
#include <boost/compute/detail/literal.hpp>
@@ -20,7 +23,7 @@ namespace boost {
namespace compute {
/// \class uniform_real_distribution
-/// \brief Produces uniformily distributed random floating-point numbers.
+/// \brief Produces uniformly distributed random floating-point numbers.
///
/// The following example shows how to setup a uniform real distribution to
/// produce random \c float values between \c 1 and \c 100.
@@ -36,10 +39,12 @@ public:
/// Creates a new uniform distribution producing numbers in the range
/// [\p a, \p b).
+ /// Requires a < b
uniform_real_distribution(RealType a = 0.f, RealType b = 1.f)
: m_a(a),
m_b(b)
{
+ BOOST_ASSERT(a < b);
}
/// Destroys the uniform_real_distribution object.
@@ -59,7 +64,7 @@ public:
return m_b;
}
- /// Generates uniformily distributed floating-point numbers and stores
+ /// Generates uniformly distributed floating-point numbers and stores
/// them to the range [\p first, \p last).
template<class OutputIterator, class Generator>
void generate(OutputIterator first,
@@ -69,7 +74,7 @@ public:
{
BOOST_COMPUTE_FUNCTION(RealType, scale_random, (const uint_ x),
{
- return LO + (convert_RealType(x) / MAX_RANDOM) * (HI - LO);
+ return nextafter(LO + (convert_RealType(x) / MAX_RANDOM) * (HI - LO), (RealType) LO);
});
scale_random.define("LO", detail::make_literal(m_a));
@@ -78,6 +83,7 @@ public:
scale_random.define(
"convert_RealType", std::string("convert_") + type_name<RealType>()
);
+ scale_random.define("RealType", type_name<RealType>());
generator.generate(
first, last, scale_random, queue
@@ -97,6 +103,11 @@ public:
private:
RealType m_a;
RealType m_b;
+
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_floating_point<RealType>::value,
+ "Template argument must be a floating point type"
+ );
};
} // end compute namespace
diff --git a/boost/compute/svm.hpp b/boost/compute/svm.hpp
index d03c8d9079..4bc3a74237 100644
--- a/boost/compute/svm.hpp
+++ b/boost/compute/svm.hpp
@@ -15,7 +15,7 @@
#include <boost/compute/context.hpp>
#include <boost/compute/memory/svm_ptr.hpp>
-// svm functions require opencl 2.0
+// svm functions require OpenCL 2.0
#if defined(CL_VERSION_2_0) || defined(BOOST_COMPUTE_DOXYGEN_INVOKED)
namespace boost {
@@ -34,7 +34,10 @@ inline svm_ptr<T> svm_alloc(const context &context,
cl_svm_mem_flags flags = CL_MEM_READ_WRITE,
unsigned int alignment = 0)
{
- svm_ptr<T> ptr(clSVMAlloc(context.get(), flags, size * sizeof(T), alignment));
+ svm_ptr<T> ptr(
+ clSVMAlloc(context.get(), flags, size * sizeof(T), alignment),
+ context
+ );
if(!ptr.get()){
BOOST_THROW_EXCEPTION(opencl_error(CL_MEM_OBJECT_ALLOCATION_FAILURE));
}
@@ -49,6 +52,13 @@ inline svm_ptr<T> svm_alloc(const context &context,
///
/// \see svm_alloc(), command_queue::enqueue_svm_free()
template<class T>
+inline void svm_free(svm_ptr<T> ptr)
+{
+ clSVMFree(ptr.get_context(), ptr.get());
+}
+
+/// \overload
+template<class T>
inline void svm_free(const context &context, svm_ptr<T> ptr)
{
clSVMFree(context.get(), ptr.get());
diff --git a/boost/compute/system.hpp b/boost/compute/system.hpp
index f205fece7d..e6ed353d68 100644
--- a/boost/compute/system.hpp
+++ b/boost/compute/system.hpp
@@ -184,14 +184,16 @@ public:
cl_uint count = 0;
clGetPlatformIDs(0, 0, &count);
- std::vector<cl_platform_id> platform_ids(count);
- clGetPlatformIDs(count, &platform_ids[0], 0);
-
std::vector<platform> platforms;
- for(size_t i = 0; i < platform_ids.size(); i++){
- platforms.push_back(platform(platform_ids[i]));
- }
+ if(count > 0)
+ {
+ std::vector<cl_platform_id> platform_ids(count);
+ clGetPlatformIDs(count, &platform_ids[0], 0);
+ for(size_t i = 0; i < platform_ids.size(); i++){
+ platforms.push_back(platform(platform_ids[i]));
+ }
+ }
return platforms;
}
diff --git a/boost/compute/utility/wait_list.hpp b/boost/compute/utility/wait_list.hpp
index 9a7e74bac0..8b81924d63 100644
--- a/boost/compute/utility/wait_list.hpp
+++ b/boost/compute/utility/wait_list.hpp
@@ -13,6 +13,12 @@
#include <vector>
+#include <boost/compute/config.hpp>
+
+#ifndef BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+
#include <boost/compute/event.hpp>
namespace boost {
@@ -27,7 +33,7 @@ template<class T> class future;
/// specify dependencies for OpenCL operations or to wait on the host until
/// all of the events have completed.
///
-/// This class also provides convenience fnuctions for interacting with
+/// This class also provides convenience functions for interacting with
/// OpenCL APIs which typically accept event dependencies as a \c cl_event*
/// pointer and a \c cl_uint size. For example:
/// \code
@@ -60,6 +66,14 @@ public:
{
}
+ #ifndef BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+ /// Creates a wait-list from \p events
+ wait_list(std::initializer_list<event> events)
+ : m_events(events)
+ {
+ }
+ #endif // BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+
/// Copies the events in the wait-list from \p other.
wait_list& operator=(const wait_list &other)
{
diff --git a/boost/config/compiler/borland.hpp b/boost/config/compiler/borland.hpp
index 80dd230034..ccd930ea53 100644
--- a/boost/config/compiler/borland.hpp
+++ b/boost/config/compiler/borland.hpp
@@ -196,6 +196,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/clang.hpp b/boost/config/compiler/clang.hpp
index 01355bb7d5..150e3c0d52 100644
--- a/boost/config/compiler/clang.hpp
+++ b/boost/config/compiler/clang.hpp
@@ -39,9 +39,20 @@
# define BOOST_NO_TYPEID
#endif
-#if defined(__int64) && !defined(__GNUC__)
+#if !__has_feature(cxx_thread_local)
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+#ifdef __is_identifier
+#if !__is_identifier(__int64) && !defined(__GNUC__)
# define BOOST_HAS_MS_INT64
#endif
+#endif
+
+#if __has_include(<stdint.h>)
+# define BOOST_HAS_STDINT_H
+#endif
+
#define BOOST_HAS_NRVO
@@ -107,11 +118,16 @@
//
// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t
//
-#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
+#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
# define BOOST_NO_CXX11_CHAR16_T
# define BOOST_NO_CXX11_CHAR32_T
#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__)
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
#if !__has_feature(cxx_constexpr)
# define BOOST_NO_CXX11_CONSTEXPR
#endif
diff --git a/boost/config/compiler/codegear.hpp b/boost/config/compiler/codegear.hpp
index 02bd792a15..e2f6061b37 100644
--- a/boost/config/compiler/codegear.hpp
+++ b/boost/config/compiler/codegear.hpp
@@ -122,6 +122,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/comeau.hpp b/boost/config/compiler/comeau.hpp
index 278222dcfd..09841604f9 100644
--- a/boost/config/compiler/comeau.hpp
+++ b/boost/config/compiler/comeau.hpp
@@ -12,7 +12,7 @@
// Comeau C++ compiler setup:
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
#if (__COMO_VERSION__ <= 4245)
diff --git a/boost/config/compiler/common_edg.hpp b/boost/config/compiler/common_edg.hpp
index b92e574d60..c09faeb0dd 100644
--- a/boost/config/compiler/common_edg.hpp
+++ b/boost/config/compiler/common_edg.hpp
@@ -106,6 +106,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/compaq_cxx.hpp b/boost/config/compiler/compaq_cxx.hpp
index b44486c673..4d6b8ab3ac 100644
--- a/boost/config/compiler/compaq_cxx.hpp
+++ b/boost/config/compiler/compaq_cxx.hpp
@@ -9,7 +9,7 @@
#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER)
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
//
// versions check:
diff --git a/boost/config/compiler/cray.hpp b/boost/config/compiler/cray.hpp
index 3f66043357..837f815234 100644
--- a/boost/config/compiler/cray.hpp
+++ b/boost/config/compiler/cray.hpp
@@ -21,7 +21,7 @@
# error "Unsupported Cray compiler, please try running the configure script."
#endif
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
//
@@ -60,6 +60,7 @@
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
diff --git a/boost/config/compiler/digitalmars.hpp b/boost/config/compiler/digitalmars.hpp
index a3d293c7b5..c344aae044 100644
--- a/boost/config/compiler/digitalmars.hpp
+++ b/boost/config/compiler/digitalmars.hpp
@@ -82,6 +82,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/gcc.hpp b/boost/config/compiler/gcc.hpp
index fbd3dd9c19..e319d04958 100644
--- a/boost/config/compiler/gcc.hpp
+++ b/boost/config/compiler/gcc.hpp
@@ -252,6 +252,7 @@
//
#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
# define BOOST_NO_CXX11_ALIGNAS
+# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
// C++0x features in 4.8.1 and later
diff --git a/boost/config/compiler/gcc_xml.hpp b/boost/config/compiler/gcc_xml.hpp
index c11f29dd01..b56c78628c 100644
--- a/boost/config/compiler/gcc_xml.hpp
+++ b/boost/config/compiler/gcc_xml.hpp
@@ -59,7 +59,8 @@
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
# define BOOST_NO_CXX11_INLINE_NAMESPACES
# define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
+# define BOOST_NO_CXX11_FINAL
+# define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/greenhills.hpp b/boost/config/compiler/greenhills.hpp
index 038b6b2b52..a76a07cf4a 100644
--- a/boost/config/compiler/greenhills.hpp
+++ b/boost/config/compiler/greenhills.hpp
@@ -9,7 +9,7 @@
#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
//
// versions check:
diff --git a/boost/config/compiler/hp_acc.hpp b/boost/config/compiler/hp_acc.hpp
index fb63839a57..a773b8c442 100644
--- a/boost/config/compiler/hp_acc.hpp
+++ b/boost/config/compiler/hp_acc.hpp
@@ -13,7 +13,7 @@
// HP aCC C++ compiler setup:
#if defined(__EDG__)
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
#endif
#if (__HP_aCC <= 33100)
@@ -123,6 +123,7 @@
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_THREAD_LOCAL
/*
See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
diff --git a/boost/config/compiler/intel.hpp b/boost/config/compiler/intel.hpp
index 88ac023acc..80969e9edd 100644
--- a/boost/config/compiler/intel.hpp
+++ b/boost/config/compiler/intel.hpp
@@ -90,7 +90,7 @@
#else
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
#if defined(__INTEL_COMPILER)
#if __INTEL_COMPILER == 9999
diff --git a/boost/config/compiler/kai.hpp b/boost/config/compiler/kai.hpp
index 2337e6a8dd..960d501c86 100644
--- a/boost/config/compiler/kai.hpp
+++ b/boost/config/compiler/kai.hpp
@@ -9,7 +9,7 @@
// Kai C++ compiler setup:
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
// at least on Sun, the contents of <cwchar> is not in namespace std
diff --git a/boost/config/compiler/metrowerks.hpp b/boost/config/compiler/metrowerks.hpp
index c930143450..3c5e22868a 100644
--- a/boost/config/compiler/metrowerks.hpp
+++ b/boost/config/compiler/metrowerks.hpp
@@ -125,6 +125,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/mpw.hpp b/boost/config/compiler/mpw.hpp
index 76045bcd3f..084f9e154f 100644
--- a/boost/config/compiler/mpw.hpp
+++ b/boost/config/compiler/mpw.hpp
@@ -74,6 +74,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/pathscale.hpp b/boost/config/compiler/pathscale.hpp
index 7c211c4517..a5e65af49b 100644
--- a/boost/config/compiler/pathscale.hpp
+++ b/boost/config/compiler/pathscale.hpp
@@ -82,6 +82,7 @@
# define BOOST_NO_CXX11_INLINE_NAMESPACES
# define BOOST_NO_CXX11_REF_QUALIFIERS
# define BOOST_NO_CXX11_FINAL
+# define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/pgi.hpp b/boost/config/compiler/pgi.hpp
index e5605c9ec2..fa2d5e402d 100644
--- a/boost/config/compiler/pgi.hpp
+++ b/boost/config/compiler/pgi.hpp
@@ -120,6 +120,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/sgi_mipspro.hpp b/boost/config/compiler/sgi_mipspro.hpp
index 90688314ad..54433c9978 100644
--- a/boost/config/compiler/sgi_mipspro.hpp
+++ b/boost/config/compiler/sgi_mipspro.hpp
@@ -9,7 +9,7 @@
#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
//
// Threading support:
diff --git a/boost/config/compiler/sunpro_cc.hpp b/boost/config/compiler/sunpro_cc.hpp
index 6017660cbb..8f07e0e9a2 100644
--- a/boost/config/compiler/sunpro_cc.hpp
+++ b/boost/config/compiler/sunpro_cc.hpp
@@ -132,6 +132,7 @@
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_THREAD_LOCAL
#endif
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
@@ -169,6 +170,13 @@
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+
+// Turn on threading support for Solaris 12.
+// Ticket #11972
+#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS)
+# define BOOST_HAS_THREADS
+#endif
+
//
// Version
//
diff --git a/boost/config/compiler/vacpp.hpp b/boost/config/compiler/vacpp.hpp
index 6c228eab6e..3fbed9fafe 100644
--- a/boost/config/compiler/vacpp.hpp
+++ b/boost/config/compiler/vacpp.hpp
@@ -131,6 +131,7 @@
#define BOOST_NO_CXX11_INLINE_NAMESPACES
#define BOOST_NO_CXX11_REF_QUALIFIERS
#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
diff --git a/boost/config/compiler/visualc.hpp b/boost/config/compiler/visualc.hpp
index baaab589ef..72caff4974 100644
--- a/boost/config/compiler/visualc.hpp
+++ b/boost/config/compiler/visualc.hpp
@@ -158,6 +158,11 @@
# define BOOST_NO_CXX11_DECLTYPE_N3276
#endif
+#if _MSC_FULL_VER >= 180020827
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
// C++11 features supported by VC++ 14 (aka 2015)
//
#if (_MSC_FULL_VER < 190023026)
@@ -175,6 +180,14 @@
# define BOOST_NO_CXX14_BINARY_LITERALS
# define BOOST_NO_CXX14_GENERIC_LAMBDAS
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+// C++11 features supported by VC++ 14 update 3 (aka 2015)
+//
+#if (_MSC_FULL_VER < 190024210)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+# define BOOST_NO_SFINAE_EXPR
+# define BOOST_NO_CXX11_CONSTEXPR
#endif
// MSVC including version 14 has not yet completely
@@ -193,15 +206,11 @@
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, May 2010)
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-// C++11 features not supported by any versions
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
//
-// This is somewhat supported in VC14, but we may need to wait for
-// a service release before enabling:
+// C++ 11:
+//
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
//
-#define BOOST_NO_CXX11_CONSTEXPR
-
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
# define BOOST_NO_CXX14_AGGREGATE_NSDMI
@@ -209,9 +218,6 @@
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
//
// prefix and suffix headers:
diff --git a/boost/config/compiler/xlcpp.hpp b/boost/config/compiler/xlcpp.hpp
index e369ecefd2..2aaafc3b66 100644
--- a/boost/config/compiler/xlcpp.hpp
+++ b/boost/config/compiler/xlcpp.hpp
@@ -238,6 +238,10 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+#if !__has_feature(cxx_thread_local)
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
#if __cplusplus < 201400
// All versions with __cplusplus above this value seem to support this:
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
diff --git a/boost/config/platform/linux.hpp b/boost/config/platform/linux.hpp
index 6fa5f45be4..8c43c7b6d3 100644
--- a/boost/config/platform/linux.hpp
+++ b/boost/config/platform/linux.hpp
@@ -72,7 +72,7 @@
// boilerplate code:
#define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp>
-#ifdef __USE_GNU
+#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID)
#define BOOST_HAS_PTHREAD_YIELD
#endif
diff --git a/boost/config/select_compiler_config.hpp b/boost/config/select_compiler_config.hpp
index 4d87093af3..7a75708428 100644
--- a/boost/config/select_compiler_config.hpp
+++ b/boost/config/select_compiler_config.hpp
@@ -122,27 +122,27 @@
//
// This section allows dependency scanners to find all the headers we *might* include:
//
-#include "boost/config/compiler/gcc_xml.hpp"
-#include "boost/config/compiler/cray.hpp"
-#include "boost/config/compiler/comeau.hpp"
-#include "boost/config/compiler/pathscale.hpp"
-#include "boost/config/compiler/intel.hpp"
-#include "boost/config/compiler/clang.hpp"
-#include "boost/config/compiler/digitalmars.hpp"
-#include "boost/config/compiler/gcc.hpp"
-#include "boost/config/compiler/kai.hpp"
-#include "boost/config/compiler/sgi_mipspro.hpp"
-#include "boost/config/compiler/compaq_cxx.hpp"
-#include "boost/config/compiler/greenhills.hpp"
-#include "boost/config/compiler/codegear.hpp"
-#include "boost/config/compiler/borland.hpp"
-#include "boost/config/compiler/metrowerks.hpp"
-#include "boost/config/compiler/sunpro_cc.hpp"
-#include "boost/config/compiler/hp_acc.hpp"
-#include "boost/config/compiler/mpw.hpp"
-#include "boost/config/compiler/vacpp.hpp"
-#include "boost/config/compiler/pgi.hpp"
-#include "boost/config/compiler/visualc.hpp"
+#include <boost/config/compiler/gcc_xml.hpp>
+#include <boost/config/compiler/cray.hpp>
+#include <boost/config/compiler/comeau.hpp>
+#include <boost/config/compiler/pathscale.hpp>
+#include <boost/config/compiler/intel.hpp>
+#include <boost/config/compiler/clang.hpp>
+#include <boost/config/compiler/digitalmars.hpp>
+#include <boost/config/compiler/gcc.hpp>
+#include <boost/config/compiler/kai.hpp>
+#include <boost/config/compiler/sgi_mipspro.hpp>
+#include <boost/config/compiler/compaq_cxx.hpp>
+#include <boost/config/compiler/greenhills.hpp>
+#include <boost/config/compiler/codegear.hpp>
+#include <boost/config/compiler/borland.hpp>
+#include <boost/config/compiler/metrowerks.hpp>
+#include <boost/config/compiler/sunpro_cc.hpp>
+#include <boost/config/compiler/hp_acc.hpp>
+#include <boost/config/compiler/mpw.hpp>
+#include <boost/config/compiler/vacpp.hpp>
+#include <boost/config/compiler/pgi.hpp>
+#include <boost/config/compiler/visualc.hpp>
#endif
diff --git a/boost/config/stdlib/libcpp.hpp b/boost/config/stdlib/libcpp.hpp
index 645bb63bfc..096b8c0de2 100644
--- a/boost/config/stdlib/libcpp.hpp
+++ b/boost/config/stdlib/libcpp.hpp
@@ -75,6 +75,14 @@
#define BOOST_NO_STD_MESSAGES
#endif
+#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+// This is a bit of a sledgehammer, because really it's just libc++abi that has no
+// support for thread_local, leading to linker errors such as
+// "undefined reference to `__cxa_thread_atexit'". It is fixed in the
+// most recent releases of libc++abi though...
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
diff --git a/boost/config/stdlib/libstdcpp3.hpp b/boost/config/stdlib/libstdcpp3.hpp
index 9718bedcf2..1d8f6ccbce 100644
--- a/boost/config/stdlib/libstdcpp3.hpp
+++ b/boost/config/stdlib/libstdcpp3.hpp
@@ -151,13 +151,29 @@
// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't
// set __GNUC__
//
+#if __SUNPRO_CC >= 0x5140
+#define BOOST_LIBSTDCXX_VERSION 50100
+#else
#define BOOST_LIBSTDCXX_VERSION 40800
#endif
+#endif
#if !defined(BOOST_LIBSTDCXX_VERSION)
# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
+// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier)
+// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later).
+#if defined(BOOST_LIBSTDCXX11)
+# if BOOST_LIBSTDCXX_VERSION < 40600
+# if !_GLIBCXX_DEPRECATED
+# define BOOST_NO_AUTO_PTR
+# endif
+# elif !_GLIBCXX_USE_DEPRECATED
+# define BOOST_NO_AUTO_PTR
+# endif
+#endif
+
// C++0x headers in GCC 4.3.0 and later
//
#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11)
@@ -247,7 +263,7 @@
//
// Headers not present on Solaris with the Oracle compiler:
-#if defined(__SUNPRO_CC)
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
#define BOOST_NO_CXX11_HDR_FUTURE
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
#define BOOST_NO_CXX11_HDR_ATOMIC
diff --git a/boost/config/suffix.hpp b/boost/config/suffix.hpp
index 17bf1020f5..eeaec2bf69 100644
--- a/boost/config/suffix.hpp
+++ b/boost/config/suffix.hpp
@@ -624,12 +624,22 @@ namespace std{ using ::type_info; }
# define BOOST_NORETURN __declspec(noreturn)
# elif defined(__GNUC__)
# define BOOST_NORETURN __attribute__ ((__noreturn__))
-# else
-# define BOOST_NO_NORETURN
-# define BOOST_NORETURN
+# elif defined(__has_attribute) && defined(__SUNPRO_CC)
+# if __has_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
+# elif defined(__has_cpp_attribute)
+# if __has_cpp_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
# endif
#endif
+#if !defined(BOOST_NORETURN)
+# define BOOST_NO_NORETURN
+# define BOOST_NORETURN
+#endif
+
// Branch prediction hints
// These macros are intended to wrap conditional expressions that yield true or false
//
diff --git a/boost/container/adaptive_pool.hpp b/boost/container/adaptive_pool.hpp
index ac3d86709e..ac14fb397e 100644
--- a/boost/container/adaptive_pool.hpp
+++ b/boost/container/adaptive_pool.hpp
@@ -121,8 +121,6 @@ class adaptive_pool
adaptive_pool& operator=
(const adaptive_pool<T2, Version2, N2, F2>&);
- //!Not assignable from other adaptive_pool
- adaptive_pool& operator=(const adaptive_pool&);
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
diff --git a/boost/container/allocator.hpp b/boost/container/allocator.hpp
index 2fb44b73d3..9b9268f16c 100644
--- a/boost/container/allocator.hpp
+++ b/boost/container/allocator.hpp
@@ -113,9 +113,6 @@ class allocator
template<class T2, unsigned int Version2, unsigned int AllocationDisableMask2>
allocator& operator=(const allocator<T2, Version2, AllocationDisableMask2>&);
- //Not assignable from other allocator
- allocator& operator=(const allocator&);
-
static const unsigned int ForbiddenMask =
BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ;
diff --git a/boost/container/deque.hpp b/boost/container/deque.hpp
index fef28a124f..255cd9399d 100644
--- a/boost/container/deque.hpp
+++ b/boost/container/deque.hpp
@@ -535,7 +535,7 @@ class deque : protected deque_base<Allocator>
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
- deque()
+ deque() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: Base()
{}
@@ -707,7 +707,7 @@ class deque : protected deque_base<Allocator>
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
- deque(BOOST_RV_REF(deque) x)
+ deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW
: Base(BOOST_MOVE_BASE(Base, x))
{ this->swap_members(x); }
@@ -1277,11 +1277,10 @@ class deque : protected deque_base<Allocator>
return const_iterator(this->cbegin()+n);
}
- //! <b>Requires</b>: size() >= n.
+ //! <b>Requires</b>: begin() <= p <= end().
//!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
//!
//! <b>Throws</b>: Nothing.
//!
@@ -1349,44 +1348,52 @@ class deque : protected deque_base<Allocator>
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the beginning of the deque.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
//!
//! <b>Complexity</b>: Amortized constant time
template <class... Args>
- void emplace_front(BOOST_FWD_REF(Args)... args)
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
{
if(this->priv_push_front_simple_available()){
+ reference r = *this->priv_push_front_simple_pos();
allocator_traits_type::construct
( this->alloc()
, this->priv_push_front_simple_pos()
, boost::forward<Args>(args)...);
this->priv_push_front_simple_commit();
+ return r;
}
else{
typedef container_detail::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
- this->priv_insert_front_aux_impl(1, type(boost::forward<Args>(args)...));
+ return *this->priv_insert_front_aux_impl(1, type(boost::forward<Args>(args)...));
}
}
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the end of the deque.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
//!
//! <b>Complexity</b>: Amortized constant time
template <class... Args>
- void emplace_back(BOOST_FWD_REF(Args)... args)
+ reference emplace_back(BOOST_FWD_REF(Args)... args)
{
if(this->priv_push_back_simple_available()){
+ reference r = *this->priv_push_back_simple_pos();
allocator_traits_type::construct
( this->alloc()
, this->priv_push_back_simple_pos()
, boost::forward<Args>(args)...);
this->priv_push_back_simple_commit();
+ return r;
}
else{
typedef container_detail::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
- this->priv_insert_back_aux_impl(1, type(boost::forward<Args>(args)...));
+ return *this->priv_insert_back_aux_impl(1, type(boost::forward<Args>(args)...));
}
}
@@ -1421,32 +1428,36 @@ class deque : protected deque_base<Allocator>
#define BOOST_CONTAINER_DEQUE_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- void emplace_front(BOOST_MOVE_UREF##N)\
+ reference emplace_front(BOOST_MOVE_UREF##N)\
{\
if(priv_push_front_simple_available()){\
+ reference r = *this->priv_push_front_simple_pos();\
allocator_traits_type::construct\
( this->alloc(), this->priv_push_front_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
priv_push_front_simple_commit();\
+ return r;\
}\
else{\
typedef container_detail::insert_nonmovable_emplace_proxy##N\
<Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\
+ return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\
}\
}\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- void emplace_back(BOOST_MOVE_UREF##N)\
+ reference emplace_back(BOOST_MOVE_UREF##N)\
{\
if(priv_push_back_simple_available()){\
+ reference r = *this->priv_push_back_simple_pos();\
allocator_traits_type::construct\
( this->alloc(), this->priv_push_back_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
priv_push_back_simple_commit();\
+ return r;\
}\
else{\
typedef container_detail::insert_nonmovable_emplace_proxy##N\
<Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\
+ return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\
}\
}\
\
@@ -1712,16 +1723,14 @@ class deque : protected deque_base<Allocator>
if (elems_before < (this->size() - n) - elems_before) {
boost::container::move_backward(begin(), first.unconst(), last.unconst());
iterator new_start = this->members_.m_start + n;
- if(!Base::traits_t::trivial_dctr_after_move)
- this->priv_destroy_range(this->members_.m_start, new_start);
+ this->priv_destroy_range(this->members_.m_start, new_start);
this->priv_destroy_nodes(this->members_.m_start.m_node, new_start.m_node);
this->members_.m_start = new_start;
}
else {
boost::container::move(last.unconst(), end(), first.unconst());
iterator new_finish = this->members_.m_finish - n;
- if(!Base::traits_t::trivial_dctr_after_move)
- this->priv_destroy_range(new_finish, this->members_.m_finish);
+ this->priv_destroy_range(new_finish, this->members_.m_finish);
this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
this->members_.m_finish = new_finish;
}
@@ -1828,8 +1837,7 @@ class deque : protected deque_base<Allocator>
}
else {
iterator new_finish = this->members_.m_finish - n;
- if(!Base::traits_t::trivial_dctr_after_move)
- this->priv_destroy_range(new_finish, this->members_.m_finish);
+ this->priv_destroy_range(new_finish, this->members_.m_finish);
this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
this->members_.m_finish = new_finish;
}
diff --git a/boost/container/detail/addressof.hpp b/boost/container/detail/addressof.hpp
index cc582c439d..fedbdb91d1 100644
--- a/boost/container/detail/addressof.hpp
+++ b/boost/container/detail/addressof.hpp
@@ -25,12 +25,12 @@ namespace container {
namespace container_detail {
template <typename T>
-inline T* addressof(T& obj)
+BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
{
return static_cast<T*>(
static_cast<void*>(
const_cast<char*>(
- &reinterpret_cast<const char&>(obj)
+ &reinterpret_cast<const volatile char&>(obj)
)));
}
diff --git a/boost/container/detail/advanced_insert_int.hpp b/boost/container/detail/advanced_insert_int.hpp
index 56df588706..278cd1b3f1 100644
--- a/boost/container/detail/advanced_insert_int.hpp
+++ b/boost/container/detail/advanced_insert_int.hpp
@@ -236,7 +236,7 @@ struct insert_nonmovable_emplace_proxy
{ this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); }
private:
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
{
BOOST_ASSERT(n == 1); (void)n;
@@ -266,7 +266,7 @@ struct insert_emplace_proxy
private:
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void priv_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
{
BOOST_ASSERT(n ==1); (void)n;
diff --git a/boost/container/detail/compare_functors.hpp b/boost/container/detail/compare_functors.hpp
index 4220d50996..28f9093b9a 100644
--- a/boost/container/detail/compare_functors.hpp
+++ b/boost/container/detail/compare_functors.hpp
@@ -53,16 +53,16 @@ struct value_to_node_compare
{}
bool operator()(const Node &a, const Node &b) const
- { return static_cast<const Pred&>(*this)(a.m_data, b.m_data); }
+ { return static_cast<const Pred&>(*this)(a.get_data(), b.get_data()); }
bool operator()(const Node &a) const
- { return static_cast<const Pred&>(*this)(a.m_data); }
+ { return static_cast<const Pred&>(*this)(a.get_data()); }
bool operator()(const Node &a, const Node &b)
- { return static_cast<Pred&>(*this)(a.m_data, b.m_data); }
+ { return static_cast<Pred&>(*this)(a.get_data(), b.get_data()); }
bool operator()(const Node &a)
- { return static_cast<Pred&>(*this)(a.m_data); }
+ { return static_cast<Pred&>(*this)(a.get_data()); }
predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
diff --git a/boost/container/detail/construct_in_place.hpp b/boost/container/detail/construct_in_place.hpp
index 6cb339519c..9fecd24a8f 100644
--- a/boost/container/detail/construct_in_place.hpp
+++ b/boost/container/detail/construct_in_place.hpp
@@ -23,16 +23,19 @@
#include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/value_init.hpp>
namespace boost {
namespace container {
+//In place construction
+
template<class Allocator, class T, class InpIt>
-inline void construct_in_place(Allocator &a, T* dest, InpIt source)
+BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* dest, InpIt source)
{ boost::container::allocator_traits<Allocator>::construct(a, dest, *source); }
template<class Allocator, class T, class U, class D>
-inline void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator<U, D>)
+BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator<U, D>)
{
boost::container::allocator_traits<Allocator>::construct(a, dest);
}
@@ -41,7 +44,7 @@ template <class T, class Difference>
class default_init_construct_iterator;
template<class Allocator, class T, class U, class D>
-inline void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator<U, D>)
+BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator<U, D>)
{
boost::container::allocator_traits<Allocator>::construct(a, dest, default_init);
}
@@ -50,13 +53,44 @@ template <class T, class EmplaceFunctor, class Difference>
class emplace_iterator;
template<class Allocator, class T, class U, class EF, class D>
-inline void construct_in_place(Allocator &a, T *dest, emplace_iterator<U, EF, D> ei)
+BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, emplace_iterator<U, EF, D> ei)
{
ei.construct_in_place(a, dest);
}
+//Assignment
+
+template<class DstIt, class InpIt>
+BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source)
+{ *dest = *source; }
+
+template<class DstIt, class U, class D>
+BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator<U, D>)
+{
+ container_detail::value_init<U> val;
+ *dest = boost::move(val.get());
+}
+
+template <class DstIt, class Difference>
+class default_init_construct_iterator;
+
+template<class DstIt, class U, class D>
+BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, default_init_construct_iterator<U, D>)
+{
+ U u;
+ *dest = boost::move(u);
+}
+
+template <class T, class EmplaceFunctor, class Difference>
+class emplace_iterator;
+
+template<class DstIt, class U, class EF, class D>
+BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, emplace_iterator<U, EF, D> ei)
+{
+ ei.assign_in_place(dest);
+}
+
} //namespace container {
} //namespace boost {
#endif //#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP
-
diff --git a/boost/container/detail/copy_move_algo.hpp b/boost/container/detail/copy_move_algo.hpp
index f590a8aaf3..ead93c6035 100644
--- a/boost/container/detail/copy_move_algo.hpp
+++ b/boost/container/detail/copy_move_algo.hpp
@@ -7,8 +7,8 @@
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_DETAIL_UTILITIES_HPP
-#define BOOST_CONTAINER_DETAIL_UTILITIES_HPP
+#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
+#define BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
@@ -25,6 +25,8 @@
#include <boost/container/detail/iterator_to_raw_pointer.hpp>
#include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/construct_in_place.hpp>
+
// move
#include <boost/move/adl_move_swap.hpp>
#include <boost/move/iterator.hpp>
@@ -515,7 +517,7 @@ inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F
F back = r;
BOOST_TRY{
while (n--) {
- allocator_traits<Allocator>::construct(a, container_detail::iterator_to_raw_pointer(r), *f);
+ boost::container::construct_in_place(a, container_detail::iterator_to_raw_pointer(r), f);
++f; ++r;
}
}
@@ -757,7 +759,7 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I
copy_n_source(I f, typename boost::container::iterator_traits<I>::difference_type n, F r)
{
while (n--) {
- *r = *f;
+ boost::container::assign_in_place(r, f);
++f; ++r;
}
return f;
@@ -1139,4 +1141,4 @@ void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_tr
} //namespace container {
} //namespace boost {
-#endif //#ifndef BOOST_CONTAINER_DETAIL_UTILITIES_HPP
+#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
diff --git a/boost/container/detail/dispatch_uses_allocator.hpp b/boost/container/detail/dispatch_uses_allocator.hpp
index 3000f7cb27..fdf203cef8 100644
--- a/boost/container/detail/dispatch_uses_allocator.hpp
+++ b/boost/container/detail/dispatch_uses_allocator.hpp
@@ -222,7 +222,7 @@ template < typename ConstructAlloc
BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_detail::is_pair<Pair> >::type)
dispatch_uses_allocator
( ConstructAlloc & construct_alloc
- , ArgAlloc & arg_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
, Pair* p)
{
(dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first));
@@ -243,7 +243,7 @@ template < typename ConstructAlloc
BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if<container_detail::is_pair<Pair> >::type)
dispatch_uses_allocator
( ConstructAlloc & construct_alloc
- , ArgAlloc & arg_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
, Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y)
{
(dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward<U>(x));
@@ -263,7 +263,7 @@ template < typename ConstructAlloc
BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if< container_detail::is_pair<Pair> >::type)
dispatch_uses_allocator
(ConstructAlloc & construct_alloc
- , ArgAlloc & arg_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
, Pair* p, Pair2& x)
{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, x.first, x.second); }
@@ -276,13 +276,135 @@ typename container_detail::enable_if_and
, container_detail::not_<boost::move_detail::is_reference<Pair2> > >::type //This is needed for MSVC10 and ambiguous overloads
dispatch_uses_allocator
(ConstructAlloc & construct_alloc
- , ArgAlloc & arg_alloc
+ , BOOST_FWD_REF(ArgAlloc) arg_alloc
, Pair* p, BOOST_RV_REF_BEG Pair2 BOOST_RV_REF_END x)
{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, ::boost::move(x.first), ::boost::move(x.second)); }
-//template <typename ConstructAlloc, typename ArgAlloc, class Pair, class Pair2>
-//void dispatch_uses_allocator( ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc
-// , pair<T1, T2>* p, piecewise_construct_t, tuple<Args1...> x, tuple<Args2...> y);
+
+//piecewise construction from boost::tuple
+#define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
+template< typename ConstructAlloc, typename ArgAlloc, class Pair \
+ , template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\
+ dispatch_uses_allocator( ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc, Pair* pair, piecewise_construct_t\
+ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
+ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\
+{\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+}\
+//
+BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
+#undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
+
+//piecewise construction from Std Tuple
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair
+ , template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
+ void dispatch_uses_allocator_index( ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc, Pair* pair
+ , Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
+ {
+ (void)t1; (void)t2;
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...);
+ BOOST_TRY{
+ (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...);
+ }
+ BOOST_CATCH(...){
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair
+ , template<class ...> class Tuple, class... Args1, class... Args2>
+ typename container_detail::enable_if< container_detail::is_pair<Pair> >::type
+ dispatch_uses_allocator( ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc, Pair* pair, piecewise_construct_t
+ , Tuple<Args1...> t1, Tuple<Args2...> t2)
+ {
+ (dispatch_uses_allocator_index)( construct_alloc, arg_alloc, pair, t1, t2
+ , typename build_number_seq<sizeof...(Args1)>::type()
+ , typename build_number_seq<sizeof...(Args2)>::type());
+ }
+
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+
+ //MSVC 2010 tuple implementation
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair\
+ , template<class, class, class, class, class, class, class, class, class, class> class StdTuple\
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\
+ dispatch_uses_allocator(ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc, Pair* pair, piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
+ {\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+ #if _VARIADIC_MAX >= 9
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
+ #else
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
+ #endif
+
+ //MSVC 2012 tuple implementation
+ #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
+ template< typename ConstructAlloc, typename ArgAlloc, class Pair\
+ , template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ typename container_detail::enable_if< container_detail::is_pair<Pair> >::type\
+ dispatch_uses_allocator\
+ ( ConstructAlloc & construct_alloc, ArgAlloc & arg_alloc, Pair* pair, piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
+ {\
+ (void)p; (void)q;\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
+ BOOST_TRY{\
+ (dispatch_uses_allocator)\
+ (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
+ }\
+ BOOST_CATCH(...) {\
+ allocator_traits<ConstructAlloc>::destroy(construct_alloc, container_detail::addressof(pair->first));\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
+
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
} //namespace container_detail
diff --git a/boost/container/detail/flat_tree.hpp b/boost/container/detail/flat_tree.hpp
index 4c48c8b7d3..db73c410a9 100644
--- a/boost/container/detail/flat_tree.hpp
+++ b/boost/container/detail/flat_tree.hpp
@@ -32,11 +32,13 @@
#include <boost/container/detail/destroyers.hpp>
#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/is_sorted.hpp>
#include <boost/container/allocator_traits.hpp>
#ifdef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
#include <boost/intrusive/pointer_traits.hpp>
#endif
#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/iterators.hpp>
#include <boost/move/make_unique.hpp>
#include <boost/move/adl_move_swap.hpp>
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
@@ -44,6 +46,7 @@
#endif
#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/move/iterator.hpp>
namespace boost {
namespace container {
@@ -98,7 +101,7 @@ struct get_flat_tree_iterators
typedef boost::container::reverse_iterator<const_iterator> const_reverse_iterator;
};
-template <class Key, class Value, class KeyOfValue,
+template <class Value, class KeyOfValue,
class Compare, class Allocator>
class flat_tree
{
@@ -183,7 +186,7 @@ class flat_tree
typedef typename vector_t::const_pointer const_pointer;
typedef typename vector_t::reference reference;
typedef typename vector_t::const_reference const_reference;
- typedef Key key_type;
+ typedef typename KeyOfValue::type key_type;
typedef Compare key_compare;
typedef typename vector_t::allocator_type allocator_type;
typedef typename vector_t::size_type size_type;
@@ -200,35 +203,36 @@ class flat_tree
typedef allocator_traits<stored_allocator_type> stored_allocator_traits;
public:
- flat_tree()
+ BOOST_CONTAINER_FORCEINLINE flat_tree()
: m_data()
{ }
- explicit flat_tree(const Compare& comp)
+ BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp)
: m_data(comp)
{ }
- flat_tree(const Compare& comp, const allocator_type& a)
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a)
: m_data(comp, a)
{ }
- explicit flat_tree(const allocator_type& a)
+ BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a)
: m_data(a)
{ }
- flat_tree(const flat_tree& x)
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x)
: m_data(x.m_data)
{ }
- flat_tree(BOOST_RV_REF(flat_tree) x)
+ BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: m_data(boost::move(x.m_data))
{ }
- flat_tree(const flat_tree& x, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a)
: m_data(x.m_data, a)
{ }
- flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
: m_data(boost::move(x.m_data), a)
{ }
@@ -237,7 +241,20 @@ class flat_tree
, const Compare& comp = Compare()
, const allocator_type& a = allocator_type())
: m_data(comp, a)
- { this->m_data.m_vect.insert(this->m_data.m_vect.end(), first, last); }
+ {
+ this->m_data.m_vect.insert(this->m_data.m_vect.end(), first, last);
+ BOOST_ASSERT((is_sorted)(this->m_data.m_vect.cbegin(), this->m_data.m_vect.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last
+ , const Compare& comp = Compare()
+ , const allocator_type& a = allocator_type())
+ : m_data(comp, a)
+ {
+ this->m_data.m_vect.insert(this->m_data.m_vect.end(), first, last);
+ BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_vect.cbegin(), this->m_data.m_vect.cend(), this->priv_value_comp()));
+ }
template <class InputIterator>
flat_tree( bool unique_insertion
@@ -262,80 +279,93 @@ class flat_tree
}
}
- ~flat_tree()
+ BOOST_CONTAINER_FORCEINLINE ~flat_tree()
{}
- flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
+ BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
{ m_data = x.m_data; return *this; }
- flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ m_data = boost::move(x.m_data); return *this; }
+ BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const
+ { return static_cast<const value_compare &>(this->m_data); }
+
+ BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp()
+ { return static_cast<value_compare &>(this->m_data); }
+
+ BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const
+ { return this->priv_value_comp().get_comp(); }
+
+ BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp()
+ { return this->priv_value_comp().get_comp(); }
+
public:
// accessors:
- Compare key_comp() const
+ BOOST_CONTAINER_FORCEINLINE Compare key_comp() const
{ return this->m_data.get_comp(); }
- value_compare value_comp() const
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
{ return this->m_data; }
- allocator_type get_allocator() const
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
{ return this->m_data.m_vect.get_allocator(); }
- const stored_allocator_type &get_stored_allocator() const
+ BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const
{ return this->m_data.m_vect.get_stored_allocator(); }
- stored_allocator_type &get_stored_allocator()
+ BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator()
{ return this->m_data.m_vect.get_stored_allocator(); }
- iterator begin()
+ BOOST_CONTAINER_FORCEINLINE iterator begin()
{ return this->m_data.m_vect.begin(); }
- const_iterator begin() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
{ return this->cbegin(); }
- const_iterator cbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
{ return this->m_data.m_vect.begin(); }
- iterator end()
+ BOOST_CONTAINER_FORCEINLINE iterator end()
{ return this->m_data.m_vect.end(); }
- const_iterator end() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const
{ return this->cend(); }
- const_iterator cend() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
{ return this->m_data.m_vect.end(); }
- reverse_iterator rbegin()
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
{ return reverse_iterator(this->end()); }
- const_reverse_iterator rbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
{ return this->crbegin(); }
- const_reverse_iterator crbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
{ return const_reverse_iterator(this->cend()); }
- reverse_iterator rend()
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
{ return reverse_iterator(this->begin()); }
- const_reverse_iterator rend() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
{ return this->crend(); }
- const_reverse_iterator crend() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
{ return const_reverse_iterator(this->cbegin()); }
- bool empty() const
+ BOOST_CONTAINER_FORCEINLINE bool empty() const
{ return this->m_data.m_vect.empty(); }
- size_type size() const
+ BOOST_CONTAINER_FORCEINLINE size_type size() const
{ return this->m_data.m_vect.size(); }
- size_type max_size() const
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const
{ return this->m_data.m_vect.max_size(); }
- void swap(flat_tree& other)
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
{ this->m_data.swap(other.m_data); }
@@ -346,7 +376,7 @@ class flat_tree
{
std::pair<iterator,bool> ret;
insert_commit_data data;
- ret.second = this->priv_insert_unique_prepare(val, data);
+ ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
ret.first = ret.second ? this->priv_insert_commit(data, val)
: iterator(vector_iterator_get_ptr(data.position));
return ret;
@@ -356,7 +386,7 @@ class flat_tree
{
std::pair<iterator,bool> ret;
insert_commit_data data;
- ret.second = this->priv_insert_unique_prepare(val, data);
+ ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
ret.first = ret.second ? this->priv_insert_commit(data, boost::move(val))
: iterator(vector_iterator_get_ptr(data.position));
return ret;
@@ -381,7 +411,7 @@ class flat_tree
BOOST_ASSERT(this->priv_in_range_or_end(hint));
std::pair<iterator,bool> ret;
insert_commit_data data;
- return this->priv_insert_unique_prepare(hint, val, data)
+ return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
? this->priv_insert_commit(data, val)
: iterator(vector_iterator_get_ptr(data.position));
}
@@ -391,7 +421,7 @@ class flat_tree
BOOST_ASSERT(this->priv_in_range_or_end(hint));
std::pair<iterator,bool> ret;
insert_commit_data data;
- return this->priv_insert_unique_prepare(hint, val, data)
+ return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
? this->priv_insert_commit(data, boost::move(val))
: iterator(vector_iterator_get_ptr(data.position));
}
@@ -481,7 +511,7 @@ class flat_tree
>::type * = 0
#endif
)
- { this->m_data.m_vect.merge(first, last); }
+ { this->m_data.m_vect.merge(first, last, static_cast<const value_compare &>(this->m_data)); }
template <class InIt>
void insert_unique(ordered_unique_range_t, InIt first, InIt last
@@ -510,7 +540,7 @@ class flat_tree
>::type * = 0
#endif
)
- { this->m_data.m_vect.merge_unique(first, last, value_compare()); }
+ { this->m_data.m_vect.merge_unique(first, last, static_cast<const value_compare &>(this->m_data)); }
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
@@ -560,6 +590,29 @@ class flat_tree
return this->insert_equal(hint, ::boost::move(val));
}
+ template <class KeyType, class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
+ (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
+ {
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ const key_type & k = key;
+ ret.second = hint == const_iterator()
+ ? this->priv_insert_unique_prepare(k, data)
+ : this->priv_insert_unique_prepare(hint, k, data);
+
+ if(!ret.second){
+ ret.first = this->nth(data.position - this->cbegin());
+ }
+ else{
+ typedef typename emplace_functor_type<try_emplace_t, KeyType, Args...>::type func_t;
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;
+ func_t func(try_emplace_t(), ::boost::forward<KeyType>(key), ::boost::forward<Args>(args)...);
+ ret.first = this->m_data.m_vect.insert(data.position, it_t(func), it_t());
+ }
+ return ret;
+ }
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE(N) \
@@ -606,13 +659,57 @@ class flat_tree
value_destructor<stored_allocator_type> d(a, val);\
return this->insert_equal(hint, ::boost::move(val));\
}\
+ template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
+ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ std::pair<iterator,bool> ret;\
+ insert_commit_data data;\
+ const key_type & k = key;\
+ ret.second = hint == const_iterator()\
+ ? this->priv_insert_unique_prepare(k, data)\
+ : this->priv_insert_unique_prepare(hint, k, data);\
+ \
+ if(!ret.second){\
+ ret.first = this->nth(data.position - this->cbegin());\
+ }\
+ else{\
+ typedef typename emplace_functor_type<try_emplace_t, KeyType BOOST_MOVE_I##N BOOST_MOVE_TARG##N>::type func_t;\
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;\
+ func_t func(try_emplace_t(), ::boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ ret.first = this->m_data.m_vect.insert(data.position, it_t(func), it_t());\
+ }\
+ return ret;\
+ }\
//
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE)
+ BOOST_MOVE_ITERATE_0TO7(BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE)
#undef BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE
#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- iterator erase(const_iterator position)
+ template<class KeyType, class M>
+ std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
+ {
+ const key_type& k = key;
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ ret.second = hint == const_iterator()
+ ? this->priv_insert_unique_prepare(k, data)
+ : this->priv_insert_unique_prepare(hint, k, data);
+ if(!ret.second){
+ ret.first = this->nth(data.position - this->cbegin());
+ ret.first->second = boost::forward<M>(obj);
+ }
+ else{
+ typedef typename emplace_functor_type<KeyType, M>::type func_t;
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;
+ func_t func(boost::forward<KeyType>(key), boost::forward<M>(obj));
+ ret.first = this->m_data.m_vect.insert(data.position, it_t(func), it_t());
+ }
+ return ret;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position)
{ return this->m_data.m_vect.erase(position); }
size_type erase(const key_type& k)
@@ -625,10 +722,10 @@ class flat_tree
return ret;
}
- iterator erase(const_iterator first, const_iterator last)
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
{ return this->m_data.m_vect.erase(first, last); }
- void clear()
+ BOOST_CONTAINER_FORCEINLINE void clear()
{ this->m_data.m_vect.clear(); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
@@ -637,19 +734,19 @@ class flat_tree
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to size().
- void shrink_to_fit()
+ BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
{ this->m_data.m_vect.shrink_to_fit(); }
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_data.m_vect.nth(n); }
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_data.m_vect.nth(n); }
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_data.m_vect.index_of(p); }
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_data.m_vect.index_of(p); }
// set operations:
@@ -682,64 +779,94 @@ class flat_tree
return n;
}
- iterator lower_bound(const key_type& k)
+ template<class C2>
+ void merge_unique(flat_tree<Value, KeyOfValue, C2, Allocator>& source)
+ {
+ this->insert( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end()));
+ }
+
+ template<class C2>
+ void merge_equal(flat_tree<Value, KeyOfValue, C2, Allocator>& source)
+ {
+ this->insert( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end()));
+ }
+
+ void merge_unique(flat_tree& source)
+ {
+ this->m_data.m_vect.merge_unique
+ ( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end())
+ , static_cast<const value_compare &>(this->m_data));
+ }
+
+ void merge_equal(flat_tree& source)
+ {
+ this->m_data.m_vect.merge
+ ( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end())
+ , static_cast<const value_compare &>(this->m_data));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
{ return this->priv_lower_bound(this->begin(), this->end(), k); }
- const_iterator lower_bound(const key_type& k) const
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
{ return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
- iterator upper_bound(const key_type& k)
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
{ return this->priv_upper_bound(this->begin(), this->end(), k); }
- const_iterator upper_bound(const key_type& k) const
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
{ return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
- std::pair<iterator,iterator> equal_range(const key_type& k)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& k)
{ return this->priv_equal_range(this->begin(), this->end(), k); }
- std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
{ return this->priv_equal_range(this->cbegin(), this->cend(), k); }
- std::pair<iterator, iterator> lower_bound_range(const key_type& k)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, iterator> lower_bound_range(const key_type& k)
{ return this->priv_lower_bound_range(this->begin(), this->end(), k); }
- std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
{ return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
- size_type capacity() const
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const
{ return this->m_data.m_vect.capacity(); }
- void reserve(size_type cnt)
+ BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
{ this->m_data.m_vect.reserve(cnt); }
- friend bool operator==(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_tree& x, const flat_tree& y)
{
return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin());
}
- friend bool operator<(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_tree& x, const flat_tree& y)
{
return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
}
- friend bool operator!=(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_tree& x, const flat_tree& y)
{ return !(x == y); }
- friend bool operator>(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_tree& x, const flat_tree& y)
{ return y < x; }
- friend bool operator<=(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_tree& x, const flat_tree& y)
{ return !(y < x); }
- friend bool operator>=(const flat_tree& x, const flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_tree& x, const flat_tree& y)
{ return !(x < y); }
- friend void swap(flat_tree& x, flat_tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y)
{ x.swap(y); }
private:
- bool priv_in_range_or_end(const_iterator pos) const
+ BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
{
return (this->begin() <= pos) && (pos <= this->end());
}
@@ -780,34 +907,34 @@ class flat_tree
}
bool priv_insert_unique_prepare
- (const_iterator b, const_iterator e, const value_type& val, insert_commit_data &commit_data)
+ (const_iterator b, const_iterator e, const key_type& k, insert_commit_data &commit_data)
{
- const value_compare &val_cmp = this->m_data;
- commit_data.position = this->priv_lower_bound(b, e, KeyOfValue()(val));
- return commit_data.position == e || val_cmp(val, *commit_data.position);
+ const key_compare &key_cmp = this->priv_key_comp();
+ commit_data.position = this->priv_lower_bound(b, e, k);
+ return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position));
}
- bool priv_insert_unique_prepare
- (const value_type& val, insert_commit_data &commit_data)
- { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), val, commit_data); }
+ BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare
+ (const key_type& k, insert_commit_data &commit_data)
+ { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); }
bool priv_insert_unique_prepare
- (const_iterator pos, const value_type& val, insert_commit_data &commit_data)
+ (const_iterator pos, const key_type& k, insert_commit_data &commit_data)
{
//N1780. Props to Howard Hinnant!
- //To insert val at pos:
- //if pos == end || val <= *pos
- // if pos == begin || val >= *(pos-1)
- // insert val before pos
+ //To insert k at pos:
+ //if pos == end || k <= *pos
+ // if pos == begin || k >= *(pos-1)
+ // insert k before pos
// else
- // insert val before upper_bound(val)
- //else if pos+1 == end || val <= *(pos+1)
- // insert val after pos
+ // insert k before upper_bound(k)
+ //else if pos+1 == end || k <= *(pos+1)
+ // insert k after pos
//else
- // insert val before lower_bound(val)
- const value_compare &val_cmp = this->m_data;
+ // insert k before lower_bound(k)
+ const key_compare &key_cmp = this->priv_key_comp();
const const_iterator cend_it = this->cend();
- if(pos == cend_it || val_cmp(val, *pos)){ //Check if val should go before end
+ if(pos == cend_it || key_cmp(k, KeyOfValue()(*pos))){ //Check if k should go before end
const const_iterator cbeg = this->cbegin();
commit_data.position = pos;
if(pos == cbeg){ //If container is empty then insert it in the beginning
@@ -815,27 +942,27 @@ class flat_tree
}
const_iterator prev(pos);
--prev;
- if(val_cmp(*prev, val)){ //If previous element was less, then it should go between prev and pos
+ if(key_cmp(KeyOfValue()(*prev), k)){ //If previous element was less, then it should go between prev and pos
return true;
}
- else if(!val_cmp(val, *prev)){ //If previous was equal then insertion should fail
+ else if(!key_cmp(k, KeyOfValue()(*prev))){ //If previous was equal then insertion should fail
commit_data.position = prev;
return false;
}
else{ //Previous was bigger so insertion hint was pointless, dispatch to hintless insertion
- //but reduce the search between beg and prev as prev is bigger than val
- return this->priv_insert_unique_prepare(cbeg, prev, val, commit_data);
+ //but reduce the search between beg and prev as prev is bigger than k
+ return this->priv_insert_unique_prepare(cbeg, prev, k, commit_data);
}
}
else{
//The hint is before the insertion position, so insert it
//in the remaining range [pos, end)
- return this->priv_insert_unique_prepare(pos, cend_it, val, commit_data);
+ return this->priv_insert_unique_prepare(pos, cend_it, k, commit_data);
}
}
template<class Convertible>
- iterator priv_insert_commit
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit
(insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible)
{
return this->m_data.m_vect.insert
@@ -966,9 +1093,9 @@ class flat_tree
//!has_trivial_destructor_after_move<> == true_type
//!specialization for optimizations
-template <class Key, class T, class KeyOfValue,
+template <class T, class KeyOfValue,
class Compare, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::container_detail::flat_tree<Key, T, KeyOfValue, Compare, Allocator> >
+struct has_trivial_destructor_after_move<boost::container::container_detail::flat_tree<T, KeyOfValue, Compare, Allocator> >
{
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
diff --git a/boost/container/detail/is_sorted.hpp b/boost/container/detail/is_sorted.hpp
new file mode 100644
index 0000000000..b8c223bb7b
--- /dev/null
+++ b/boost/container/detail/is_sorted.hpp
@@ -0,0 +1,57 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2016-2016. Distributed under the 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/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_DETAIL_IS_SORTED_HPP
+#define BOOST_CONTAINER_DETAIL_IS_SORTED_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace container {
+namespace container_detail {
+
+template <class ForwardIterator, class Pred>
+bool is_sorted (ForwardIterator first, ForwardIterator last, Pred pred)
+{
+ if(first != last){
+ ForwardIterator next = first;
+ while (++next != last){
+ if(pred(*next, *first))
+ return false;
+ ++first;
+ }
+ }
+ return true;
+}
+
+template <class ForwardIterator, class Pred>
+bool is_sorted_and_unique (ForwardIterator first, ForwardIterator last, Pred pred)
+{
+ if(first != last){
+ ForwardIterator next = first;
+ while (++next != last){
+ if(!pred(*first, *next))
+ return false;
+ ++first;
+ }
+ }
+ return true;
+}
+
+} //namespace container_detail {
+} //namespace container {
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_SORTED_HPP
diff --git a/boost/container/detail/iterators.hpp b/boost/container/detail/iterators.hpp
index 32ff32f362..d3b353a461 100644
--- a/boost/container/detail/iterators.hpp
+++ b/boost/container/detail/iterators.hpp
@@ -26,6 +26,7 @@
#include <boost/container/detail/workaround.hpp>
#include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/value_init.hpp>
#include <boost/static_assert.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/intrusive/detail/reverse_iterator.hpp>
@@ -560,17 +561,23 @@ class emplace_iterator
BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const
{ return *this + (-off); }
+ private:
//This pseudo-iterator's dereference operations have no sense since value is not
//constructed until ::boost::container::construct_in_place is called.
//So comment them to catch bad uses
- //const T& operator*() const;
- //const T& operator[](difference_type) const;
- //const T* operator->() const;
+ const T& operator*() const;
+ const T& operator[](difference_type) const;
+ const T* operator->() const;
+ public:
template<class Allocator>
void construct_in_place(Allocator &a, T* ptr)
{ (*m_pe)(a, ptr); }
+ template<class DestIt>
+ void assign_in_place(DestIt dest)
+ { (*m_pe)(dest); }
+
private:
difference_type m_num;
EmplaceFunctor * m_pe;
@@ -612,21 +619,44 @@ struct emplace_functor
{}
template<class Allocator, class T>
- void operator()(Allocator &a, T *ptr)
+ BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)
{ emplace_functor::inplace_impl(a, ptr, index_tuple_t()); }
- template<class Allocator, class T, int ...IdxPack>
+ template<class DestIt>
+ BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)
+ { emplace_functor::inplace_impl(dest, index_tuple_t()); }
+
+ private:
+ template<class Allocator, class T, std::size_t ...IdxPack>
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const container_detail::index_tuple<IdxPack...>&)
{
allocator_traits<Allocator>::construct
(a, ptr, ::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
}
+ template<class DestIt, std::size_t ...IdxPack>
+ BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const container_detail::index_tuple<IdxPack...>&)
+ {
+ typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;
+ value_type && tmp= value_type(::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
+ *dest = ::boost::move(tmp);
+ }
+
container_detail::tuple<Args&...> args_;
};
+template<class ...Args>
+struct emplace_functor_type
+{
+ typedef emplace_functor<Args...> type;
+};
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+//Partial specializations cannot match argument list for primary template, so add an extra argument
+template <BOOST_MOVE_CLASSDFLT9, class Dummy = void>
+struct emplace_functor_type;
+
#define BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
struct emplace_functor##N\
@@ -638,10 +668,26 @@ struct emplace_functor##N\
void operator()(Allocator &a, T *ptr)\
{ allocator_traits<Allocator>::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\
\
+ template<class DestIt>\
+ void operator()(DestIt dest)\
+ {\
+ typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;\
+ BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), container_detail::value_init<value_type> tmp) ;\
+ *dest = ::boost::move(const_cast<value_type &>(BOOST_MOVE_IF(N, tmp, tmp.get())));\
+ }\
+ \
BOOST_MOVE_MREF##N\
};\
+\
+template <BOOST_MOVE_CLASS##N>\
+struct emplace_functor_type<BOOST_MOVE_TARG##N>\
+{\
+ typedef emplace_functor##N BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N type;\
+};\
//
+
BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE)
+
#undef BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE
#endif
diff --git a/boost/container/detail/mpl.hpp b/boost/container/detail/mpl.hpp
index e1684ea0b1..82fcc7036d 100644
--- a/boost/container/detail/mpl.hpp
+++ b/boost/container/detail/mpl.hpp
@@ -62,19 +62,18 @@ using boost::move_detail::disable_if_and;
using boost::move_detail::enable_if_or;
using boost::move_detail::disable_if_or;
-
-template <class Pair>
+template <class FirstType>
struct select1st
{
- typedef Pair argument_type;
- typedef typename Pair::first_type result_type;
+ typedef FirstType type;
- template<class OtherPair>
- const typename Pair::first_type& operator()(const OtherPair& x) const
+ template<class T>
+ const type& operator()(const T& x) const
{ return x.first; }
- const typename Pair::first_type& operator()(const typename Pair::first_type& x) const
- { return x; }
+ template<class T>
+ type& operator()(T& x)
+ { return const_cast<type&>(x.first); }
};
} //namespace container_detail {
diff --git a/boost/container/detail/node_alloc_holder.hpp b/boost/container/detail/node_alloc_holder.hpp
index 1b7c4d76dc..7ef5d2883e 100644
--- a/boost/container/detail/node_alloc_holder.hpp
+++ b/boost/container/detail/node_alloc_holder.hpp
@@ -394,12 +394,6 @@ struct node_alloc_holder
ICont &non_const_icont() const
{ return const_cast<ICont&>(this->members_.m_icont); }
- ICont &icont()
- { return this->members_.m_icont; }
-
- const ICont &icont() const
- { return this->members_.m_icont; }
-
NodeAlloc &node_alloc()
{ return static_cast<NodeAlloc &>(this->members_); }
@@ -407,6 +401,13 @@ struct node_alloc_holder
{ return static_cast<const NodeAlloc &>(this->members_); }
members_holder members_;
+
+ public:
+ ICont &icont()
+ { return this->members_.m_icont; }
+
+ const ICont &icont() const
+ { return this->members_.m_icont; }
};
} //namespace container_detail {
diff --git a/boost/container/detail/pair.hpp b/boost/container/detail/pair.hpp
index 134760e1e6..096f79561e 100644
--- a/boost/container/detail/pair.hpp
+++ b/boost/container/detail/pair.hpp
@@ -28,13 +28,62 @@
#include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/std_fwd.hpp>
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+# include <boost/container/detail/variadic_templates_tools.hpp>
+#endif
#include <boost/move/adl_move_swap.hpp> //swap
#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
#include <boost/move/utility_core.hpp>
+#include<boost/move/detail/fwd_macros.hpp>
+
+namespace boost {
+namespace tuples {
+
+struct null_type;
+
+} //namespace tuples {
+} //namespace boost {
+
+#if defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+//MSVC 2010 tuple marker
+namespace std { namespace tr1 { struct _Nil; }}
+#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+//MSVC 2012 tuple marker
+namespace std { struct _Nil; }
+#endif
+
namespace boost {
namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ template <int Dummy = 0>
+ struct std_piecewise_construct_holder
+ {
+ static ::std::piecewise_construct_t *dummy;
+ };
+
+ template <int Dummy>
+ ::std::piecewise_construct_t *std_piecewise_construct_holder<Dummy>::dummy;
+
+typedef const std::piecewise_construct_t & piecewise_construct_t;
+
+struct try_emplace_t{};
+
+#else
+
+//! The piecewise_construct_t struct is an empty structure type used as a unique type to
+//! disambiguate used to disambiguate between different functions that take two tuple arguments.
+typedef unspecified piecewise_construct_t;
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A instance of type
+//! piecewise_construct_t
+static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspecified, *std_piecewise_construct_holder<>::dummy);
+
namespace container_detail {
template <class T1, class T2>
@@ -78,6 +127,9 @@ struct is_std_pair< std::pair<T1, T2> >
struct pair_nat;
+template<typename T, typename U, typename V>
+void get(T); //to enable ADL
+
template <class T1, class T2>
struct pair
{
@@ -147,11 +199,105 @@ struct pair
: first(::boost::move(p.first)), second(::boost::move(p.second))
{}
- //piecewise_construct missing
- //template <class U, class V> pair(pair<U, V>&& p);
- //template <class... Args1, class... Args2>
- // pair(piecewise_construct_t, tuple<Args1...> first_args,
- // tuple<Args2...> second_args);
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< class KeyType, class ...Args>
+ pair(try_emplace_t, BOOST_FWD_REF(KeyType) k, Args && ...args)
+ : first(boost::forward<KeyType>(k)), second(::boost::forward<Args>(args)...)\
+ {}
+ #else
+
+ //piecewise construction from boost::tuple
+ #define BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE(N)\
+ template< class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N > \
+ pair( try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\
+ : first(boost::forward<KeyType>(k)), second(BOOST_MOVE_FWD##N)\
+ {}\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE)
+ #undef BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE
+
+ #endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+ //piecewise construction from boost::tuple
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\
+ template< template<class, class, class, class, class, class, class, class, class, class> class BoostTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
+ , BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q)\
+ : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\
+ { (void)p; (void)q; }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE
+
+ //piecewise construction from variadic tuple (with delegating constructors)
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ # if !defined(BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS)
+ private:
+ template<template<class ...> class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2>
+ pair(Tuple<Args1...>& t1, Tuple<Args2...>& t2, index_tuple<Indexes1...>, index_tuple<Indexes2...>)
+ : first (::boost::forward<Args1>(get<Indexes1>(t1))...)
+ , second(::boost::forward<Args2>(get<Indexes2>(t2))...)
+ { (void) t1; (void)t2; }
+
+ public:
+ template<template<class ...> class Tuple, class... Args1, class... Args2>
+ pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
+ : pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type())
+ {}
+ # else
+ //piecewise construction from variadic tuple (suboptimal, without delegating constructors)
+ private:
+ template<typename T, template<class ...> class Tuple, typename... Args>
+ static T build_from_args(Tuple<Args...>&& t)
+ { return do_build_from_args<T>(::boost::move(t), typename build_number_seq<sizeof...(Args)>::type()); }
+
+ template<typename T, template<class ...> class Tuple, typename... Args, std::size_t... Indexes>
+ static T do_build_from_args(Tuple<Args...> && t, const index_tuple<Indexes...>&)
+ { (void)t; return T(::boost::forward<Args>(get<Indexes>(t))...); }
+
+ public:
+ template<template<class ...> class Tuple, class... Args1, class... Args2>
+ pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
+ : first (build_from_args<first_type> (::boost::move(t1)))
+ , second (build_from_args<second_type>(::boost::move(t2)))
+ {}
+ # endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
+ //MSVC 2010 tuple implementation
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\
+ template< template<class, class, class, class, class, class, class, class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::std::tr1::_Nil)> p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
+ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
+ { (void)p; (void)q; }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540)
+ #if _VARIADIC_MAX >= 9
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9
+ #else
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1)
+ #endif
+
+ //MSVC 2012 tuple implementation
+ #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\
+ template< template<BOOST_MOVE_REPEAT(_VARIADIC_MAX, class), class, class, class> class StdTuple \
+ BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \
+ pair( piecewise_construct_t\
+ , StdTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),N),::std::_Nil) > p\
+ , StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
+ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
+ { (void)p; (void)q; }\
+ //
+ BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE
+ #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT
+ #endif
//pair copy assignment
pair& operator=(BOOST_COPY_ASSIGN_REF(pair) p)
@@ -283,6 +429,12 @@ struct is_enum< ::boost::container::container_detail::pair<T, U> >
static const bool value = false;
};
+template<class T, class U>
+struct is_enum< ::std::pair<T, U> >
+{
+ static const bool value = false;
+};
+
template <class T>
struct is_class;
@@ -325,8 +477,43 @@ struct is_class_or_union< std::pair<T1, T2> >
static const bool value = true;
};
+template<class T>
+struct is_union;
+
+template <class T1, class T2>
+struct is_union< ::boost::container::container_detail::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = false;
+};
+
+template <class T1, class T2>
+struct is_union< std::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = false;
+};
+template<class T>
+struct is_class;
+template <class T1, class T2>
+struct is_class< ::boost::container::container_detail::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+template <class T1, class T2>
+struct is_class< std::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
} //namespace move_detail{
diff --git a/boost/container/detail/tree.hpp b/boost/container/detail/tree.hpp
index 0fd6097650..853d0ad843 100644
--- a/boost/container/detail/tree.hpp
+++ b/boost/container/detail/tree.hpp
@@ -25,6 +25,7 @@
#include <boost/container/allocator_traits.hpp>
#include <boost/container/container_fwd.hpp>
#include <boost/container/options.hpp>
+#include <boost/container/node_handle.hpp>
// container/detail
#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
@@ -135,7 +136,7 @@ struct tree_node
typedef typename tree_internal_data_type<T>::type internal_type;
typedef tree_node< T, VoidPointer
- , tree_type_value, OptimizeSize> node_type;
+ , tree_type_value, OptimizeSize> node_t;
BOOST_CONTAINER_FORCEINLINE T &get_data()
{
@@ -199,11 +200,11 @@ class insert_equal_end_hint_functor
Icont &icont_;
public:
- insert_equal_end_hint_functor(Icont &icont)
+ BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont)
: icont_(icont)
{}
- void operator()(Node &n)
+ BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
{ this->icont_.insert_equal(this->icont_.cend(), n); }
};
@@ -213,11 +214,11 @@ class push_back_functor
Icont &icont_;
public:
- push_back_functor(Icont &icont)
+ BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont)
: icont_(icont)
{}
- void operator()(Node &n)
+ BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
{ this->icont_.push_back(n); }
};
@@ -294,18 +295,18 @@ struct intrusive_tree_type
allocator_traits<Allocator>::size_type size_type;
typedef typename container_detail::tree_node
< value_type, void_pointer
- , tree_type_value, OptimizeSize> node_type;
+ , tree_type_value, OptimizeSize> node_t;
typedef value_to_node_compare
- <node_type, ValueCompare> node_compare_type;
- //Deducing the hook type from node_type (e.g. node_type::hook_type) would
- //provoke an early instantiation of node_type that could ruin recursive
+ <node_t, ValueCompare> node_compare_type;
+ //Deducing the hook type from node_t (e.g. node_t::hook_type) would
+ //provoke an early instantiation of node_t that could ruin recursive
//tree definitions, so retype the complete type to avoid any problem.
typedef typename intrusive_tree_hook
<void_pointer, tree_type_value
, OptimizeSize>::type hook_type;
public:
typedef typename intrusive_tree_dispatch
- < node_type, node_compare_type
+ < node_t, node_compare_type
, size_type, hook_type
, tree_type_value>::type type;
};
@@ -328,14 +329,14 @@ template< boost::container::tree_type_enum tree_type_value
struct intrusive_tree_proxy
{
template<class Icont>
- static void rebalance(Icont &) {}
+ BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {}
};
template<boost::container::tree_type_enum tree_type_value>
struct intrusive_tree_proxy<tree_type_value, true>
{
template<class Icont>
- static void rebalance(Icont &c)
+ BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c)
{ c.rebalance(); }
};
@@ -351,7 +352,7 @@ template<class AllocHolder, bool DoMove>
class RecyclingCloner
{
typedef typename AllocHolder::intrusive_container intrusive_container;
- typedef typename AllocHolder::Node node_type;
+ typedef typename AllocHolder::Node node_t;
typedef typename AllocHolder::NodePtr node_ptr_type;
public:
@@ -359,13 +360,13 @@ class RecyclingCloner
: m_holder(holder), m_icont(itree)
{}
- static void do_assign(node_ptr_type &p, const node_type &other, bool_<true>)
- { p->do_move_assign(const_cast<node_type &>(other).m_data); }
+ BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<true>)
+ { p->do_move_assign(const_cast<node_t &>(other).m_data); }
- static void do_assign(node_ptr_type &p, const node_type &other, bool_<false>)
+ BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<false>)
{ p->do_assign(other.m_data); }
- node_ptr_type operator()(const node_type &other) const
+ node_ptr_type operator()(const node_t &other) const
{
if(node_ptr_type p = m_icont.unlink_leftmost_without_rebalance()){
//First recycle a node (this can't throw)
@@ -393,59 +394,63 @@ class RecyclingCloner
intrusive_container &m_icont;
};
-template<class KeyValueCompare, class Node>
-//where KeyValueCompare is tree_value_compare<Key, T, Compare, KeyOfValue>
+template<class KeyCompare, class KeyOfValue>
struct key_node_compare
- : private KeyValueCompare
+ : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
{
- explicit key_node_compare(const KeyValueCompare &comp)
- : KeyValueCompare(comp)
+ BOOST_CONTAINER_FORCEINLINE explicit key_node_compare(const KeyCompare &comp)
+ : base_t(comp)
{}
- template<class T>
- struct is_node
- {
- static const bool value = is_same<T, Node>::value;
- };
-
- template<class T>
- typename enable_if_c<is_node<T>::value, const typename KeyValueCompare::value_type &>::type
- key_forward(const T &node) const
- { return node.get_data(); }
-
- template<class T>
- #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
- const T &key_forward(const T &key, typename enable_if_c<!is_node<T>::value>::type* =0) const
- #else
- typename enable_if_c<!is_node<T>::value, const T &>::type key_forward(const T &key) const
- #endif
- { return key; }
-
- template<class KeyType, class KeyType2>
- bool operator()(const KeyType &key1, const KeyType2 &key2) const
- { return KeyValueCompare::operator()(this->key_forward(key1), this->key_forward(key2)); }
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+ BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const
+ { return static_cast<const key_compare &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE key_compare &key_comp()
+ { return static_cast<key_compare &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
+ { return this->key_comp()(key1, key_of_value()(nonkey2.get_data())); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
+ { return this->key_comp()(key_of_value()(nonkey1.get_data()), key2); }
+
+ template<class U, class V>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
+ { return this->key_comp()(key_of_value()(nonkey1.get_data()), key_of_value()(nonkey2.get_data())); }
};
-template <class Key, class T, class KeyOfValue,
+template <class T, class KeyOfValue,
class Compare, class Allocator,
class Options = tree_assoc_defaults>
class tree
- : protected container_detail::node_alloc_holder
+ : public container_detail::node_alloc_holder
< Allocator
, typename container_detail::intrusive_tree_type
- < Allocator, tree_value_compare<Key, T, Compare, KeyOfValue> //ValComp
+ < Allocator, tree_value_compare
+ <typename allocator_traits<Allocator>::pointer, Compare, KeyOfValue>
, Options::tree_type, Options::optimize_size>::type
>
{
typedef tree_value_compare
- <Key, T, Compare, KeyOfValue> ValComp;
+ < typename allocator_traits<Allocator>::pointer
+ , Compare, KeyOfValue> ValComp;
typedef typename container_detail::intrusive_tree_type
< Allocator, ValComp, Options::tree_type
, Options::optimize_size>::type Icont;
typedef container_detail::node_alloc_holder
<Allocator, Icont> AllocHolder;
typedef typename AllocHolder::NodePtr NodePtr;
- typedef tree < Key, T, KeyOfValue
+ typedef tree < T, KeyOfValue
, Compare, Allocator, Options> ThisType;
typedef typename AllocHolder::NodeAlloc NodeAlloc;
typedef boost::container::
@@ -462,7 +467,7 @@ class tree
public:
- typedef Key key_type;
+ typedef typename KeyOfValue::type key_type;
typedef T value_type;
typedef Allocator allocator_type;
typedef Compare key_compare;
@@ -479,32 +484,36 @@ class tree
allocator_traits<Allocator>::size_type size_type;
typedef typename boost::container::
allocator_traits<Allocator>::difference_type difference_type;
- typedef difference_type tree_difference_type;
- typedef pointer tree_pointer;
- typedef const_pointer tree_const_pointer;
- typedef reference tree_reference;
- typedef const_reference tree_const_reference;
+ typedef container_detail::iterator_from_iiterator
+ <iiterator, false> iterator;
+ typedef container_detail::iterator_from_iiterator
+ <iiterator, true > const_iterator;
+ typedef boost::container::reverse_iterator
+ <iterator> reverse_iterator;
+ typedef boost::container::reverse_iterator
+ <const_iterator> const_reverse_iterator;
+ typedef node_handle
+ < Node, value_type, allocator_type, void> node_type;
+ typedef insert_return_type_base
+ <iterator, node_type> insert_return_type;
+
typedef NodeAlloc stored_allocator_type;
private:
- typedef key_node_compare<value_compare, Node> KeyNodeCompare;
+ typedef key_node_compare<key_compare, KeyOfValue> KeyNodeCompare;
public:
- typedef container_detail::iterator_from_iiterator<iiterator, false> iterator;
- typedef container_detail::iterator_from_iiterator<iiterator, true > const_iterator;
- typedef boost::container::reverse_iterator<iterator> reverse_iterator;
- typedef boost::container::reverse_iterator<const_iterator> const_reverse_iterator;
- tree()
+ BOOST_CONTAINER_FORCEINLINE tree()
: AllocHolder()
{}
- explicit tree(const key_compare& comp, const allocator_type& a = allocator_type())
+ BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a = allocator_type())
: AllocHolder(ValComp(comp), a)
{}
- explicit tree(const allocator_type& a)
+ BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a)
: AllocHolder(a)
{}
@@ -604,18 +613,19 @@ class tree
, container_detail::push_back_functor<Node, Icont>(this->icont()));
}
- tree(const tree& x)
+ BOOST_CONTAINER_FORCEINLINE tree(const tree& x)
: AllocHolder(x.value_comp(), x)
{
this->icont().clone_from
(x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
}
- tree(BOOST_RV_REF(tree) x)
+ BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
{}
- tree(const tree& x, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a)
: AllocHolder(x.value_comp(), a)
{
this->icont().clone_from
@@ -634,7 +644,7 @@ class tree
}
}
- ~tree()
+ BOOST_CONTAINER_FORCEINLINE ~tree()
{} //AllocHolder clears the tree
tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x)
@@ -669,8 +679,9 @@ class tree
}
tree& operator=(BOOST_RV_REF(tree) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{
BOOST_ASSERT(this != &x);
NodeAlloc &this_alloc = this->node_alloc();
@@ -712,43 +723,43 @@ class tree
public:
// accessors:
- value_compare value_comp() const
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
{ return this->icont().value_comp().predicate(); }
- key_compare key_comp() const
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
{ return this->icont().value_comp().predicate().key_comp(); }
- allocator_type get_allocator() const
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
{ return allocator_type(this->node_alloc()); }
- const stored_allocator_type &get_stored_allocator() const
+ BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const
{ return this->node_alloc(); }
- stored_allocator_type &get_stored_allocator()
+ BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator()
{ return this->node_alloc(); }
- iterator begin()
+ BOOST_CONTAINER_FORCEINLINE iterator begin()
{ return iterator(this->icont().begin()); }
- const_iterator begin() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
{ return this->cbegin(); }
- iterator end()
+ BOOST_CONTAINER_FORCEINLINE iterator end()
{ return iterator(this->icont().end()); }
- const_iterator end() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const
{ return this->cend(); }
- reverse_iterator rbegin()
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
{ return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
{ return this->crbegin(); }
- reverse_iterator rend()
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
{ return reverse_iterator(begin()); }
- const_reverse_iterator rend() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
{ return this->crend(); }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
@@ -756,7 +767,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- const_iterator cbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
{ return const_iterator(this->non_const_icont().begin()); }
//! <b>Effects</b>: Returns a const_iterator to the end of the container.
@@ -764,7 +775,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- const_iterator cend() const
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
{ return const_iterator(this->non_const_icont().end()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
@@ -773,7 +784,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
{ return const_reverse_iterator(cend()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
@@ -782,19 +793,19 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
{ return const_reverse_iterator(cbegin()); }
- bool empty() const
+ BOOST_CONTAINER_FORCEINLINE bool empty() const
{ return !this->size(); }
- size_type size() const
+ BOOST_CONTAINER_FORCEINLINE size_type size() const
{ return this->icont().size(); }
- size_type max_size() const
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const
{ return AllocHolder::max_size(); }
- void swap(ThisType& x)
+ BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
{ AllocHolder::swap(x); }
@@ -808,7 +819,7 @@ class tree
(const key_type& key, insert_commit_data &data)
{
std::pair<iiterator, bool> ret =
- this->icont().insert_unique_check(key, KeyNodeCompare(value_comp()), data);
+ this->icont().insert_unique_check(key, KeyNodeCompare(key_comp()), data);
return std::pair<iterator, bool>(iterator(ret.first), ret.second);
}
@@ -817,19 +828,10 @@ class tree
{
BOOST_ASSERT((priv_is_linked)(hint));
std::pair<iiterator, bool> ret =
- this->icont().insert_unique_check(hint.get(), key, KeyNodeCompare(value_comp()), data);
+ this->icont().insert_unique_check(hint.get(), key, KeyNodeCompare(key_comp()), data);
return std::pair<iterator, bool>(iterator(ret.first), ret.second);
}
- iterator insert_unique_commit(const value_type& v, insert_commit_data &data)
- {
- NodePtr tmp = AllocHolder::create_node(v);
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_unique_commit(*tmp, data));
- destroy_deallocator.release();
- return ret;
- }
-
template<class MovableConvertible>
iterator insert_unique_commit
(BOOST_FWD_REF(MovableConvertible) v, insert_commit_data &data)
@@ -841,17 +843,6 @@ class tree
return ret;
}
- std::pair<iterator,bool> insert_unique(const value_type& v)
- {
- insert_commit_data data;
- std::pair<iterator,bool> ret =
- this->insert_unique_check(KeyOfValue()(v), data);
- if(ret.second){
- ret.first = this->insert_unique_commit(v, data);
- }
- return ret;
- }
-
template<class MovableConvertible>
std::pair<iterator,bool> insert_unique(BOOST_FWD_REF(MovableConvertible) v)
{
@@ -866,6 +857,17 @@ class tree
private:
+ template<class KeyConvertible, class M>
+ iiterator priv_insert_or_assign_commit
+ (BOOST_FWD_REF(KeyConvertible) key, BOOST_FWD_REF(M) obj, insert_commit_data &data)
+ {
+ NodePtr tmp = AllocHolder::create_node(boost::forward<KeyConvertible>(key), boost::forward<M>(obj));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iiterator ret(this->icont().insert_unique_commit(*tmp, data));
+ destroy_deallocator.release();
+ return ret;
+ }
+
bool priv_is_linked(const_iterator const position) const
{
iiterator const cur(position.get());
@@ -896,7 +898,7 @@ class tree
//No throw insertion part, release rollback
destroy_deallocator.release();
return std::pair<iterator,bool>
- ( iterator(iiterator(this->icont().insert_unique_commit(*p, data)))
+ ( iterator(this->icont().insert_unique_commit(*p, data))
, true );
}
@@ -911,7 +913,7 @@ class tree
Destroyer(this->node_alloc())(p);
return ret.first;
}
- return iterator(iiterator(this->icont().insert_unique_commit(*p, data)));
+ return iterator(this->icont().insert_unique_commit(*p, data));
}
public:
@@ -919,11 +921,11 @@ class tree
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
- std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
{ return this->emplace_unique_impl(AllocHolder::create_node(boost::forward<Args>(args)...)); }
template <class... Args>
- iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
{ return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(boost::forward<Args>(args)...)); }
template <class... Args>
@@ -947,6 +949,22 @@ class tree
return ret;
}
+ template <class KeyType, class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
+ (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
+ {
+ insert_commit_data data;
+ const key_type & k = key; //Support emulated rvalue references
+ std::pair<iiterator, bool> ret =
+ hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
+ if(ret.second){
+ ret.first = this->icont().insert_unique_commit
+ (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key), boost::forward<Args>(args)...), data);
+ }
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
+ }
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_TREE_EMPLACE_CODE(N) \
@@ -978,6 +996,22 @@ class tree
destroy_deallocator.release();\
return ret;\
}\
+ \
+ template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
+ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ insert_commit_data data;\
+ const key_type & k = key;\
+ std::pair<iiterator, bool> ret =\
+ hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)\
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);\
+ if(ret.second){\
+ ret.first = this->icont().insert_unique_commit\
+ (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N), data);\
+ }\
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);\
+ }\
//
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_TREE_EMPLACE_CODE)
#undef BOOST_CONTAINER_TREE_EMPLACE_CODE
@@ -1044,27 +1078,21 @@ class tree
this->insert_equal(*first);
}
- template<class KeyConvertible>
- iterator insert_from_key(BOOST_FWD_REF(KeyConvertible) key)
+ template<class KeyType, class M>
+ std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
{
insert_commit_data data;
const key_type & k = key; //Support emulated rvalue references
std::pair<iiterator, bool> ret =
- this->icont().insert_unique_check(k, KeyNodeCompare(value_comp()), data);
- return ret.second
- ? this->insert_unique_key_commit(boost::forward<KeyConvertible>(key), data)
- : iterator(ret.first);
- }
-
- template<class KeyConvertible>
- iterator insert_unique_key_commit
- (BOOST_FWD_REF(KeyConvertible) key, insert_commit_data &data)
- {
- NodePtr tmp = AllocHolder::create_node_from_key(boost::forward<KeyConvertible>(key));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_unique_commit(*tmp, data));
- destroy_deallocator.release();
- return ret;
+ hint == const_iterator() ? this->icont().insert_unique_check(k, KeyNodeCompare(key_comp()), data)
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
+ if(ret.second){
+ ret.first = this->priv_insert_or_assign_commit(boost::forward<KeyType>(key), boost::forward<M>(obj), data);
+ }
+ else{
+ ret.first->get_data().second = boost::forward<M>(obj);
+ }
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
}
iterator erase(const_iterator position)
@@ -1073,8 +1101,8 @@ class tree
return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc())));
}
- size_type erase(const key_type& k)
- { return AllocHolder::erase_key(k, KeyNodeCompare(value_comp()), alloc_version()); }
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k)
+ { return AllocHolder::erase_key(k, KeyNodeCompare(key_comp()), alloc_version()); }
iterator erase(const_iterator first, const_iterator last)
{
@@ -1083,43 +1111,117 @@ class tree
return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version()));
}
- void clear()
+ node_type extract(const key_type& k)
+ {
+ iterator const it = this->find(k);
+ if(this->end() != it){
+ return this->extract(it);
+ }
+ return node_type();
+ }
+
+ node_type extract(const_iterator position)
+ {
+ BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position));
+ iiterator const iit(position.get());
+ this->icont().erase(iit);
+ return node_type(iit.operator->(), this->node_alloc());
+ }
+
+ insert_return_type insert_unique_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ return this->insert_unique_node(this->end(), boost::move(nh));
+ }
+
+ insert_return_type insert_unique_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ insert_return_type irt; //inserted == false, node.empty()
+ if(!nh.empty()){
+ insert_commit_data data;
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(hint, KeyOfValue()(nh.value()), data);
+ if(ret.second){
+ irt.inserted = true;
+ irt.position = iterator(this->icont().insert_unique_commit(*nh.get_node_pointer(), data));
+ nh.release();
+ }
+ else{
+ irt.position = ret.first;
+ irt.node = boost::move(nh);
+ }
+ }
+ else{
+ irt.position = this->end();
+ }
+ return BOOST_MOVE_RET(insert_return_type, irt);
+ }
+
+ iterator insert_equal_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ if(nh.empty()){
+ return this->end();
+ }
+ else{
+ NodePtr const p(nh.release());
+ return iterator(this->icont().insert_equal(*p));
+ }
+ }
+
+ iterator insert_equal_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ if(nh.empty()){
+ return this->end();
+ }
+ else{
+ NodePtr const p(nh.release());
+ return iterator(this->icont().insert_equal(hint.get(), *p));
+ }
+ }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(tree<T, KeyOfValue, C2, Allocator, Options>& source)
+ { return this->icont().merge_unique(source.icont()); }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_equal(tree<T, KeyOfValue, C2, Allocator, Options>& source)
+ { return this->icont().merge_equal(source.icont()); }
+ BOOST_CONTAINER_FORCEINLINE void clear()
{ AllocHolder::clear(alloc_version()); }
// search operations. Const and non-const overloads even if no iterator is returned
// so splay implementations can to their rebalancing when searching in non-const versions
- iterator find(const key_type& k)
- { return iterator(this->icont().find(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& k)
+ { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
- const_iterator find(const key_type& k) const
- { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
+ { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
- size_type count(const key_type& k) const
- { return size_type(this->icont().count(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
+ { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
- iterator lower_bound(const key_type& k)
- { return iterator(this->icont().lower_bound(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
+ { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
- const_iterator lower_bound(const key_type& k) const
- { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
+ { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
- iterator upper_bound(const key_type& k)
- { return iterator(this->icont().upper_bound(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
+ { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
- const_iterator upper_bound(const key_type& k) const
- { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(value_comp()))); }
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
+ { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
std::pair<iterator,iterator> equal_range(const key_type& k)
{
std::pair<iiterator, iiterator> ret =
- this->icont().equal_range(k, KeyNodeCompare(value_comp()));
+ this->icont().equal_range(k, KeyNodeCompare(key_comp()));
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
}
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
{
std::pair<iiterator, iiterator> ret =
- this->non_const_icont().equal_range(k, KeyNodeCompare(value_comp()));
+ this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
return std::pair<const_iterator,const_iterator>
(const_iterator(ret.first), const_iterator(ret.second));
}
@@ -1127,40 +1229,40 @@ class tree
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
{
std::pair<iiterator, iiterator> ret =
- this->icont().lower_bound_range(k, KeyNodeCompare(value_comp()));
+ this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
}
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
{
std::pair<iiterator, iiterator> ret =
- this->non_const_icont().lower_bound_range(k, KeyNodeCompare(value_comp()));
+ this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
return std::pair<const_iterator,const_iterator>
(const_iterator(ret.first), const_iterator(ret.second));
}
- void rebalance()
+ BOOST_CONTAINER_FORCEINLINE void rebalance()
{ intrusive_tree_proxy_t::rebalance(this->icont()); }
- friend bool operator==(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const tree& x, const tree& y)
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
- friend bool operator<(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const tree& x, const tree& y)
{ return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
- friend bool operator!=(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const tree& x, const tree& y)
{ return !(x == y); }
- friend bool operator>(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const tree& x, const tree& y)
{ return y < x; }
- friend bool operator<=(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const tree& x, const tree& y)
{ return !(y < x); }
- friend bool operator>=(const tree& x, const tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const tree& x, const tree& y)
{ return !(x < y); }
- friend void swap(tree& x, tree& y)
+ BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y)
{ x.swap(y); }
};
@@ -1172,11 +1274,11 @@ struct has_trivial_destructor_after_move;
//!has_trivial_destructor_after_move<> == true_type
//!specialization for optimizations
-template <class Key, class T, class KeyOfValue, class Compare, class Allocator, class Options>
+template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
struct has_trivial_destructor_after_move
<
::boost::container::container_detail::tree
- <Key, T, KeyOfValue, Compare, Allocator, Options>
+ <T, KeyOfValue, Compare, Allocator, Options>
>
{
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
diff --git a/boost/container/detail/value_init.hpp b/boost/container/detail/value_init.hpp
index eb4c976d92..faba70ee14 100644
--- a/boost/container/detail/value_init.hpp
+++ b/boost/container/detail/value_init.hpp
@@ -37,6 +37,8 @@ struct value_init
operator T &() { return m_t; }
+ T &get() { return m_t; }
+
T m_t;
};
diff --git a/boost/container/detail/variadic_templates_tools.hpp b/boost/container/detail/variadic_templates_tools.hpp
index d8c8443038..f5101c577c 100644
--- a/boost/container/detail/variadic_templates_tools.hpp
+++ b/boost/container/detail/variadic_templates_tools.hpp
@@ -21,6 +21,7 @@
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/container/detail/type_traits.hpp>
#include <cstddef> //std::size_t
@@ -42,13 +43,13 @@ class tuple<Head, Tail...>
typedef tuple<Tail...> inherited;
public:
- tuple() { }
+ tuple()
+ : inherited(), m_head()
+ {}
- // implicit copy-constructor is okay
- // Construct tuple from separate arguments.
- tuple(typename add_const_reference<Head>::type v,
- typename add_const_reference<Tail>::type... vtail)
- : inherited(vtail...), m_head(v)
+ template<class U, class ...Args>
+ tuple(U &&u, Args && ...args)
+ : inherited(::boost::forward<Args>(args)...), m_head(::boost::forward<U>(u))
{}
// Construct tuple from another tuple.
@@ -77,8 +78,8 @@ class tuple<Head, Tail...>
template<typename... Values>
-tuple<Values&&...> tie_forward(Values&&... values)
-{ return tuple<Values&&...>(values...); }
+tuple<Values&&...> forward_as_tuple(Values&&... values)
+{ return tuple<Values&&...>(::boost::forward<Values>(values)...); }
template<int I, typename Tuple>
struct tuple_element;
@@ -135,18 +136,18 @@ typename get_impl<I, tuple<Values...> >::const_type get(const tuple<Values...>&
// in a function call.
////////////////////////////////////////////////////
-template<int... Indexes>
+template<std::size_t ... Indexes>
struct index_tuple{};
template<std::size_t Num, typename Tuple = index_tuple<> >
struct build_number_seq;
-template<std::size_t Num, int... Indexes>
+template<std::size_t Num, std::size_t ... Indexes>
struct build_number_seq<Num, index_tuple<Indexes...> >
: build_number_seq<Num - 1, index_tuple<Indexes..., sizeof...(Indexes)> >
{};
-template<int... Indexes>
+template<std::size_t ... Indexes>
struct build_number_seq<0, index_tuple<Indexes...> >
{ typedef index_tuple<Indexes...> type; };
diff --git a/boost/container/detail/workaround.hpp b/boost/container/detail/workaround.hpp
index ae9151c32d..64ecd6fd6b 100644
--- a/boost/container/detail/workaround.hpp
+++ b/boost/container/detail/workaround.hpp
@@ -29,12 +29,30 @@
#define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
#endif
+#if defined(BOOST_GCC_VERSION)
+# if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#elif defined(BOOST_MSVC)
+# if _MSC_FULL_VER < 180020827
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#elif defined(BOOST_CLANG)
+# if !__has_feature(cxx_delegating_constructors)
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#endif
+
#if !defined(BOOST_FALLTHOUGH)
#define BOOST_CONTAINER_FALLTHOUGH
#else
#define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH;
#endif
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600))
+#define BOOST_CONTAINER_PAIR_TEST_HAS_HEADER_TUPLE
+#endif
+
//Macros for documentation purposes. For code, expands to the argument
#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE
#define BOOST_CONTAINER_SEEDOC(TYPE) TYPE
diff --git a/boost/container/flat_map.hpp b/boost/container/flat_map.hpp
index afd5a52d33..b842101feb 100644
--- a/boost/container/flat_map.hpp
+++ b/boost/container/flat_map.hpp
@@ -53,14 +53,17 @@ namespace container {
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class Key, class T, class Compare, class Allocator>
+class flat_multimap;
+
namespace container_detail{
template<class D, class S>
-static D &force(const S &s)
+BOOST_CONTAINER_FORCEINLINE static D &force(const S &s)
{ return *const_cast<D*>((reinterpret_cast<const D*>(&s))); }
template<class D, class S>
-static D force_copy(S s)
+BOOST_CONTAINER_FORCEINLINE static D force_copy(S s)
{
D *vp = reinterpret_cast<D *>(&s);
return D(*vp);
@@ -110,16 +113,16 @@ class flat_map
private:
BOOST_COPYABLE_AND_MOVABLE(flat_map)
//This is the tree that we should store if pair was movable
- typedef container_detail::flat_tree<Key,
+ typedef container_detail::flat_tree<
std::pair<Key, T>,
- container_detail::select1st< std::pair<Key, T> >,
+ container_detail::select1st<Key>,
Compare,
Allocator> tree_t;
//This is the real tree stored here. It's based on a movable pair
- typedef container_detail::flat_tree<Key,
+ typedef container_detail::flat_tree<
container_detail::pair<Key, T>,
- container_detail::select1st<container_detail::pair<Key, T> >,
+ container_detail::select1st<Key>,
Compare,
typename allocator_traits<Allocator>::template portable_rebind_alloc
<container_detail::pair<Key, T> >::type> impl_tree_t;
@@ -131,7 +134,7 @@ class flat_map
typedef typename impl_tree_t::allocator_type impl_allocator_type;
typedef container_detail::flat_tree_value_compare
< Compare
- , container_detail::select1st< std::pair<Key, T> >
+ , container_detail::select1st<Key>
, std::pair<Key, T> > value_compare_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<Allocator>::pointer>::iterator iterator_impl;
@@ -143,6 +146,13 @@ class flat_map
<typename allocator_traits<Allocator>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
public:
typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
+
+ impl_tree_t &tree()
+ { return m_flat_tree; }
+
+ const impl_tree_t &tree() const
+ { return m_flat_tree; }
+
private:
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -183,10 +193,11 @@ class flat_map
//! <b>Effects</b>: Default constructs an empty flat_map.
//!
//! <b>Complexity</b>: Constant.
- flat_map()
+ flat_map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: m_flat_tree()
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -197,7 +208,7 @@ class flat_map
explicit flat_map(const Compare& comp, const allocator_type& a = allocator_type())
: m_flat_tree(comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -207,7 +218,7 @@ class flat_map
explicit flat_map(const allocator_type& a)
: m_flat_tree(container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -221,7 +232,7 @@ class flat_map
const allocator_type& a = allocator_type())
: m_flat_tree(true, first, last, comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -234,7 +245,7 @@ class flat_map
flat_map(InputIterator first, InputIterator last, const allocator_type& a)
: m_flat_tree(true, first, last, Compare(), container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -251,9 +262,9 @@ class flat_map
template <class InputIterator>
flat_map( ordered_unique_range_t, InputIterator first, InputIterator last
, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
- : m_flat_tree(ordered_range, first, last, comp, a)
+ : m_flat_tree(ordered_unique_range, first, last, comp, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -267,7 +278,7 @@ class flat_map
const allocator_type& a = allocator_type())
: m_flat_tree(true, il.begin(), il.end(), comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -279,7 +290,7 @@ class flat_map
flat_map(std::initializer_list<value_type> il, const allocator_type& a)
: m_flat_tree(true, il.begin(), il.end(), Compare(), container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -295,9 +306,9 @@ class flat_map
//! <b>Note</b>: Non-standard extension.
flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
- : m_flat_tree(ordered_range, il.begin(), il.end(), comp, a)
+ : m_flat_tree(ordered_unique_range, il.begin(), il.end(), comp, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
#endif
@@ -308,7 +319,7 @@ class flat_map
flat_map(const flat_map& x)
: m_flat_tree(x.m_flat_tree)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -319,9 +330,10 @@ class flat_map
//!
//! <b>Postcondition</b>: x is emptied.
flat_map(BOOST_RV_REF(flat_map) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: m_flat_tree(boost::move(x.m_flat_tree))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -331,7 +343,7 @@ class flat_map
flat_map(const flat_map& x, const allocator_type &a)
: m_flat_tree(x.m_flat_tree, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -342,7 +354,7 @@ class flat_map
flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a)
: m_flat_tree(boost::move(x.m_flat_tree), a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -362,8 +374,9 @@ class flat_map
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
flat_map& operator=(BOOST_RV_REF(flat_map) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -601,6 +614,96 @@ class flat_map
BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
#endif
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( impl_const_iterator(), k, ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( impl_const_iterator(), ::boost::move(k), ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( container_detail::force_copy<impl_const_iterator>(hint)
+ , k, ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( container_detail::force_copy<impl_const_iterator>(hint)
+ , ::boost::move(k), ::boost::forward<M>(obj))
+ );
+ }
+
//! @copydoc ::boost::container::flat_set::nth(size_type)
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{ return container_detail::force_copy<iterator>(m_flat_tree.nth(n)); }
@@ -689,6 +792,79 @@ class flat_map
, boost::forward<Args>(args)...));
}
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >(
+ m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward<Args>(args)...));
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
+ {
+ return container_detail::force_copy<iterator>(m_flat_tree.try_emplace
+ (container_detail::force_copy<impl_const_iterator>(hint), k, boost::forward<Args>(args)...).first);
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ {
+ return container_detail::force_copy< std::pair<iterator, bool> >
+ (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward<Args>(args)...));
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ {
+ return container_detail::force_copy<iterator>
+ (m_flat_tree.try_emplace(container_detail::force_copy
+ <impl_const_iterator>(hint), boost::move(k), boost::forward<Args>(args)...).first);
+ }
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \
@@ -705,6 +881,29 @@ class flat_map
return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique\
(container_detail::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
}\
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return container_detail::force_copy< std::pair<iterator, bool> >\
+ (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return container_detail::force_copy<iterator>(m_flat_tree.try_emplace\
+ (container_detail::force_copy<impl_const_iterator>(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return container_detail::force_copy< std::pair<iterator, bool> >\
+ (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return container_detail::force_copy<iterator>(m_flat_tree.try_emplace\
+ (container_detail::force_copy<impl_const_iterator>(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
//
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE)
#undef BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE
@@ -867,6 +1066,39 @@ class flat_map
{ m_flat_tree.insert_unique(ordered_unique_range, il.begin(), il.end()); }
#endif
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
+ //! the comparison object of *this. If there is an element in a with key equivalent to the
+ //! key of an element from source, then that element is not extracted from source.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, Allocator>& source)
+ { m_flat_tree.merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_map<Key, T, C2, Allocator>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, Allocator>& source)
+ { m_flat_tree.merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, Allocator>&>(source)); }
+
//! <b>Effects</b>: Erases the element pointed to by p.
//!
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
@@ -1137,15 +1369,15 @@ class flat_multimap
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(flat_multimap)
- typedef container_detail::flat_tree<Key,
+ typedef container_detail::flat_tree<
std::pair<Key, T>,
- container_detail::select1st< std::pair<Key, T> >,
+ container_detail::select1st<Key>,
Compare,
Allocator> tree_t;
//This is the real tree stored here. It's based on a movable pair
- typedef container_detail::flat_tree<Key,
+ typedef container_detail::flat_tree<
container_detail::pair<Key, T>,
- container_detail::select1st<container_detail::pair<Key, T> >,
+ container_detail::select1st<Key>,
Compare,
typename allocator_traits<Allocator>::template portable_rebind_alloc
<container_detail::pair<Key, T> >::type> impl_tree_t;
@@ -1157,7 +1389,7 @@ class flat_multimap
typedef typename impl_tree_t::allocator_type impl_allocator_type;
typedef container_detail::flat_tree_value_compare
< Compare
- , container_detail::select1st< std::pair<Key, T> >
+ , container_detail::select1st<Key>
, std::pair<Key, T> > value_compare_impl;
typedef typename container_detail::get_flat_tree_iterators
<typename allocator_traits<Allocator>::pointer>::iterator iterator_impl;
@@ -1169,6 +1401,13 @@ class flat_multimap
<typename allocator_traits<Allocator>::pointer>::const_reverse_iterator const_reverse_iterator_impl;
public:
typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
+
+ impl_tree_t &tree()
+ { return m_flat_tree; }
+
+ const impl_tree_t &tree() const
+ { return m_flat_tree; }
+
private:
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -1208,10 +1447,11 @@ class flat_multimap
//! <b>Effects</b>: Default constructs an empty flat_map.
//!
//! <b>Complexity</b>: Constant.
- flat_multimap()
+ flat_multimap() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: m_flat_tree()
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1223,7 +1463,7 @@ class flat_multimap
const allocator_type& a = allocator_type())
: m_flat_tree(comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1233,7 +1473,7 @@ class flat_multimap
explicit flat_multimap(const allocator_type& a)
: m_flat_tree(container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1248,7 +1488,7 @@ class flat_multimap
const allocator_type& a = allocator_type())
: m_flat_tree(false, first, last, comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1261,7 +1501,7 @@ class flat_multimap
flat_multimap(InputIterator first, InputIterator last, const allocator_type& a)
: m_flat_tree(false, first, last, Compare(), container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1280,7 +1520,7 @@ class flat_multimap
const allocator_type& a = allocator_type())
: m_flat_tree(ordered_range, first, last, comp, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1293,7 +1533,7 @@ class flat_multimap
flat_multimap(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: m_flat_tree(false, il.begin(), il.end(), comp, container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1305,7 +1545,7 @@ class flat_multimap
flat_multimap(std::initializer_list<value_type> il, const allocator_type& a)
: m_flat_tree(false, il.begin(), il.end(), Compare(), container_detail::force<impl_allocator_type>(a))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1322,7 +1562,7 @@ class flat_multimap
const allocator_type& a = allocator_type())
: m_flat_tree(ordered_range, il.begin(), il.end(), comp, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
#endif
@@ -1333,7 +1573,7 @@ class flat_multimap
flat_multimap(const flat_multimap& x)
: m_flat_tree(x.m_flat_tree)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1343,9 +1583,10 @@ class flat_multimap
//!
//! <b>Postcondition</b>: x is emptied.
flat_multimap(BOOST_RV_REF(flat_multimap) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: m_flat_tree(boost::move(x.m_flat_tree))
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1355,7 +1596,7 @@ class flat_multimap
flat_multimap(const flat_multimap& x, const allocator_type &a)
: m_flat_tree(x.m_flat_tree, a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1366,7 +1607,7 @@ class flat_multimap
flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a)
: m_flat_tree(boost::move(x.m_flat_tree), a)
{
- //A type must be std::pair<Key, T>
+ //value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<Key, T>, typename Allocator::value_type>::value));
}
@@ -1380,8 +1621,9 @@ class flat_multimap
//!
//! <b>Complexity</b>: Constant.
flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ m_flat_tree = boost::move(x.m_flat_tree); return *this; }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -1801,6 +2043,38 @@ class flat_multimap
{ m_flat_tree.insert_equal(ordered_range, il.begin(), il.end()); }
#endif
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Extracts each element in source and insert it into a using
+ //! the comparison object of *this.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ void merge(flat_multimap<Key, T, C2, Allocator>& source)
+ { m_flat_tree.merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
+ template<class C2>
+ void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, Allocator>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
+ template<class C2>
+ void merge(flat_map<Key, T, C2, Allocator>& source)
+ { m_flat_tree.merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
+ template<class C2>
+ void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_map<Key, T, C2, Allocator>&>(source)); }
+
//! <b>Effects</b>: Erases the element pointed to by p.
//!
//! <b>Returns</b>: Returns an iterator pointing to the element immediately
diff --git a/boost/container/flat_set.hpp b/boost/container/flat_set.hpp
index a99e70786a..fa27006177 100644
--- a/boost/container/flat_set.hpp
+++ b/boost/container/flat_set.hpp
@@ -47,6 +47,11 @@
namespace boost {
namespace container {
+#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+template <class Key, class T, class Compare, class Allocator>
+class flat_multimap;
+#endif
+
//! flat_set is a Sorted Associative Container that stores objects of type Key.
//! It is also a Unique Associative Container, meaning that no two elements are the same.
//!
@@ -69,13 +74,21 @@ template <class Key, class Compare, class Allocator>
#endif
class flat_set
///@cond
- : public container_detail::flat_tree<Key, Key, container_detail::identity<Key>, Compare, Allocator>
+ : public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator>
///@endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(flat_set)
- typedef container_detail::flat_tree<Key, Key, container_detail::identity<Key>, Compare, Allocator> base_t;
+ typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator> base_t;
+
+ public:
+ base_t &tree()
+ { return *this; }
+
+ const base_t &tree() const
+ { return *this; }
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
@@ -112,7 +125,8 @@ class flat_set
//! <b>Effects</b>: Default constructs an empty container.
//!
//! <b>Complexity</b>: Constant.
- explicit flat_set()
+ explicit flat_set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{}
@@ -168,7 +182,7 @@ class flat_set
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last,
const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
- : base_t(ordered_range, first, last, comp, a)
+ : base_t(ordered_unique_range, first, last, comp, a)
{}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -203,7 +217,7 @@ class flat_set
//! <b>Note</b>: Non-standard extension.
flat_set(ordered_unique_range_t, std::initializer_list<value_type> il,
const Compare& comp = Compare(), const allocator_type& a = allocator_type())
- : base_t(ordered_range, il.begin(), il.end(), comp, a)
+ : base_t(ordered_unique_range, il.begin(), il.end(), comp, a)
{}
#endif
@@ -220,6 +234,7 @@ class flat_set
//!
//! <b>Postcondition</b>: x is emptied.
flat_set(BOOST_RV_REF(flat_set) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x))
{}
@@ -251,8 +266,9 @@ class flat_set
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
flat_set& operator=(BOOST_RV_REF(flat_set) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<flat_set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -602,6 +618,26 @@ class flat_set
{ this->base_t::insert_unique(ordered_unique_range, il.begin(), il.end()); }
#endif
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, Allocator>& source)
+ { this->base_t::merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_set<Key, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_set<Key, C2, Allocator>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_multimap<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, Allocator>& source)
+ { this->base_t::merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_multiset<Key, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multiset<Key, C2, Allocator>&>(source)); }
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Erases the element pointed to by p.
@@ -700,11 +736,10 @@ class flat_set
//! <b>Note</b>: Non-standard extension
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
- //! <b>Requires</b>: size() >= n.
+ //! <b>Requires</b>: begin() <= p <= end().
//!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
//!
//! <b>Throws</b>: Nothing.
//!
@@ -865,13 +900,20 @@ template <class Key, class Compare, class Allocator>
#endif
class flat_multiset
///@cond
- : public container_detail::flat_tree<Key, Key, container_detail::identity<Key>, Compare, Allocator>
+ : public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator>
///@endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(flat_multiset)
- typedef container_detail::flat_tree<Key, Key, container_detail::identity<Key>, Compare, Allocator> base_t;
+ typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator> base_t;
+
+ public:
+ base_t &tree()
+ { return *this; }
+
+ const base_t &tree() const
+ { return *this; }
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
@@ -899,7 +941,8 @@ class flat_multiset
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
//! @copydoc ::boost::container::flat_set::flat_set()
- explicit flat_multiset()
+ explicit flat_multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{}
@@ -956,8 +999,16 @@ class flat_multiset
: base_t(false, il.begin(), il.end(), Compare(), a)
{}
- //! @copydoc ::boost::container::flat_set::flat_set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare& comp, const allocator_type&)
- flat_multiset(ordered_unique_range_t, std::initializer_list<value_type> il,
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ flat_multiset(ordered_range_t, std::initializer_list<value_type> il,
const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a)
{}
@@ -970,6 +1021,7 @@ class flat_multiset
//! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
flat_multiset(BOOST_RV_REF(flat_multiset) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(boost::move(static_cast<base_t&>(x)))
{}
@@ -989,8 +1041,9 @@ class flat_multiset
//! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<flat_multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -1220,6 +1273,26 @@ class flat_multiset
{ this->base_t::insert_equal(ordered_range, il.begin(), il.end()); }
#endif
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, Allocator>& source)
+ { this->base_t::merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multiset::merge(flat_multiset<Key, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multiset<Key, C2, Allocator>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, Allocator>& source)
+ { this->base_t::merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multiset::merge(flat_set<Key, C2, Allocator>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, Allocator> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_set<Key, C2, Allocator>&>(source)); }
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! @copydoc ::boost::container::flat_set::erase(const_iterator)
diff --git a/boost/container/list.hpp b/boost/container/list.hpp
index 8236ff7939..f779cc4553 100644
--- a/boost/container/list.hpp
+++ b/boost/container/list.hpp
@@ -188,7 +188,7 @@ class list
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
- list()
+ list() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: AllocHolder()
{}
@@ -250,7 +250,7 @@ class list
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
- list(BOOST_RV_REF(list) x)
+ list(BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
{}
@@ -408,7 +408,7 @@ class list
return this->assign(cvalue_iterator(val, n), cvalue_iterator());
}
- //! <b>Effects</b>: Assigns the the range [first, last) to *this.
+ //! <b>Effects</b>: Assigns the range [first, last) to *this.
//!
//! <b>Throws</b>: If memory allocation throws or
//! T's constructor from dereferencing InpIt throws.
@@ -433,7 +433,7 @@ class list
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
+ //! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
//!
//! <b>Throws</b>: If memory allocation throws or
//! T's constructor from dereferencing std::initializer_list iterator throws.
@@ -709,24 +709,28 @@ class list
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the end of the list.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or
//! T's in-place constructor throws.
//!
//! <b>Complexity</b>: Constant
template <class... Args>
- void emplace_back(BOOST_FWD_REF(Args)... args)
- { this->emplace(this->cend(), boost::forward<Args>(args)...); }
+ reference emplace_back(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace(this->cend(), boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the beginning of the list.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or
//! T's in-place constructor throws.
//!
//! <b>Complexity</b>: Constant
template <class... Args>
- void emplace_front(BOOST_FWD_REF(Args)... args)
- { this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... before p.
@@ -747,12 +751,12 @@ class list
#define BOOST_CONTAINER_LIST_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- void emplace_back(BOOST_MOVE_UREF##N)\
- { this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ reference emplace_back(BOOST_MOVE_UREF##N)\
+ { return *this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- void emplace_front(BOOST_MOVE_UREF##N)\
- { this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
+ reference emplace_front(BOOST_MOVE_UREF##N)\
+ { return *this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
iterator emplace(const_iterator position BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
@@ -948,7 +952,7 @@ class list
//! <b>Requires</b>: p must be a valid iterator of *this.
//!
- //! <b>Effects</b>: Erases the element at p p.
+ //! <b>Effects</b>: Erases the element at p.
//!
//! <b>Throws</b>: Nothing.
//!
@@ -1045,7 +1049,7 @@ class list
//! this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//! If p == i or p == ++i, this function is a null operation.
//!
//! <b>Throws</b>: Nothing
@@ -1066,7 +1070,7 @@ class list
//! this' allocator and x's allocator shall compare equal.
//!
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//! If p == i or p == ++i, this function is a null operation.
//!
//! <b>Throws</b>: Nothing
@@ -1087,7 +1091,7 @@ class list
//! this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//!
//! <b>Throws</b>: Nothing
//!
@@ -1109,7 +1113,7 @@ class list
//! this' allocator and x's allocator shall compare equal.
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//!
//! <b>Throws</b>: Nothing
//!
@@ -1129,7 +1133,7 @@ class list
//! n == distance(first, last). this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//!
//! <b>Throws</b>: Nothing
//!
@@ -1150,7 +1154,7 @@ class list
//! n == distance(first, last). this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//!
//! <b>Throws</b>: Nothing
//!
diff --git a/boost/container/map.hpp b/boost/container/map.hpp
index 87cc183c8e..5520fb45ba 100644
--- a/boost/container/map.hpp
+++ b/boost/container/map.hpp
@@ -53,6 +53,34 @@
namespace boost {
namespace container {
+///@cond
+
+template<class Key, class Mapped>
+struct pair_key_mapped_of_value
+{
+ typedef Key key_type;
+ typedef Mapped mapped_type;
+
+ template<class Pair>
+ const key_type & key_of_value(const Pair &p) const
+ { return p.first; }
+
+ template<class Pair>
+ const mapped_type & mapped_of_value(const Pair &p) const
+ { return p.second; }
+
+ template<class Pair>
+ key_type & key_of_value(Pair &p) const
+ { return const_cast<key_type&>(p.first); }
+
+ template<class Pair>
+ mapped_type & mapped_of_value(Pair &p) const
+ { return p.second; }
+
+};
+
+///@endcond
+
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
//! A map is a kind of associative container that supports unique keys (contains at
@@ -68,31 +96,30 @@ namespace container {
//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
-//! \tparam MapOptions is an packed option type generated using using boost::container::tree_assoc_options.
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
template < class Key, class T, class Compare = std::less<Key>
- , class Allocator = new_allocator< std::pair< const Key, T> >, class MapOptions = tree_assoc_defaults >
+ , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults >
#else
-template <class Key, class T, class Compare, class Allocator, class MapOptions>
+template <class Key, class T, class Compare, class Allocator, class Options>
#endif
class map
///@cond
: public container_detail::tree
- < Key, std::pair<const Key, T>
- , container_detail::select1st< std::pair<const Key, T> >
- , Compare, Allocator, MapOptions>
+ < std::pair<const Key, T>
+ , container_detail::select1st<Key>
+ , Compare, Allocator, Options>
///@endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(map)
- typedef std::pair<const Key, T> value_type_impl;
+ typedef container_detail::select1st<Key> select_1st_t;
+ typedef std::pair<const Key, T> value_type_impl;
typedef container_detail::tree
- <Key, value_type_impl, container_detail::select1st<value_type_impl>, Compare, Allocator, MapOptions> base_t;
- typedef container_detail::pair <Key, T> movable_value_type_impl;
- typedef container_detail::tree_value_compare
- < Key, value_type_impl, Compare, container_detail::select1st<value_type_impl>
- > value_compare_impl;
+ <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
+ typedef container_detail::pair <Key, T> movable_value_type_impl;
+ typedef typename base_t::value_compare value_compare_impl;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
@@ -102,10 +129,10 @@ class map
//
//////////////////////////////////////////////
- typedef Key key_type;
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef T mapped_type;
- typedef std::pair<const Key, T> value_type;
+ typedef Key key_type;
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef T mapped_type;
+ typedef std::pair<const Key, T> value_type;
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
typedef typename boost::container::allocator_traits<Allocator>::reference reference;
@@ -122,6 +149,14 @@ class map
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
typedef std::pair<key_type, mapped_type> nonconst_value_type;
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(node_handle<
+ typename base_t::node_type::container_node_type
+ BOOST_MOVE_I value_type
+ BOOST_MOVE_I allocator_type
+ BOOST_MOVE_I pair_key_mapped_of_value
+ <key_type BOOST_MOVE_I mapped_type> >) node_type;
+ typedef BOOST_CONTAINER_IMPDEF
+ (insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
//////////////////////////////////////////////
//
@@ -132,7 +167,9 @@ class map
//! <b>Effects</b>: Default constructs an empty map.
//!
//! <b>Complexity</b>: Constant.
- map()
+ BOOST_CONTAINER_FORCEINLINE
+ map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{
//A type must be std::pair<CONST Key, T>
@@ -143,6 +180,7 @@ class map
//! and allocator.
//!
//! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
explicit map(const Compare& comp, const allocator_type& a = allocator_type())
: base_t(comp, a)
{
@@ -153,6 +191,7 @@ class map
//! <b>Effects</b>: Constructs an empty map using the specified allocator.
//!
//! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
explicit map(const allocator_type& a)
: base_t(a)
{
@@ -166,6 +205,7 @@ class map
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first.
template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
map(InputIterator first, InputIterator last, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(true, first, last, comp, a)
@@ -180,6 +220,7 @@ class map
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first.
template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
map(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(true, first, last, Compare(), a)
{
@@ -198,6 +239,7 @@ class map
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
map( ordered_unique_range_t, InputIterator first, InputIterator last
, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: base_t(ordered_range, first, last, comp, a)
@@ -212,6 +254,7 @@ class map
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE
map(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: base_t(true, il.begin(), il.end(), comp, a)
{
@@ -224,6 +267,7 @@ class map
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE
map(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(true, il.begin(), il.end(), Compare(), a)
{
@@ -241,6 +285,7 @@ class map
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a)
@@ -253,6 +298,7 @@ class map
//! <b>Effects</b>: Copy constructs a map.
//!
//! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
map(const map& x)
: base_t(static_cast<const base_t&>(x))
{
@@ -265,7 +311,9 @@ class map
//! <b>Complexity</b>: Constant.
//!
//! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE
map(BOOST_RV_REF(map) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x))
{
//A type must be std::pair<CONST Key, T>
@@ -275,6 +323,7 @@ class map
//! <b>Effects</b>: Copy constructs a map using the specified allocator.
//!
//! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
map(const map& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a)
{
@@ -288,6 +337,7 @@ class map
//! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise.
//!
//! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE
map(BOOST_RV_REF(map) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a)
{
@@ -298,6 +348,7 @@ class map
//! <b>Effects</b>: Makes *this a copy of x.
//!
//! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
{ return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
@@ -309,15 +360,17 @@ class map
//! <b>Complexity</b>: Constant if allocator_traits_type::
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE
map& operator=(BOOST_RV_REF(map) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
-
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Assign content of il to *this.
//!
+ BOOST_CONTAINER_FORCEINLINE
map& operator=(std::initializer_list<value_type> il)
{
this->clear();
@@ -466,32 +519,100 @@ class map
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! Effects: If there is no key equivalent to x in the map, inserts
+ //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
//! value_type(x, T()) into the map.
//!
- //! Returns: A reference to the mapped_type corresponding to x in *this.
+ //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
//!
- //! Complexity: Logarithmic.
+ //! <b>Complexity</b>: Logarithmic.
mapped_type& operator[](const key_type &k);
- //! Effects: If there is no key equivalent to x in the map, inserts
+ //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
//! value_type(boost::move(x), T()) into the map (the key is move-constructed)
//!
- //! Returns: A reference to the mapped_type corresponding to x in *this.
+ //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
//!
- //! Complexity: Logarithmic.
+ //! <b>Complexity</b>: Logarithmic.
mapped_type& operator[](key_type &&k);
#elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
//in compilers like GCC 3.4, we can't catch temporaries
- mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
- mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
#else
BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
#endif
- //! Returns: A reference to the element whose key is equivalent to x.
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(hint, k, ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward<M>(obj)); }
+
+ //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
//! Throws: An exception object of type out_of_range if no such element is present.
- //! Complexity: logarithmic.
+ //! <b>Complexity</b>: logarithmic.
T& at(const key_type& k)
{
iterator i = this->find(k);
@@ -501,9 +622,9 @@ class map
return i->second;
}
- //! Returns: A reference to the element whose key is equivalent to x.
+ //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
//! Throws: An exception object of type out_of_range if no such element is present.
- //! Complexity: logarithmic.
+ //! <b>Complexity</b>: logarithmic.
const T& at(const key_type& k) const
{
const_iterator i = this->find(k);
@@ -527,7 +648,7 @@ class map
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic.
- std::pair<iterator,bool> insert(const value_type& x)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
{ return this->base_t::insert_unique(x); }
//! <b>Effects</b>: Inserts a new value_type created from the pair if and only if
@@ -538,8 +659,8 @@ class map
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic.
- std::pair<iterator,bool> insert(const nonconst_value_type& x)
- { return this->base_t::insert_unique(x); }
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const nonconst_value_type& x)
+ { return this->try_emplace(x.first, x.second); }
//! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
//! only if there is no element in the container with key equivalent to the key of x.
@@ -549,8 +670,8 @@ class map
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic.
- std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::insert_unique(boost::move(x)); }
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
+ { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
//! only if there is no element in the container with key equivalent to the key of x.
@@ -560,8 +681,8 @@ class map
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic.
- std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::insert_unique(boost::move(x)); }
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
+ { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
//! no element in the container with key equivalent to the key of x.
@@ -571,7 +692,7 @@ class map
//! points to the element with key equivalent to the key of x.
//!
//! <b>Complexity</b>: Logarithmic.
- std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
{ return this->base_t::insert_unique(boost::move(x)); }
//! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
@@ -583,7 +704,7 @@ class map
//!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
- iterator insert(const_iterator p, const value_type& x)
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
{ return this->base_t::insert_unique(p, x); }
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
@@ -596,7 +717,7 @@ class map
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::insert_unique_convertible(p, boost::move(x)); }
+ { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
//! no element in the container with key equivalent to the key of x.
@@ -608,7 +729,7 @@ class map
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::insert_unique_convertible(p, boost::move(x)); }
+ { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
//! <b>Effects</b>: Inserts a copy of x in the container.
//! p is a hint pointing to where the insert should start to search.
@@ -617,7 +738,7 @@ class map
//!
//! <b>Complexity</b>: Logarithmic.
iterator insert(const_iterator p, const nonconst_value_type& x)
- { return this->base_t::insert_unique_convertible(p, x); }
+ { return this->try_emplace(p, x.first, x.second); }
//! <b>Effects</b>: Inserts an element move constructed from x in the container.
//! p is a hint pointing to where the insert should start to search.
@@ -635,7 +756,7 @@ class map
//!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
template <class InputIterator>
- void insert(InputIterator first, InputIterator last)
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
{ this->base_t::insert_unique(first, last); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -643,10 +764,42 @@ class map
//! if there is no element with key equivalent to the key of that element.
//!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
- void insert(std::initializer_list<value_type> il)
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
{ this->base_t::insert_unique(il.begin(), il.end()); }
#endif
+ //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
+ //!
+ //! <b>Effects</b>: If nh is empty, has no effect. Otherwise, inserts the element owned
+ //! by nh if and only if there is no element in the container with a key equivalent to nh.key().
+ //!
+ //! <b>Returns</b>: If nh is empty, insert_return_type.inserted is false, insert_return_type.position
+ //! is end(), and insert_return_type.node is empty. Otherwise if the insertion took place,
+ //! insert_return_type.inserted is true, insert_return_type.position points to the inserted element,
+ //! and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is
+ //! false, insert_return_type.node has the previous value of nh, and insert_return_type.position
+ //! points to an element with a key equivalent to nh.key().
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(boost::move(n)));
+ return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
+ }
+
+ //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
+ //! to the position just prior to "hint".
+ //!
+ //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
+ //! right before "hint".
+ insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(hint, boost::move(n)));
+ return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
+ }
+
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Inserts an object x of type T constructed with
@@ -661,7 +814,7 @@ class map
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
template <class... Args>
- std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type T constructed with
@@ -675,19 +828,95 @@ class map
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
template <class... Args>
- iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(const_iterator(), k, boost::forward<Args>(args)...); }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(hint, k, boost::forward<Args>(args)...).first; }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward<Args>(args)...); }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(hint, boost::move(k), boost::forward<Args>(args)...).first; }
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
//
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE)
#undef BOOST_CONTAINER_MAP_EMPLACE_CODE
@@ -719,6 +948,74 @@ class map
//! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW;
+ #endif
+
+ //! <b>Effects</b>: Removes the first element in the container with key equivalent to k.
+ //!
+ //! <b>Returns</b>: A node_type owning the element if found, otherwise an empty node_type.
+ //!
+ //! <b>Complexity</b>: log(a.size()).
+ node_type extract(const key_type& k)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(k));
+ node_type nh(boost::move(base_nh));
+ return BOOST_MOVE_RET(node_type, nh);
+ }
+
+ //! <b>Effects</b>: Removes the element pointed to by "position".
+ //!
+ //! <b>Returns</b>: A node_type owning the element, otherwise an empty node_type.
+ //!
+ //! <b>Complexity</b>: Amortized constant.
+ node_type extract(const_iterator position)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(position));
+ node_type nh(boost::move(base_nh));
+ return BOOST_MOVE_RET(node_type, nh);
+ }
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
+ //! the comparison object of *this. If there is an element in a with key equivalent to the
+ //! key of an element from source, then that element is not extracted from source.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Swaps the contents of *this and x.
//!
//! <b>Throws</b>: Nothing.
@@ -764,7 +1061,7 @@ class map
//! <b>Returns</b>: The number of elements with key equivalent to x.
//!
//! <b>Complexity</b>: log(size())+count(k)
- size_type count(const key_type& x) const
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
{ return static_cast<size_type>(this->find(x) != this->cend()); }
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
@@ -848,11 +1145,10 @@ class map
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
template<class KeyConvertible>
- mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k)
+ BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k)
{
- return this->insert_from_key(boost::forward<KeyConvertible>(k))->second;
+ return this->try_emplace(boost::forward<KeyConvertible>(k)).first->second;
}
-
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
};
@@ -892,34 +1188,33 @@ namespace container {
//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
-//! \tparam MultiMapOptions is an packed option type generated using using boost::container::tree_assoc_options.
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
template < class Key, class T, class Compare = std::less<Key>
- , class Allocator = new_allocator< std::pair< const Key, T> >, class MultiMapOptions = tree_assoc_defaults>
+ , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults>
#else
-template <class Key, class T, class Compare, class Allocator, class MultiMapOptions>
+template <class Key, class T, class Compare, class Allocator, class Options>
#endif
class multimap
///@cond
: public container_detail::tree
- < Key, std::pair<const Key, T>
- , container_detail::select1st< std::pair<const Key, T> >
- , Compare, Allocator, MultiMapOptions>
+ < std::pair<const Key, T>
+ , container_detail::select1st<Key>
+ , Compare, Allocator, Options>
///@endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(multimap)
- typedef std::pair<const Key, T> value_type_impl;
+ typedef container_detail::select1st<Key> select_1st_t;
+ typedef std::pair<const Key, T> value_type_impl;
typedef container_detail::tree
- <Key, value_type_impl, container_detail::select1st<value_type_impl>, Compare, Allocator, MultiMapOptions> base_t;
- typedef container_detail::pair <Key, T> movable_value_type_impl;
- typedef container_detail::tree_value_compare
- < Key, value_type_impl, Compare, container_detail::select1st<value_type_impl>
- > value_compare_impl;
+ <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
+ typedef container_detail::pair <Key, T> movable_value_type_impl;
+ typedef typename base_t::value_compare value_compare_impl;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
public:
//////////////////////////////////////////////
@@ -947,6 +1242,12 @@ class multimap
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
typedef std::pair<key_type, mapped_type> nonconst_value_type;
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(node_handle<
+ typename base_t::node_type::container_node_type
+ BOOST_MOVE_I value_type
+ BOOST_MOVE_I allocator_type
+ BOOST_MOVE_I pair_key_mapped_of_value
+ <key_type BOOST_MOVE_I mapped_type> >) node_type;
//////////////////////////////////////////////
//
@@ -957,7 +1258,9 @@ class multimap
//! <b>Effects</b>: Default constructs an empty multimap.
//!
//! <b>Complexity</b>: Constant.
- multimap()
+ BOOST_CONTAINER_FORCEINLINE
+ multimap() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{
//A type must be std::pair<CONST Key, T>
@@ -967,6 +1270,7 @@ class multimap
//! <b>Effects</b>: Constructs an empty multimap using the specified allocator.
//!
//! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
explicit multimap(const Compare& comp, const allocator_type& a = allocator_type())
: base_t(comp, a)
{
@@ -978,6 +1282,7 @@ class multimap
//! object and allocator.
//!
//! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
explicit multimap(const allocator_type& a)
: base_t(a)
{
@@ -991,6 +1296,7 @@ class multimap
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first.
template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
multimap(InputIterator first, InputIterator last,
const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
@@ -1006,7 +1312,7 @@ class multimap
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is last - first.
template <class InputIterator>
- multimap(InputIterator first, InputIterator last, const allocator_type& a)
+ BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a)
: base_t(false, first, last, Compare(), a)
{
//A type must be std::pair<CONST Key, T>
@@ -1023,7 +1329,7 @@ class multimap
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
- multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(),
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(ordered_range, first, last, comp, a)
{}
@@ -1034,6 +1340,7 @@ class multimap
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE
multimap(std::initializer_list<value_type> il, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(false, il.begin(), il.end(), comp, a)
@@ -1047,6 +1354,7 @@ class multimap
//!
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
//! comp and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE
multimap(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(false, il.begin(), il.end(), Compare(), a)
{
@@ -1063,6 +1371,7 @@ class multimap
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a)
@@ -1075,7 +1384,7 @@ class multimap
//! <b>Effects</b>: Copy constructs a multimap.
//!
//! <b>Complexity</b>: Linear in x.size().
- multimap(const multimap& x)
+ BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x)
: base_t(static_cast<const base_t&>(x))
{
//A type must be std::pair<CONST Key, T>
@@ -1087,7 +1396,8 @@ class multimap
//! <b>Complexity</b>: Constant.
//!
//! <b>Postcondition</b>: x is emptied.
- multimap(BOOST_RV_REF(multimap) x)
+ BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x))
{
//A type must be std::pair<CONST Key, T>
@@ -1097,7 +1407,7 @@ class multimap
//! <b>Effects</b>: Copy constructs a multimap.
//!
//! <b>Complexity</b>: Linear in x.size().
- multimap(const multimap& x, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a)
: base_t(static_cast<const base_t&>(x), a)
{
//A type must be std::pair<CONST Key, T>
@@ -1109,7 +1419,7 @@ class multimap
//! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
//!
//! <b>Postcondition</b>: x is emptied.
- multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
: base_t(BOOST_MOVE_BASE(base_t, x), a)
{
//A type must be std::pair<CONST Key, T>
@@ -1119,21 +1429,22 @@ class multimap
//! <b>Effects</b>: Makes *this a copy of x.
//!
//! <b>Complexity</b>: Linear in x.size().
- multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
{ return static_cast<multimap&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
//! <b>Effects</b>: this->swap(x.get()).
//!
//! <b>Complexity</b>: Constant.
- multimap& operator=(BOOST_RV_REF(multimap) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Assign content of il to *this.
//!
- multimap& operator=(std::initializer_list<value_type> il)
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list<value_type> il)
{
this->clear();
insert(il.begin(), il.end());
@@ -1211,7 +1522,7 @@ class multimap
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
template <class... Args>
- iterator emplace(BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type T constructed with
@@ -1224,18 +1535,18 @@ class multimap
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
template <class... Args>
- iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace(BOOST_MOVE_UREF##N)\
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{ return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
//
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE)
@@ -1247,29 +1558,29 @@ class multimap
//! newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic.
- iterator insert(const value_type& x)
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
{ return this->base_t::insert_equal(x); }
//! <b>Effects</b>: Inserts a new value constructed from x and returns
//! the iterator pointing to the newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic.
- iterator insert(const nonconst_value_type& x)
- { return this->base_t::insert_equal(x); }
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const nonconst_value_type& x)
+ { return this->base_t::emplace_equal(x); }
//! <b>Effects</b>: Inserts a new value move-constructed from x and returns
//! the iterator pointing to the newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic.
- iterator insert(BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::insert_equal(boost::move(x)); }
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(nonconst_value_type) x)
+ { return this->base_t::emplace_equal(boost::move(x)); }
//! <b>Effects</b>: Inserts a new value move-constructed from x and returns
//! the iterator pointing to the newly inserted element.
//!
//! <b>Complexity</b>: Logarithmic.
iterator insert(BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::insert_equal(boost::move(x)); }
+ { return this->base_t::emplace_equal(boost::move(x)); }
//! <b>Effects</b>: Inserts a copy of x in the container.
//! p is a hint pointing to where the insert should start to search.
@@ -1279,7 +1590,7 @@ class multimap
//!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
- iterator insert(const_iterator p, const value_type& x)
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
{ return this->base_t::insert_equal(p, x); }
//! <b>Effects</b>: Inserts a new value constructed from x in the container.
@@ -1290,8 +1601,8 @@ class multimap
//!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
- iterator insert(const_iterator p, const nonconst_value_type& x)
- { return this->base_t::insert_equal_convertible(p, x); }
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x)
+ { return this->base_t::emplace_hint_equal(p, x); }
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
//! p is a hint pointing to where the insert should start to search.
@@ -1301,8 +1612,8 @@ class multimap
//!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
- iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::insert_equal_convertible(p, boost::move(x)); }
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
+ { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
//! p is a hint pointing to where the insert should start to search.
@@ -1312,8 +1623,8 @@ class multimap
//!
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
//! is inserted right before p.
- iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::insert_equal_convertible(p, boost::move(x)); }
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
+ { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
//! <b>Requires</b>: first, last are not iterators into *this.
//!
@@ -1321,17 +1632,42 @@ class multimap
//!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
template <class InputIterator>
- void insert(InputIterator first, InputIterator last)
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
{ this->base_t::insert_equal(first, last); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end().
//!
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
- void insert(std::initializer_list<value_type> il)
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
{ this->base_t::insert_equal(il.begin(), il.end()); }
#endif
+ //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
+ //!
+ //! <b>Effects/Returns</b>: If nh is empty, has no effect and returns end(). Otherwise, inserts
+ //! the element owned by nh and returns an iterator pointing to the newly inserted element.
+ //! If a range containing elements with keys equivalent to nh.key() exists,
+ //! the element is inserted at the end of that range. nh is always emptied.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ return this->base_t::insert_equal_node(boost::move(n));
+ }
+
+ //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
+ //! to the position just prior to "hint".
+ //!
+ //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
+ //! right before "hint".
+ iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ return this->base_t::insert_equal_node(hint, boost::move(n));
+ }
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! @copydoc ::boost::container::set::erase(const_iterator)
@@ -1342,7 +1678,63 @@ class multimap
//! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
iterator erase(const_iterator first, const_iterator last);
+ #endif
+ //! @copydoc ::boost::container::map::extract(const key_type&)
+ node_type extract(const key_type& k)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(k));
+ return node_type(boost::move(base_nh));
+ }
+
+ //! @copydoc ::boost::container::map::extract(const_iterator)
+ node_type extract(const_iterator position)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(position));
+ return node_type (boost::move(base_nh));
+ }
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Extracts each element in source and insert it into a using
+ //! the comparison object of *this.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ void merge(multimap<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ void merge(map<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! @copydoc ::boost::container::set::swap
void swap(multiset& x)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
diff --git a/boost/container/new_allocator.hpp b/boost/container/new_allocator.hpp
index 6a1d8c76e3..9304a9cfa4 100644
--- a/boost/container/new_allocator.hpp
+++ b/boost/container/new_allocator.hpp
@@ -176,4 +176,4 @@ class new_allocator
#include <boost/container/detail/config_end.hpp>
-#endif //BOOST_CONTAINER_ALLOCATOR_HPP
+#endif //BOOST_CONTAINER_NEW_ALLOCATOR_HPP
diff --git a/boost/container/node_allocator.hpp b/boost/container/node_allocator.hpp
index d92577e741..7a6988c4b0 100644
--- a/boost/container/node_allocator.hpp
+++ b/boost/container/node_allocator.hpp
@@ -109,9 +109,6 @@ class node_allocator
template<class T2, std::size_t N2>
node_allocator& operator=
(const node_allocator<T2, N2>&);
-
- //!Not assignable from other node_allocator
- node_allocator& operator=(const node_allocator&);
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
diff --git a/boost/container/node_handle.hpp b/boost/container/node_handle.hpp
new file mode 100644
index 0000000000..300b4713ad
--- /dev/null
+++ b/boost/container/node_handle.hpp
@@ -0,0 +1,396 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2016-2016. Distributed under the 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/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_NODE_HANDLE_HPP
+#define BOOST_CONTAINER_NODE_HANDLE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/container/detail/placement_new.hpp>
+#include <boost/container/detail/to_raw_pointer.hpp>
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/detail/mpl.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+
+#include <boost/type_traits/aligned_storage.hpp>
+
+
+//!\file
+
+namespace boost {
+namespace container {
+
+///@cond
+
+template<class Value, class KeyMapped, bool keymapped_is_void = container_detail::is_same<KeyMapped, void>::value>
+struct node_handle_keymapped_traits
+{
+ typedef Value key_type;
+ typedef Value mapped_type;
+};
+
+template<class Value, class KeyMapped>
+struct node_handle_keymapped_traits<Value, KeyMapped, false>
+{
+ typedef typename KeyMapped::key_type key_type;
+ typedef typename KeyMapped::mapped_type mapped_type;
+};
+
+///@endcond
+
+//! A node_handle is an object that accepts ownership of a single element from an associative container.
+//! It may be used to transfer that ownership to another container with compatible nodes. Containers
+//! with compatible nodes have the same node handle type. Elements may be transferred in either direction
+//! between container types in the same row:.
+//!
+//! Container types with compatible nodes
+//!
+//! map<K, T, C1, A> <-> map<K, T, C2, A>
+//!
+//! map<K, T, C1, A> <-> multimap<K, T, C2, A>
+//!
+//! set<K, C1, A> <-> set<K, C2, A>
+//!
+//! set<K, C1, A> <-> multiset<K, C2, A>
+//!
+//! If a node handle is not empty, then it contains an allocator that is equal to the allocator of the container
+//! when the element was extracted. If a node handle is empty, it contains no allocator.
+template <class NodeType, class Value, class Allocator, class KeyMapped = void>
+class node_handle
+{
+ typedef node_handle_keymapped_traits<Value, KeyMapped> keymapped_t;
+
+ public:
+ typedef Value value_type;
+ typedef typename keymapped_t::key_type key_type;
+ typedef typename keymapped_t::mapped_type mapped_type;
+ typedef Allocator allocator_type;
+ typedef NodeType container_node_type;
+
+ ///@cond
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle)
+
+ typedef allocator_traits<allocator_type> ator_traits;
+ typedef typename ator_traits::template portable_rebind_alloc
+ <container_node_type>::type nallocator_type;
+ typedef allocator_traits<nallocator_type> node_ator_traits;
+ typedef typename node_ator_traits::pointer node_pointer;
+ typedef ::boost::aligned_storage
+ <sizeof(allocator_type), boost::alignment_of<nallocator_type>::value> nalloc_storage_t;
+
+ node_pointer m_ptr;
+ nalloc_storage_t m_nalloc_storage;
+
+ void move_construct_alloc(nallocator_type &al)
+ { ::new(m_nalloc_storage.address(), boost_container_new_t()) allocator_type(::boost::move(al)); }
+
+ void destroy_node()
+ {
+ node_ator_traits::destroy(this->node_alloc(), container_detail::to_raw_pointer(m_ptr));
+ node_ator_traits::deallocate(this->node_alloc(), m_ptr, 1u);
+ }
+
+ template<class OtherNodeHandle>
+ void move_construct_end(OtherNodeHandle &nh)
+ {
+ if(m_ptr){
+ ::new (m_nalloc_storage.address(), boost_container_new_t()) allocator_type(::boost::move(nh.node_alloc()));
+ nh.destroy_alloc();
+ nh.get_node_pointer() = node_pointer();
+ }
+ BOOST_ASSERT(nh.empty());
+ }
+
+ public:
+
+ void destroy_alloc()
+ { static_cast<allocator_type*>(m_nalloc_storage.address())->~allocator_type(); }
+
+ node_pointer &get_node_pointer()
+ { return m_ptr; }
+
+ nallocator_type &node_alloc()
+ { return *static_cast<nallocator_type*>(m_nalloc_storage.address()); }
+
+ node_pointer release()
+ {
+ node_pointer p(m_ptr);
+ m_ptr = node_pointer();
+ if(p)
+ this->destroy_alloc();
+ return p;
+ }
+
+ ///@endcond
+
+ public:
+ //! <b>Effects</b>: Initializes m_ptr to nullptr.
+ //!
+ //! <b>Postcondition</b>: this->empty()
+ BOOST_CXX14_CONSTEXPR node_handle() BOOST_NOEXCEPT
+ : m_ptr(), m_nalloc_storage()
+ { BOOST_ASSERT(this->empty()); }
+
+ //! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with p.
+ //! If p != nullptr copy constructs internal allocator al.
+ node_handle(node_pointer p, const nallocator_type &al) BOOST_NOEXCEPT
+ : m_ptr(p), m_nalloc_storage()
+ {
+ if(m_ptr){
+ ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(al);
+ }
+ }
+
+ //! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with a related nh's internal pointer
+ //! and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal
+ //! allocator with nh's internal allocator and destroy nh's internal allocator.
+ //!
+ //! <b>Postcondition</b>: nh.empty()
+ //!
+ //! <b>Note</b>: Two node_handle's are related if only one of KeyMapped template parameter
+ //! of a node handle is void.
+ template<class KeyMapped2>
+ node_handle( BOOST_RV_REF_BEG node_handle<NodeType, Value, Allocator, KeyMapped2> BOOST_RV_REF_END nh
+ , typename container_detail::enable_if_c
+ < ((unsigned)container_detail::is_same<KeyMapped, void>::value +
+ (unsigned)container_detail::is_same<KeyMapped2, void>::value) == 1u
+ >::type* = 0)
+ : m_ptr(nh.get_node_pointer()), m_nalloc_storage()
+ { this->move_construct_end(nh); }
+
+ //! <b>Effects</b>: Constructs a node_handle object initializing internal pointer with nh's internal pointer
+ //! and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal
+ //! allocator with nh's internal allocator and destroy nh's internal allocator.
+ //!
+ //! <b>Postcondition</b>: nh.empty()
+ node_handle (BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT
+ : m_ptr(nh.m_ptr), m_nalloc_storage()
+ { this->move_construct_end(nh); }
+
+ //! <b>Effects</b>: If !this->empty(), destroys the value_type subobject in the container_node_type object
+ //! pointed to by c by calling allocator_traits<impl_defined>::destroy, then deallocates m_ptr by calling
+ //! ator_traits::rebind_traits<container_node_type>::deallocate.
+ ~node_handle () BOOST_NOEXCEPT
+ {
+ if(!this->empty()){
+ this->destroy_node();
+ this->destroy_alloc();
+ }
+ }
+
+ //! <b>Requires</b>: Either this->empty(), or ator_traits::propagate_on_container_move_assignment is true, or
+ //! node_alloc() == nh.node_alloc().
+ //!
+ //! <b>Effects</b>: If m_ptr != nullptr, destroys the value_type subobject in the container_node_type object
+ //! pointed to by m_ptr by calling ator_traits::destroy, then deallocates m_ptr by calling ator_-
+ //! traits::rebind_traits<container_node_type>::deallocate. Assigns nh.m_ptr to m_ptr. If this->empty()
+ //! or ator_traits::propagate_on_container_move_assignment is true, move assigns nh.node_alloc() to
+ //! node_alloc(). Assigns nullptr to nh.m_ptr and assigns nullopt to nh.node_alloc().
+ //! <b>Returns</b>: *this.
+ //!
+ //! <b>Throws</b>: Nothing.
+ node_handle & operator=(BOOST_RV_REF(node_handle) nh)
+ {
+ BOOST_ASSERT(this->empty() || nh.empty() || ator_traits::propagate_on_container_move_assignment::value
+ || ator_traits::equal(node_alloc(), nh.node_alloc()));
+
+ bool const was_this_non_null = !this->empty();
+ bool const was_nh_non_null = !nh.empty();
+
+ if(was_nh_non_null){
+ if(was_this_non_null){
+ this->destroy_node();
+ if(ator_traits::propagate_on_container_move_assignment::value){
+ this->node_alloc() = ::boost::move(nh.node_alloc());
+ }
+ }
+ else{
+ this->move_construct_alloc(nh.node_alloc());
+ }
+ m_ptr = nh.m_ptr;
+ nh.m_ptr = node_pointer();
+ nh.destroy_alloc();
+ }
+ else if(was_this_non_null){
+ this->destroy_node();
+ this->destroy_alloc();
+ m_ptr = node_pointer();
+ }
+ return *this;
+ }
+
+ //! <b>Requires</b>: empty() == false.
+ //!
+ //! <b>Returns</b>: A reference to the value_type subobject in the container_node_type object pointed to by m_ptr
+ //!
+ //! <b>Throws</b>: Nothing.
+ value_type& value() const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT((container_detail::is_same<KeyMapped, void>::value));
+ BOOST_ASSERT(!empty());
+ return m_ptr->get_data();
+ }
+
+ //! <b>Requires</b>: empty() == false.
+ //!
+ //! <b>Returns</b>: A non-const reference to the key_type member of the value_type subobject in the
+ //! container_node_type object pointed to by m_ptr.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Requires</b>: Modifying the key through the returned reference is permitted.
+ key_type& key() const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT((!container_detail::is_same<KeyMapped, void>::value));
+ BOOST_ASSERT(!empty());
+ return const_cast<key_type &>(KeyMapped().key_of_value(m_ptr->get_data()));
+ }
+
+ //! <b>Requires</b>: empty() == false.
+ //!
+ //! <b>Returns</b>: A reference to the mapped_type member of the value_type subobject
+ //! in the container_node_type object pointed to by m_ptr
+ //!
+ //! <b>Throws</b>: Nothing.
+ mapped_type& mapped() const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT((!container_detail::is_same<KeyMapped, void>::value));
+ BOOST_ASSERT(!empty());
+ return KeyMapped().mapped_of_value(m_ptr->get_data());
+ }
+
+ //! <b>Requires</b>: empty() == false.
+ //!
+ //! <b>Returns</b>: A copy of the internally hold allocator.
+ //!
+ //! <b>Throws</b>: Nothing.
+ allocator_type get_allocator() const
+ {
+ BOOST_ASSERT(!empty());
+ return this->node_alloc();
+ }
+
+ //! <b>Returns</b>: m_ptr != nullptr.
+ //!
+ #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+ BOOST_CONTAINER_FORCEINLINE explicit operator bool
+ #else
+ private: struct bool_conversion {int for_bool; int for_arg(); }; typedef int bool_conversion::* explicit_bool_arg;
+ public: BOOST_CONTAINER_FORCEINLINE operator explicit_bool_arg
+ #endif
+ ()const BOOST_NOEXCEPT
+ { return m_ptr ? &bool_conversion::for_bool : explicit_bool_arg(0); }
+
+ //! <b>Returns</b>: m_ptr == nullptr.
+ //!
+ bool empty() const BOOST_NOEXCEPT
+ {
+ return !this->m_ptr;
+ }
+
+ //! <b>Requires</b>: this->empty(), or nh.empty(), or ator_traits::propagate_on_container_swap is true, or
+ //! node_alloc() == nh.node_alloc().
+ //!
+ //! <b>Effects</b>: Calls swap(m_ptr, nh.m_ptr). If this->empty(), or nh.empty(), or ator_traits::propagate_on_-
+ //! container_swap is true calls swap(node_alloc(), nh.node_alloc()).
+ void swap(node_handle &nh)
+ BOOST_NOEXCEPT_IF(ator_traits::propagate_on_container_swap::value || ator_traits::is_always_equal::value)
+ {
+ BOOST_ASSERT(this->empty() || nh.empty() || ator_traits::propagate_on_container_swap::value
+ || ator_traits::equal(node_alloc(), nh.node_alloc()));
+
+ bool const was_this_non_null = !this->empty();
+ bool const was_nh_non_null = !nh.empty();
+
+ if(was_nh_non_null){
+ if(was_this_non_null){
+ if(ator_traits::propagate_on_container_swap){
+ ::boost::adl_move_swap(this->node_alloc(), nh.node_alloc());
+ }
+ }
+ else{
+ this->move_construct_alloc(nh.node_alloc());
+ nh.destroy_alloc();
+ }
+ }
+ else if(was_this_non_null){
+ nh.move_construct_alloc(this->node_alloc());
+ nh.destroy_alloc();
+ }
+ ::boost::adl_move_swap(m_ptr, nh.m_ptr);
+ }
+
+ //! <b>Effects</b>: x.swap(y).
+ //!
+ friend void swap(node_handle & x, node_handle & y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y)))
+ { x.swap(y); }
+};
+
+//! A class template used to describe the results of inserting a
+//! Container::node_type in a Container with unique keys.
+//! Includes at least the following non-static public data members:
+//!
+//! <ul><li>bool inserted</li>;
+//! <li>Iterator position</li>;
+//! <li>NodeType node</li></ul>
+//!
+//! This type is MoveConstructible, MoveAssignable, DefaultConstructible,
+//! Destructible, and lvalues of that type are swappable
+template<class Iterator, class NodeType>
+struct insert_return_type_base
+{
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_base)
+
+ public:
+ insert_return_type_base()
+ : inserted(false), position(), node()
+ {}
+
+ insert_return_type_base(BOOST_RV_REF(insert_return_type_base) other)
+ : inserted(other.inserted), position(other.position), node(boost::move(other.node))
+ {}
+
+ template<class RelatedIt, class RelatedNode>
+ insert_return_type_base(bool insert, RelatedIt it, BOOST_RV_REF(RelatedNode) node)
+ : inserted(insert), position(it), node(boost::move(node))
+ {}
+
+ insert_return_type_base & operator=(BOOST_RV_REF(insert_return_type_base) other)
+ {
+ inserted = other.inserted;
+ position = other.position;
+ node = boost::move(other.node);
+ return *this;
+ }
+
+ bool inserted;
+ Iterator position;
+ NodeType node;
+};
+
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_NODE_HANDLE_HPP
diff --git a/boost/container/pmr/deque.hpp b/boost/container/pmr/deque.hpp
index 744758606c..acb7da3d0d 100644
--- a/boost/container/pmr/deque.hpp
+++ b/boost/container/pmr/deque.hpp
@@ -29,6 +29,8 @@ using deque = boost::container::deque<T, polymorphic_allocator<T>>;
#endif
+//! A portable metafunction to obtain a deque
+//! that uses a polymorphic allocator
template<class T>
struct deque_of
{
diff --git a/boost/container/pmr/flat_map.hpp b/boost/container/pmr/flat_map.hpp
index 786c190b05..150d5332f2 100644
--- a/boost/container/pmr/flat_map.hpp
+++ b/boost/container/pmr/flat_map.hpp
@@ -38,6 +38,8 @@ using flat_multimap = boost::container::flat_multimap<Key, T, Compare, polymorph
#endif
+//! A portable metafunction to obtain a flat_map
+//! that uses a polymorphic allocator
template <class Key
,class T
,class Compare = std::less<Key>
@@ -47,6 +49,8 @@ struct flat_map_of
typedef boost::container::flat_map<Key, T, Compare, polymorphic_allocator<std::pair<Key, T> > > type;
};
+//! A portable metafunction to obtain a flat_multimap
+//! that uses a polymorphic allocator
template <class Key
,class T
,class Compare = std::less<Key>
diff --git a/boost/container/pmr/flat_set.hpp b/boost/container/pmr/flat_set.hpp
index 5c3ad1e09e..6d4292bfb4 100644
--- a/boost/container/pmr/flat_set.hpp
+++ b/boost/container/pmr/flat_set.hpp
@@ -36,6 +36,8 @@ using flat_multiset = boost::container::flat_multiset<Key, Compare, polymorphic_
#endif
+//! A portable metafunction to obtain a flat_set
+//! that uses a polymorphic allocator
template <class Key
,class Compare = std::less<Key>
,class Options = tree_assoc_defaults >
@@ -44,6 +46,8 @@ struct flat_set_of
typedef boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> > type;
};
+//! A portable metafunction to obtain a flat_multiset
+//! that uses a polymorphic allocator
template <class Key
,class Compare = std::less<Key>
,class Options = tree_assoc_defaults >
diff --git a/boost/container/pmr/list.hpp b/boost/container/pmr/list.hpp
index 5967f452be..f3676a3d17 100644
--- a/boost/container/pmr/list.hpp
+++ b/boost/container/pmr/list.hpp
@@ -29,6 +29,8 @@ using list = boost::container::list<T, polymorphic_allocator<T>>;
#endif
+//! A portable metafunction to obtain a list
+//! that uses a polymorphic allocator
template<class T>
struct list_of
{
diff --git a/boost/container/pmr/map.hpp b/boost/container/pmr/map.hpp
index fdada0e420..165a473373 100644
--- a/boost/container/pmr/map.hpp
+++ b/boost/container/pmr/map.hpp
@@ -38,6 +38,8 @@ using multimap = boost::container::multimap<Key, T, Compare, polymorphic_allocat
#endif
+//! A portable metafunction to obtain a map
+//! that uses a polymorphic allocator
template <class Key
,class T
,class Compare = std::less<Key>
@@ -47,6 +49,8 @@ struct map_of
typedef boost::container::map<Key, T, Compare, polymorphic_allocator<std::pair<const Key, T> >, Options> type;
};
+//! A portable metafunction to obtain a multimap
+//! that uses a polymorphic allocator
template <class Key
,class T
,class Compare = std::less<Key>
diff --git a/boost/container/pmr/set.hpp b/boost/container/pmr/set.hpp
index 6f2c3bfb29..04583ce2dd 100644
--- a/boost/container/pmr/set.hpp
+++ b/boost/container/pmr/set.hpp
@@ -36,6 +36,8 @@ using multiset = boost::container::multiset<Key, Compare, polymorphic_allocator<
#endif
+//! A portable metafunction to obtain a set
+//! that uses a polymorphic allocator
template <class Key
,class Compare = std::less<Key>
,class Options = tree_assoc_defaults >
@@ -44,6 +46,8 @@ struct set_of
typedef boost::container::set<Key, Compare, polymorphic_allocator<Key>, Options> type;
};
+//! A portable metafunction to obtain a multiset
+//! that uses a polymorphic allocator
template <class Key
,class Compare = std::less<Key>
,class Options = tree_assoc_defaults >
diff --git a/boost/container/pmr/slist.hpp b/boost/container/pmr/slist.hpp
index 4ee76c62ef..c90fd7d6cd 100644
--- a/boost/container/pmr/slist.hpp
+++ b/boost/container/pmr/slist.hpp
@@ -29,6 +29,8 @@ using slist = boost::container::slist<T, polymorphic_allocator<T>>;
#endif
+//! A portable metafunction to obtain a slist
+//! that uses a polymorphic allocator
template<class T>
struct slist_of
{
diff --git a/boost/container/pmr/small_vector.hpp b/boost/container/pmr/small_vector.hpp
index a79d5a075e..6eef149728 100644
--- a/boost/container/pmr/small_vector.hpp
+++ b/boost/container/pmr/small_vector.hpp
@@ -29,6 +29,8 @@ using small_vector = boost::container::small_vector<T, N, polymorphic_allocator<
#endif
+//! A portable metafunction to obtain a small_vector
+//! that uses a polymorphic allocator
template<class T, std::size_t N>
struct small_vector_of
{
diff --git a/boost/container/pmr/stable_vector.hpp b/boost/container/pmr/stable_vector.hpp
index 07a2059d87..d11c426fc4 100644
--- a/boost/container/pmr/stable_vector.hpp
+++ b/boost/container/pmr/stable_vector.hpp
@@ -29,6 +29,8 @@ using stable_vector = boost::container::stable_vector<T, polymorphic_allocator<T
#endif
+//! A portable metafunction to obtain a stable_vector
+//! that uses a polymorphic allocator
template<class T>
struct stable_vector_of
{
diff --git a/boost/container/pmr/string.hpp b/boost/container/pmr/string.hpp
index 2e879e3054..c1eba67296 100644
--- a/boost/container/pmr/string.hpp
+++ b/boost/container/pmr/string.hpp
@@ -30,6 +30,8 @@ using basic_string =
#endif
+//! A portable metafunction to obtain a basic_string
+//! that uses a polymorphic allocator
template <class CharT, class Traits = std::char_traits<CharT> >
struct basic_string_of
{
diff --git a/boost/container/pmr/vector.hpp b/boost/container/pmr/vector.hpp
index cef6ae5b94..2bd9c157e0 100644
--- a/boost/container/pmr/vector.hpp
+++ b/boost/container/pmr/vector.hpp
@@ -29,6 +29,8 @@ using vector = boost::container::vector<T, polymorphic_allocator<T>>;
#endif
+//! A portable metafunction to obtain a vector
+//! that uses a polymorphic allocator
template<class T>
struct vector_of
{
diff --git a/boost/container/set.hpp b/boost/container/set.hpp
index ca05cac1f7..5cf0f964a5 100644
--- a/boost/container/set.hpp
+++ b/boost/container/set.hpp
@@ -59,22 +59,22 @@ namespace container {
//! \tparam Key is the type to be inserted in the set, which is also the key_type
//! \tparam Compare is the comparison functor used to order keys
//! \tparam Allocator is the allocator to be used to allocate memory for this container
-//! \tparam SetOptions is an packed option type generated using using boost::container::tree_assoc_options.
-template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class SetOptions = tree_assoc_defaults >
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = tree_assoc_defaults >
#else
-template <class Key, class Compare, class Allocator, class SetOptions>
+template <class Key, class Compare, class Allocator, class Options>
#endif
class set
///@cond
: public container_detail::tree
- < Key, Key, container_detail::identity<Key>, Compare, Allocator, SetOptions>
+ < Key, container_detail::identity<Key>, Compare, Allocator, Options>
///@endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(set)
typedef container_detail::tree
- < Key, Key, container_detail::identity<Key>, Compare, Allocator, SetOptions> base_t;
+ < Key, container_detail::identity<Key>, Compare, Allocator, Options> base_t;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
@@ -100,6 +100,8 @@ class set
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::insert_return_type) insert_return_type;
//////////////////////////////////////////////
//
@@ -110,7 +112,8 @@ class set
//! <b>Effects</b>: Default constructs an empty set.
//!
//! <b>Complexity</b>: Constant.
- set()
+ set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{}
@@ -215,6 +218,7 @@ class set
//!
//! <b>Postcondition</b>: x is emptied.
set(BOOST_RV_REF(set) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x))
{}
@@ -248,8 +252,9 @@ class set
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
set& operator=(BOOST_RV_REF(set) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -520,6 +525,42 @@ class set
{ this->base_t::insert_unique(il.begin(), il.end()); }
#endif
+ //! @copydoc ::boost::container::map::insert(node_type&&)
+ insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_unique_node(boost::move(nh)); }
+
+ //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&)
+ insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_unique_node(hint, boost::move(nh)); }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::set::merge(set<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::map::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::set::merge(multiset<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! <b>Effects</b>: Erases the element pointed to by p.
@@ -711,8 +752,8 @@ class set
//!has_trivial_destructor_after_move<> == true_type
//!specialization for optimizations
-template <class Key, class Compare, class SetOptions, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::set<Key, Compare, Allocator, SetOptions> >
+template <class Key, class Compare, class Options, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::set<Key, Compare, Allocator, Options> >
{
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
@@ -737,22 +778,22 @@ namespace container {
//! \tparam Key is the type to be inserted in the set, which is also the key_type
//! \tparam Compare is the comparison functor used to order keys
//! \tparam Allocator is the allocator to be used to allocate memory for this container
-//! \tparam MultiSetOptions is an packed option type generated using using boost::container::tree_assoc_options.
-template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class MultiSetOptions = tree_assoc_defaults >
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = tree_assoc_defaults >
#else
-template <class Key, class Compare, class Allocator, class MultiSetOptions>
+template <class Key, class Compare, class Allocator, class Options>
#endif
class multiset
/// @cond
: public container_detail::tree
- <Key, Key,container_detail::identity<Key>, Compare, Allocator, MultiSetOptions>
+ <Key,container_detail::identity<Key>, Compare, Allocator, Options>
/// @endcond
{
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
private:
BOOST_COPYABLE_AND_MOVABLE(multiset)
typedef container_detail::tree
- <Key, Key,container_detail::identity<Key>, Compare, Allocator, MultiSetOptions> base_t;
+ <Key,container_detail::identity<Key>, Compare, Allocator, Options> base_t;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
@@ -779,6 +820,7 @@ class multiset
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
//////////////////////////////////////////////
//
@@ -787,7 +829,8 @@ class multiset
//////////////////////////////////////////////
//! @copydoc ::boost::container::set::set()
- multiset()
+ multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
+ container_detail::is_nothrow_default_constructible<Compare>::value)
: base_t()
{}
@@ -856,6 +899,7 @@ class multiset
//! @copydoc ::boost::container::set::set(set &&)
multiset(BOOST_RV_REF(multiset) x)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
: base_t(BOOST_MOVE_BASE(base_t, x))
{}
@@ -875,8 +919,9 @@ class multiset
//! @copydoc ::boost::container::set::operator=(set &&)
multiset& operator=(BOOST_RV_REF(multiset) x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::container_detail::is_nothrow_move_assignable<Compare>::value )
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
{ return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
@@ -1043,6 +1088,42 @@ class multiset
{ this->base_t::insert_equal(il.begin(), il.end()); }
#endif
+ //! @copydoc ::boost::container::multimap::insert(node_type&&)
+ iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_equal_node(boost::move(nh)); }
+
+ //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&)
+ iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_equal_node(hint, boost::move(nh)); }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multiset::merge(multiset<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::multimap::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
+ {
+ typedef container_detail::tree
+ <Key, container_detail::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multiset::merge(set<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
//! @copydoc ::boost::container::set::erase(const_iterator)
@@ -1154,8 +1235,8 @@ class multiset
//!has_trivial_destructor_after_move<> == true_type
//!specialization for optimizations
-template <class Key, class Compare, class Allocator, class MultiSetOptions>
-struct has_trivial_destructor_after_move<boost::container::multiset<Key, Compare, Allocator, MultiSetOptions> >
+template <class Key, class Compare, class Allocator, class Options>
+struct has_trivial_destructor_after_move<boost::container::multiset<Key, Compare, Allocator, Options> >
{
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
diff --git a/boost/container/slist.hpp b/boost/container/slist.hpp
index 8e7aa20030..3a1d66bb6d 100644
--- a/boost/container/slist.hpp
+++ b/boost/container/slist.hpp
@@ -216,7 +216,7 @@ class slist
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
- slist()
+ slist() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: AllocHolder()
{}
@@ -303,7 +303,7 @@ class slist
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
- slist(BOOST_RV_REF(slist) x)
+ slist(BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
{}
@@ -379,7 +379,7 @@ class slist
//! <b>Complexity</b>: Constant if allocator_traits_type::
//! propagate_on_container_move_assignment is true or
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
- slist& operator= (BOOST_RV_REF(slist) x)
+ slist& operator=(BOOST_RV_REF(slist) x)
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|| allocator_traits_type::is_always_equal::value)
{
@@ -714,13 +714,15 @@ class slist
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the front of the list
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or
//! T's copy constructor throws.
//!
//! <b>Complexity</b>: Amortized constant time.
template <class... Args>
- void emplace_front(BOOST_FWD_REF(Args)... args)
- { this->emplace_after(this->cbefore_begin(), boost::forward<Args>(args)...); }
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace_after(this->cbefore_begin(), boost::forward<Args>(args)...); }
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... after prev
@@ -740,8 +742,8 @@ class slist
#define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- void emplace_front(BOOST_MOVE_UREF##N)\
- { this->emplace_after(this->cbefore_begin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
+ reference emplace_front(BOOST_MOVE_UREF##N)\
+ { return *this->emplace_after(this->cbefore_begin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
iterator emplace_after(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
@@ -794,7 +796,7 @@ class slist
//! <b>Requires</b>: prev_p must be a valid iterator of *this.
//!
//! <b>Effects</b>: Inserts a move constructed copy object from the value after the
- //! p pointed by prev_p.
+ //! element pointed by prev_p.
//!
//! <b>Returns</b>: An iterator to the inserted element.
//!
@@ -1404,7 +1406,7 @@ class slist
//! <b>Requires</b>: p must be a valid iterator of *this.
//!
- //! <b>Effects</b>: Erases the element at p p.
+ //! <b>Effects</b>: Erases the element at p.
//!
//! <b>Throws</b>: Nothing.
//!
@@ -1458,7 +1460,7 @@ class slist
//! this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//! If p == i or p == ++i, this function is a null operation.
//!
//! <b>Throws</b>: Nothing
@@ -1475,7 +1477,7 @@ class slist
//! this' allocator and x's allocator shall compare equal.
//!
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//! If p == i or p == ++i, this function is a null operation.
//!
//! <b>Throws</b>: Nothing
@@ -1491,7 +1493,7 @@ class slist
//! by this list. first and last must point to elements contained in list x.
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//! this' allocator and x's allocator shall compare equal.
//!
//! <b>Throws</b>: Nothing
@@ -1509,7 +1511,7 @@ class slist
//! this' allocator and x's allocator shall compare equal
//!
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the the element pointed by p. No destructors or copy constructors are called.
+ //! before the element pointed by p. No destructors or copy constructors are called.
//!
//! <b>Throws</b>: Nothing
//!
@@ -1676,13 +1678,16 @@ namespace container {
#include <boost/move/detail/std_ns_begin.hpp>
BOOST_CONTAINER_DOC1ST(namespace std {, BOOST_MOVE_STD_NS_BEG)
+//! A specialization of insert_iterator
+//! that works with slist
template <class T, class Allocator>
class insert_iterator<boost::container::slist<T, Allocator> >
{
- protected:
+ private:
typedef boost::container::slist<T, Allocator> Container;
Container* container;
typename Container::iterator iter;
+
public:
typedef Container container_type;
typedef output_iterator_tag iterator_category;
diff --git a/boost/container/small_vector.hpp b/boost/container/small_vector.hpp
index 9759d2fa0e..e23b54f8ac 100644
--- a/boost/container/small_vector.hpp
+++ b/boost/container/small_vector.hpp
@@ -502,8 +502,12 @@ class small_vector : public small_vector_base<T, Allocator>
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ //! @brief The capacity/max size of the container
+ static const size_type static_capacity = N;
+
public:
BOOST_CONTAINER_FORCEINLINE small_vector()
+ BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: base_type(initial_capacity_t(), internal_capacity())
{}
@@ -531,12 +535,12 @@ class small_vector : public small_vector_base<T, Allocator>
: base_type(initial_capacity_t(), internal_capacity())
{ this->resize(n, v); }
- small_vector(size_type n, const value_type &v, const allocator_type &a)
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a)
: base_type(initial_capacity_t(), internal_capacity(), a)
{ this->resize(n, v); }
template <class InIt>
- small_vector(InIt first, InIt last
+ BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_c
< container_detail::is_convertible<InIt BOOST_MOVE_I size_type>::value
BOOST_MOVE_I container_detail::nat >::type * = 0)
diff --git a/boost/container/stable_vector.hpp b/boost/container/stable_vector.hpp
index a332dbc66c..5d6dc0f228 100644
--- a/boost/container/stable_vector.hpp
+++ b/boost/container/stable_vector.hpp
@@ -540,7 +540,7 @@ class stable_vector
//! <b>Throws</b>: If allocator_type's default constructor throws.
//!
//! <b>Complexity</b>: Constant.
- stable_vector()
+ stable_vector() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: internal_data(), index()
{
STABLE_VECTOR_CHECK_INVARIANT;
@@ -698,7 +698,7 @@ class stable_vector
//! <b>Throws</b>: If allocator_type's copy constructor throws.
//!
//! <b>Complexity</b>: Constant.
- stable_vector(BOOST_RV_REF(stable_vector) x)
+ stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW
: internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index))
{
this->priv_swap_members(x);
@@ -1374,16 +1374,18 @@ class stable_vector
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the end of the stable_vector.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
//!
//! <b>Complexity</b>: Amortized constant time.
template<class ...Args>
- void emplace_back(Args &&...args)
+ reference emplace_back(Args &&...args)
{
typedef emplace_functor<Args...> EmplaceFunctor;
typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
- this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
+ return *this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
}
//! <b>Requires</b>: p must be a valid iterator of *this.
@@ -1411,13 +1413,13 @@ class stable_vector
#define BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- void emplace_back(BOOST_MOVE_UREF##N)\
+ reference emplace_back(BOOST_MOVE_UREF##N)\
{\
typedef emplace_functor##N\
BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\
typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;\
EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\
- this->insert(this->cend() , EmplaceIterator(ef), EmplaceIterator());\
+ return *this->insert(this->cend() , EmplaceIterator(ef), EmplaceIterator());\
}\
\
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
diff --git a/boost/container/static_vector.hpp b/boost/container/static_vector.hpp
index a37c16572c..21168cbf96 100644
--- a/boost/container/static_vector.hpp
+++ b/boost/container/static_vector.hpp
@@ -139,6 +139,9 @@ public:
//! @brief The const reverse iterator.
typedef typename base_t::const_reverse_iterator const_reverse_iterator;
+ //! @brief The capacity/max size of the container
+ static const size_type static_capacity = Capacity;
+
//! @brief Constructs an empty static_vector.
//!
//! @par Throws
@@ -276,6 +279,7 @@ public:
//! @par Complexity
//! Linear O(N).
BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other)
+ BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<value_type>::value)
: base_t(BOOST_MOVE_BASE(base_t, other))
{}
@@ -673,6 +677,8 @@ public:
//! @brief Inserts a Value constructed with
//! \c std::forward<Args>(args)... in the end of the container.
//!
+ //! @return A reference to the created object.
+ //!
//! @param args The arguments of the constructor of the new element which will be created at the end of the container.
//!
//! @par Throws
@@ -681,7 +687,7 @@ public:
//! @par Complexity
//! Constant O(1).
template<class ...Args>
- void emplace_back(Args &&...args);
+ reference emplace_back(Args &&...args);
//! @pre
//! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>
diff --git a/boost/container/string.hpp b/boost/container/string.hpp
index 33f5f66176..1e47abaaf0 100644
--- a/boost/container/string.hpp
+++ b/boost/container/string.hpp
@@ -230,7 +230,14 @@ class basic_string_base
protected:
bool is_short() const
- { return static_cast<bool>(this->members_.m_repr.s.h.is_short != 0); }
+ {
+ //Access and copy (to avoid UB) the first byte of the union to know if the
+ //active representation is short or long
+ short_header hdr;
+ BOOST_STATIC_ASSERT((sizeof(short_header) == 1));
+ *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr;
+ return hdr.is_short != 0;
+ }
void is_short(bool yes)
{
@@ -584,7 +591,7 @@ class basic_string
//! <b>Effects</b>: Default constructs a basic_string.
//!
//! <b>Throws</b>: If allocator_type's default constructor throws.
- basic_string()
+ basic_string() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: base_t()
{ this->priv_terminate_string(); }
diff --git a/boost/container/vector.hpp b/boost/container/vector.hpp
index fabe92df88..5d4ab308ca 100644
--- a/boost/container/vector.hpp
+++ b/boost/container/vector.hpp
@@ -380,7 +380,7 @@ struct vector_alloc_holder
, m_capacity()
{
if(initial_size){
- pointer reuse = 0;
+ pointer reuse = pointer();
m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
}
}
@@ -393,7 +393,7 @@ struct vector_alloc_holder
, m_capacity()
{
if(initial_size){
- pointer reuse = 0;
+ pointer reuse = pointer();
m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
}
}
@@ -525,7 +525,7 @@ struct vector_alloc_holder
void priv_first_allocation(size_type cap)
{
if(cap){
- pointer reuse = 0;
+ pointer reuse = pointer();
m_start = this->allocation_command(allocate_new, cap, cap, reuse);
m_capacity = cap;
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
@@ -792,7 +792,7 @@ class vector
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
- vector() BOOST_NOEXCEPT_OR_NOTHROW
+ vector() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
: m_holder()
{}
@@ -1103,7 +1103,7 @@ class vector
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
BOOST_CONTAINER_FORCEINLINE vector& operator=(BOOST_RV_REF(vector) x)
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
+ || allocator_traits_type::is_always_equal::value)
{
BOOST_ASSERT(&x != this);
this->priv_move_assign(boost::move(x));
@@ -1630,11 +1630,10 @@ class vector
return const_iterator(this->m_holder.start()+n);
}
- //! <b>Requires</b>: size() >= n.
+ //! <b>Requires</b>: begin() <= p <= end().
//!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
//!
//! <b>Throws</b>: Nothing.
//!
@@ -1725,21 +1724,24 @@ class vector
//! <b>Effects</b>: Inserts an object of type T constructed with
//! std::forward<Args>(args)... in the end of the vector.
//!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
//! T's copy/move constructor throws.
//!
//! <b>Complexity</b>: Amortized constant time.
template<class ...Args>
- BOOST_CONTAINER_FORCEINLINE void emplace_back(BOOST_FWD_REF(Args)...args)
+ BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_FWD_REF(Args)...args)
{
if (BOOST_LIKELY(this->room_enough())){
//There is more memory, just construct a new object at the end
allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
++this->m_holder.m_size;
+ return *this->priv_raw_end();
}
else{
typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> type;
- this->priv_forward_range_insert_no_capacity
+ return *this->priv_forward_range_insert_no_capacity
(this->back_ptr(), 1, type(::boost::forward<Args>(args)...), alloc_version());
}
}
@@ -1788,16 +1790,17 @@ class vector
#define BOOST_CONTAINER_VECTOR_EMPLACE_CODE(N) \
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE void emplace_back(BOOST_MOVE_UREF##N)\
+ BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\
{\
if (BOOST_LIKELY(this->room_enough())){\
allocator_traits_type::construct (this->m_holder.alloc()\
, this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
++this->m_holder.m_size;\
+ return *this->priv_raw_end();\
}\
else{\
typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- this->priv_forward_range_insert_no_capacity\
+ return *this->priv_forward_range_insert_no_capacity\
( this->back_ptr(), 1, type(BOOST_MOVE_FWD##N), alloc_version());\
}\
}\
@@ -2247,7 +2250,7 @@ class vector
size_type *indexes = 0;
while(remaining){
//Query for room to store indexes in the remaining buffer
- uintptr_t const szt_align_mask = container_detail::alignment_of<size_type>::value - 1;
+ boost::uintptr_t const szt_align_mask = container_detail::alignment_of<size_type>::value - 1;
boost::uintptr_t const addr = boost::uintptr_t(this->priv_raw_begin() + s + n);
boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c);
boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask;
@@ -2544,7 +2547,7 @@ class vector
//buffer or expand the old one.
bool same_buffer_start;
size_type real_cap = 0;
- pointer reuse = 0;
+ pointer reuse(this->m_holder.start());
pointer const ret(this->m_holder.allocation_command(allocate_new | expand_fwd | expand_bwd, new_cap, real_cap = new_cap, reuse));
//Check for forward expansion
diff --git a/boost/context/fixedsize_stack.hpp b/boost/context/fixedsize_stack.hpp
index 681de40576..c04dd1b7f6 100644
--- a/boost/context/fixedsize_stack.hpp
+++ b/boost/context/fixedsize_stack.hpp
@@ -45,8 +45,9 @@ public:
stack_context allocate() {
void * vp = std::malloc( size_);
- if ( ! vp) throw std::bad_alloc();
-
+ if ( ! vp) {
+ throw std::bad_alloc();
+ }
stack_context sctx;
sctx.size = size_;
sctx.sp = static_cast< char * >( vp) + sctx.size;
diff --git a/boost/coroutine/asymmetric_coroutine.hpp b/boost/coroutine/asymmetric_coroutine.hpp
index 640896f7c4..6a24a0b343 100644
--- a/boost/coroutine/asymmetric_coroutine.hpp
+++ b/boost/coroutine/asymmetric_coroutine.hpp
@@ -7,6 +7,14 @@
#ifndef BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
#define BOOST_COROUTINES_ASYMMETRIC_COROUTINE_H
+#ifndef BOOST_COROUTINES_NO_DEPRECATION_WARNING
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
+# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING.")
+# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
+# endif
+#endif
+
#include <cstddef>
#include <iterator>
#include <memory>
diff --git a/boost/coroutine/detail/config.hpp b/boost/coroutine/detail/config.hpp
index 488a401862..8043e6cf8c 100644
--- a/boost/coroutine/detail/config.hpp
+++ b/boost/coroutine/detail/config.hpp
@@ -10,6 +10,14 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
+#ifndef BOOST_COROUTINE_NO_DEPRECATION_WARNING
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
+# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINE_NO_DEPRECATION_WARNING.")
+# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINE_NO_DEPRECATION_WARNING."
+# endif
+#endif
+
#ifdef BOOST_COROUTINES_DECL
# undef BOOST_COROUTINES_DECL
#endif
diff --git a/boost/coroutine/symmetric_coroutine.hpp b/boost/coroutine/symmetric_coroutine.hpp
index 543cae0a37..cf11136f70 100644
--- a/boost/coroutine/symmetric_coroutine.hpp
+++ b/boost/coroutine/symmetric_coroutine.hpp
@@ -7,6 +7,14 @@
#ifndef BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
#define BOOST_COROUTINES_SYMMETRIC_COROUTINE_H
+#ifndef BOOST_COROUTINES_NO_DEPRECATION_WARNING
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
+# pragma message ("Warning: Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING.")
+# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
+# warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
+# endif
+#endif
+
#include <boost/config.hpp>
#include <boost/coroutine/detail/symmetric_coroutine_call.hpp>
diff --git a/boost/coroutine2/detail/pull_control_block_ecv1.ipp b/boost/coroutine2/detail/pull_control_block_ecv1.ipp
index f271e795df..eb2ae2778f 100644
--- a/boost/coroutine2/detail/pull_control_block_ecv1.ipp
+++ b/boost/coroutine2/detail/pull_control_block_ecv1.ipp
@@ -36,6 +36,7 @@ void
pull_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -52,15 +53,17 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
push_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -78,15 +81,17 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
push_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -120,6 +125,7 @@ pull_coroutine< T >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
// destroy data if it set
@@ -181,6 +187,7 @@ void
pull_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -197,15 +204,17 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
push_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -223,15 +232,17 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
push_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -263,6 +274,7 @@ pull_coroutine< T & >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
}
@@ -305,6 +317,7 @@ void
pull_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -320,15 +333,17 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
push_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -346,15 +361,17 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
push_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -384,6 +401,7 @@ pull_coroutine< void >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
}
diff --git a/boost/coroutine2/detail/pull_control_block_ecv2.ipp b/boost/coroutine2/detail/pull_control_block_ecv2.ipp
index 785bc59ff1..766a3f59c7 100644
--- a/boost/coroutine2/detail/pull_control_block_ecv2.ipp
+++ b/boost/coroutine2/detail/pull_control_block_ecv2.ipp
@@ -37,6 +37,7 @@ pull_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx( nullptr);
}
@@ -53,15 +54,17 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
push_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -80,15 +83,17 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename push_coroutine< T >::control_block synthesized_cb{ this, ctx };
push_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -104,9 +109,7 @@ pull_coroutine< T >::control_block::control_block( context::preallocated palloc,
bvalid{ false },
storage{} {
// enter coroutine-fn in order to have first value available after ctor (of `*this`) returns
- auto result = ctx( nullptr);
- ctx = std::move( std::get< 0 >( result) );
- set( std::get< 1 >( result) );
+ resume();
}
template< typename T >
@@ -184,6 +187,7 @@ pull_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx( nullptr);
}
@@ -200,15 +204,17 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
push_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -227,15 +233,17 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename push_coroutine< T & >::control_block synthesized_cb{ this, ctx };
push_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -250,9 +258,7 @@ pull_coroutine< T & >::control_block::control_block( context::preallocated pallo
except{},
t{ nullptr } {
// enter coroutine-fn in order to have first value available after ctor (of `*this`) returns
- auto result = ctx( nullptr);
- ctx = std::move( std::get< 0 >( result) );
- t = std::get< 1 >( result);
+ resume();
}
template< typename T >
@@ -306,6 +312,7 @@ pull_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx();
}
@@ -321,15 +328,17 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
push_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -346,15 +355,17 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
typename push_coroutine< void >::control_block synthesized_cb{ this, ctx };
push_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized push_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized push_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -367,7 +378,7 @@ pull_coroutine< void >::control_block::control_block( context::preallocated pall
state{ state_t::unwind },
except{} {
// enter coroutine-fn in order to have first value available after ctor (of `*this`) returns
- ctx = ctx();
+ resume();
}
inline
diff --git a/boost/coroutine2/detail/push_control_block_ecv1.ipp b/boost/coroutine2/detail/push_control_block_ecv1.ipp
index f9119fd771..cc9622dfbe 100644
--- a/boost/coroutine2/detail/push_control_block_ecv1.ipp
+++ b/boost/coroutine2/detail/push_control_block_ecv1.ipp
@@ -37,6 +37,7 @@ void
push_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -53,19 +54,21 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename pull_coroutine< T >::control_block synthesized_cb{ this, ctx };
pull_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- T * t = static_cast< T * >( ctx() );
- // set transferred value
- synthesized_cb.set( t);
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ T * t = static_cast< T * >( ctx() );
+ // set transferred value
+ synthesized_cb.set( t);
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -83,19 +86,21 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
typename pull_coroutine< T >::control_block synthesized_cb{ this, ctx };
pull_coroutine< T > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- T * t = static_cast< T * >( ctx() );
- // set transferred value
- synthesized_cb.set( t);
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ T * t = static_cast< T * >( ctx() );
+ // set transferred value
+ synthesized_cb.set( t);
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -125,6 +130,7 @@ push_coroutine< T >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
}
@@ -173,6 +179,7 @@ void
push_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -189,19 +196,21 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename pull_coroutine< T & >::control_block synthesized_cb{ this, ctx };
pull_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- T * t = static_cast< T * >( ctx() );
- // set transferred value
- synthesized_cb.t = t;
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ T * t = static_cast< T * >( ctx() );
+ // set transferred value
+ synthesized_cb.t = t;
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -219,19 +228,21 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
typename pull_coroutine< T & >::control_block synthesized_cb{ this, ctx };
pull_coroutine< T & > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- T * t = static_cast< T * >( ctx() );
- // set transferred value
- synthesized_cb.t = t;
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ T * t = static_cast< T * >( ctx() );
+ // set transferred value
+ synthesized_cb.t = t;
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -261,6 +272,7 @@ push_coroutine< T & >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
}
@@ -298,6 +310,7 @@ void
push_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
boost::context::execution_context ctx = cb->ctx;
// destroy control structure
+ cb->state |= state_t::destroy;
cb->~control_block();
}
@@ -313,17 +326,19 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx };
pull_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- ctx();
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ ctx();
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -341,17 +356,19 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx };
pull_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- // jump back to ctor
- ctx();
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( forced_unwind const&) {
- // do nothing for unwinding exception
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ // jump back to ctor
+ ctx();
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( forced_unwind const&) {
+ // do nothing for unwinding exception
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -381,6 +398,7 @@ push_coroutine< void >::control_block::~control_block() {
if ( state_t::none == ( state & state_t::complete) &&
state_t::none != ( state & state_t::unwind) ) {
// unwind coroutine stack
+ other->ctx = boost::context::execution_context::current();
ctx( context::exec_ontop_arg, unwind_coroutine);
}
}
diff --git a/boost/coroutine2/detail/push_control_block_ecv2.ipp b/boost/coroutine2/detail/push_control_block_ecv2.ipp
index bfdee06a18..f940bb13b7 100644
--- a/boost/coroutine2/detail/push_control_block_ecv2.ipp
+++ b/boost/coroutine2/detail/push_control_block_ecv2.ipp
@@ -36,6 +36,7 @@ push_coroutine< T >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx( nullptr);
}
@@ -54,15 +55,17 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
other = & synthesized_cb;
// set transferred value
synthesized_cb.set( data);
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -83,15 +86,17 @@ push_coroutine< T >::control_block::control_block( context::preallocated palloc,
other = & synthesized_cb;
// set transferred value
synthesized_cb.set( data);
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -161,6 +166,7 @@ push_coroutine< T & >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx( nullptr);
}
@@ -179,15 +185,17 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
other = & synthesized_cb;
// set transferred value
synthesized_cb.t = data;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -208,15 +216,17 @@ push_coroutine< T & >::control_block::control_block( context::preallocated pallo
other = & synthesized_cb;
// set transferred value
synthesized_cb.t = data;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -275,6 +285,7 @@ push_coroutine< void >::control_block::destroy( control_block * cb) noexcept {
// destroy control structure
cb->~control_block();
// destroy coroutine's stack
+ cb->state |= state_t::destroy;
ctx();
}
@@ -289,15 +300,17 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx };
pull_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
@@ -314,15 +327,17 @@ push_coroutine< void >::control_block::control_block( context::preallocated pall
typename pull_coroutine< void >::control_block synthesized_cb{ this, ctx};
pull_coroutine< void > synthesized{ & synthesized_cb };
other = & synthesized_cb;
- try {
- auto fn = std::move( fn_);
- // call coroutine-fn with synthesized pull_coroutine as argument
- fn( synthesized);
- } catch ( boost::context::detail::forced_unwind const&) {
- throw;
- } catch (...) {
- // store other exceptions in exception-pointer
- except = std::current_exception();
+ if ( state_t::none == ( state & state_t::destroy) ) {
+ try {
+ auto fn = std::move( fn_);
+ // call coroutine-fn with synthesized pull_coroutine as argument
+ fn( synthesized);
+ } catch ( boost::context::detail::forced_unwind const&) {
+ throw;
+ } catch (...) {
+ // store other exceptions in exception-pointer
+ except = std::current_exception();
+ }
}
// set termination flags
state |= state_t::complete;
diff --git a/boost/coroutine2/detail/state.hpp b/boost/coroutine2/detail/state.hpp
index e338a5aed4..2541fb4ede 100644
--- a/boost/coroutine2/detail/state.hpp
+++ b/boost/coroutine2/detail/state.hpp
@@ -25,7 +25,8 @@ namespace detail {
enum class state_t : unsigned int {
none = 0,
complete = 1 << 1,
- unwind = 1 << 2
+ unwind = 1 << 2,
+ destroy = 1 << 3
};
diff --git a/boost/date_time/posix_time/time_parsers.hpp b/boost/date_time/posix_time/time_parsers.hpp
index 55b6ccf1f8..24f20704aa 100644
--- a/boost/date_time/posix_time/time_parsers.hpp
+++ b/boost/date_time/posix_time/time_parsers.hpp
@@ -35,6 +35,10 @@ namespace posix_time {
return date_time::parse_iso_time<ptime>(s, 'T');
}
+ inline ptime from_iso_extended_string(const std::string& s) {
+ return date_time::parse_delimited_time<ptime>(s, 'T');
+ }
+
} } //namespace posix_time
diff --git a/boost/date_time/time_facet.hpp b/boost/date_time/time_facet.hpp
index b9abedfba9..be6010c692 100644
--- a/boost/date_time/time_facet.hpp
+++ b/boost/date_time/time_facet.hpp
@@ -1131,9 +1131,10 @@ namespace date_time {
if(sec == -1){
return check_special_value(sitr, stream_end, t, c);
}
- if (*itr == 'S')
+ if (*itr == 'S' || sitr == stream_end)
break;
- // %s is the same as %S%f so we drop through into %f
+ // %s is the same as %S%f so we drop through into %f if we are
+ // not at the end of the stream
}
case 'f':
{
diff --git a/boost/detail/iterator.hpp b/boost/detail/iterator.hpp
index c2e8f1e2a5..2498ef448f 100644
--- a/boost/detail/iterator.hpp
+++ b/boost/detail/iterator.hpp
@@ -9,6 +9,9 @@
// This header is obsolete and will be deprecated.
#include <iterator>
+#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+#include <cstddef>
+#endif
namespace boost
{
@@ -19,6 +22,16 @@ namespace detail
using std::iterator_traits;
using std::distance;
+#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
+// when one of the arguments is an array and the other one is a pointer.
+template< typename T, std::size_t N >
+inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
+{
+ return std::distance(static_cast< T* >(left), right);
+}
+#endif
+
} // namespace detail
} // namespace boost
diff --git a/boost/detail/utf8_codecvt_facet.hpp b/boost/detail/utf8_codecvt_facet.hpp
index b3c7346da7..d2fa26d47a 100644
--- a/boost/detail/utf8_codecvt_facet.hpp
+++ b/boost/detail/utf8_codecvt_facet.hpp
@@ -113,9 +113,7 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet :
public std::codecvt<wchar_t, char, std::mbstate_t>
{
public:
- BOOST_UTF8_DECL explicit utf8_codecvt_facet(std::size_t no_locale_manage=0)
- : std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
- {}
+ BOOST_UTF8_DECL explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
virtual ~utf8_codecvt_facet(){}
protected:
BOOST_UTF8_DECL virtual std::codecvt_base::result do_in(
diff --git a/boost/detail/utf8_codecvt_facet.ipp b/boost/detail/utf8_codecvt_facet.ipp
index a6a5e2d375..753466b86b 100644
--- a/boost/detail/utf8_codecvt_facet.ipp
+++ b/boost/detail/utf8_codecvt_facet.ipp
@@ -30,6 +30,12 @@ BOOST_UTF8_BEGIN_NAMESPACE
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// implementation for wchar_t
+BOOST_UTF8_DECL utf8_codecvt_facet::utf8_codecvt_facet(
+ std::size_t no_locale_manage
+) :
+ std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
+{}
+
// Translate incoming UTF-8 into UCS-4
BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in(
std::mbstate_t& /*state*/,
@@ -198,7 +204,7 @@ BOOST_UTF8_DECL int utf8_codecvt_facet::do_length(
last_octet_count = (get_octet_count(*from_next));
++char_count;
}
- return static_cast<int>(from_next-from_end);
+ return static_cast<int>(from_next-from);
}
BOOST_UTF8_DECL unsigned int utf8_codecvt_facet::get_octet_count(
diff --git a/boost/detail/winapi/GetCurrentProcess.hpp b/boost/detail/winapi/GetCurrentProcess.hpp
index 14d5186888..9f56478148 100644
--- a/boost/detail/winapi/GetCurrentProcess.hpp
+++ b/boost/detail/winapi/GetCurrentProcess.hpp
@@ -16,7 +16,7 @@
#pragma once
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead.")
diff --git a/boost/detail/winapi/GetCurrentThread.hpp b/boost/detail/winapi/GetCurrentThread.hpp
index 047add8c9c..52dea5a67e 100644
--- a/boost/detail/winapi/GetCurrentThread.hpp
+++ b/boost/detail/winapi/GetCurrentThread.hpp
@@ -16,7 +16,7 @@
#pragma once
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_current_thread.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_current_thread.hpp instead.")
diff --git a/boost/detail/winapi/GetLastError.hpp b/boost/detail/winapi/GetLastError.hpp
index 7fda753806..8860f80f3a 100644
--- a/boost/detail/winapi/GetLastError.hpp
+++ b/boost/detail/winapi/GetLastError.hpp
@@ -16,7 +16,7 @@
#pragma once
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_last_error.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_last_error.hpp instead.")
diff --git a/boost/detail/winapi/GetProcessTimes.hpp b/boost/detail/winapi/GetProcessTimes.hpp
index 7b2b969261..8f625e6d4b 100644
--- a/boost/detail/winapi/GetProcessTimes.hpp
+++ b/boost/detail/winapi/GetProcessTimes.hpp
@@ -15,7 +15,7 @@
#pragma once
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_process_times.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_process_times.hpp instead.")
diff --git a/boost/detail/winapi/GetThreadTimes.hpp b/boost/detail/winapi/GetThreadTimes.hpp
index d69c410e61..62c853c322 100644
--- a/boost/detail/winapi/GetThreadTimes.hpp
+++ b/boost/detail/winapi/GetThreadTimes.hpp
@@ -16,7 +16,7 @@
#pragma once
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403)
#pragma message "This header is deprecated, use boost/detail/winapi/get_thread_times.hpp instead."
#elif defined(_MSC_VER)
#pragma message("This header is deprecated, use boost/detail/winapi/get_thread_times.hpp instead.")
diff --git a/boost/detail/winapi/environment.hpp b/boost/detail/winapi/environment.hpp
new file mode 100644
index 0000000000..c777c46067
--- /dev/null
+++ b/boost/detail/winapi/environment.hpp
@@ -0,0 +1,118 @@
+// environment.hpp --------------------------------------------------------------//
+
+// Copyright 2016 Klemens D. Morgenstern
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
+#define BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
+
+#include <boost/detail/winapi/basic_types.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#if !defined( BOOST_USE_WINDOWS_H )
+extern "C" {
+#if !defined( BOOST_NO_ANSI_APIS )
+BOOST_SYMBOL_IMPORT boost::detail::winapi::LPSTR_ WINAPI GetEnvironmentStringsA();
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI FreeEnvironmentStringsA(boost::detail::winapi::LPSTR_);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetEnvironmentVariableA(
+ boost::detail::winapi::LPCSTR_ lpName,
+ boost::detail::winapi::LPSTR_ lpBuffer,
+ boost::detail::winapi::DWORD_ nSize
+);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SetEnvironmentVariableA(
+ boost::detail::winapi::LPCSTR_ lpName,
+ boost::detail::winapi::LPCSTR_ lpValue
+);
+#endif // !defined( BOOST_NO_ANSI_APIS )
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::LPWSTR_ WINAPI GetEnvironmentStringsW();
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI FreeEnvironmentStringsW(boost::detail::winapi::LPWSTR_);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetEnvironmentVariableW(
+ boost::detail::winapi::LPCWSTR_ lpName,
+ boost::detail::winapi::LPWSTR_ lpBuffer,
+ boost::detail::winapi::DWORD_ nSize
+);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SetEnvironmentVariableW(
+ boost::detail::winapi::LPCWSTR_ lpName,
+ boost::detail::winapi::LPCWSTR_ lpValue
+);
+} // extern "C"
+#endif // !defined( BOOST_USE_WINDOWS_H )
+
+namespace boost { namespace detail { namespace winapi {
+
+#if !defined( BOOST_NO_ANSI_APIS )
+using ::GetEnvironmentStringsA;
+using ::FreeEnvironmentStringsA;
+using ::GetEnvironmentVariableA;
+using ::SetEnvironmentVariableA;
+#endif // !defined( BOOST_NO_ANSI_APIS )
+
+using ::GetEnvironmentStringsW;
+using ::FreeEnvironmentStringsW;
+using ::GetEnvironmentVariableW;
+using ::SetEnvironmentVariableW;
+
+template< typename Char >
+Char* get_environment_strings();
+
+#if !defined( BOOST_NO_ANSI_APIS )
+
+template< >
+BOOST_FORCEINLINE char* get_environment_strings< char >()
+{
+ return GetEnvironmentStringsA();
+}
+
+BOOST_FORCEINLINE BOOL_ free_environment_strings(boost::detail::winapi::LPSTR_ p)
+{
+ return FreeEnvironmentStringsA(p);
+}
+
+BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCSTR_ name, LPSTR_ buffer, DWORD_ size)
+{
+ return GetEnvironmentVariableA(name, buffer, size);
+}
+
+BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCSTR_ name, LPCSTR_ value)
+{
+ return SetEnvironmentVariableA(name, value);
+}
+
+#endif // !defined( BOOST_NO_ANSI_APIS )
+
+template< >
+BOOST_FORCEINLINE wchar_t* get_environment_strings< wchar_t >()
+{
+ return GetEnvironmentStringsW();
+}
+
+BOOST_FORCEINLINE BOOL_ free_environment_strings(boost::detail::winapi::LPWSTR_ p)
+{
+ return FreeEnvironmentStringsW(p);
+}
+
+BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCWSTR_ name, LPWSTR_ buffer, DWORD_ size)
+{
+ return GetEnvironmentVariableW(name, buffer, size);
+}
+
+BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCWSTR_ name, LPCWSTR_ value)
+{
+ return SetEnvironmentVariableW(name, value);
+}
+
+} // namespace winapi
+} // namespace detail
+} // namespace boost
+
+#endif // BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
diff --git a/boost/detail/winapi/error_codes.hpp b/boost/detail/winapi/error_codes.hpp
new file mode 100644
index 0000000000..e364fb0ef0
--- /dev/null
+++ b/boost/detail/winapi/error_codes.hpp
@@ -0,0 +1,2959 @@
+// error_codes.hpp --------------------------------------------------------------//
+
+// Copyright 2016 Andrey Semashev
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
+#define BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
+
+#include <boost/detail/winapi/basic_types.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+namespace detail {
+namespace winapi {
+
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_XPS_ = 82;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_XAML_ = 43;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USN_ = 129;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BLBUI_ = 128;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SPP_ = 256;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WSB_ONLINE_ = 133;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DLS_ = 153;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BLB_CLI_ = 121;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BLB_ = 120;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WSBAPP_ = 122;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WPN_ = 62;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WMAAECMA_ = 1996;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINRM_ = 51;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINPE_ = 61;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWSUPDATE_ = 36;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWS_STORE_ = 63;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWS_SETUP_ = 48;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWS_DEFENDER_ = 80;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWS_CE_ = 24;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINDOWS_ = 8;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WINCODEC_DWRITE_DWM_ = 2200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WIA_ = 33;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WER_ = 27;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WEP_ = 2049;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WEB_SOCKET_ = 886;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WEB_ = 885;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_VOLSNAP_ = 130;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_VOLMGR_ = 56;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_VISUALCPP_ = 109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_VIRTUALIZATION_ = 55;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_VHD_ = 58;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_URT_ = 19;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_UMI_ = 22;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_UI_ = 42;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_TPM_SOFTWARE_ = 41;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_TPM_SERVICES_ = 40;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_TIERING_ = 131;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SYNCENGINE_ = 2050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SXS_ = 23;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_STORAGE_ = 3;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_STATE_MANAGEMENT_ = 34;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SSPI_ = 9;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_SPACES_ = 231;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SOS_ = 160;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SCARD_ = 16;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SHELL_ = 39;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SETUPAPI_ = 15;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SECURITY_ = 9;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SDIAG_ = 60;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_SDBUS_ = 2305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_RPC_ = 1;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_RESTORE_ = 256;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_SCRIPT_ = 112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_PARSE_ = 113;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_RAS_ = 83;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_POWERSHELL_ = 84;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_PLA_ = 48;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_PIDGENX_ = 2561;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_P2P_INT_ = 98;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_P2P_ = 99;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_OPC_ = 81;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_ONLINE_ID_ = 134;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WIN32_ = 7;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_CONTROL_ = 10;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_WEBSERVICES_ = 61;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_NULL_ = 0;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_NDIS_ = 52;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_NAP_ = 39;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_MOBILE_ = 1793;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_METADIRECTORY_ = 35;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_MSMQ_ = 14;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_MEDIASERVER_ = 13;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_MBN_ = 84;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_LINGUISTIC_SERVICES_ = 305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_LEAP_ = 2184;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_JSCRIPT_ = 2306;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_INTERNET_ = 12;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_ITF_ = 4;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_INPUT_ = 64;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_HYPERVISOR_ = 53;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_ACCELERATOR_ = 1536;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_HTTP_ = 25;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_GRAPHICS_ = 38;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_FWP_ = 50;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_FVE_ = 49;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_FILTER_MANAGER_ = 31;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_EAS_ = 85;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_EAP_ = 66;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DXGI_DDI_ = 2171;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DXGI_ = 2170;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DPLAY_ = 21;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DMSERVER_ = 256;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DISPATCH_ = 2;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DIRECTORYSERVICE_ = 37;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DIRECTMUSIC_ = 2168;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DIRECT3D11_ = 2172;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DIRECT3D10_ = 2169;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DIRECT2D_ = 2201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DAF_ = 100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_UTIL_ = 260;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT_ = 272;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_TFTP_ = 264;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_PXE_ = 263;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER_ = 289;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT_ = 290;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_MANAGEMENT_ = 259;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_IMAGING_ = 258;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING_ = 278;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_SERVER_ = 257;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER_ = 293;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEPLOYMENT_SERVICES_BINLSVC_ = 261;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEFRAG_ = 2304;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_DEBUGGERS_ = 176;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_CONFIGURATION_ = 33;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_COMPLUS_ = 17;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_USERMODE_COMMONLOG_ = 26;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_CMI_ = 54;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_CERT_ = 11;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BLUETOOTH_ATT_ = 101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BCD_ = 57;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_BACKGROUNDCOPY_ = 32;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_AUDIOSTREAMING_ = 1094;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_AUDCLNT_ = 2185;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_AUDIO_ = 102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_ACTION_QUEUE_ = 44;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_ACS_ = 20;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FACILITY_AAF_ = 18;
+
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUCCESS_ = 0;
+BOOST_CONSTEXPR_OR_CONST DWORD_ NO_ERROR_ = 0;
+
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FUNCTION_ = 1;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_NOT_FOUND_ = 2;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATH_NOT_FOUND_ = 3;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_OPEN_FILES_ = 4;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_DENIED_ = 5;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_HANDLE_ = 6;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ARENA_TRASHED_ = 7;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_ENOUGH_MEMORY_ = 8;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_BLOCK_ = 9;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_ENVIRONMENT_ = 10;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_FORMAT_ = 11;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ACCESS_ = 12;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DATA_ = 13;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OUTOFMEMORY_ = 14;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DRIVE_ = 15;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CURRENT_DIRECTORY_ = 16;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SAME_DEVICE_ = 17;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_FILES_ = 18;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRITE_PROTECT_ = 19;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_UNIT_ = 20;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_READY_ = 21;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_COMMAND_ = 22;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CRC_ = 23;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_LENGTH_ = 24;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEEK_ = 25;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_DOS_DISK_ = 26;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECTOR_NOT_FOUND_ = 27;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OUT_OF_PAPER_ = 28;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRITE_FAULT_ = 29;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_READ_FAULT_ = 30;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GEN_FAILURE_ = 31;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHARING_VIOLATION_ = 32;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOCK_VIOLATION_ = 33;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRONG_DISK_ = 34;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHARING_BUFFER_EXCEEDED_ = 36;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HANDLE_EOF_ = 38;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HANDLE_DISK_FULL_ = 39;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SUPPORTED_ = 50;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REM_NOT_LIST_ = 51;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DUP_NAME_ = 52;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_NETPATH_ = 53;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETWORK_BUSY_ = 54;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEV_NOT_EXIST_ = 55;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_CMDS_ = 56;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ADAP_HDW_ERR_ = 57;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_NET_RESP_ = 58;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNEXP_NET_ERR_ = 59;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_REM_ADAP_ = 60;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTQ_FULL_ = 61;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SPOOL_SPACE_ = 62;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINT_CANCELLED_ = 63;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETNAME_DELETED_ = 64;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETWORK_ACCESS_DENIED_ = 65;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DEV_TYPE_ = 66;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_NET_NAME_ = 67;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_NAMES_ = 68;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_SESS_ = 69;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHARING_PAUSED_ = 70;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQ_NOT_ACCEP_ = 71;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REDIR_PAUSED_ = 72;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_EXISTS_ = 80;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_MAKE_ = 82;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_I24_ = 83;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OUT_OF_STRUCTURES_ = 84;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_ASSIGNED_ = 85;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PASSWORD_ = 86;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PARAMETER_ = 87;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NET_WRITE_FAULT_ = 88;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_PROC_SLOTS_ = 89;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_SEMAPHORES_ = 100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXCL_SEM_ALREADY_OWNED_ = 101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEM_IS_SET_ = 102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_SEM_REQUESTS_ = 103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_AT_INTERRUPT_TIME_ = 104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEM_OWNER_DIED_ = 105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEM_USER_LIMIT_ = 106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_CHANGE_ = 107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVE_LOCKED_ = 108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BROKEN_PIPE_ = 109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPEN_FAILED_ = 110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BUFFER_OVERFLOW_ = 111;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_FULL_ = 112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_SEARCH_HANDLES_ = 113;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TARGET_HANDLE_ = 114;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CATEGORY_ = 117;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_VERIFY_SWITCH_ = 118;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DRIVER_LEVEL_ = 119;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CALL_NOT_IMPLEMENTED_ = 120;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEM_TIMEOUT_ = 121;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSUFFICIENT_BUFFER_ = 122;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_NAME_ = 123;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LEVEL_ = 124;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_VOLUME_LABEL_ = 125;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MOD_NOT_FOUND_ = 126;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROC_NOT_FOUND_ = 127;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_NO_CHILDREN_ = 128;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CHILD_NOT_COMPLETE_ = 129;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIRECT_ACCESS_HANDLE_ = 130;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NEGATIVE_SEEK_ = 131;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEEK_ON_DEVICE_ = 132;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_JOIN_TARGET_ = 133;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_JOINED_ = 134;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_SUBSTED_ = 135;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_JOINED_ = 136;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SUBSTED_ = 137;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOIN_TO_JOIN_ = 138;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUBST_TO_SUBST_ = 139;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOIN_TO_SUBST_ = 140;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUBST_TO_JOIN_ = 141;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BUSY_DRIVE_ = 142;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SAME_DRIVE_ = 143;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIR_NOT_ROOT_ = 144;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIR_NOT_EMPTY_ = 145;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_SUBST_PATH_ = 146;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_JOIN_PATH_ = 147;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATH_BUSY_ = 148;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IS_SUBST_TARGET_ = 149;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_TRACE_ = 150;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EVENT_COUNT_ = 151;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_MUXWAITERS_ = 152;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LIST_FORMAT_ = 153;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LABEL_TOO_LONG_ = 154;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_TCBS_ = 155;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SIGNAL_REFUSED_ = 156;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISCARDED_ = 157;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_LOCKED_ = 158;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_THREADID_ADDR_ = 159;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_ARGUMENTS_ = 160;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_PATHNAME_ = 161;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SIGNAL_PENDING_ = 162;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MAX_THRDS_REACHED_ = 164;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOCK_FAILED_ = 167;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BUSY_ = 170;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_SUPPORT_IN_PROGRESS_ = 171;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANCEL_VIOLATION_ = 173;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ATOMIC_LOCKS_NOT_SUPPORTED_ = 174;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SEGMENT_NUMBER_ = 180;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ORDINAL_ = 182;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_EXISTS_ = 183;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FLAG_NUMBER_ = 186;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEM_NOT_FOUND_ = 187;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_STARTING_CODESEG_ = 188;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_STACKSEG_ = 189;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MODULETYPE_ = 190;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EXE_SIGNATURE_ = 191;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXE_MARKED_INVALID_ = 192;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_EXE_FORMAT_ = 193;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ITERATED_DATA_EXCEEDS_64k_ = 194;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MINALLOCSIZE_ = 195;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DYNLINK_FROM_INVALID_RING_ = 196;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IOPL_NOT_ENABLED_ = 197;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SEGDPL_ = 198;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_AUTODATASEG_EXCEEDS_64k_ = 199;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RING2SEG_MUST_BE_MOVABLE_ = 200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RELOC_CHAIN_XEEDS_SEGLIM_ = 201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INFLOOP_IN_RELOC_CHAIN_ = 202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENVVAR_NOT_FOUND_ = 203;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SIGNAL_SENT_ = 205;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILENAME_EXCED_RANGE_ = 206;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RING2_STACK_IN_USE_ = 207;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_META_EXPANSION_TOO_LONG_ = 208;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SIGNAL_NUMBER_ = 209;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_1_INACTIVE_ = 210;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOCKED_ = 212;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_MODULES_ = 214;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NESTING_NOT_ALLOWED_ = 215;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXE_MACHINE_TYPE_MISMATCH_ = 216;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY_ = 217;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY_ = 218;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_CHECKED_OUT_ = 220;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CHECKOUT_REQUIRED_ = 221;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_FILE_TYPE_ = 222;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_TOO_LARGE_ = 223;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FORMS_AUTH_REQUIRED_ = 224;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VIRUS_INFECTED_ = 225;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VIRUS_DELETED_ = 226;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PIPE_LOCAL_ = 229;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_PIPE_ = 230;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PIPE_BUSY_ = 231;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_DATA_ = 232;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PIPE_NOT_CONNECTED_ = 233;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MORE_DATA_ = 234;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VC_DISCONNECTED_ = 240;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EA_NAME_ = 254;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EA_LIST_INCONSISTENT_ = 255;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_ITEMS_ = 259;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_COPY_ = 266;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIRECTORY_ = 267;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EAS_DIDNT_FIT_ = 275;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EA_FILE_CORRUPT_ = 276;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EA_TABLE_FULL_ = 277;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EA_HANDLE_ = 278;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EAS_NOT_SUPPORTED_ = 282;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_OWNER_ = 288;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_POSTS_ = 298;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PARTIAL_COPY_ = 299;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPLOCK_NOT_GRANTED_ = 300;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_OPLOCK_PROTOCOL_ = 301;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_TOO_FRAGMENTED_ = 302;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DELETE_PENDING_ = 303;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING_ = 304;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHORT_NAMES_NOT_ENABLED_ON_VOLUME_ = 305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECURITY_STREAM_IS_INCONSISTENT_ = 306;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LOCK_RANGE_ = 307;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMAGE_SUBSYSTEM_NOT_PRESENT_ = 308;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOTIFICATION_GUID_ALREADY_DEFINED_ = 309;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EXCEPTION_HANDLER_ = 310;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DUPLICATE_PRIVILEGES_ = 311;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_RANGES_PROCESSED_ = 312;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_ALLOWED_ON_SYSTEM_FILE_ = 313;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_RESOURCES_EXHAUSTED_ = 314;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TOKEN_ = 315;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_FEATURE_NOT_SUPPORTED_ = 316;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MR_MID_NOT_FOUND_ = 317;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SCOPE_NOT_FOUND_ = 318;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNDEFINED_SCOPE_ = 319;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CAP_ = 320;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_UNREACHABLE_ = 321;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_NO_RESOURCES_ = 322;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATA_CHECKSUM_ERROR_ = 323;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERMIXED_KERNEL_EA_OPERATION_ = 324;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED_ = 326;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OFFSET_ALIGNMENT_VIOLATION_ = 327;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FIELD_IN_PARAMETER_LIST_ = 328;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPERATION_IN_PROGRESS_ = 329;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DEVICE_PATH_ = 330;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_DESCRIPTORS_ = 331;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SCRUB_DATA_DISABLED_ = 332;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_REDUNDANT_STORAGE_ = 333;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESIDENT_FILE_NOT_SUPPORTED_ = 334;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COMPRESSED_FILE_NOT_SUPPORTED_ = 335;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIRECTORY_NOT_SUPPORTED_ = 336;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_READ_FROM_COPY_ = 337;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FT_WRITE_FAILURE_ = 338;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FT_DI_SCAN_REQUIRED_ = 339;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_KERNEL_INFO_VERSION_ = 340;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PEP_INFO_VERSION_ = 341;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_NOT_EXTERNALLY_BACKED_ = 342;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXTERNAL_BACKING_PROVIDER_UNKNOWN_ = 343;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_NOACTION_REBOOT_ = 350;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_SHUTDOWN_ = 351;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_RESTART_ = 352;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MAX_SESSIONS_REACHED_ = 353;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_MODE_ALREADY_BACKGROUND_ = 400;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_MODE_NOT_BACKGROUND_ = 401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_MODE_ALREADY_BACKGROUND_ = 402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_MODE_NOT_BACKGROUND_ = 403;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_HARDWARE_ERROR_ = 483;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ADDRESS_ = 487;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_USER_PROFILE_LOAD_ = 500;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ARITHMETIC_OVERFLOW_ = 534;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PIPE_CONNECTED_ = 535;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PIPE_LISTENING_ = 536;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VERIFIER_STOP_ = 537;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ABIOS_ERROR_ = 538;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WX86_WARNING_ = 539;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WX86_ERROR_ = 540;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TIMER_NOT_CANCELED_ = 541;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNWIND_ = 542;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_STACK_ = 543;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_UNWIND_TARGET_ = 544;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PORT_ATTRIBUTES_ = 545;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PORT_MESSAGE_TOO_LONG_ = 546;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_QUOTA_LOWER_ = 547;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_ALREADY_ATTACHED_ = 548;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTRUCTION_MISALIGNMENT_ = 549;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILING_NOT_STARTED_ = 550;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILING_NOT_STOPPED_ = 551;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COULD_NOT_INTERPRET_ = 552;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILING_AT_LIMIT_ = 553;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_WAIT_ = 554;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_TERMINATE_SELF_ = 555;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNEXPECTED_MM_CREATE_ERR_ = 556;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNEXPECTED_MM_MAP_ERROR_ = 557;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNEXPECTED_MM_EXTEND_ERR_ = 558;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_FUNCTION_TABLE_ = 559;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_GUID_TRANSLATION_ = 560;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LDT_SIZE_ = 561;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LDT_OFFSET_ = 563;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LDT_DESCRIPTOR_ = 564;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_THREADS_ = 565;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_NOT_IN_PROCESS_ = 566;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGEFILE_QUOTA_EXCEEDED_ = 567;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_SERVER_CONFLICT_ = 568;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYNCHRONIZATION_REQUIRED_ = 569;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NET_OPEN_FAILED_ = 570;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IO_PRIVILEGE_FAILED_ = 571;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTROL_C_EXIT_ = 572;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MISSING_SYSTEMFILE_ = 573;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNHANDLED_EXCEPTION_ = 574;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_INIT_FAILURE_ = 575;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGEFILE_CREATE_FAILED_ = 576;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_IMAGE_HASH_ = 577;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_PAGEFILE_ = 578;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ILLEGAL_FLOAT_CONTEXT_ = 579;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_EVENT_PAIR_ = 580;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_CTRLR_CONFIG_ERROR_ = 581;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ILLEGAL_CHARACTER_ = 582;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNDEFINED_CHARACTER_ = 583;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOPPY_VOLUME_ = 584;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT_ = 585;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BACKUP_CONTROLLER_ = 586;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUTANT_LIMIT_EXCEEDED_ = 587;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FS_DRIVER_REQUIRED_ = 588;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_LOAD_REGISTRY_FILE_ = 589;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEBUG_ATTACH_FAILED_ = 590;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_PROCESS_TERMINATED_ = 591;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATA_NOT_ACCEPTED_ = 592;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VDM_HARD_ERROR_ = 593;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_CANCEL_TIMEOUT_ = 594;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPLY_MESSAGE_MISMATCH_ = 595;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOST_WRITEBEHIND_DATA_ = 596;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLIENT_SERVER_PARAMETERS_INVALID_ = 597;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_TINY_STREAM_ = 598;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STACK_OVERFLOW_READ_ = 599;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONVERT_TO_LARGE_ = 600;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FOUND_OUT_OF_SCOPE_ = 601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALLOCATE_BUCKET_ = 602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MARSHALL_OVERFLOW_ = 603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_VARIANT_ = 604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_COMPRESSION_BUFFER_ = 605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_AUDIT_FAILED_ = 606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TIMER_RESOLUTION_NOT_SET_ = 607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSUFFICIENT_LOGON_INFO_ = 608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DLL_ENTRYPOINT_ = 609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_SERVICE_ENTRYPOINT_ = 610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IP_ADDRESS_CONFLICT1_ = 611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IP_ADDRESS_CONFLICT2_ = 612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REGISTRY_QUOTA_LIMIT_ = 613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_CALLBACK_ACTIVE_ = 614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PWD_TOO_SHORT_ = 615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PWD_TOO_RECENT_ = 616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PWD_HISTORY_CONFLICT_ = 617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNSUPPORTED_COMPRESSION_ = 618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_HW_PROFILE_ = 619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PLUGPLAY_DEVICE_PATH_ = 620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUOTA_LIST_INCONSISTENT_ = 621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVALUATION_EXPIRATION_ = 622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ILLEGAL_DLL_RELOCATION_ = 623;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DLL_INIT_FAILED_LOGOFF_ = 624;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VALIDATE_CONTINUE_ = 625;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_MATCHES_ = 626;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RANGE_LIST_CONFLICT_ = 627;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVER_SID_MISMATCH_ = 628;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_ENABLE_DENY_ONLY_ = 629;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOAT_MULTIPLE_FAULTS_ = 630;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOAT_MULTIPLE_TRAPS_ = 631;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOINTERFACE_ = 632;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_FAILED_SLEEP_ = 633;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_SYSTEM_FILE_ = 634;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COMMITMENT_MINIMUM_ = 635;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_RESTART_ENUMERATION_ = 636;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_IMAGE_BAD_SIGNATURE_ = 637;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_REBOOT_REQUIRED_ = 638;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSUFFICIENT_POWER_ = 639;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MULTIPLE_FAULT_VIOLATION_ = 640;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_SHUTDOWN_ = 641;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PORT_NOT_SET_ = 642;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_VERSION_CHECK_FAILURE_ = 643;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RANGE_NOT_FOUND_ = 644;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SAFE_MODE_DRIVER_ = 646;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAILED_DRIVER_ENTRY_ = 647;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_ENUMERATION_ERROR_ = 648;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MOUNT_POINT_NOT_RESOLVED_ = 649;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DEVICE_OBJECT_PARAMETER_ = 650;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_OCCURED_ = 651;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_DATABASE_ERROR_ = 652;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_HIVE_TOO_LARGE_ = 653;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_FAILED_PRIOR_UNLOAD_ = 654;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLSNAP_PREPARE_HIBERNATE_ = 655;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HIBERNATION_FAILURE_ = 656;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PWD_TOO_LONG_ = 657;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_SYSTEM_LIMITATION_ = 665;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ASSERTION_FAILURE_ = 668;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACPI_ERROR_ = 669;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WOW_ASSERTION_ = 670;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_BAD_MPS_TABLE_ = 671;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_TRANSLATION_FAILED_ = 672;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_IRQ_TRANSLATION_FAILED_ = 673;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PNP_INVALID_ID_ = 674;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAKE_SYSTEM_DEBUGGER_ = 675;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HANDLES_CLOSED_ = 676;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXTRANEOUS_INFORMATION_ = 677;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RXACT_COMMIT_NECESSARY_ = 678;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_CHECK_ = 679;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GUID_SUBSTITUTION_MADE_ = 680;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STOPPED_ON_SYMLINK_ = 681;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LONGJUMP_ = 682;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PLUGPLAY_QUERY_VETOED_ = 683;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNWIND_CONSOLIDATE_ = 684;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REGISTRY_HIVE_RECOVERED_ = 685;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DLL_MIGHT_BE_INSECURE_ = 686;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DLL_MIGHT_BE_INCOMPATIBLE_ = 687;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_EXCEPTION_NOT_HANDLED_ = 688;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_REPLY_LATER_ = 689;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE_ = 690;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_TERMINATE_THREAD_ = 691;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_TERMINATE_PROCESS_ = 692;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_CONTROL_C_ = 693;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_PRINTEXCEPTION_C_ = 694;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_RIPEXCEPTION_ = 695;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_CONTROL_BREAK_ = 696;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_COMMAND_EXCEPTION_ = 697;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_NAME_EXISTS_ = 698;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_WAS_SUSPENDED_ = 699;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMAGE_NOT_AT_BASE_ = 700;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RXACT_STATE_CREATED_ = 701;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SEGMENT_NOTIFICATION_ = 702;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_CURRENT_DIRECTORY_ = 703;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FT_READ_RECOVERY_FROM_BACKUP_ = 704;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FT_WRITE_RECOVERY_ = 705;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMAGE_MACHINE_TYPE_MISMATCH_ = 706;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECEIVE_PARTIAL_ = 707;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECEIVE_EXPEDITED_ = 708;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECEIVE_PARTIAL_EXPEDITED_ = 709;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVENT_DONE_ = 710;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVENT_PENDING_ = 711;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CHECKING_FILE_SYSTEM_ = 712;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FATAL_APP_EXIT_ = 713;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PREDEFINED_HANDLE_ = 714;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAS_UNLOCKED_ = 715;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NOTIFICATION_ = 716;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAS_LOCKED_ = 717;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_HARD_ERROR_ = 718;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_WIN32_ = 719;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE_ = 720;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_YIELD_PERFORMED_ = 721;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TIMER_RESUME_IGNORED_ = 722;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ARBITRATION_UNHANDLED_ = 723;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CARDBUS_NOT_SUPPORTED_ = 724;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MP_PROCESSOR_MISMATCH_ = 725;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HIBERNATED_ = 726;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESUME_HIBERNATION_ = 727;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FIRMWARE_UPDATED_ = 728;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVERS_LEAKING_LOCKED_PAGES_ = 729;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAKE_SYSTEM_ = 730;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_1_ = 731;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_2_ = 732;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_3_ = 733;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_63_ = 734;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ABANDONED_WAIT_0_ = 735;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ABANDONED_WAIT_63_ = 736;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_USER_APC_ = 737;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_KERNEL_APC_ = 738;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALERTED_ = 739;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ELEVATION_REQUIRED_ = 740;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPARSE_ = 741;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPLOCK_BREAK_IN_PROGRESS_ = 742;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLUME_MOUNTED_ = 743;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RXACT_COMMITTED_ = 744;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOTIFY_CLEANUP_ = 745;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED_ = 746;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGE_FAULT_TRANSITION_ = 747;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGE_FAULT_DEMAND_ZERO_ = 748;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGE_FAULT_COPY_ON_WRITE_ = 749;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGE_FAULT_GUARD_PAGE_ = 750;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGE_FAULT_PAGING_FILE_ = 751;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CACHE_PAGE_LOCKED_ = 752;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CRASH_DUMP_ = 753;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BUFFER_ALL_ZEROS_ = 754;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPARSE_OBJECT_ = 755;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_REQUIREMENTS_CHANGED_ = 756;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSLATION_COMPLETE_ = 757;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOTHING_TO_TERMINATE_ = 758;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_NOT_IN_JOB_ = 759;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_IN_JOB_ = 760;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLSNAP_HIBERNATE_READY_ = 761;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY_ = 762;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED_ = 763;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERRUPT_STILL_CONNECTED_ = 764;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WAIT_FOR_OPLOCK_ = 765;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_EXCEPTION_HANDLED_ = 766;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DBG_CONTINUE_ = 767;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CALLBACK_POP_STACK_ = 768;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COMPRESSION_DISABLED_ = 769;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANTFETCHBACKWARDS_ = 770;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANTSCROLLBACKWARDS_ = 771;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ROWSNOTRELEASED_ = 772;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_ACCESSOR_FLAGS_ = 773;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ERRORS_ENCOUNTERED_ = 774;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_CAPABLE_ = 775;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQUEST_OUT_OF_SEQUENCE_ = 776;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VERSION_PARSE_ERROR_ = 777;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BADSTARTPOSITION_ = 778;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMORY_HARDWARE_ = 779;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_REPAIR_DISABLED_ = 780;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE_ = 781;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_POWERSTATE_TRANSITION_ = 782;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION_ = 783;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_EXCEPTION_ = 784;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_AUDIT_BY_POLICY_ = 785;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY_ = 786;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ABANDON_HIBERFILE_ = 787;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED_ = 788;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR_ = 789;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR_ = 790;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_MCFG_TABLE_ = 791;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_REPAIR_REDIRECTED_ = 792;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_REPAIR_UNSUCCESSFUL_ = 793;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_LOG_OVERFULL_ = 794;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_LOG_CORRUPTED_ = 795;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_LOG_UNAVAILABLE_ = 796;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_LOG_DELETED_FULL_ = 797;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORRUPT_LOG_CLEARED_ = 798;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ORPHAN_NAME_EXHAUSTED_ = 799;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPLOCK_SWITCHED_TO_NEW_HANDLE_ = 800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_GRANT_REQUESTED_OPLOCK_ = 801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_BREAK_OPLOCK_ = 802;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPLOCK_HANDLE_CLOSED_ = 803;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_ACE_CONDITION_ = 804;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ACE_CONDITION_ = 805;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_HANDLE_REVOKED_ = 806;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMAGE_AT_DIFFERENT_BASE_ = 807;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENCRYPTED_IO_NOT_POSSIBLE_ = 808;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EA_ACCESS_DENIED_ = 994;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPERATION_ABORTED_ = 995;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IO_INCOMPLETE_ = 996;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IO_PENDING_ = 997;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOACCESS_ = 998;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SWAPERROR_ = 999;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STACK_OVERFLOW_ = 1001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MESSAGE_ = 1002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CAN_NOT_COMPLETE_ = 1003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FLAGS_ = 1004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNRECOGNIZED_VOLUME_ = 1005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_INVALID_ = 1006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FULLSCREEN_MODE_ = 1007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_TOKEN_ = 1008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BADDB_ = 1009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BADKEY_ = 1010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANTOPEN_ = 1011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANTREAD_ = 1012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANTWRITE_ = 1013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REGISTRY_RECOVERED_ = 1014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REGISTRY_CORRUPT_ = 1015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REGISTRY_IO_FAILED_ = 1016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_REGISTRY_FILE_ = 1017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_KEY_DELETED_ = 1018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_LOG_SPACE_ = 1019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_KEY_HAS_CHILDREN_ = 1020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CHILD_MUST_BE_VOLATILE_ = 1021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOTIFY_ENUM_DIR_ = 1022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENT_SERVICES_RUNNING_ = 1051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SERVICE_CONTROL_ = 1052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_REQUEST_TIMEOUT_ = 1053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NO_THREAD_ = 1054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_DATABASE_LOCKED_ = 1055;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_ALREADY_RUNNING_ = 1056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SERVICE_ACCOUNT_ = 1057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_DISABLED_ = 1058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CIRCULAR_DEPENDENCY_ = 1059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_DOES_NOT_EXIST_ = 1060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_CANNOT_ACCEPT_CTRL_ = 1061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NOT_ACTIVE_ = 1062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAILED_SERVICE_CONTROLLER_CONNECT_ = 1063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXCEPTION_IN_SERVICE_ = 1064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATABASE_DOES_NOT_EXIST_ = 1065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_SPECIFIC_ERROR_ = 1066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_ABORTED_ = 1067;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_DEPENDENCY_FAIL_ = 1068;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_LOGON_FAILED_ = 1069;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_START_HANG_ = 1070;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SERVICE_LOCK_ = 1071;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_MARKED_FOR_DELETE_ = 1072;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_EXISTS_ = 1073;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_RUNNING_LKG_ = 1074;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_DEPENDENCY_DELETED_ = 1075;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BOOT_ALREADY_ACCEPTED_ = 1076;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NEVER_STARTED_ = 1077;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DUPLICATE_SERVICE_NAME_ = 1078;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIFFERENT_SERVICE_ACCOUNT_ = 1079;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_DETECT_DRIVER_FAILURE_ = 1080;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_DETECT_PROCESS_ABORT_ = 1081;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_RECOVERY_PROGRAM_ = 1082;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NOT_IN_EXE_ = 1083;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SAFEBOOT_SERVICE_ = 1084;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_END_OF_MEDIA_ = 1100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILEMARK_DETECTED_ = 1101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BEGINNING_OF_MEDIA_ = 1102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SETMARK_DETECTED_ = 1103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_DATA_DETECTED_ = 1104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PARTITION_FAILURE_ = 1105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_BLOCK_LENGTH_ = 1106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_NOT_PARTITIONED_ = 1107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_LOCK_MEDIA_ = 1108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_UNLOAD_MEDIA_ = 1109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_CHANGED_ = 1110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BUS_RESET_ = 1111;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MEDIA_IN_DRIVE_ = 1112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_UNICODE_TRANSLATION_ = 1113;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DLL_INIT_FAILED_ = 1114;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHUTDOWN_IN_PROGRESS_ = 1115;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SHUTDOWN_IN_PROGRESS_ = 1116;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IO_DEVICE_ = 1117;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERIAL_NO_DEVICE_ = 1118;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IRQ_BUSY_ = 1119;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MORE_WRITES_ = 1120;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COUNTER_TIMEOUT_ = 1121;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOPPY_ID_MARK_NOT_FOUND_ = 1122;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOPPY_WRONG_CYLINDER_ = 1123;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOPPY_UNKNOWN_ERROR_ = 1124;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOPPY_BAD_REGISTERS_ = 1125;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_RECALIBRATE_FAILED_ = 1126;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_OPERATION_FAILED_ = 1127;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_RESET_FAILED_ = 1128;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EOM_OVERFLOW_ = 1129;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_ENOUGH_SERVER_MEMORY_ = 1130;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POSSIBLE_DEADLOCK_ = 1131;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MAPPED_ALIGNMENT_ = 1132;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SET_POWER_STATE_VETOED_ = 1140;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SET_POWER_STATE_FAILED_ = 1141;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_LINKS_ = 1142;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OLD_WIN_VERSION_ = 1150;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_WRONG_OS_ = 1151;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SINGLE_INSTANCE_APP_ = 1152;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RMODE_APP_ = 1153;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DLL_ = 1154;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_ASSOCIATION_ = 1155;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DDE_FAIL_ = 1156;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DLL_NOT_FOUND_ = 1157;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_USER_HANDLES_ = 1158;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MESSAGE_SYNC_ONLY_ = 1159;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SOURCE_ELEMENT_EMPTY_ = 1160;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DESTINATION_ELEMENT_FULL_ = 1161;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ILLEGAL_ELEMENT_ADDRESS_ = 1162;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MAGAZINE_NOT_PRESENT_ = 1163;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_REINITIALIZATION_NEEDED_ = 1164;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_REQUIRES_CLEANING_ = 1165;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_DOOR_OPEN_ = 1166;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_NOT_CONNECTED_ = 1167;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_FOUND_ = 1168;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MATCH_ = 1169;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SET_NOT_FOUND_ = 1170;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POINT_NOT_FOUND_ = 1171;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_TRACKING_SERVICE_ = 1172;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_VOLUME_ID_ = 1173;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_REMOVE_REPLACED_ = 1175;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_MOVE_REPLACEMENT_ = 1176;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_MOVE_REPLACEMENT_2_ = 1177;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOURNAL_DELETE_IN_PROGRESS_ = 1178;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOURNAL_NOT_ACTIVE_ = 1179;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POTENTIAL_FILE_FOUND_ = 1180;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOURNAL_ENTRY_DELETED_ = 1181;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHUTDOWN_IS_SCHEDULED_ = 1190;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHUTDOWN_USERS_LOGGED_ON_ = 1191;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DEVICE_ = 1200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_UNAVAIL_ = 1201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_ALREADY_REMEMBERED_ = 1202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_NET_OR_BAD_PATH_ = 1203;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_PROVIDER_ = 1204;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_OPEN_PROFILE_ = 1205;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_PROFILE_ = 1206;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_CONTAINER_ = 1207;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXTENDED_ERROR_ = 1208;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_GROUPNAME_ = 1209;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_COMPUTERNAME_ = 1210;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EVENTNAME_ = 1211;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DOMAINNAME_ = 1212;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SERVICENAME_ = 1213;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_NETNAME_ = 1214;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SHARENAME_ = 1215;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PASSWORDNAME_ = 1216;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MESSAGENAME_ = 1217;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MESSAGEDEST_ = 1218;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SESSION_CREDENTIAL_CONFLICT_ = 1219;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOTE_SESSION_LIMIT_EXCEEDED_ = 1220;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DUP_DOMAINNAME_ = 1221;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_NETWORK_ = 1222;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANCELLED_ = 1223;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_USER_MAPPED_FILE_ = 1224;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_REFUSED_ = 1225;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GRACEFUL_DISCONNECT_ = 1226;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ADDRESS_ALREADY_ASSOCIATED_ = 1227;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ADDRESS_NOT_ASSOCIATED_ = 1228;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_INVALID_ = 1229;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_ACTIVE_ = 1230;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETWORK_UNREACHABLE_ = 1231;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOST_UNREACHABLE_ = 1232;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROTOCOL_UNREACHABLE_ = 1233;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PORT_UNREACHABLE_ = 1234;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQUEST_ABORTED_ = 1235;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_ABORTED_ = 1236;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RETRY_ = 1237;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTION_COUNT_LIMIT_ = 1238;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGIN_TIME_RESTRICTION_ = 1239;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGIN_WKSTA_RESTRICTION_ = 1240;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCORRECT_ADDRESS_ = 1241;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_REGISTERED_ = 1242;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NOT_FOUND_ = 1243;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_AUTHENTICATED_ = 1244;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_LOGGED_ON_ = 1245;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTINUE_ = 1246;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_INITIALIZED_ = 1247;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_MORE_DEVICES_ = 1248;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_SITE_ = 1249;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_CONTROLLER_EXISTS_ = 1250;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ONLY_IF_CONNECTED_ = 1251;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OVERRIDE_NOCHANGES_ = 1252;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_USER_PROFILE_ = 1253;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SUPPORTED_ON_SBS_ = 1254;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVER_SHUTDOWN_IN_PROGRESS_ = 1255;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOST_DOWN_ = 1256;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NON_ACCOUNT_SID_ = 1257;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NON_DOMAIN_SID_ = 1258;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APPHELP_BLOCK_ = 1259;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_DISABLED_BY_POLICY_ = 1260;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REG_NAT_CONSUMPTION_ = 1261;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CSCSHARE_OFFLINE_ = 1262;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PKINIT_FAILURE_ = 1263;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SMARTCARD_SUBSYSTEM_FAILURE_ = 1264;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOWNGRADE_DETECTED_ = 1265;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MACHINE_LOCKED_ = 1271;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CALLBACK_SUPPLIED_INVALID_DATA_ = 1273;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED_ = 1274;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_BLOCKED_ = 1275;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_IMPORT_OF_NON_DLL_ = 1276;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_DISABLED_WEBBLADE_ = 1277;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER_ = 1278;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECOVERY_FAILURE_ = 1279;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_FIBER_ = 1280;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_THREAD_ = 1281;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STACK_BUFFER_OVERRUN_ = 1282;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PARAMETER_QUOTA_EXCEEDED_ = 1283;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEBUGGER_INACTIVE_ = 1284;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DELAY_LOAD_FAILED_ = 1285;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VDM_DISALLOWED_ = 1286;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNIDENTIFIED_ERROR_ = 1287;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CRUNTIME_PARAMETER_ = 1288;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BEYOND_VDL_ = 1289;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCOMPATIBLE_SERVICE_SID_TYPE_ = 1290;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVER_PROCESS_TERMINATED_ = 1291;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMPLEMENTATION_LIMIT_ = 1292;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROCESS_IS_PROTECTED_ = 1293;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICE_NOTIFY_CLIENT_LAGGING_ = 1294;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_QUOTA_EXCEEDED_ = 1295;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTENT_BLOCKED_ = 1296;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE_ = 1297;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_HANG_ = 1298;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LABEL_ = 1299;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_ALL_ASSIGNED_ = 1300;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SOME_NOT_MAPPED_ = 1301;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_QUOTAS_FOR_ACCOUNT_ = 1302;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOCAL_USER_SESSION_KEY_ = 1303;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NULL_LM_PASSWORD_ = 1304;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_REVISION_ = 1305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REVISION_MISMATCH_ = 1306;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_OWNER_ = 1307;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRIMARY_GROUP_ = 1308;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_IMPERSONATION_TOKEN_ = 1309;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_DISABLE_MANDATORY_ = 1310;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_LOGON_SERVERS_ = 1311;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_LOGON_SESSION_ = 1312;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_PRIVILEGE_ = 1313;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRIVILEGE_NOT_HELD_ = 1314;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ACCOUNT_NAME_ = 1315;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_USER_EXISTS_ = 1316;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_USER_ = 1317;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GROUP_EXISTS_ = 1318;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_GROUP_ = 1319;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMBER_IN_GROUP_ = 1320;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMBER_NOT_IN_GROUP_ = 1321;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LAST_ADMIN_ = 1322;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRONG_PASSWORD_ = 1323;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ILL_FORMED_PASSWORD_ = 1324;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PASSWORD_RESTRICTION_ = 1325;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_FAILURE_ = 1326;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCOUNT_RESTRICTION_ = 1327;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LOGON_HOURS_ = 1328;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_WORKSTATION_ = 1329;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PASSWORD_EXPIRED_ = 1330;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCOUNT_DISABLED_ = 1331;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NONE_MAPPED_ = 1332;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_LUIDS_REQUESTED_ = 1333;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LUIDS_EXHAUSTED_ = 1334;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SUB_AUTHORITY_ = 1335;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ACL_ = 1336;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SID_ = 1337;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SECURITY_DESCR_ = 1338;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_INHERITANCE_ACL_ = 1340;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVER_DISABLED_ = 1341;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVER_NOT_DISABLED_ = 1342;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ID_AUTHORITY_ = 1343;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALLOTTED_SPACE_EXCEEDED_ = 1344;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_GROUP_ATTRIBUTES_ = 1345;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_IMPERSONATION_LEVEL_ = 1346;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_OPEN_ANONYMOUS_ = 1347;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_VALIDATION_CLASS_ = 1348;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_TOKEN_TYPE_ = 1349;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SECURITY_ON_OBJECT_ = 1350;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_ACCESS_DOMAIN_INFO_ = 1351;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SERVER_STATE_ = 1352;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DOMAIN_STATE_ = 1353;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DOMAIN_ROLE_ = 1354;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_DOMAIN_ = 1355;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_EXISTS_ = 1356;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_LIMIT_EXCEEDED_ = 1357;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERNAL_DB_CORRUPTION_ = 1358;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERNAL_ERROR_ = 1359;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GENERIC_NOT_MAPPED_ = 1360;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DESCRIPTOR_FORMAT_ = 1361;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_LOGON_PROCESS_ = 1362;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_SESSION_EXISTS_ = 1363;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_PACKAGE_ = 1364;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_LOGON_SESSION_STATE_ = 1365;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_SESSION_COLLISION_ = 1366;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LOGON_TYPE_ = 1367;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_IMPERSONATE_ = 1368;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RXACT_INVALID_STATE_ = 1369;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RXACT_COMMIT_FAILURE_ = 1370;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPECIAL_ACCOUNT_ = 1371;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPECIAL_GROUP_ = 1372;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPECIAL_USER_ = 1373;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMBERS_PRIMARY_GROUP_ = 1374;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOKEN_ALREADY_IN_USE_ = 1375;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_ALIAS_ = 1376;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMBER_NOT_IN_ALIAS_ = 1377;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEMBER_IN_ALIAS_ = 1378;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALIAS_EXISTS_ = 1379;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_NOT_GRANTED_ = 1380;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_SECRETS_ = 1381;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECRET_TOO_LONG_ = 1382;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INTERNAL_DB_ERROR_ = 1383;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_CONTEXT_IDS_ = 1384;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOGON_TYPE_NOT_GRANTED_ = 1385;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NT_CROSS_ENCRYPTION_REQUIRED_ = 1386;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUCH_MEMBER_ = 1387;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MEMBER_ = 1388;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TOO_MANY_SIDS_ = 1389;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LM_CROSS_ENCRYPTION_REQUIRED_ = 1390;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_INHERITANCE_ = 1391;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_CORRUPT_ = 1392;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_CORRUPT_ = 1393;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_USER_SESSION_KEY_ = 1394;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LICENSE_QUOTA_EXCEEDED_ = 1395;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRONG_TARGET_NAME_ = 1396;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUTUAL_AUTH_FAILED_ = 1397;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TIME_SKEW_ = 1398;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CURRENT_DOMAIN_NOT_ALLOWED_ = 1399;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_WINDOW_HANDLE_ = 1400;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MENU_HANDLE_ = 1401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CURSOR_HANDLE_ = 1402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ACCEL_HANDLE_ = 1403;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_HOOK_HANDLE_ = 1404;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DWP_HANDLE_ = 1405;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TLW_WITH_WSCHILD_ = 1406;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_FIND_WND_CLASS_ = 1407;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WINDOW_OF_OTHER_THREAD_ = 1408;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOTKEY_ALREADY_REGISTERED_ = 1409;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLASS_ALREADY_EXISTS_ = 1410;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLASS_DOES_NOT_EXIST_ = 1411;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLASS_HAS_WINDOWS_ = 1412;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_INDEX_ = 1413;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ICON_HANDLE_ = 1414;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRIVATE_DIALOG_INDEX_ = 1415;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LISTBOX_ID_NOT_FOUND_ = 1416;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_WILDCARD_CHARACTERS_ = 1417;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLIPBOARD_NOT_OPEN_ = 1418;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOTKEY_NOT_REGISTERED_ = 1419;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WINDOW_NOT_DIALOG_ = 1420;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTROL_ID_NOT_FOUND_ = 1421;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_COMBOBOX_MESSAGE_ = 1422;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WINDOW_NOT_COMBOBOX_ = 1423;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_EDIT_HEIGHT_ = 1424;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DC_NOT_FOUND_ = 1425;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_HOOK_FILTER_ = 1426;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FILTER_PROC_ = 1427;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOOK_NEEDS_HMOD_ = 1428;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GLOBAL_ONLY_HOOK_ = 1429;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_JOURNAL_HOOK_SET_ = 1430;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOOK_NOT_INSTALLED_ = 1431;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LB_MESSAGE_ = 1432;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SETCOUNT_ON_BAD_LB_ = 1433;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LB_WITHOUT_TABSTOPS_ = 1434;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DESTROY_OBJECT_OF_OTHER_THREAD_ = 1435;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CHILD_WINDOW_MENU_ = 1436;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SYSTEM_MENU_ = 1437;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MSGBOX_STYLE_ = 1438;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SPI_VALUE_ = 1439;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SCREEN_ALREADY_LOCKED_ = 1440;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HWNDS_HAVE_DIFF_PARENT_ = 1441;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_CHILD_WINDOW_ = 1442;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_GW_COMMAND_ = 1443;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_THREAD_ID_ = 1444;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NON_MDICHILD_WINDOW_ = 1445;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POPUP_ALREADY_ACTIVE_ = 1446;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SCROLLBARS_ = 1447;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SCROLLBAR_RANGE_ = 1448;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SHOWWIN_COMMAND_ = 1449;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SYSTEM_RESOURCES_ = 1450;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NONPAGED_SYSTEM_RESOURCES_ = 1451;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGED_SYSTEM_RESOURCES_ = 1452;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WORKING_SET_QUOTA_ = 1453;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PAGEFILE_QUOTA_ = 1454;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COMMITMENT_LIMIT_ = 1455;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MENU_ITEM_NOT_FOUND_ = 1456;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_KEYBOARD_HANDLE_ = 1457;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOOK_TYPE_NOT_ALLOWED_ = 1458;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION_ = 1459;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TIMEOUT_ = 1460;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MONITOR_HANDLE_ = 1461;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCORRECT_SIZE_ = 1462;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYMLINK_CLASS_DISABLED_ = 1463;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYMLINK_NOT_SUPPORTED_ = 1464;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_XML_PARSE_ERROR_ = 1465;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_XMLDSIG_ERROR_ = 1466;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESTART_APPLICATION_ = 1467;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRONG_COMPARTMENT_ = 1468;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_AUTHIP_FAILURE_ = 1469;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_NVRAM_RESOURCES_ = 1470;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_GUI_PROCESS_ = 1471;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVENTLOG_FILE_CORRUPT_ = 1500;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVENTLOG_CANT_START_ = 1501;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_FILE_FULL_ = 1502;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVENTLOG_FILE_CHANGED_ = 1503;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TASK_NAME_ = 1550;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TASK_INDEX_ = 1551;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_THREAD_ALREADY_IN_TASK_ = 1552;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_SERVICE_FAILURE_ = 1601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_USEREXIT_ = 1602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_FAILURE_ = 1603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_SUSPEND_ = 1604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PRODUCT_ = 1605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_FEATURE_ = 1606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_COMPONENT_ = 1607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PROPERTY_ = 1608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_HANDLE_STATE_ = 1609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_CONFIGURATION_ = 1610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INDEX_ABSENT_ = 1611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_SOURCE_ABSENT_ = 1612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_VERSION_ = 1613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRODUCT_UNINSTALLED_ = 1614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_QUERY_SYNTAX_ = 1615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FIELD_ = 1616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_REMOVED_ = 1617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_ALREADY_RUNNING_ = 1618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_OPEN_FAILED_ = 1619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_INVALID_ = 1620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_UI_FAILURE_ = 1621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_LOG_FAILURE_ = 1622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_LANGUAGE_UNSUPPORTED_ = 1623;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_TRANSFORM_FAILURE_ = 1624;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_REJECTED_ = 1625;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FUNCTION_NOT_CALLED_ = 1626;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FUNCTION_FAILED_ = 1627;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TABLE_ = 1628;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATATYPE_MISMATCH_ = 1629;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNSUPPORTED_TYPE_ = 1630;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CREATE_FAILED_ = 1631;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_TEMP_UNWRITABLE_ = 1632;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PLATFORM_UNSUPPORTED_ = 1633;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_NOTUSED_ = 1634;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_PACKAGE_OPEN_FAILED_ = 1635;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_PACKAGE_INVALID_ = 1636;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_PACKAGE_UNSUPPORTED_ = 1637;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRODUCT_VERSION_ = 1638;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_COMMAND_LINE_ = 1639;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_REMOTE_DISALLOWED_ = 1640;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUCCESS_REBOOT_INITIATED_ = 1641;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_TARGET_NOT_FOUND_ = 1642;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_PACKAGE_REJECTED_ = 1643;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_TRANSFORM_REJECTED_ = 1644;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_REMOTE_PROHIBITED_ = 1645;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_REMOVAL_UNSUPPORTED_ = 1646;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PATCH_ = 1647;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_NO_SEQUENCE_ = 1648;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_REMOVAL_DISALLOWED_ = 1649;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PATCH_XML_ = 1650;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT_ = 1651;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_SERVICE_SAFEBOOT_ = 1652;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_FAST_EXCEPTION_ = 1653;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_REJECTED_ = 1654;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DYNAMIC_CODE_BLOCKED_ = 1655;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_STRING_BINDING_ = 1700;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_WRONG_KIND_OF_BINDING_ = 1701;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_BINDING_ = 1702;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROTSEQ_NOT_SUPPORTED_ = 1703;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_RPC_PROTSEQ_ = 1704;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_STRING_UUID_ = 1705;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_ENDPOINT_FORMAT_ = 1706;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_NET_ADDR_ = 1707;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_ENDPOINT_FOUND_ = 1708;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_TIMEOUT_ = 1709;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_OBJECT_NOT_FOUND_ = 1710;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ALREADY_REGISTERED_ = 1711;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_TYPE_ALREADY_REGISTERED_ = 1712;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ALREADY_LISTENING_ = 1713;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_PROTSEQS_REGISTERED_ = 1714;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOT_LISTENING_ = 1715;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_MGR_TYPE_ = 1716;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_IF_ = 1717;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_BINDINGS_ = 1718;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_PROTSEQS_ = 1719;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CANT_CREATE_ENDPOINT_ = 1720;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_OUT_OF_RESOURCES_ = 1721;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_SERVER_UNAVAILABLE_ = 1722;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_SERVER_TOO_BUSY_ = 1723;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_NETWORK_OPTIONS_ = 1724;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_CALL_ACTIVE_ = 1725;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CALL_FAILED_ = 1726;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CALL_FAILED_DNE_ = 1727;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROTOCOL_ERROR_ = 1728;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROXY_ACCESS_DENIED_ = 1729;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNSUPPORTED_TRANS_SYN_ = 1730;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNSUPPORTED_TYPE_ = 1732;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_TAG_ = 1733;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_BOUND_ = 1734;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_ENTRY_NAME_ = 1735;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_NAME_SYNTAX_ = 1736;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNSUPPORTED_NAME_SYNTAX_ = 1737;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UUID_NO_ADDRESS_ = 1739;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_DUPLICATE_ENDPOINT_ = 1740;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_AUTHN_TYPE_ = 1741;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_MAX_CALLS_TOO_SMALL_ = 1742;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_STRING_TOO_LONG_ = 1743;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROTSEQ_NOT_FOUND_ = 1744;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROCNUM_OUT_OF_RANGE_ = 1745;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_BINDING_HAS_NO_AUTH_ = 1746;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_AUTHN_SERVICE_ = 1747;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_AUTHN_LEVEL_ = 1748;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_AUTH_IDENTITY_ = 1749;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNKNOWN_AUTHZ_SERVICE_ = 1750;
+BOOST_CONSTEXPR_OR_CONST DWORD_ EPT_S_INVALID_ENTRY_ = 1751;
+BOOST_CONSTEXPR_OR_CONST DWORD_ EPT_S_CANT_PERFORM_OP_ = 1752;
+BOOST_CONSTEXPR_OR_CONST DWORD_ EPT_S_NOT_REGISTERED_ = 1753;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOTHING_TO_EXPORT_ = 1754;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INCOMPLETE_NAME_ = 1755;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_VERS_OPTION_ = 1756;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_MORE_MEMBERS_ = 1757;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOT_ALL_OBJS_UNEXPORTED_ = 1758;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INTERFACE_NOT_FOUND_ = 1759;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ENTRY_ALREADY_EXISTS_ = 1760;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ENTRY_NOT_FOUND_ = 1761;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NAME_SERVICE_UNAVAILABLE_ = 1762;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_NAF_ID_ = 1763;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CANNOT_SUPPORT_ = 1764;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_CONTEXT_AVAILABLE_ = 1765;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INTERNAL_ERROR_ = 1766;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ZERO_DIVIDE_ = 1767;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ADDRESS_ERROR_ = 1768;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_FP_DIV_ZERO_ = 1769;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_FP_UNDERFLOW_ = 1770;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_FP_OVERFLOW_ = 1771;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_NO_MORE_ENTRIES_ = 1772;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_CHAR_TRANS_OPEN_FAIL_ = 1773;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_CHAR_TRANS_SHORT_FILE_ = 1774;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_IN_NULL_CONTEXT_ = 1775;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_CONTEXT_DAMAGED_ = 1777;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_HANDLES_MISMATCH_ = 1778;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_SS_CANNOT_GET_CALL_HANDLE_ = 1779;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_NULL_REF_POINTER_ = 1780;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_ENUM_VALUE_OUT_OF_RANGE_ = 1781;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_BYTE_COUNT_TOO_SMALL_ = 1782;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_BAD_STUB_DATA_ = 1783;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_USER_BUFFER_ = 1784;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNRECOGNIZED_MEDIA_ = 1785;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_TRUST_LSA_SECRET_ = 1786;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_TRUST_SAM_ACCOUNT_ = 1787;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRUSTED_DOMAIN_FAILURE_ = 1788;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRUSTED_RELATIONSHIP_FAILURE_ = 1789;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRUST_FAILURE_ = 1790;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CALL_IN_PROGRESS_ = 1791;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETLOGON_NOT_STARTED_ = 1792;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCOUNT_EXPIRED_ = 1793;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REDIRECTOR_HAS_OPEN_HANDLES_ = 1794;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_ALREADY_INSTALLED_ = 1795;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PORT_ = 1796;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PRINTER_DRIVER_ = 1797;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PRINTPROCESSOR_ = 1798;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_SEPARATOR_FILE_ = 1799;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRIORITY_ = 1800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRINTER_NAME_ = 1801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_ALREADY_EXISTS_ = 1802;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRINTER_COMMAND_ = 1803;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DATATYPE_ = 1804;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_ENVIRONMENT_ = 1805;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_MORE_BINDINGS_ = 1806;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT_ = 1807;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT_ = 1808;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOLOGON_SERVER_TRUST_ACCOUNT_ = 1809;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_TRUST_INCONSISTENT_ = 1810;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVER_HAS_OPEN_HANDLES_ = 1811;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_DATA_NOT_FOUND_ = 1812;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_TYPE_NOT_FOUND_ = 1813;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NAME_NOT_FOUND_ = 1814;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_LANG_NOT_FOUND_ = 1815;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_ENOUGH_QUOTA_ = 1816;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_INTERFACES_ = 1817;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_CALL_CANCELLED_ = 1818;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_BINDING_INCOMPLETE_ = 1819;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_COMM_FAILURE_ = 1820;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UNSUPPORTED_AUTHN_LEVEL_ = 1821;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NO_PRINC_NAME_ = 1822;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOT_RPC_ERROR_ = 1823;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_UUID_LOCAL_ONLY_ = 1824;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_SEC_PKG_ERROR_ = 1825;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOT_CANCELLED_ = 1826;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_INVALID_ES_ACTION_ = 1827;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_WRONG_ES_VERSION_ = 1828;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_WRONG_STUB_VERSION_ = 1829;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_INVALID_PIPE_OBJECT_ = 1830;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_WRONG_PIPE_ORDER_ = 1831;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_WRONG_PIPE_VERSION_ = 1832;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_COOKIE_AUTH_FAILED_ = 1833;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_GROUP_MEMBER_NOT_FOUND_ = 1898;
+BOOST_CONSTEXPR_OR_CONST DWORD_ EPT_S_CANT_CREATE_ = 1899;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_OBJECT_ = 1900;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TIME_ = 1901;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FORM_NAME_ = 1902;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_FORM_SIZE_ = 1903;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALREADY_WAITING_ = 1904;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DELETED_ = 1905;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRINTER_STATE_ = 1906;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PASSWORD_MUST_CHANGE_ = 1907;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_CONTROLLER_NOT_FOUND_ = 1908;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACCOUNT_LOCKED_OUT_ = 1909;
+BOOST_CONSTEXPR_OR_CONST DWORD_ OR_INVALID_OXID_ = 1910;
+BOOST_CONSTEXPR_OR_CONST DWORD_ OR_INVALID_OID_ = 1911;
+BOOST_CONSTEXPR_OR_CONST DWORD_ OR_INVALID_SET_ = 1912;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_SEND_INCOMPLETE_ = 1913;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_ASYNC_HANDLE_ = 1914;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INVALID_ASYNC_CALL_ = 1915;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_PIPE_CLOSED_ = 1916;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_PIPE_DISCIPLINE_ERROR_ = 1917;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_X_PIPE_EMPTY_ = 1918;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SITENAME_ = 1919;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_ACCESS_FILE_ = 1920;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_RESOLVE_FILENAME_ = 1921;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_ENTRY_TYPE_MISMATCH_ = 1922;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_NOT_ALL_OBJS_EXPORTED_ = 1923;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_INTERFACE_NOT_EXPORTED_ = 1924;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PROFILE_NOT_ADDED_ = 1925;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PRF_ELT_NOT_ADDED_ = 1926;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_PRF_ELT_NOT_REMOVED_ = 1927;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_GRP_ELT_NOT_ADDED_ = 1928;
+BOOST_CONSTEXPR_OR_CONST DWORD_ RPC_S_GRP_ELT_NOT_REMOVED_ = 1929;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_KM_DRIVER_BLOCKED_ = 1930;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTEXT_EXPIRED_ = 1931;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PER_USER_TRUST_QUOTA_EXCEEDED_ = 1932;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED_ = 1933;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED_ = 1934;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_AUTHENTICATION_FIREWALL_FAILED_ = 1935;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED_ = 1936;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NTLM_BLOCKED_ = 1937;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PASSWORD_CHANGE_REQUIRED_ = 1938;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PIXEL_FORMAT_ = 2000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_DRIVER_ = 2001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_WINDOW_STYLE_ = 2002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_METAFILE_NOT_SUPPORTED_ = 2003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSFORM_NOT_SUPPORTED_ = 2004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLIPPING_NOT_SUPPORTED_ = 2005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CMM_ = 2010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PROFILE_ = 2011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TAG_NOT_FOUND_ = 2012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TAG_NOT_PRESENT_ = 2013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DUPLICATE_TAG_ = 2014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE_ = 2015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILE_NOT_FOUND_ = 2016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_COLORSPACE_ = 2017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ICM_NOT_ENABLED_ = 2018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DELETING_ICM_XFORM_ = 2019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TRANSFORM_ = 2020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COLORSPACE_MISMATCH_ = 2021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_COLORINDEX_ = 2022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROFILE_DOES_NOT_MATCH_DEVICE_ = 2023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTED_OTHER_PASSWORD_ = 2108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT_ = 2109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_USERNAME_ = 2202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_CONNECTED_ = 2250;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPEN_FILES_ = 2401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACTIVE_CONNECTIONS_ = 2402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_IN_USE_ = 2404;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNKNOWN_PRINT_MONITOR_ = 3000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_IN_USE_ = 3001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPOOL_FILE_NOT_FOUND_ = 3002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPL_NO_STARTDOC_ = 3003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPL_NO_ADDJOB_ = 3004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED_ = 3005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINT_MONITOR_ALREADY_INSTALLED_ = 3006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRINT_MONITOR_ = 3007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINT_MONITOR_IN_USE_ = 3008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_HAS_JOBS_QUEUED_ = 3009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUCCESS_REBOOT_REQUIRED_ = 3010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SUCCESS_RESTART_REQUIRED_ = 3011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_NOT_FOUND_ = 3012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_WARNED_ = 3013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_BLOCKED_ = 3014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_PACKAGE_IN_USE_ = 3015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND_ = 3016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_REBOOT_REQUIRED_ = 3017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FAIL_REBOOT_INITIATED_ = 3018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED_ = 3019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINT_JOB_RESTART_REQUIRED_ = 3020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PRINTER_DRIVER_MANIFEST_ = 3021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PRINTER_NOT_SHAREABLE_ = 3022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQUEST_PAUSED_ = 3050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IO_REISSUE_AS_CACHED_ = 3950;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WINS_INTERNAL_ = 4000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CAN_NOT_DEL_LOCAL_WINS_ = 4001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATIC_INIT_ = 4002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INC_BACKUP_ = 4003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FULL_BACKUP_ = 4004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REC_NON_EXISTENT_ = 4005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RPL_NOT_ALLOWED_ = 4006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_CONTENTINFO_VERSION_UNSUPPORTED_ = 4050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_CANNOT_PARSE_CONTENTINFO_ = 4051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_MISSING_DATA_ = 4052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_NO_MORE_ = 4053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_NOT_INITIALIZED_ = 4054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_ALREADY_INITIALIZED_ = 4055;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_SHUTDOWN_IN_PROGRESS_ = 4056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_INVALIDATED_ = 4057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_ALREADY_EXISTS_ = 4058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_OPERATION_NOTFOUND_ = 4059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_ALREADY_COMPLETED_ = 4060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_OUT_OF_BOUNDS_ = 4061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_VERSION_UNSUPPORTED_ = 4062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_INVALID_CONFIGURATION_ = 4063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_NOT_LICENSED_ = 4064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_SERVICE_UNAVAILABLE_ = 4065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ PEERDIST_ERROR_TRUST_FAILURE_ = 4066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DHCP_ADDRESS_CONFLICT_ = 4100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_GUID_NOT_FOUND_ = 4200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_INSTANCE_NOT_FOUND_ = 4201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_ITEMID_NOT_FOUND_ = 4202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_TRY_AGAIN_ = 4203;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_DP_NOT_FOUND_ = 4204;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_UNRESOLVED_INSTANCE_REF_ = 4205;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_ALREADY_ENABLED_ = 4206;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_GUID_DISCONNECTED_ = 4207;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_SERVER_UNAVAILABLE_ = 4208;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_DP_FAILED_ = 4209;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_INVALID_MOF_ = 4210;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_INVALID_REGINFO_ = 4211;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_ALREADY_DISABLED_ = 4212;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_READ_ONLY_ = 4213;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WMI_SET_FAILURE_ = 4214;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_APPCONTAINER_ = 4250;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APPCONTAINER_REQUIRED_ = 4251;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SUPPORTED_IN_APPCONTAINER_ = 4252;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_PACKAGE_SID_LENGTH_ = 4253;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MEDIA_ = 4300;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_LIBRARY_ = 4301;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_MEDIA_POOL_ = 4302;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DRIVE_MEDIA_MISMATCH_ = 4303;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_OFFLINE_ = 4304;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LIBRARY_OFFLINE_ = 4305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EMPTY_ = 4306;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_EMPTY_ = 4307;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_UNAVAILABLE_ = 4308;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_DISABLED_ = 4309;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CLEANER_ = 4310;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_CLEAN_ = 4311;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_NOT_FOUND_ = 4312;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATABASE_FAILURE_ = 4313;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATABASE_FULL_ = 4314;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_INCOMPATIBLE_ = 4315;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NOT_PRESENT_ = 4316;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_OPERATION_ = 4317;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIA_NOT_AVAILABLE_ = 4318;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEVICE_NOT_AVAILABLE_ = 4319;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REQUEST_REFUSED_ = 4320;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_DRIVE_OBJECT_ = 4321;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LIBRARY_FULL_ = 4322;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MEDIUM_NOT_ACCESSIBLE_ = 4323;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_LOAD_MEDIUM_ = 4324;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_INVENTORY_DRIVE_ = 4325;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_INVENTORY_SLOT_ = 4326;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_INVENTORY_TRANSPORT_ = 4327;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSPORT_FULL_ = 4328;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CONTROLLING_IEPORT_ = 4329;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA_ = 4330;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLEANER_SLOT_SET_ = 4331;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLEANER_SLOT_NOT_SET_ = 4332;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLEANER_CARTRIDGE_SPENT_ = 4333;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNEXPECTED_OMID_ = 4334;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_DELETE_LAST_ITEM_ = 4335;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MESSAGE_EXCEEDS_MAX_SIZE_ = 4336;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLUME_CONTAINS_SYS_FILES_ = 4337;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INDIGENOUS_TYPE_ = 4338;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SUPPORTING_DRIVES_ = 4339;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLEANER_CARTRIDGE_INSTALLED_ = 4340;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IEPORT_FULL_ = 4341;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_OFFLINE_ = 4350;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOTE_STORAGE_NOT_ACTIVE_ = 4351;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOTE_STORAGE_MEDIA_ERROR_ = 4352;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_A_REPARSE_POINT_ = 4390;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPARSE_ATTRIBUTE_CONFLICT_ = 4391;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_REPARSE_DATA_ = 4392;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPARSE_TAG_INVALID_ = 4393;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REPARSE_TAG_MISMATCH_ = 4394;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_DATA_NOT_FOUND_ = 4400;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_DATA_EXPIRED_ = 4401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_DATA_CORRUPT_ = 4402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_DATA_LIMIT_EXCEEDED_ = 4403;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APP_DATA_REBOOT_REQUIRED_ = 4404;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_ROLLBACK_DETECTED_ = 4420;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_POLICY_VIOLATION_ = 4421;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_INVALID_POLICY_ = 4422;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND_ = 4423;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_POLICY_NOT_SIGNED_ = 4424;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_NOT_ENABLED_ = 4425;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECUREBOOT_FILE_REPLACED_ = 4426;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OFFLOAD_READ_FLT_NOT_SUPPORTED_ = 4440;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OFFLOAD_WRITE_FLT_NOT_SUPPORTED_ = 4441;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OFFLOAD_READ_FILE_NOT_SUPPORTED_ = 4442;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OFFLOAD_WRITE_FILE_NOT_SUPPORTED_ = 4443;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLUME_NOT_SIS_ENABLED_ = 4500;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENT_RESOURCE_EXISTS_ = 5001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENCY_NOT_FOUND_ = 5002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENCY_ALREADY_EXISTS_ = 5003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NOT_ONLINE_ = 5004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOST_NODE_NOT_AVAILABLE_ = 5005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NOT_AVAILABLE_ = 5006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NOT_FOUND_ = 5007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHUTDOWN_CLUSTER_ = 5008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_EVICT_ACTIVE_NODE_ = 5009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_ALREADY_EXISTS_ = 5010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_IN_LIST_ = 5011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GROUP_NOT_AVAILABLE_ = 5012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GROUP_NOT_FOUND_ = 5013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GROUP_NOT_ONLINE_ = 5014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOST_NODE_NOT_RESOURCE_OWNER_ = 5015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HOST_NODE_NOT_GROUP_OWNER_ = 5016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESMON_CREATE_FAILED_ = 5017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESMON_ONLINE_FAILED_ = 5018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_ONLINE_ = 5019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUM_RESOURCE_ = 5020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_QUORUM_CAPABLE_ = 5021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SHUTTING_DOWN_ = 5022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_STATE_ = 5023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_PROPERTIES_STORED_ = 5024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_QUORUM_CLASS_ = 5025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CORE_RESOURCE_ = 5026;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUM_RESOURCE_ONLINE_FAILED_ = 5027;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUMLOG_OPEN_FAILED_ = 5028;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTERLOG_CORRUPT_ = 5029;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE_ = 5030;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE_ = 5031;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND_ = 5032;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE_ = 5033;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUM_OWNER_ALIVE_ = 5034;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NETWORK_NOT_AVAILABLE_ = 5035;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NODE_NOT_AVAILABLE_ = 5036;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ALL_NODES_NOT_AVAILABLE_ = 5037;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_FAILED_ = 5038;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_NODE_ = 5039;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_EXISTS_ = 5040;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_JOIN_IN_PROGRESS_ = 5041;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_NOT_FOUND_ = 5042;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND_ = 5043;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_EXISTS_ = 5044;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_NOT_FOUND_ = 5045;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETINTERFACE_EXISTS_ = 5046;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETINTERFACE_NOT_FOUND_ = 5047;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_REQUEST_ = 5048;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_NETWORK_PROVIDER_ = 5049;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_DOWN_ = 5050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_UNREACHABLE_ = 5051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_NOT_MEMBER_ = 5052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS_ = 5053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_NETWORK_ = 5054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_UP_ = 5056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_IPADDR_IN_USE_ = 5057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_NOT_PAUSED_ = 5058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NO_SECURITY_CONTEXT_ = 5059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_NOT_INTERNAL_ = 5060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_ALREADY_UP_ = 5061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_ALREADY_DOWN_ = 5062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_ALREADY_ONLINE_ = 5063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE_ = 5064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_ALREADY_MEMBER_ = 5065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_LAST_INTERNAL_NETWORK_ = 5066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS_ = 5067;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_OPERATION_ON_QUORUM_ = 5068;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENCY_NOT_ALLOWED_ = 5069;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_PAUSED_ = 5070;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NODE_CANT_HOST_RESOURCE_ = 5071;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_NOT_READY_ = 5072;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_SHUTTING_DOWN_ = 5073;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_JOIN_ABORTED_ = 5074;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INCOMPATIBLE_VERSIONS_ = 5075;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED_ = 5076;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED_ = 5077;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND_ = 5078;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED_ = 5079;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESNAME_NOT_FOUND_ = 5080;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED_ = 5081;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST_ = 5082;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_DATABASE_SEQMISMATCH_ = 5083;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESMON_INVALID_STATE_ = 5084;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_GUM_NOT_LOCKER_ = 5085;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUM_DISK_NOT_FOUND_ = 5086;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATABASE_BACKUP_CORRUPT_ = 5087;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT_ = 5088;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_PROPERTY_UNCHANGEABLE_ = 5089;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_ADMIN_ACCESS_POINT_ = 5090;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE_ = 5890;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_QUORUMLOG_NOT_FOUND_ = 5891;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_MEMBERSHIP_HALT_ = 5892;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INSTANCE_ID_MISMATCH_ = 5893;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP_ = 5894;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH_ = 5895;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP_ = 5896;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PARAMETER_MISMATCH_ = 5897;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NODE_CANNOT_BE_CLUSTERED_ = 5898;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_WRONG_OS_VERSION_ = 5899;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME_ = 5900;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSCFG_ALREADY_COMMITTED_ = 5901;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSCFG_ROLLBACK_FAILED_ = 5902;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT_ = 5903;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_OLD_VERSION_ = 5904;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME_ = 5905;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NO_NET_ADAPTERS_ = 5906;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_POISONED_ = 5907;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_GROUP_MOVING_ = 5908;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_TYPE_BUSY_ = 5909;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_CALL_TIMED_OUT_ = 5910;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_CLUSTER_IPV6_ADDRESS_ = 5911;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INTERNAL_INVALID_FUNCTION_ = 5912;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS_ = 5913;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PARTIAL_SEND_ = 5914;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_REGISTRY_INVALID_FUNCTION_ = 5915;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_STRING_TERMINATION_ = 5916;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_STRING_FORMAT_ = 5917;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS_ = 5918;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS_ = 5919;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NULL_DATA_ = 5920;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PARTIAL_READ_ = 5921;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_PARTIAL_WRITE_ = 5922;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_CANT_DESERIALIZE_DATA_ = 5923;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT_ = 5924;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NO_QUORUM_ = 5925;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_IPV6_NETWORK_ = 5926;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK_ = 5927;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP_ = 5928;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPENDENCY_TREE_TOO_COMPLEX_ = 5929;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXCEPTION_IN_RESOURCE_CALL_ = 5930;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RHS_FAILED_INITIALIZATION_ = 5931;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NOT_INSTALLED_ = 5932;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE_ = 5933;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_MAX_NODES_IN_CLUSTER_ = 5934;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_TOO_MANY_NODES_ = 5935;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_OBJECT_ALREADY_USED_ = 5936;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NONCORE_GROUPS_FOUND_ = 5937;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_SHARE_RESOURCE_CONFLICT_ = 5938;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_EVICT_INVALID_REQUEST_ = 5939;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SINGLETON_RESOURCE_ = 5940;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_GROUP_SINGLETON_RESOURCE_ = 5941;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_PROVIDER_FAILED_ = 5942;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_CONFIGURATION_ERROR_ = 5943;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_GROUP_BUSY_ = 5944;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NOT_SHARED_VOLUME_ = 5945;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_SECURITY_DESCRIPTOR_ = 5946;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SHARED_VOLUMES_IN_USE_ = 5947;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_USE_SHARED_VOLUMES_API_ = 5948;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_BACKUP_IN_PROGRESS_ = 5949;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NON_CSV_PATH_ = 5950;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CSV_VOLUME_NOT_LOCAL_ = 5951;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_WATCHDOG_TERMINATING_ = 5952;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_VETOED_MOVE_INCOMPATIBLE_NODES_ = 5953;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_INVALID_NODE_WEIGHT_ = 5954;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_VETOED_CALL_ = 5955;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESMON_SYSTEM_RESOURCES_LACKING_ = 5956;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_DESTINATION_ = 5957;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_SOURCE_ = 5958;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_GROUP_QUEUED_ = 5959;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_LOCKED_STATUS_ = 5960;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SHARED_VOLUME_FAILOVER_NOT_ALLOWED_ = 5961;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_NODE_DRAIN_IN_PROGRESS_ = 5962;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_DISK_NOT_CONNECTED_ = 5963;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DISK_NOT_CSV_CAPABLE_ = 5964;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_NOT_IN_AVAILABLE_STORAGE_ = 5965;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SHARED_VOLUME_REDIRECTED_ = 5966;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_SHARED_VOLUME_NOT_REDIRECTED_ = 5967;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_CANNOT_RETURN_PROPERTIES_ = 5968;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_CONTAINS_UNSUPPORTED_DIFF_AREA_FOR_SHARED_VOLUMES_ = 5969;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_IS_IN_MAINTENANCE_MODE_ = 5970;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_AFFINITY_CONFLICT_ = 5971;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CLUSTER_RESOURCE_IS_REPLICA_VIRTUAL_MACHINE_ = 5972;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENCRYPTION_FAILED_ = 6000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DECRYPTION_FAILED_ = 6001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_ENCRYPTED_ = 6002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_RECOVERY_POLICY_ = 6003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_EFS_ = 6004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_WRONG_EFS_ = 6005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_USER_KEYS_ = 6006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_NOT_ENCRYPTED_ = 6007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_EXPORT_FORMAT_ = 6008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_READ_ONLY_ = 6009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIR_EFS_DISALLOWED_ = 6010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EFS_SERVER_NOT_TRUSTED_ = 6011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_RECOVERY_POLICY_ = 6012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EFS_ALG_BLOB_TOO_BIG_ = 6013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLUME_NOT_SUPPORT_EFS_ = 6014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EFS_DISABLED_ = 6015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EFS_VERSION_NOT_SUPPORT_ = 6016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE_ = 6017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER_ = 6018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE_ = 6019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE_ = 6020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CS_ENCRYPTION_FILE_NOT_CSE_ = 6021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENCRYPTION_POLICY_DENIES_OPERATION_ = 6022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_BROWSER_SERVERS_FOUND_ = 6118;
+BOOST_CONSTEXPR_OR_CONST DWORD_ SCHED_E_SERVICE_NOT_LOCALSYSTEM_ = 6200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_SECTOR_INVALID_ = 6600;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_SECTOR_PARITY_INVALID_ = 6601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_SECTOR_REMAPPED_ = 6602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_BLOCK_INCOMPLETE_ = 6603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_INVALID_RANGE_ = 6604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_BLOCKS_EXHAUSTED_ = 6605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_READ_CONTEXT_INVALID_ = 6606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_RESTART_INVALID_ = 6607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_BLOCK_VERSION_ = 6608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_BLOCK_INVALID_ = 6609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_READ_MODE_INVALID_ = 6610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_NO_RESTART_ = 6611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_METADATA_CORRUPT_ = 6612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_METADATA_INVALID_ = 6613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_METADATA_INCONSISTENT_ = 6614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_RESERVATION_INVALID_ = 6615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CANT_DELETE_ = 6616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CONTAINER_LIMIT_EXCEEDED_ = 6617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_START_OF_LOG_ = 6618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_POLICY_ALREADY_INSTALLED_ = 6619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_POLICY_NOT_INSTALLED_ = 6620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_POLICY_INVALID_ = 6621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_POLICY_CONFLICT_ = 6622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_PINNED_ARCHIVE_TAIL_ = 6623;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_RECORD_NONEXISTENT_ = 6624;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_RECORDS_RESERVED_INVALID_ = 6625;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_SPACE_RESERVED_INVALID_ = 6626;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_TAIL_INVALID_ = 6627;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_FULL_ = 6628;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COULD_NOT_RESIZE_LOG_ = 6629;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_MULTIPLEXED_ = 6630;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_DEDICATED_ = 6631;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_ARCHIVE_NOT_IN_PROGRESS_ = 6632;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_ARCHIVE_IN_PROGRESS_ = 6633;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_EPHEMERAL_ = 6634;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_NOT_ENOUGH_CONTAINERS_ = 6635;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CLIENT_ALREADY_REGISTERED_ = 6636;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CLIENT_NOT_REGISTERED_ = 6637;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_FULL_HANDLER_IN_PROGRESS_ = 6638;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CONTAINER_READ_FAILED_ = 6639;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CONTAINER_WRITE_FAILED_ = 6640;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CONTAINER_OPEN_FAILED_ = 6641;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CONTAINER_STATE_INVALID_ = 6642;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_STATE_INVALID_ = 6643;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_PINNED_ = 6644;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_METADATA_FLUSH_FAILED_ = 6645;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_INCONSISTENT_SECURITY_ = 6646;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_APPENDED_FLUSH_FAILED_ = 6647;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_PINNED_RESERVATION_ = 6648;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_TRANSACTION_ = 6700;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_ACTIVE_ = 6701;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_REQUEST_NOT_VALID_ = 6702;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_REQUESTED_ = 6703;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_ALREADY_ABORTED_ = 6704;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_ALREADY_COMMITTED_ = 6705;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TM_INITIALIZATION_FAILED_ = 6706;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCEMANAGER_READ_ONLY_ = 6707;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_JOINED_ = 6708;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_SUPERIOR_EXISTS_ = 6709;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CRM_PROTOCOL_ALREADY_EXISTS_ = 6710;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_PROPAGATION_FAILED_ = 6711;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CRM_PROTOCOL_NOT_FOUND_ = 6712;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_INVALID_MARSHALL_BUFFER_ = 6713;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CURRENT_TRANSACTION_NOT_VALID_ = 6714;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_FOUND_ = 6715;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCEMANAGER_NOT_FOUND_ = 6716;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENLISTMENT_NOT_FOUND_ = 6717;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONMANAGER_NOT_FOUND_ = 6718;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONMANAGER_NOT_ONLINE_ = 6719;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION_ = 6720;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_ROOT_ = 6721;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_OBJECT_EXPIRED_ = 6722;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_RESPONSE_NOT_ENLISTED_ = 6723;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_RECORD_TOO_LONG_ = 6724;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED_ = 6725;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_INTEGRITY_VIOLATED_ = 6726;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONMANAGER_IDENTITY_MISMATCH_ = 6727;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT_ = 6728;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_MUST_WRITETHROUGH_ = 6729;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NO_SUPERIOR_ = 6730;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HEURISTIC_DAMAGE_POSSIBLE_ = 6731;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONAL_CONFLICT_ = 6800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RM_NOT_ACTIVE_ = 6801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RM_METADATA_CORRUPT_ = 6802;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIRECTORY_NOT_RM_ = 6803;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE_ = 6805;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_RESIZE_INVALID_SIZE_ = 6806;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OBJECT_NO_LONGER_EXISTS_ = 6807;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STREAM_MINIVERSION_NOT_FOUND_ = 6808;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STREAM_MINIVERSION_NOT_VALID_ = 6809;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION_ = 6810;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT_ = 6811;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS_ = 6812;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOTE_FILE_VERSION_MISMATCH_ = 6814;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HANDLE_NO_LONGER_VALID_ = 6815;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_TXF_METADATA_ = 6816;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_CORRUPTION_DETECTED_ = 6817;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_RECOVER_WITH_HANDLE_OPEN_ = 6818;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RM_DISCONNECTED_ = 6819;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ENLISTMENT_NOT_SUPERIOR_ = 6820;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECOVERY_NOT_NEEDED_ = 6821;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RM_ALREADY_STARTED_ = 6822;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FILE_IDENTITY_NOT_PERSISTENT_ = 6823;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY_ = 6824;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANT_CROSS_RM_BOUNDARY_ = 6825;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TXF_DIR_NOT_EMPTY_ = 6826;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INDOUBT_TRANSACTIONS_EXIST_ = 6827;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TM_VOLATILE_ = 6828;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ROLLBACK_TIMER_EXPIRED_ = 6829;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TXF_ATTRIBUTE_CORRUPT_ = 6830;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION_ = 6831;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED_ = 6832;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_LOG_GROWTH_FAILED_ = 6833;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE_ = 6834;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TXF_METADATA_ALREADY_PRESENT_ = 6835;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET_ = 6836;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_REQUIRED_PROMOTION_ = 6837;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION_ = 6838;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTIONS_NOT_FROZEN_ = 6839;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_FREEZE_IN_PROGRESS_ = 6840;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SNAPSHOT_VOLUME_ = 6841;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SAVEPOINT_WITH_OPEN_FILES_ = 6842;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DATA_LOST_REPAIR_ = 6843;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION_ = 6844;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TM_IDENTITY_MISMATCH_ = 6845;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_FLOATED_SECTION_ = 6846;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_ACCEPT_TRANSACTED_WORK_ = 6847;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_ABORT_TRANSACTIONS_ = 6848;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_BAD_CLUSTERS_ = 6849;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION_ = 6850;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_VOLUME_DIRTY_ = 6851;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_LINK_TRACKING_IN_TRANSACTION_ = 6852;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION_ = 6853;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EXPIRED_HANDLE_ = 6854;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TRANSACTION_NOT_ENLISTED_ = 6855;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATION_NAME_INVALID_ = 7001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_INVALID_PD_ = 7002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_PD_NOT_FOUND_ = 7003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WD_NOT_FOUND_ = 7004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY_ = 7005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SERVICE_NAME_COLLISION_ = 7006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CLOSE_PENDING_ = 7007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_NO_OUTBUF_ = 7008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_INF_NOT_FOUND_ = 7009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_INVALID_MODEMNAME_ = 7010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_ERROR_ = 7011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_TIMEOUT_ = 7012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_NO_CARRIER_ = 7013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE_ = 7014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_BUSY_ = 7015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_MODEM_RESPONSE_VOICE_ = 7016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_TD_ERROR_ = 7017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATION_NOT_FOUND_ = 7022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATION_ALREADY_EXISTS_ = 7023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATION_BUSY_ = 7024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_BAD_VIDEO_MODE_ = 7025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_GRAPHICS_INVALID_ = 7035;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_LOGON_DISABLED_ = 7037;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_NOT_CONSOLE_ = 7038;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CLIENT_QUERY_TIMEOUT_ = 7040;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CONSOLE_DISCONNECT_ = 7041;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CONSOLE_CONNECT_ = 7042;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SHADOW_DENIED_ = 7044;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATION_ACCESS_DENIED_ = 7045;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_INVALID_WD_ = 7049;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SHADOW_INVALID_ = 7050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SHADOW_DISABLED_ = 7051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CLIENT_LICENSE_IN_USE_ = 7052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CLIENT_LICENSE_NOT_SET_ = 7053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_LICENSE_NOT_AVAILABLE_ = 7054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_LICENSE_CLIENT_INVALID_ = 7055;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_LICENSE_EXPIRED_ = 7056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SHADOW_NOT_RUNNING_ = 7057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE_ = 7058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ACTIVATION_COUNT_EXCEEDED_ = 7059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_WINSTATIONS_DISABLED_ = 7060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED_ = 7061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SESSION_IN_USE_ = 7062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_NO_FORCE_LOGOFF_ = 7063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_ACCOUNT_RESTRICTION_ = 7064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RDP_PROTOCOL_ERROR_ = 7065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CDM_CONNECT_ = 7066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_CDM_DISCONNECT_ = 7067;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CTX_SECURITY_LAYER_ERROR_ = 7068;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TS_INCOMPATIBLE_SESSIONS_ = 7069;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_TS_VIDEO_SUBSYSTEM_ERROR_ = 7070;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_INVALID_API_SEQUENCE_ = 8001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_STARTING_SERVICE_ = 8002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_STOPPING_SERVICE_ = 8003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_INTERNAL_API_ = 8004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_INTERNAL_ = 8005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_SERVICE_COMM_ = 8006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_INSUFFICIENT_PRIV_ = 8007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_AUTHENTICATION_ = 8008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_PARENT_INSUFFICIENT_PRIV_ = 8009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_PARENT_AUTHENTICATION_ = 8010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_CHILD_TO_PARENT_COMM_ = 8011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_PARENT_TO_CHILD_COMM_ = 8012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_SYSVOL_POPULATE_ = 8013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_SYSVOL_POPULATE_TIMEOUT_ = 8014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_SYSVOL_IS_BUSY_ = 8015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_SYSVOL_DEMOTE_ = 8016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ FRS_ERR_INVALID_SERVICE_PARAMETER_ = 8017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DS_S_SUCCESS_ = NO_ERROR_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_INSTALLED_ = 8200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY_ = 8201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_ATTRIBUTE_OR_VALUE_ = 8202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_ATTRIBUTE_SYNTAX_ = 8203;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED_ = 8204;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS_ = 8205;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BUSY_ = 8206;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNAVAILABLE_ = 8207;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_RIDS_ALLOCATED_ = 8208;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_MORE_RIDS_ = 8209;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INCORRECT_ROLE_OWNER_ = 8210;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RIDMGR_INIT_ERROR_ = 8211;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_CLASS_VIOLATION_ = 8212;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ON_NON_LEAF_ = 8213;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ON_RDN_ = 8214;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOD_OBJ_CLASS_ = 8215;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CROSS_DOM_MOVE_ERROR_ = 8216;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GC_NOT_AVAILABLE_ = 8217;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SHARED_POLICY_ = 8218;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POLICY_OBJECT_NOT_FOUND_ = 8219;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_POLICY_ONLY_IN_DS_ = 8220;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PROMOTION_ACTIVE_ = 8221;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_PROMOTION_ACTIVE_ = 8222;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OPERATIONS_ERROR_ = 8224;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_PROTOCOL_ERROR_ = 8225;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_TIMELIMIT_EXCEEDED_ = 8226;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SIZELIMIT_EXCEEDED_ = 8227;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ADMIN_LIMIT_EXCEEDED_ = 8228;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COMPARE_FALSE_ = 8229;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COMPARE_TRUE_ = 8230;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AUTH_METHOD_NOT_SUPPORTED_ = 8231;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_STRONG_AUTH_REQUIRED_ = 8232;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INAPPROPRIATE_AUTH_ = 8233;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AUTH_UNKNOWN_ = 8234;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REFERRAL_ = 8235;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNAVAILABLE_CRIT_EXTENSION_ = 8236;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CONFIDENTIALITY_REQUIRED_ = 8237;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INAPPROPRIATE_MATCHING_ = 8238;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CONSTRAINT_VIOLATION_ = 8239;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_SUCH_OBJECT_ = 8240;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ALIAS_PROBLEM_ = 8241;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_DN_SYNTAX_ = 8242;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_IS_LEAF_ = 8243;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ALIAS_DEREF_PROBLEM_ = 8244;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNWILLING_TO_PERFORM_ = 8245;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOOP_DETECT_ = 8246;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAMING_VIOLATION_ = 8247;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJECT_RESULTS_TOO_LARGE_ = 8248;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AFFECTS_MULTIPLE_DSAS_ = 8249;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SERVER_DOWN_ = 8250;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOCAL_ERROR_ = 8251;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ENCODING_ERROR_ = 8252;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DECODING_ERROR_ = 8253;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_FILTER_UNKNOWN_ = 8254;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_PARAM_ERROR_ = 8255;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_SUPPORTED_ = 8256;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_RESULTS_RETURNED_ = 8257;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CONTROL_NOT_FOUND_ = 8258;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CLIENT_LOOP_ = 8259;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REFERRAL_LIMIT_EXCEEDED_ = 8260;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SORT_CONTROL_MISSING_ = 8261;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OFFSET_RANGE_ERROR_ = 8262;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RIDMGR_DISABLED_ = 8263;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ROOT_MUST_BE_NC_ = 8301;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ADD_REPLICA_INHIBITED_ = 8302;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_NOT_DEF_IN_SCHEMA_ = 8303;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MAX_OBJ_SIZE_EXCEEDED_ = 8304;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_STRING_NAME_EXISTS_ = 8305;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA_ = 8306;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RDN_DOESNT_MATCH_SCHEMA_ = 8307;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_REQUESTED_ATTS_FOUND_ = 8308;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_USER_BUFFER_TO_SMALL_ = 8309;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_IS_NOT_ON_OBJ_ = 8310;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ILLEGAL_MOD_OPERATION_ = 8311;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_TOO_LARGE_ = 8312;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BAD_INSTANCE_TYPE_ = 8313;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MASTERDSA_REQUIRED_ = 8314;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJECT_CLASS_REQUIRED_ = 8315;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MISSING_REQUIRED_ATT_ = 8316;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_NOT_DEF_FOR_CLASS_ = 8317;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_ALREADY_EXISTS_ = 8318;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ADD_ATT_VALUES_ = 8320;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SINGLE_VALUE_CONSTRAINT_ = 8321;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RANGE_CONSTRAINT_ = 8322;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_VAL_ALREADY_EXISTS_ = 8323;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_REM_MISSING_ATT_ = 8324;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_REM_MISSING_ATT_VAL_ = 8325;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ROOT_CANT_BE_SUBREF_ = 8326;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_CHAINING_ = 8327;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_CHAINED_EVAL_ = 8328;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_PARENT_OBJECT_ = 8329;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_PARENT_IS_AN_ALIAS_ = 8330;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MIX_MASTER_AND_REPS_ = 8331;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CHILDREN_EXIST_ = 8332;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_NOT_FOUND_ = 8333;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ALIASED_OBJ_MISSING_ = 8334;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BAD_NAME_SYNTAX_ = 8335;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ALIAS_POINTS_TO_ALIAS_ = 8336;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DEREF_ALIAS_ = 8337;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OUT_OF_SCOPE_ = 8338;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJECT_BEING_REMOVED_ = 8339;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DELETE_DSA_OBJ_ = 8340;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GENERIC_ERROR_ = 8341;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DSA_MUST_BE_INT_MASTER_ = 8342;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CLASS_NOT_DSA_ = 8343;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INSUFF_ACCESS_RIGHTS_ = 8344;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ILLEGAL_SUPERIOR_ = 8345;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATTRIBUTE_OWNED_BY_SAM_ = 8346;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_TOO_MANY_PARTS_ = 8347;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_TOO_LONG_ = 8348;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_VALUE_TOO_LONG_ = 8349;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_UNPARSEABLE_ = 8350;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_TYPE_UNKNOWN_ = 8351;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_AN_OBJECT_ = 8352;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SEC_DESC_TOO_SHORT_ = 8353;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SEC_DESC_INVALID_ = 8354;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_DELETED_NAME_ = 8355;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SUBREF_MUST_HAVE_PARENT_ = 8356;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NCNAME_MUST_BE_NC_ = 8357;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ADD_SYSTEM_ONLY_ = 8358;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CLASS_MUST_BE_CONCRETE_ = 8359;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_DMD_ = 8360;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_GUID_EXISTS_ = 8361;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_ON_BACKLINK_ = 8362;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_CROSSREF_FOR_NC_ = 8363;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SHUTTING_DOWN_ = 8364;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNKNOWN_OPERATION_ = 8365;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_ROLE_OWNER_ = 8366;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COULDNT_CONTACT_FSMO_ = 8367;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CROSS_NC_DN_RENAME_ = 8368;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOD_SYSTEM_ONLY_ = 8369;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REPLICATOR_ONLY_ = 8370;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_CLASS_NOT_DEFINED_ = 8371;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OBJ_CLASS_NOT_SUBCLASS_ = 8372;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_REFERENCE_INVALID_ = 8373;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CROSS_REF_EXISTS_ = 8374;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DEL_MASTER_CROSSREF_ = 8375;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD_ = 8376;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX_ = 8377;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_RDN_ = 8378;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_OID_ = 8379;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_MAPI_ID_ = 8380;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_SCHEMA_ID_GUID_ = 8381;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_LDAP_DISPLAY_NAME_ = 8382;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SEMANTIC_ATT_TEST_ = 8383;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SYNTAX_MISMATCH_ = 8384;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_MUST_HAVE_ = 8385;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_MAY_HAVE_ = 8386;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NONEXISTENT_MAY_HAVE_ = 8387;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NONEXISTENT_MUST_HAVE_ = 8388;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AUX_CLS_TEST_FAIL_ = 8389;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NONEXISTENT_POSS_SUP_ = 8390;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SUB_CLS_TEST_FAIL_ = 8391;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BAD_RDN_ATT_ID_SYNTAX_ = 8392;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_AUX_CLS_ = 8393;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_SUB_CLS_ = 8394;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_POSS_SUP_ = 8395;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RECALCSCHEMA_FAILED_ = 8396;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_TREE_DELETE_NOT_FINISHED_ = 8397;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DELETE_ = 8398;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_SCHEMA_REQ_ID_ = 8399;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BAD_ATT_SCHEMA_SYNTAX_ = 8400;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_CACHE_ATT_ = 8401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_CACHE_CLASS_ = 8402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_REMOVE_ATT_CACHE_ = 8403;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_REMOVE_CLASS_CACHE_ = 8404;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_RETRIEVE_DN_ = 8405;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MISSING_SUPREF_ = 8406;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_RETRIEVE_INSTANCE_ = 8407;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CODE_INCONSISTENCY_ = 8408;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DATABASE_ERROR_ = 8409;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GOVERNSID_MISSING_ = 8410;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MISSING_EXPECTED_ATT_ = 8411;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NCNAME_MISSING_CR_REF_ = 8412;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SECURITY_CHECKING_ERROR_ = 8413;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SCHEMA_NOT_LOADED_ = 8414;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SCHEMA_ALLOC_FAILED_ = 8415;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ATT_SCHEMA_REQ_SYNTAX_ = 8416;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GCVERIFY_ERROR_ = 8417;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SCHEMA_MISMATCH_ = 8418;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_FIND_DSA_OBJ_ = 8419;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_FIND_EXPECTED_NC_ = 8420;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_FIND_NC_IN_CACHE_ = 8421;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_RETRIEVE_CHILD_ = 8422;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SECURITY_ILLEGAL_MODIFY_ = 8423;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_REPLACE_HIDDEN_REC_ = 8424;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BAD_HIERARCHY_FILE_ = 8425;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED_ = 8426;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CONFIG_PARAM_MISSING_ = 8427;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COUNTING_AB_INDICES_FAILED_ = 8428;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED_ = 8429;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INTERNAL_FAILURE_ = 8430;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNKNOWN_ERROR_ = 8431;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ROOT_REQUIRES_CLASS_TOP_ = 8432;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REFUSING_FSMO_ROLES_ = 8433;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MISSING_FSMO_SETTINGS_ = 8434;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNABLE_TO_SURRENDER_ROLES_ = 8435;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_GENERIC_ = 8436;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_INVALID_PARAMETER_ = 8437;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_BUSY_ = 8438;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_BAD_DN_ = 8439;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_BAD_NC_ = 8440;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_DN_EXISTS_ = 8441;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_INTERNAL_ERROR_ = 8442;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_INCONSISTENT_DIT_ = 8443;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_CONNECTION_FAILED_ = 8444;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_BAD_INSTANCE_TYPE_ = 8445;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_OUT_OF_MEM_ = 8446;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_MAIL_PROBLEM_ = 8447;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_REF_ALREADY_EXISTS_ = 8448;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_REF_NOT_FOUND_ = 8449;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_OBJ_IS_REP_SOURCE_ = 8450;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_DB_ERROR_ = 8451;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_NO_REPLICA_ = 8452;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_ACCESS_DENIED_ = 8453;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_NOT_SUPPORTED_ = 8454;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_RPC_CANCELLED_ = 8455;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SOURCE_DISABLED_ = 8456;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SINK_DISABLED_ = 8457;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_NAME_COLLISION_ = 8458;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SOURCE_REINSTALLED_ = 8459;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_MISSING_PARENT_ = 8460;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_PREEMPTED_ = 8461;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_ABANDON_SYNC_ = 8462;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SHUTDOWN_ = 8463;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET_ = 8464;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA_ = 8465;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_EXTN_CONNECTION_FAILED_ = 8466;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INSTALL_SCHEMA_MISMATCH_ = 8467;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_LINK_ID_ = 8468;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_RESOLVING_ = 8469;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_NOT_FOUND_ = 8470;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_NOT_UNIQUE_ = 8471;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_NO_MAPPING_ = 8472;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_DOMAIN_ONLY_ = 8473;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING_ = 8474;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CONSTRUCTED_ATT_MOD_ = 8475;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_WRONG_OM_OBJ_CLASS_ = 8476;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_REPL_PENDING_ = 8477;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DS_REQUIRED_ = 8478;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_LDAP_DISPLAY_NAME_ = 8479;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NON_BASE_SEARCH_ = 8480;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_RETRIEVE_ATTS_ = 8481;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_BACKLINK_WITHOUT_LINK_ = 8482;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EPOCH_MISMATCH_ = 8483;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_NAME_MISMATCH_ = 8484;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_AND_DST_NC_IDENTICAL_ = 8485;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DST_NC_MISMATCH_ = 8486;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC_ = 8487;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_GUID_MISMATCH_ = 8488;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOVE_DELETED_OBJECT_ = 8489;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_PDC_OPERATION_IN_PROGRESS_ = 8490;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD_ = 8491;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION_ = 8492;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS_ = 8493;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NC_MUST_HAVE_NC_PARENT_ = 8494;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_ = 8495;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DST_DOMAIN_NOT_NATIVE_ = 8496;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER_ = 8497;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOVE_ACCOUNT_GROUP_ = 8498;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOVE_RESOURCE_GROUP_ = 8499;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_SEARCH_FLAG_ = 8500;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_TREE_DELETE_ABOVE_NC_ = 8501;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE_ = 8502;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE_ = 8503;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SAM_INIT_FAILURE_ = 8504;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SENSITIVE_GROUP_VIOLATION_ = 8505;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOD_PRIMARYGROUPID_ = 8506;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD_ = 8507;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NONSAFE_SCHEMA_CHANGE_ = 8508;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SCHEMA_UPDATE_DISALLOWED_ = 8509;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_CREATE_UNDER_SCHEMA_ = 8510;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INSTALL_NO_SRC_SCH_VERSION_ = 8511;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE_ = 8512;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_GROUP_TYPE_ = 8513;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN_ = 8514;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN_ = 8515;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER_ = 8516;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER_ = 8517;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER_ = 8518;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER_ = 8519;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER_ = 8520;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_HAVE_PRIMARY_MEMBERS_ = 8521;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_STRING_SD_CONVERSION_FAILED_ = 8522;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAMING_MASTER_GC_ = 8523;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DNS_LOOKUP_FAILURE_ = 8524;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_COULDNT_UPDATE_SPNS_ = 8525;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_RETRIEVE_SD_ = 8526;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_KEY_NOT_UNIQUE_ = 8527;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_WRONG_LINKED_ATT_SYNTAX_ = 8528;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD_ = 8529;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY_ = 8530;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_START_ = 8531;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INIT_FAILURE_ = 8532;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION_ = 8533;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SOURCE_DOMAIN_IN_FOREST_ = 8534;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST_ = 8535;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED_ = 8536;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN_ = 8537;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER_ = 8538;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_SID_EXISTS_IN_FOREST_ = 8539;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH_ = 8540;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SAM_INIT_FAILURE_ = 8541;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SCHEMA_INFO_SHIP_ = 8542;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SCHEMA_CONFLICT_ = 8543;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT_ = 8544;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_OBJ_NC_MISMATCH_ = 8545;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NC_STILL_HAS_DSAS_ = 8546;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GC_REQUIRED_ = 8547;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY_ = 8548;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS_ = 8549;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ADD_TO_GC_ = 8550;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_CHECKPOINT_WITH_PDC_ = 8551;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SOURCE_AUDITING_NOT_ENABLED_ = 8552;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC_ = 8553;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_NAME_FOR_SPN_ = 8554;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS_ = 8555;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNICODEPWD_NOT_IN_QUOTES_ = 8556;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED_ = 8557;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MUST_BE_RUN_ON_DST_DC_ = 8558;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER_ = 8559;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ_ = 8560;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INIT_FAILURE_CONSOLE_ = 8561;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SAM_INIT_FAILURE_CONSOLE_ = 8562;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_FOREST_VERSION_TOO_HIGH_ = 8563;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DOMAIN_VERSION_TOO_HIGH_ = 8564;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_FOREST_VERSION_TOO_LOW_ = 8565;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DOMAIN_VERSION_TOO_LOW_ = 8566;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INCOMPATIBLE_VERSION_ = 8567;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOW_DSA_VERSION_ = 8568;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN_ = 8569;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_SUPPORTED_SORT_ORDER_ = 8570;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_NOT_UNIQUE_ = 8571;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4_ = 8572;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OUT_OF_VERSION_STORE_ = 8573;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INCOMPATIBLE_CONTROLS_USED_ = 8574;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_REF_DOMAIN_ = 8575;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RESERVED_LINK_ID_ = 8576;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LINK_ID_NOT_AVAILABLE_ = 8577;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER_ = 8578;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE_ = 8579;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC_ = 8580;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG_ = 8581;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MODIFYDN_WRONG_GRANDPARENT_ = 8582;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NAME_ERROR_TRUST_REFERRAL_ = 8583;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER_ = 8584;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD_ = 8585;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2_ = 8586;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_THREAD_LIMIT_EXCEEDED_ = 8587;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NOT_CLOSEST_ = 8588;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF_ = 8589;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SINGLE_USER_MODE_FAILED_ = 8590;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NTDSCRIPT_SYNTAX_ERROR_ = 8591;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NTDSCRIPT_PROCESS_ERROR_ = 8592;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DIFFERENT_REPL_EPOCHS_ = 8593;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRS_EXTENSIONS_CHANGED_ = 8594;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR_ = 8595;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_MSDS_INTID_ = 8596;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUP_MSDS_INTID_ = 8597;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTS_IN_RDNATTID_ = 8598;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AUTHORIZATION_FAILED_ = 8599;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_SCRIPT_ = 8600;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REMOTE_CROSSREF_OP_FAILED_ = 8601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CROSS_REF_BUSY_ = 8602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN_ = 8603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC_ = 8604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DUPLICATE_ID_FOUND_ = 8605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT_ = 8606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_GROUP_CONVERSION_ERROR_ = 8607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOVE_APP_BASIC_GROUP_ = 8608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_CANT_MOVE_APP_QUERY_GROUP_ = 8609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_ROLE_NOT_VERIFIED_ = 8610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL_ = 8611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DOMAIN_RENAME_IN_PROGRESS_ = 8612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_EXISTING_AD_CHILD_NC_ = 8613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_REPL_LIFETIME_EXCEEDED_ = 8614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER_ = 8615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LDAP_SEND_QUEUE_FULL_ = 8616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_OUT_SCHEDULE_WINDOW_ = 8617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_POLICY_NOT_KNOWN_ = 8618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SITE_SETTINGS_OBJECT_ = 8619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_SECRETS_ = 8620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NO_WRITABLE_DC_FOUND_ = 8621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_SERVER_OBJECT_ = 8622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NO_NTDSA_OBJECT_ = 8623;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_NON_ASQ_SEARCH_ = 8624;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_AUDIT_FAILURE_ = 8625;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_SEARCH_FLAG_SUBTREE_ = 8626;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_INVALID_SEARCH_FLAG_TUPLE_ = 8627;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_HIERARCHY_TABLE_TOO_DEEP_ = 8628;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_CORRUPT_UTD_VECTOR_ = 8629;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_SECRETS_DENIED_ = 8630;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_RESERVED_MAPI_ID_ = 8631;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_MAPI_ID_NOT_AVAILABLE_ = 8632;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_MISSING_KRBTGT_SECRET_ = 8633;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DOMAIN_NAME_EXISTS_IN_FOREST_ = 8634;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_FLAT_NAME_EXISTS_IN_FOREST_ = 8635;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_USER_PRINCIPAL_NAME_ = 8636;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS_ = 8637;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_OID_NOT_FOUND_ = 8638;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DRA_RECYCLED_TARGET_ = 8639;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_DISALLOWED_NC_REDIRECT_ = 8640;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_HIGH_ADLDS_FFL_ = 8641;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_HIGH_DSA_VERSION_ = 8642;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_LOW_ADLDS_FFL_ = 8643;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DOMAIN_SID_SAME_AS_LOCAL_WORKSTATION_ = 8644;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED_ = 8645;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INCORRECT_ACCOUNT_TYPE_ = 8646;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_SPN_VALUE_NOT_UNIQUE_IN_FOREST_ = 8647;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DS_UPN_VALUE_NOT_UNIQUE_IN_FOREST_ = 8648;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RESPONSE_CODES_BASE_ = 9000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NO_ERROR_ = NO_ERROR_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_MASK_ = 0x00002328;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_FORMAT_ERROR_ = 9001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_SERVER_FAILURE_ = 9002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NAME_ERROR_ = 9003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NOT_IMPLEMENTED_ = 9004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_REFUSED_ = 9005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_YXDOMAIN_ = 9006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_YXRRSET_ = 9007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NXRRSET_ = 9008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NOTAUTH_ = 9009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_NOTZONE_ = 9010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_BADSIG_ = 9016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_BADKEY_ = 9017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_BADTIME_ = 9018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_LAST_ = DNS_ERROR_RCODE_BADTIME_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DNSSEC_BASE_ = 9100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_KEYMASTER_REQUIRED_ = 9101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE_ = 9102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NSEC3_INCOMPATIBLE_WITH_RSA_SHA1_ = 9103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS_ = 9104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNSUPPORTED_ALGORITHM_ = 9105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_KEY_SIZE_ = 9106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE_ = 9107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION_ = 9108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR_ = 9109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNEXPECTED_CNG_ERROR_ = 9110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION_ = 9111;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_KSP_NOT_ACCESSIBLE_ = 9112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_TOO_MANY_SKDS_ = 9113;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_ROLLOVER_PERIOD_ = 9114;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET_ = 9115;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ROLLOVER_IN_PROGRESS_ = 9116;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_STANDBY_KEY_NOT_PRESENT_ = 9117;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_ZSK_ = 9118;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD_ = 9119;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ROLLOVER_ALREADY_QUEUED_ = 9120;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE_ = 9121;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_BAD_KEYMASTER_ = 9122;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD_ = 9123;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_NSEC3_ITERATION_COUNT_ = 9124;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DNSSEC_IS_DISABLED_ = 9125;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_XML_ = 9126;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_VALID_TRUST_ANCHORS_ = 9127;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ROLLOVER_NOT_POKEABLE_ = 9128;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NSEC3_NAME_COLLISION_ = 9129;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NSEC_INCOMPATIBLE_WITH_NSEC3_RSA_SHA1_ = 9130;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_PACKET_FMT_BASE_ = 9500;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_INFO_NO_RECORDS_ = 9501;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_BAD_PACKET_ = 9502;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_PACKET_ = 9503;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RCODE_ = 9504;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNSECURE_PACKET_ = 9505;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_STATUS_PACKET_UNSECURE_ = DNS_ERROR_UNSECURE_PACKET_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_REQUEST_PENDING_ = 9506;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_MEMORY_ = ERROR_OUTOFMEMORY_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_NAME_ = ERROR_INVALID_NAME_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_DATA_ = ERROR_INVALID_DATA_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_GENERAL_API_BASE_ = 9550;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_TYPE_ = 9551;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_IP_ADDRESS_ = 9552;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_PROPERTY_ = 9553;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_TRY_AGAIN_LATER_ = 9554;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_UNIQUE_ = 9555;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NON_RFC_NAME_ = 9556;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_STATUS_FQDN_ = 9557;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_STATUS_DOTTED_NAME_ = 9558;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_STATUS_SINGLE_PART_NAME_ = 9559;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_NAME_CHAR_ = 9560;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NUMERIC_NAME_ = 9561;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER_ = 9562;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION_ = 9563;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_CANNOT_FIND_ROOT_HINTS_ = 9564;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INCONSISTENT_ROOT_HINTS_ = 9565;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DWORD_VALUE_TOO_SMALL_ = 9566;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DWORD_VALUE_TOO_LARGE_ = 9567;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_BACKGROUND_LOADING_ = 9568;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_ON_RODC_ = 9569;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_UNDER_DNAME_ = 9570;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DELEGATION_REQUIRED_ = 9571;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_POLICY_TABLE_ = 9572;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_BASE_ = 9600;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_DOES_NOT_EXIST_ = 9601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_ZONE_INFO_ = 9602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_ZONE_OPERATION_ = 9603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_CONFIGURATION_ERROR_ = 9604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_HAS_NO_SOA_RECORD_ = 9605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_HAS_NO_NS_RECORDS_ = 9606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_LOCKED_ = 9607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_CREATION_FAILED_ = 9608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_ALREADY_EXISTS_ = 9609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_AUTOZONE_ALREADY_EXISTS_ = 9610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_ZONE_TYPE_ = 9611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP_ = 9612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_NOT_SECONDARY_ = 9613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NEED_SECONDARY_ADDRESSES_ = 9614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_WINS_INIT_FAILED_ = 9615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NEED_WINS_SERVERS_ = 9616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NBSTAT_INIT_FAILED_ = 9617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SOA_DELETE_INVALID_ = 9618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_FORWARDER_ALREADY_EXISTS_ = 9619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_REQUIRES_MASTER_IP_ = 9620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_IS_SHUTDOWN_ = 9621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONE_LOCKED_FOR_SIGNING_ = 9622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DATAFILE_BASE_ = 9650;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_PRIMARY_REQUIRES_DATAFILE_ = 9651;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_DATAFILE_NAME_ = 9652;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DATAFILE_OPEN_FAILURE_ = 9653;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_FILE_WRITEBACK_FAILED_ = 9654;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DATAFILE_PARSING_ = 9655;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DATABASE_BASE_ = 9700;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RECORD_DOES_NOT_EXIST_ = 9701;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RECORD_FORMAT_ = 9702;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NODE_CREATION_FAILED_ = 9703;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_UNKNOWN_RECORD_TYPE_ = 9704;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RECORD_TIMED_OUT_ = 9705;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NAME_NOT_IN_ZONE_ = 9706;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_CNAME_LOOP_ = 9707;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NODE_IS_CNAME_ = 9708;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_CNAME_COLLISION_ = 9709;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT_ = 9710;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_RECORD_ALREADY_EXISTS_ = 9711;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SECONDARY_DATA_ = 9712;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_CREATE_CACHE_DATA_ = 9713;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NAME_DOES_NOT_EXIST_ = 9714;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_WARNING_PTR_CREATE_FAILED_ = 9715;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_WARNING_DOMAIN_UNDELETED_ = 9716;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DS_UNAVAILABLE_ = 9717;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DS_ZONE_ALREADY_EXISTS_ = 9718;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE_ = 9719;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NODE_IS_DNAME_ = 9720;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DNAME_COLLISION_ = 9721;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ALIAS_LOOP_ = 9722;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_OPERATION_BASE_ = 9750;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_INFO_AXFR_COMPLETE_ = 9751;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_AXFR_ = 9752;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_INFO_ADDED_LOCAL_WINS_ = 9753;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SECURE_BASE_ = 9800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_STATUS_CONTINUE_NEEDED_ = 9801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SETUP_BASE_ = 9850;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_TCPIP_ = 9851;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NO_DNS_SERVERS_ = 9852;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_BASE_ = 9900;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_DOES_NOT_EXIST_ = 9901;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_ALREADY_EXISTS_ = 9902;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_NOT_ENLISTED_ = 9903;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_ALREADY_ENLISTED_ = 9904;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_NOT_AVAILABLE_ = 9905;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DP_FSMO_ERROR_ = 9906;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONESCOPE_ALREADY_EXISTS_ = 9951;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONESCOPE_DOES_NOT_EXIST_ = 9952;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DEFAULT_ZONESCOPE_ = 9953;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_ZONESCOPE_NAME_ = 9954;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_NOT_ALLOWED_WITH_ZONESCOPES_ = 9955;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_LOAD_ZONESCOPE_FAILED_ = 9956;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_ZONESCOPE_FILE_WRITEBACK_FAILED_ = 9957;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_SCOPE_NAME_ = 9958;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SCOPE_DOES_NOT_EXIST_ = 9959;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_DEFAULT_SCOPE_ = 9960;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_INVALID_SCOPE_OPERATION_ = 9961;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SCOPE_LOCKED_ = 9962;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DNS_ERROR_SCOPE_ALREADY_EXISTS_ = 9963;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSABASEERR_ = 10000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEINTR_ = 10004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEBADF_ = 10009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEACCES_ = 10013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEFAULT_ = 10014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEINVAL_ = 10022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEMFILE_ = 10024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEWOULDBLOCK_ = 10035;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEINPROGRESS_ = 10036;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEALREADY_ = 10037;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOTSOCK_ = 10038;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEDESTADDRREQ_ = 10039;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEMSGSIZE_ = 10040;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEPROTOTYPE_ = 10041;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOPROTOOPT_ = 10042;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEPROTONOSUPPORT_ = 10043;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAESOCKTNOSUPPORT_ = 10044;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEOPNOTSUPP_ = 10045;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEPFNOSUPPORT_ = 10046;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEAFNOSUPPORT_ = 10047;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEADDRINUSE_ = 10048;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEADDRNOTAVAIL_ = 10049;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENETDOWN_ = 10050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENETUNREACH_ = 10051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENETRESET_ = 10052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAECONNABORTED_ = 10053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAECONNRESET_ = 10054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOBUFS_ = 10055;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEISCONN_ = 10056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOTCONN_ = 10057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAESHUTDOWN_ = 10058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAETOOMANYREFS_ = 10059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAETIMEDOUT_ = 10060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAECONNREFUSED_ = 10061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAELOOP_ = 10062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENAMETOOLONG_ = 10063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEHOSTDOWN_ = 10064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEHOSTUNREACH_ = 10065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOTEMPTY_ = 10066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEPROCLIM_ = 10067;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEUSERS_ = 10068;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEDQUOT_ = 10069;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAESTALE_ = 10070;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEREMOTE_ = 10071;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSASYSNOTREADY_ = 10091;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAVERNOTSUPPORTED_ = 10092;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSANOTINITIALISED_ = 10093;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEDISCON_ = 10101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAENOMORE_ = 10102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAECANCELLED_ = 10103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEINVALIDPROCTABLE_ = 10104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEINVALIDPROVIDER_ = 10105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEPROVIDERFAILEDINIT_ = 10106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSASYSCALLFAILURE_ = 10107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSASERVICE_NOT_FOUND_ = 10108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSATYPE_NOT_FOUND_ = 10109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_E_NO_MORE_ = 10110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_E_CANCELLED_ = 10111;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAEREFUSED_ = 10112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSAHOST_NOT_FOUND_ = 11001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSATRY_AGAIN_ = 11002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSANO_RECOVERY_ = 11003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSANO_DATA_ = 11004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_RECEIVERS_ = 11005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_SENDERS_ = 11006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_NO_SENDERS_ = 11007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_NO_RECEIVERS_ = 11008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_REQUEST_CONFIRMED_ = 11009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_ADMISSION_FAILURE_ = 11010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_POLICY_FAILURE_ = 11011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_BAD_STYLE_ = 11012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_BAD_OBJECT_ = 11013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_TRAFFIC_CTRL_ERROR_ = 11014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_GENERIC_ERROR_ = 11015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_ESERVICETYPE_ = 11016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFLOWSPEC_ = 11017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EPROVSPECBUF_ = 11018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFILTERSTYLE_ = 11019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFILTERTYPE_ = 11020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFILTERCOUNT_ = 11021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EOBJLENGTH_ = 11022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFLOWCOUNT_ = 11023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EUNKOWNPSOBJ_ = 11024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EPOLICYOBJ_ = 11025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EFLOWDESC_ = 11026;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EPSFLOWSPEC_ = 11027;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_EPSFILTERSPEC_ = 11028;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_ESDMODEOBJ_ = 11029;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_ESHAPERATEOBJ_ = 11030;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_QOS_RESERVED_PETYPE_ = 11031;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_SECURE_HOST_NOT_FOUND_ = 11032;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WSA_IPSEC_NAME_POLICY_ERROR_ = 11033;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_QM_POLICY_EXISTS_ = 13000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_QM_POLICY_NOT_FOUND_ = 13001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_QM_POLICY_IN_USE_ = 13002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_POLICY_EXISTS_ = 13003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_POLICY_NOT_FOUND_ = 13004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_POLICY_IN_USE_ = 13005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_FILTER_EXISTS_ = 13006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_FILTER_NOT_FOUND_ = 13007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TRANSPORT_FILTER_EXISTS_ = 13008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND_ = 13009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_AUTH_EXISTS_ = 13010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_AUTH_NOT_FOUND_ = 13011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_AUTH_IN_USE_ = 13012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND_ = 13013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND_ = 13014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND_ = 13015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TUNNEL_FILTER_EXISTS_ = 13016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND_ = 13017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_FILTER_PENDING_DELETION_ = 13018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION_ = 13019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION_ = 13020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_POLICY_PENDING_DELETION_ = 13021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_MM_AUTH_PENDING_DELETION_ = 13022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_QM_POLICY_PENDING_DELETION_ = 13023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WARNING_IPSEC_MM_POLICY_PRUNED_ = 13024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WARNING_IPSEC_QM_POLICY_PRUNED_ = 13025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NEG_STATUS_BEGIN_ = 13800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_AUTH_FAIL_ = 13801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_ATTRIB_FAIL_ = 13802;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NEGOTIATION_PENDING_ = 13803;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR_ = 13804;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_TIMED_OUT_ = 13805;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_CERT_ = 13806;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SA_DELETED_ = 13807;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SA_REAPED_ = 13808;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_MM_ACQUIRE_DROP_ = 13809;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QM_ACQUIRE_DROP_ = 13810;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QUEUE_DROP_MM_ = 13811;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM_ = 13812;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_DROP_NO_RESPONSE_ = 13813;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_MM_DELAY_DROP_ = 13814;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QM_DELAY_DROP_ = 13815;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_ERROR_ = 13816;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_CRL_FAILED_ = 13817;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_KEY_USAGE_ = 13818;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_CERT_TYPE_ = 13819;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_PRIVATE_KEY_ = 13820;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SIMULTANEOUS_REKEY_ = 13821;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_DH_FAIL_ = 13822;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_CRITICAL_PAYLOAD_NOT_RECOGNIZED_ = 13823;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_HEADER_ = 13824;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_POLICY_ = 13825;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_SIGNATURE_ = 13826;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_KERBEROS_ERROR_ = 13827;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_PUBLIC_KEY_ = 13828;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_ = 13829;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_SA_ = 13830;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_PROP_ = 13831;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_TRANS_ = 13832;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_KE_ = 13833;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_ID_ = 13834;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_CERT_ = 13835;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ_ = 13836;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_HASH_ = 13837;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_SIG_ = 13838;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_NONCE_ = 13839;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY_ = 13840;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_DELETE_ = 13841;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR_ = 13842;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_PAYLOAD_ = 13843;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_LOAD_SOFT_SA_ = 13844;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN_ = 13845;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_COOKIE_ = 13846;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_PEER_CERT_ = 13847;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PEER_CRL_FAILED_ = 13848;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_POLICY_CHANGE_ = 13849;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NO_MM_POLICY_ = 13850;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NOTCBPRIV_ = 13851;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SECLOADFAIL_ = 13852;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_FAILSSPINIT_ = 13853;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_FAILQUERYSSP_ = 13854;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SRVACQFAIL_ = 13855;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SRVQUERYCRED_ = 13856;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_GETSPIFAIL_ = 13857;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_FILTER_ = 13858;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_OUT_OF_MEMORY_ = 13859;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED_ = 13860;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_POLICY_ = 13861;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_UNKNOWN_DOI_ = 13862;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_SITUATION_ = 13863;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_DH_FAILURE_ = 13864;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_GROUP_ = 13865;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_ENCRYPT_ = 13866;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_DECRYPT_ = 13867;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_POLICY_MATCH_ = 13868;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_UNSUPPORTED_ID_ = 13869;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_HASH_ = 13870;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_HASH_ALG_ = 13871;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_HASH_SIZE_ = 13872;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG_ = 13873;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_AUTH_ALG_ = 13874;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_SIG_ = 13875;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_LOAD_FAILED_ = 13876;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_RPC_DELETE_ = 13877;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_BENIGN_REINIT_ = 13878;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY_ = 13879;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_MAJOR_VERSION_ = 13880;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN_ = 13881;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_MM_LIMIT_ = 13882;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NEGOTIATION_DISABLED_ = 13883;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QM_LIMIT_ = 13884;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_MM_EXPIRED_ = 13885;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID_ = 13886;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH_ = 13887;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID_ = 13888;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD_ = 13889;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_DOS_COOKIE_SENT_ = 13890;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_SHUTTING_DOWN_ = 13891;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_CGA_AUTH_FAILED_ = 13892;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PROCESS_ERR_NATOA_ = 13893;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INVALID_MM_FOR_QM_ = 13894;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_QM_EXPIRED_ = 13895;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_TOO_MANY_FILTERS_ = 13896;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NEG_STATUS_END_ = 13897;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL_ = 13898;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE_ = 13899;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING_ = 13900;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING_ = 13901;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS_ = 13902;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_RATELIMIT_DROP_ = 13903;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE_ = 13904;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_ = 13905;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE_ = 13906;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY_ = 13907;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE_ = 13908;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END_ = 13909;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_BAD_SPI_ = 13910;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_SA_LIFETIME_EXPIRED_ = 13911;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_WRONG_SA_ = 13912;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_REPLAY_CHECK_FAILED_ = 13913;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_INVALID_PACKET_ = 13914;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_INTEGRITY_CHECK_FAILED_ = 13915;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_CLEAR_TEXT_DROP_ = 13916;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_AUTH_FIREWALL_DROP_ = 13917;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_THROTTLE_DROP_ = 13918;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_BLOCK_ = 13925;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_RECEIVED_MULTICAST_ = 13926;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_INVALID_PACKET_ = 13927;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED_ = 13928;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_MAX_ENTRIES_ = 13929;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED_ = 13930;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_NOT_INSTALLED_ = 13931;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES_ = 13932;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_SECTION_NOT_FOUND_ = 14000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_CANT_GEN_ACTCTX_ = 14001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_ACTCTXDATA_FORMAT_ = 14002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ASSEMBLY_NOT_FOUND_ = 14003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_FORMAT_ERROR_ = 14004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_PARSE_ERROR_ = 14005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ACTIVATION_CONTEXT_DISABLED_ = 14006;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_KEY_NOT_FOUND_ = 14007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_VERSION_CONFLICT_ = 14008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_WRONG_SECTION_TYPE_ = 14009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_THREAD_QUERIES_DISABLED_ = 14010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET_ = 14011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_UNKNOWN_ENCODING_GROUP_ = 14012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_UNKNOWN_ENCODING_ = 14013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_XML_NAMESPACE_URI_ = 14014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED_ = 14015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED_ = 14016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_ = 14017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE_ = 14018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE_ = 14019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT_ = 14020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_DLL_NAME_ = 14021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME_ = 14022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_CLSID_ = 14023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_IID_ = 14024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_TLBID_ = 14025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_PROGID_ = 14026;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_DUPLICATE_ASSEMBLY_NAME_ = 14027;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_FILE_HASH_MISMATCH_ = 14028;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_POLICY_PARSE_ERROR_ = 14029;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSINGQUOTE_ = 14030;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_COMMENTSYNTAX_ = 14031;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADSTARTNAMECHAR_ = 14032;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADNAMECHAR_ = 14033;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADCHARINSTRING_ = 14034;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_XMLDECLSYNTAX_ = 14035;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADCHARDATA_ = 14036;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSINGWHITESPACE_ = 14037;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_EXPECTINGTAGEND_ = 14038;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSINGSEMICOLON_ = 14039;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNBALANCEDPAREN_ = 14040;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INTERNALERROR_ = 14041;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE_ = 14042;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INCOMPLETE_ENCODING_ = 14043;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSING_PAREN_ = 14044;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE_ = 14045;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MULTIPLE_COLONS_ = 14046;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALID_DECIMAL_ = 14047;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALID_HEXIDECIMAL_ = 14048;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALID_UNICODE_ = 14049;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK_ = 14050;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNEXPECTEDENDTAG_ = 14051;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDTAG_ = 14052;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_DUPLICATEATTRIBUTE_ = 14053;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MULTIPLEROOTS_ = 14054;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALIDATROOTLEVEL_ = 14055;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADXMLDECL_ = 14056;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSINGROOT_ = 14057;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNEXPECTEDEOF_ = 14058;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADPEREFINSUBSET_ = 14059;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDSTARTTAG_ = 14060;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDENDTAG_ = 14061;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDSTRING_ = 14062;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDCOMMENT_ = 14063;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDDECL_ = 14064;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNCLOSEDCDATA_ = 14065;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_RESERVEDNAMESPACE_ = 14066;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALIDENCODING_ = 14067;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALIDSWITCH_ = 14068;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_BADXMLCASE_ = 14069;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALID_STANDALONE_ = 14070;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_UNEXPECTED_STANDALONE_ = 14071;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_INVALID_VERSION_ = 14072;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_XML_E_MISSINGEQUALS_ = 14073;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROTECTION_RECOVERY_FAILED_ = 14074;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT_ = 14075;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROTECTION_CATALOG_NOT_VALID_ = 14076;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_UNTRANSLATABLE_HRESULT_ = 14077;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING_ = 14078;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE_ = 14079;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME_ = 14080;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ASSEMBLY_MISSING_ = 14081;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_CORRUPT_ACTIVATION_STACK_ = 14082;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_CORRUPTION_ = 14083;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_EARLY_DEACTIVATION_ = 14084;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_DEACTIVATION_ = 14085;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MULTIPLE_DEACTIVATION_ = 14086;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_PROCESS_TERMINATION_REQUESTED_ = 14087;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_RELEASE_ACTIVATION_CONTEXT_ = 14088;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY_ = 14089;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE_ = 14090;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME_ = 14091;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE_ = 14092;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_IDENTITY_PARSE_ERROR_ = 14093;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MALFORMED_SUBSTITUTION_STRING_ = 14094;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN_ = 14095;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_UNMAPPED_SUBSTITUTION_STRING_ = 14096;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ASSEMBLY_NOT_LOCKED_ = 14097;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_COMPONENT_STORE_CORRUPT_ = 14098;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_ADVANCED_INSTALLER_FAILED_ = 14099;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_XML_ENCODING_MISMATCH_ = 14100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT_ = 14101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_IDENTITIES_DIFFERENT_ = 14102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT_ = 14103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY_ = 14104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_MANIFEST_TOO_BIG_ = 14105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_SETTING_NOT_REGISTERED_ = 14106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE_ = 14107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SMI_PRIMITIVE_INSTALLER_FAILED_ = 14108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GENERIC_COMMAND_FAILED_ = 14109;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SXS_FILE_HASH_MISSING_ = 14110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_CHANNEL_PATH_ = 15000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_QUERY_ = 15001;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND_ = 15002;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND_ = 15003;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_PUBLISHER_NAME_ = 15004;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_EVENT_DATA_ = 15005;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_CHANNEL_NOT_FOUND_ = 15007;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_MALFORMED_XML_TEXT_ = 15008;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL_ = 15009;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_CONFIGURATION_ERROR_ = 15010;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_QUERY_RESULT_STALE_ = 15011;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_QUERY_RESULT_INVALID_POSITION_ = 15012;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_NON_VALIDATING_MSXML_ = 15013;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_ALREADYSCOPED_ = 15014;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_NOTELTSET_ = 15015;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_INVARG_ = 15016;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_INVTEST_ = 15017;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_INVTYPE_ = 15018;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_PARSEERR_ = 15019;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_UNSUPPORTEDOP_ = 15020;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_UNEXPECTEDTOKEN_ = 15021;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL_ = 15022;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE_ = 15023;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE_ = 15024;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_CHANNEL_CANNOT_ACTIVATE_ = 15025;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_TOO_COMPLEX_ = 15026;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_MESSAGE_NOT_FOUND_ = 15027;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_MESSAGE_ID_NOT_FOUND_ = 15028;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_UNRESOLVED_VALUE_INSERT_ = 15029;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_UNRESOLVED_PARAMETER_INSERT_ = 15030;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_MAX_INSERTS_REACHED_ = 15031;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_EVENT_DEFINITION_NOT_FOUND_ = 15032;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND_ = 15033;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_VERSION_TOO_OLD_ = 15034;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_VERSION_TOO_NEW_ = 15035;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY_ = 15036;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_PUBLISHER_DISABLED_ = 15037;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EVT_FILTER_OUT_OF_RANGE_ = 15038;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE_ = 15080;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_LOG_DISABLED_ = 15081;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_CIRCULAR_FORWARDING_ = 15082;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_CREDSTORE_FULL_ = 15083;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_CRED_NOT_FOUND_ = 15084;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_EC_NO_ACTIVE_CHANNEL_ = 15085;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_FILE_NOT_FOUND_ = 15100;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INVALID_FILE_ = 15101;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INVALID_RC_CONFIG_ = 15102;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INVALID_LOCALE_NAME_ = 15103;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME_ = 15104;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_FILE_NOT_LOADED_ = 15105;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESOURCE_ENUM_USER_STOP_ = 15106;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED_ = 15107;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME_ = 15108;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE_ = 15110;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_PRICONFIG_ = 15111;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_FILE_TYPE_ = 15112;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_UNKNOWN_QUALIFIER_ = 15113;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_QUALIFIER_VALUE_ = 15114;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_NO_CANDIDATE_ = 15115;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE_ = 15116;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_RESOURCE_TYPE_MISMATCH_ = 15117;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_DUPLICATE_MAP_NAME_ = 15118;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_DUPLICATE_ENTRY_ = 15119;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_RESOURCE_IDENTIFIER_ = 15120;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_FILEPATH_TOO_LONG_ = 15121;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE_ = 15122;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_PRI_FILE_ = 15126;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_NAMED_RESOURCE_NOT_FOUND_ = 15127;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_MAP_NOT_FOUND_ = 15135;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_UNSUPPORTED_PROFILE_TYPE_ = 15136;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INVALID_QUALIFIER_OPERATOR_ = 15137;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE_ = 15138;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_AUTOMERGE_ENABLED_ = 15139;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_TOO_MANY_RESOURCES_ = 15140;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_MERGE_ = 15141;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_LOAD_UNLOAD_PRI_FILE_ = 15142;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_NO_CURRENT_VIEW_ON_THREAD_ = 15143;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DIFFERENT_PROFILE_RESOURCE_MANAGER_EXIST_ = 15144;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_OPERATION_NOT_ALLOWED_FROM_SYSTEM_COMPONENT_ = 15145;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_DIRECT_REF_TO_NON_DEFAULT_RESOURCE_ = 15146;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MRM_GENERATION_COUNT_MISMATCH_ = 15147;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_INVALID_CAPABILITIES_STRING_ = 15200;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_INVALID_VCP_VERSION_ = 15201;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION_ = 15202;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_MCCS_VERSION_MISMATCH_ = 15203;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_UNSUPPORTED_MCCS_VERSION_ = 15204;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_INTERNAL_ERROR_ = 15205;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED_ = 15206;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE_ = 15207;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_AMBIGUOUS_SYSTEM_DEVICE_ = 15250;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_DEVICE_NOT_FOUND_ = 15299;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HASH_NOT_SUPPORTED_ = 15300;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_HASH_NOT_PRESENT_ = 15301;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED_ = 15321;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_CLIENT_INFORMATION_INVALID_ = 15322;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_VERSION_NOT_SUPPORTED_ = 15323;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_INVALID_REGISTRATION_PACKET_ = 15324;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_OPERATION_DENIED_ = 15325;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE_ = 15326;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED_ = 15327;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_CANNOT_SWITCH_RUNLEVEL_ = 15400;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_RUNLEVEL_SETTING_ = 15401;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RUNLEVEL_SWITCH_TIMEOUT_ = 15402;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT_ = 15403;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RUNLEVEL_SWITCH_IN_PROGRESS_ = 15404;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SERVICES_FAILED_AUTOSTART_ = 15405;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_COM_TASK_STOP_PENDING_ = 15501;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_OPEN_PACKAGE_FAILED_ = 15600;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_NOT_FOUND_ = 15601;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_INVALID_PACKAGE_ = 15602;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED_ = 15603;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_OUT_OF_DISK_SPACE_ = 15604;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_NETWORK_FAILURE_ = 15605;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_REGISTRATION_FAILURE_ = 15606;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_DEREGISTRATION_FAILURE_ = 15607;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_CANCEL_ = 15608;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_FAILED_ = 15609;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_REMOVE_FAILED_ = 15610;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PACKAGE_ALREADY_EXISTS_ = 15611;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_NEEDS_REMEDIATION_ = 15612;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PREREQUISITE_FAILED_ = 15613;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PACKAGE_REPOSITORY_CORRUPTED_ = 15614;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_POLICY_FAILURE_ = 15615;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PACKAGE_UPDATING_ = 15616;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DEPLOYMENT_BLOCKED_BY_POLICY_ = 15617;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_PACKAGES_IN_USE_ = 15618;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RECOVERY_FILE_CORRUPT_ = 15619;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INVALID_STAGED_SIGNATURE_ = 15620;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED_ = 15621;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_PACKAGE_DOWNGRADE_ = 15622;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_SYSTEM_NEEDS_REMEDIATION_ = 15623;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN_ = 15624;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_RESILIENCY_FILE_CORRUPT_ = 15625;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING_ = 15626;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_NO_PACKAGE_ = 15700;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT_ = 15701;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT_ = 15702;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_NO_APPLICATION_ = 15703;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED_ = 15704;
+BOOST_CONSTEXPR_OR_CONST DWORD_ APPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID_ = 15705;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_LOAD_STORE_FAILED_ = 15800;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_GET_VERSION_FAILED_ = 15801;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_SET_VERSION_FAILED_ = 15802;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_STRUCTURED_RESET_FAILED_ = 15803;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_OPEN_CONTAINER_FAILED_ = 15804;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_CREATE_CONTAINER_FAILED_ = 15805;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_DELETE_CONTAINER_FAILED_ = 15806;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_READ_SETTING_FAILED_ = 15807;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_WRITE_SETTING_FAILED_ = 15808;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_DELETE_SETTING_FAILED_ = 15809;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_QUERY_SETTING_FAILED_ = 15810;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_READ_COMPOSITE_SETTING_FAILED_ = 15811;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED_ = 15812;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_ENUMERATE_CONTAINER_FAILED_ = 15813;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_ENUMERATE_SETTINGS_FAILED_ = 15814;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED_ = 15815;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED_ = 15816;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED_ = 15817;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED_ = 15818;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ERROR_API_UNAVAILABLE_ = 15841;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STORE_ERROR_UNLICENSED_ = 15861;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STORE_ERROR_UNLICENSED_USER_ = 15862;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STORE_ERROR_PENDING_COM_TRANSACTION_ = 15863;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STORE_ERROR_LICENSE_REVOKED_ = 15864;
+
+} // namespace winapi
+} // namespace detail
+} // namespace boost
+
+#endif // BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
diff --git a/boost/detail/winapi/file_management.hpp b/boost/detail/winapi/file_management.hpp
index 308535e2ae..4c28bec5b6 100644
--- a/boost/detail/winapi/file_management.hpp
+++ b/boost/detail/winapi/file_management.hpp
@@ -136,6 +136,14 @@ UnlockFileEx(
::_OVERLAPPED* lpOverlapped);
BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
+ReadFile(
+ boost::detail::winapi::HANDLE_ hFile,
+ boost::detail::winapi::LPVOID_ lpBuffer,
+ boost::detail::winapi::DWORD_ nNumberOfBytesToRead,
+ boost::detail::winapi::LPDWORD_ lpNumberOfBytesRead,
+ ::_OVERLAPPED* lpOverlapped);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
WriteFile(
boost::detail::winapi::HANDLE_ hFile,
boost::detail::winapi::LPCVOID_ lpBuffer,
@@ -386,6 +394,16 @@ BOOST_FORCEINLINE BOOL_ UnlockFileEx(
return ::UnlockFileEx(hFile, dwReserved, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
+BOOST_FORCEINLINE BOOL_ ReadFile(
+ HANDLE_ hFile,
+ LPVOID_ lpBuffer,
+ DWORD_ nNumberOfBytesToWrite,
+ LPDWORD_ lpNumberOfBytesWritten,
+ OVERLAPPED_* lpOverlapped)
+{
+ return ::ReadFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
+}
+
BOOST_FORCEINLINE BOOL_ WriteFile(
HANDLE_ hFile,
LPCVOID_ lpBuffer,
@@ -394,7 +412,7 @@ BOOST_FORCEINLINE BOOL_ WriteFile(
OVERLAPPED_* lpOverlapped)
{
return ::WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
-};
+}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_file(
diff --git a/boost/detail/winapi/handles.hpp b/boost/detail/winapi/handles.hpp
index 54859f46d9..f8ed825338 100644
--- a/boost/detail/winapi/handles.hpp
+++ b/boost/detail/winapi/handles.hpp
@@ -31,6 +31,14 @@ DuplicateHandle(
boost::detail::winapi::BOOL_ bInheritHandle,
boost::detail::winapi::DWORD_ dwOptions);
}
+
+#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
+CompareObjectHandles(
+ boost::detail::winapi::HANDLE_ hFirstObjectHandle,
+ boost::detail::winapi::HANDLE_ hSecondObjectHandle);
+#endif
+
#endif
namespace boost {
@@ -40,6 +48,10 @@ namespace winapi {
using ::CloseHandle;
using ::DuplicateHandle;
+#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
+using ::CompareObjectHandles;
+#endif
+
#if defined( BOOST_USE_WINDOWS_H )
const DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
const DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
diff --git a/boost/detail/winapi/jobs.hpp b/boost/detail/winapi/jobs.hpp
new file mode 100644
index 0000000000..233df17ec4
--- /dev/null
+++ b/boost/detail/winapi/jobs.hpp
@@ -0,0 +1,115 @@
+// jobs.hpp --------------------------------------------------------------//
+
+// Copyright 2016 Klemens D. Morgenstern
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_DETAIL_WINAPI_JOBS_HPP_
+#define BOOST_DETAIL_WINAPI_JOBS_HPP_
+
+#include <boost/detail/winapi/basic_types.hpp>
+#include <boost/detail/winapi/access_rights.hpp>
+
+#if !defined( BOOST_USE_WINDOWS_H )
+extern "C" {
+#if !defined( BOOST_NO_ANSI_APIS )
+BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateJobObjectA(
+ ::_SECURITY_ATTRIBUTES* lpJobAttributes,
+ boost::detail::winapi::LPCSTR_ lpName);
+#endif
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI CreateJobObjectW(
+ ::_SECURITY_ATTRIBUTES* lpJobAttributes,
+ boost::detail::winapi::LPCWSTR_ lpName);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI AssignProcessToJobObject(
+ boost::detail::winapi::HANDLE_ hJob,
+ boost::detail::winapi::HANDLE_ hProcess);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI IsProcessInJob(
+ boost::detail::winapi::HANDLE_ ProcessHandle,
+ boost::detail::winapi::HANDLE_ JobHandle,
+ boost::detail::winapi::PBOOL_ Result);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI TerminateJobObject(
+ boost::detail::winapi::HANDLE_ hJob,
+ boost::detail::winapi::UINT_ uExitCode);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenJobObjectA(
+ boost::detail::winapi::DWORD_ dwDesiredAccess,
+ boost::detail::winapi::BOOL_ bInheritHandles,
+ boost::detail::winapi::LPCSTR_ lpName);
+
+BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenJobObjectW(
+ boost::detail::winapi::DWORD_ dwDesiredAccess,
+ boost::detail::winapi::BOOL_ bInheritHandles,
+ boost::detail::winapi::LPCWSTR_ lpName);
+} // extern "C"
+#endif // !defined( BOOST_USE_WINDOWS_H )
+
+namespace boost { namespace detail { namespace winapi {
+
+#if defined( BOOST_USE_WINDOWS_H )
+const DWORD_ JOB_OBJECT_ASSIGN_PROCESS_ = JOB_OBJECT_ASSIGN_PROCESS;
+const DWORD_ JOB_OBJECT_SET_ATTRIBUTES_ = JOB_OBJECT_SET_ATTRIBUTES;
+const DWORD_ JOB_OBJECT_QUERY_ = JOB_OBJECT_QUERY;
+const DWORD_ JOB_OBJECT_TERMINATE_ = JOB_OBJECT_TERMINATE;
+const DWORD_ JOB_OBJECT_SET_SECURITY_ATTRIBUTES_ = JOB_OBJECT_SET_SECURITY_ATTRIBUTES;
+const DWORD_ JOB_OBJECT_ALL_ACCESS_ = JOB_OBJECT_ALL_ACCESS;
+#else
+const DWORD_ JOB_OBJECT_ASSIGN_PROCESS_ = 0x0001;
+const DWORD_ JOB_OBJECT_SET_ATTRIBUTES_ = 0x0002;
+const DWORD_ JOB_OBJECT_QUERY_ = 0x0004;
+const DWORD_ JOB_OBJECT_TERMINATE_ = 0x0008;
+const DWORD_ JOB_OBJECT_SET_SECURITY_ATTRIBUTES_ = 0x0010;
+const DWORD_ JOB_OBJECT_ALL_ACCESS_ = (STANDARD_RIGHTS_REQUIRED_ | SYNCHRONIZE_ | 0x1F);
+#endif
+
+#if !defined( BOOST_NO_ANSI_APIS )
+using ::OpenJobObjectA;
+#endif
+
+using ::OpenJobObjectW;
+
+using ::AssignProcessToJobObject;
+using ::IsProcessInJob;
+using ::TerminateJobObject;
+
+#if !defined( BOOST_NO_ANSI_APIS )
+BOOST_FORCEINLINE HANDLE_ CreateJobObjectA(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCSTR_ lpName)
+{
+ return ::CreateJobObjectA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
+}
+
+BOOST_FORCEINLINE HANDLE_ create_job_object(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCSTR_ lpName)
+{
+ return ::CreateJobObjectA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
+}
+
+BOOST_FORCEINLINE HANDLE_ open_job_object(DWORD_ dwDesiredAccess, BOOL_ bInheritHandles, LPCSTR_ lpName)
+{
+ return ::OpenJobObjectA(dwDesiredAccess, bInheritHandles, lpName);
+}
+#endif // !defined( BOOST_NO_ANSI_APIS )
+
+BOOST_FORCEINLINE HANDLE_ CreateJobObjectW(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCWSTR_ lpName)
+{
+ return ::CreateJobObjectW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
+}
+
+BOOST_FORCEINLINE HANDLE_ create_job_object(LPSECURITY_ATTRIBUTES_ lpJobAttributes, LPCWSTR_ lpName)
+{
+ return ::CreateJobObjectW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpJobAttributes), lpName);
+}
+
+BOOST_FORCEINLINE HANDLE_ open_job_object(DWORD_ dwDesiredAccess, BOOL_ bInheritHandles, LPCWSTR_ lpName)
+{
+ return OpenJobObjectW(dwDesiredAccess, bInheritHandles, lpName);
+}
+
+} // namespace winapi
+} // namespace detail
+} // namespace boost
+
+#endif // BOOST_DETAIL_WINAPI_JOBS_HPP_
diff --git a/boost/detail/winapi/process.hpp b/boost/detail/winapi/process.hpp
index d980aa6d4b..dc8a5339bb 100644
--- a/boost/detail/winapi/process.hpp
+++ b/boost/detail/winapi/process.hpp
@@ -11,6 +11,7 @@
#include <boost/detail/winapi/config.hpp>
#include <boost/detail/winapi/basic_types.hpp>
+#include <boost/detail/winapi/access_rights.hpp>
#include <boost/detail/winapi/get_current_process.hpp>
#include <boost/detail/winapi/get_current_process_id.hpp>
#include <boost/predef/platform.h>
@@ -75,6 +76,11 @@ BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreateProcessW(
::_STARTUPINFOW* lpStartupInfo,
::_PROCESS_INFORMATION* lpProcessInformation);
+BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI OpenProcess(
+ boost::detail::winapi::DWORD_ dwDesiredAccess,
+ boost::detail::winapi::BOOL_ bInheritHandle,
+ boost::detail::winapi::DWORD_ dwProcessId);
+
} // extern "C"
#endif //defined BOOST_WINDOWS_H
@@ -134,6 +140,20 @@ const DWORD_ STARTF_TITLEISAPPID_ = STARTF_TITLEISAPPID;
const DWORD_ STARTF_PREVENTPINNING_ = STARTF_PREVENTPINNING;
#endif
+const DWORD_ PROCESS_TERMINATE_ = PROCESS_TERMINATE;
+const DWORD_ PROCESS_CREATE_THREAD_ = PROCESS_CREATE_THREAD;
+const DWORD_ PROCESS_SET_SESSIONID_ = PROCESS_SET_SESSIONID;
+const DWORD_ PROCESS_VM_OPERATION_ = PROCESS_VM_OPERATION;
+const DWORD_ PROCESS_VM_READ_ = PROCESS_VM_READ;
+const DWORD_ PROCESS_VM_WRITE_ = PROCESS_VM_WRITE;
+const DWORD_ PROCESS_DUP_HANDLE_ = PROCESS_DUP_HANDLE;
+const DWORD_ PROCESS_CREATE_PROCESS_ = PROCESS_CREATE_PROCESS;
+const DWORD_ PROCESS_SET_QUOTA_ = PROCESS_SET_QUOTA;
+const DWORD_ PROCESS_SET_INFORMATION_ = PROCESS_SET_INFORMATION;
+const DWORD_ PROCESS_QUERY_INFORMATION_ = PROCESS_QUERY_INFORMATION;
+const DWORD_ PROCESS_SUSPEND_RESUME_ = PROCESS_SUSPEND_RESUME;
+const DWORD_ PROCESS_ALL_ACCESS_ = PROCESS_ALL_ACCESS;
+
#else // defined( BOOST_USE_WINDOWS_H )
const DWORD_ DEBUG_PROCESS_ = 0x1;
@@ -186,6 +206,20 @@ const DWORD_ STARTF_TITLEISAPPID_ = 0x00001000;
const DWORD_ STARTF_PREVENTPINNING_ = 0x00002000;
#endif
+const DWORD_ PROCESS_TERMINATE_ = 0x0001;
+const DWORD_ PROCESS_CREATE_THREAD_ = 0x0002;
+const DWORD_ PROCESS_SET_SESSIONID_ = 0x0004;
+const DWORD_ PROCESS_VM_OPERATION_ = 0x0008;
+const DWORD_ PROCESS_VM_READ_ = 0x0010;
+const DWORD_ PROCESS_VM_WRITE_ = 0x0020;
+const DWORD_ PROCESS_DUP_HANDLE_ = 0x0040;
+const DWORD_ PROCESS_CREATE_PROCESS_ = 0x0080;
+const DWORD_ PROCESS_SET_QUOTA_ = 0x0100;
+const DWORD_ PROCESS_SET_INFORMATION_ = 0x0200;
+const DWORD_ PROCESS_QUERY_INFORMATION_ = 0x0400;
+const DWORD_ PROCESS_SUSPEND_RESUME_ = 0x0800;
+const DWORD_ PROCESS_ALL_ACCESS_ = (STANDARD_RIGHTS_REQUIRED_ | SYNCHRONIZE_ | 0xFFF);
+
#endif // defined( BOOST_USE_WINDOWS_H )
#if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW )
@@ -274,6 +308,7 @@ typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOEXW {
using ::GetExitCodeProcess;
using ::ExitProcess;
using ::TerminateProcess;
+using ::OpenProcess;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ CreateProcessA(
diff --git a/boost/dll/alias.hpp b/boost/dll/alias.hpp
index 0cc986c279..b8ee45ffa3 100644
--- a/boost/dll/alias.hpp
+++ b/boost/dll/alias.hpp
@@ -36,7 +36,7 @@ namespace boost { namespace dll {
#define BOOST_DLL_FORCE_NO_WEAK_EXPORTS
#endif
-#if BOOST_COMP_MSVC
+#if BOOST_COMP_MSVC || (BOOST_COMP_INTEL && BOOST_OS_WINDOWS)
#define BOOST_DLL_SELECTANY __declspec(selectany)
diff --git a/boost/dll/detail/aggressive_ptr_cast.hpp b/boost/dll/detail/aggressive_ptr_cast.hpp
index a8887f4382..a882cd9b19 100644
--- a/boost/dll/detail/aggressive_ptr_cast.hpp
+++ b/boost/dll/detail/aggressive_ptr_cast.hpp
@@ -104,7 +104,7 @@ BOOST_FORCEINLINE typename boost::disable_if_c<!boost::is_member_pointer<To>::va
template <class To, class From>
BOOST_FORCEINLINE typename boost::disable_if_c<boost::is_member_pointer<To>::value || !boost::is_member_pointer<From>::value, To>::type
- aggressive_ptr_cast(From v) BOOST_NOEXCEPT
+ aggressive_ptr_cast(From /* v */) BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT_MSG(
boost::is_pointer<To>::value,
diff --git a/boost/dll/detail/ctor_dtor.hpp b/boost/dll/detail/ctor_dtor.hpp
index 5950d9e60a..3da8395ff5 100644
--- a/boost/dll/detail/ctor_dtor.hpp
+++ b/boost/dll/detail/ctor_dtor.hpp
@@ -6,8 +6,8 @@
// For more information, see http://www.boost.org
-#ifndef INCLUDE_BOOST_DLL_DETAIL_CTOR_DTOR_HPP_
-#define INCLUDE_BOOST_DLL_DETAIL_CTOR_DTOR_HPP_
+#ifndef BOOST_DLL_DETAIL_CTOR_DTOR_HPP_
+#define BOOST_DLL_DETAIL_CTOR_DTOR_HPP_
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
@@ -23,6 +23,7 @@
# include <boost/dll/detail/demangling/itanium.hpp>
#endif
+
namespace boost { namespace dll { namespace detail {
/*!
@@ -55,8 +56,11 @@ struct constructor<Class(Args...)> {
//! True if a allocating constructor could be loaded.
bool has_allocating() const { return allocating != nullptr; }
+ //! True if a standard constructor could be loaded.
+ bool has_standard() const { return standard != nullptr; }
+
//! False if neither the allocating nor the standard constructor is available.
- bool is_empty() const { return !((allocating == nullptr) && (standard != nullptr)) ; }
+ bool is_empty() const { return (allocating == nullptr) && (standard == nullptr) ; }
constructor() = delete;
constructor(const constructor &) = default;
@@ -71,8 +75,8 @@ struct constructor<Class(Args...)> {
template <typename Class>
struct destructor {
-#if !defined(BOOST_MSVC) && !defined(BOOST_MSVC_VER)
- typedef void( *type)(Class* const);
+#if !defined(_WIN32)
+ typedef void(*type)(Class* const);
#elif !defined(_WIN64)
typedef void(__thiscall * type)(Class* const);
#else
@@ -96,8 +100,11 @@ struct destructor {
//! True if a deleting destructor could be loaded.
bool has_deleting() const { return deleting != nullptr; }
+ //! True if a standard destructor could be loaded.
+ bool has_standard() const { return standard != nullptr; }
+
//! False if neither the deleting nor the standard destructor is available.
- bool is_empty() const { return !((deleting == nullptr) && (standard != nullptr)) ; }
+ bool is_empty() const { return (deleting == nullptr) && (standard == nullptr) ; }
destructor() = delete;
//! Copy destructor.
@@ -121,7 +128,11 @@ constructor<Signature> load_ctor(Lib & lib, const mangled_storage_impl::ctor_sym
template<typename Class, typename Lib>
destructor<Class> load_dtor(Lib & lib, const mangled_storage_impl::dtor_sym & dt) {
typedef typename destructor<Class>::standard_t standard_t;
- standard_t dtor = &lib.template get< typename boost::remove_pointer<standard_t>::type >(dt);
+ //@apolukhin That does NOT work this way with MSVC-14 x32 via memcpy. The x64 is different.
+ //standard_t dtor = &lib.template get< typename boost::remove_pointer<standard_t>::type >(dt);
+ void * buf = &lib.template get<int>(dt);
+ standard_t dtor;
+ std::memcpy(&dtor, &buf, sizeof(dtor));
return destructor<Class>(dtor);
}
@@ -137,12 +148,17 @@ constructor<Signature> load_ctor(Lib & lib, const mangled_storage_impl::ctor_sym
//see here for the abi http://mentorembedded.github.io/cxx-abi/abi.html#mangling-special-ctor-dtor
- if (!ct.C1.empty()) {
- s = lib.template get<stand>(ct.C1);
+ if (!ct.C1.empty())
+ {
+ //the only way this works on mingw/win.
+ //For some reason there is always an 0xA in the following poniter, which screws with the this pointer.
+ void *buf = &lib.template get<int>(ct.C1);
+ std::memcpy(&s, &buf, sizeof(void*));
}
-
- if (!ct.C3.empty()) {
- a = lib.template get<alloc>(ct.C3);
+ if (!ct.C3.empty())
+ {
+ void *buf = &lib.template get<int>(ct.C3);
+ std::memcpy(&a, &buf, sizeof(void*));
}
return constructor<Signature>(s,a);
@@ -173,4 +189,4 @@ destructor<Class> load_dtor(Lib & lib, const mangled_storage_impl::dtor_sym & dt
}}} // namespace boost::dll::detail
-#endif /* INCLUDE_BOOST_DLL_DETAIL_CTOR_DTOR_HPP_ */
+#endif /* BOOST_DLL_DETAIL_CTOR_DTOR_HPP_ */
diff --git a/boost/dll/detail/demangling/demangle_symbol.hpp b/boost/dll/detail/demangling/demangle_symbol.hpp
index e0590b38fa..30525f6b31 100644
--- a/boost/dll/detail/demangling/demangle_symbol.hpp
+++ b/boost/dll/detail/demangling/demangle_symbol.hpp
@@ -13,7 +13,6 @@
#include <algorithm>
#if defined(BOOST_MSVC) || defined(BOOST_MSVC_FULL_VER)
-#include <boost/detail/winapi/dbghelp.hpp>
namespace boost
{
@@ -22,15 +21,35 @@ namespace dll
namespace detail
{
+typedef void * (__cdecl * allocation_function)(std::size_t);
+typedef void (__cdecl * free_function)(void *);
+
+extern "C" char* __unDName( char* outputString,
+ const char* name,
+ int maxStringLength, // Note, COMMA is leading following optional arguments
+ allocation_function pAlloc,
+ free_function pFree,
+ unsigned short disableFlags
+ );
+
inline std::string demangle_symbol(const char *mangled_name)
{
- char unmangled_name[2048];
- ::boost::detail::winapi::
- UnDecorateSymbolName(mangled_name, unmangled_name, 2048, 0);
+ allocation_function alloc = [](std::size_t size){return static_cast<void*>(new char[size]);};
+ free_function free_f = [](void* p){delete [] static_cast<char*>(p);};
+
+
+
+ std::unique_ptr<char> name { __unDName(
+ nullptr,
+ mangled_name,
+ 0,
+ alloc,
+ free_f,
+ static_cast<unsigned short>(0))};
- return std::string(unmangled_name);
+ return std::string(name.get());
}
inline std::string demangle_symbol(const std::string& mangled_name)
{
@@ -76,8 +95,14 @@ inline std::string demangle_symbol(const std::string& mangled_name)
}
-}}}
+}
+namespace experimental
+{
+using ::boost::dll::detail::demangle_symbol;
+}
+
+}}
#endif
-#endif /* INCLUDE_BOOST_DEMANGLE_HPP_ */
+#endif /* BOOST_DEMANGLE_HPP_ */
diff --git a/boost/dll/detail/demangling/itanium.hpp b/boost/dll/detail/demangling/itanium.hpp
index 356a5eca82..2701a0390b 100644
--- a/boost/dll/detail/demangling/itanium.hpp
+++ b/boost/dll/detail/demangling/itanium.hpp
@@ -27,12 +27,12 @@ class mangled_storage_impl : public mangled_storage_base
struct dummy {};
template<typename Return, typename ...Args>
- std::vector<std::string> get_func_params(dummy<Return(Args...)>)
+ std::vector<std::string> get_func_params(dummy<Return(Args...)>) const
{
return {get_name<Args>()...};
}
template<typename Return, typename ...Args>
- std::string get_return_type(dummy<Return(Args...)>)
+ std::string get_return_type(dummy<Return(Args...)>) const
{
return get_name<Return>();
}
@@ -62,19 +62,25 @@ public:
};
template<typename T>
- std::string get_variable(const std::string &name);
+ std::string get_variable(const std::string &name) const;
template<typename Func>
- std::string get_function(const std::string &name);
+ std::string get_function(const std::string &name) const;
template<typename Class, typename Func>
- std::string get_mem_fn(const std::string &name);
+ std::string get_mem_fn(const std::string &name) const;
template<typename Signature>
- ctor_sym get_constructor();
+ ctor_sym get_constructor() const;
template<typename Class>
- dtor_sym get_destructor();
+ dtor_sym get_destructor() const;
+
+ template<typename T>
+ std::string get_type_info() const;
+
+ template<typename T>
+ std::vector<std::string> get_related() const;
};
@@ -86,12 +92,12 @@ namespace parser
inline std::string const_rule_impl(true_type ) {return " const";}
inline std::string const_rule_impl(false_type) {return "";}
template<typename T>
- auto const_rule() {using t = is_const<typename remove_reference<T>::type>; return const_rule_impl(t());}
+ std::string const_rule() {using t = is_const<typename remove_reference<T>::type>; return const_rule_impl(t());}
inline std::string volatile_rule_impl(true_type ) {return " volatile";}
inline std::string volatile_rule_impl(false_type) {return "";}
template<typename T>
- auto volatile_rule() {using t = is_volatile<typename remove_reference<T>::type>; return volatile_rule_impl(t());}
+ std::string volatile_rule() {using t = is_volatile<typename remove_reference<T>::type>; return volatile_rule_impl(t());}
inline std::string reference_rule_impl(false_type, false_type) {return "";}
inline std::string reference_rule_impl(true_type, false_type) {return "&" ;}
@@ -99,11 +105,11 @@ namespace parser
template<typename T>
- auto reference_rule() {using t_l = is_lvalue_reference<T>; using t_r = is_rvalue_reference<T>; return reference_rule_impl(t_l(), t_r());}
+ std::string reference_rule() {using t_l = is_lvalue_reference<T>; using t_r = is_rvalue_reference<T>; return reference_rule_impl(t_l(), t_r());}
//it takes a string, because it may be overloaded.
template<typename T>
- auto type_rule(const std::string & type_name)
+ std::string type_rule(const std::string & type_name)
{
using namespace std;
@@ -140,7 +146,7 @@ namespace parser
-template<typename T> std::string mangled_storage_impl::get_variable(const std::string &name)
+template<typename T> std::string mangled_storage_impl::get_variable(const std::string &name) const
{
auto found = std::find_if(storage_.begin(), storage_.end(),
[&](const entry& e) {return e.demangled == name;});
@@ -151,7 +157,7 @@ template<typename T> std::string mangled_storage_impl::get_variable(const std::s
return "";
}
-template<typename Func> std::string mangled_storage_impl::get_function(const std::string &name)
+template<typename Func> std::string mangled_storage_impl::get_function(const std::string &name) const
{
using func_type = Func*;
@@ -166,7 +172,7 @@ template<typename Func> std::string mangled_storage_impl::get_function(const std
}
template<typename Class, typename Func>
-std::string mangled_storage_impl::get_mem_fn(const std::string &name)
+std::string mangled_storage_impl::get_mem_fn(const std::string &name) const
{
using namespace parser;
@@ -189,7 +195,7 @@ std::string mangled_storage_impl::get_mem_fn(const std::string &name)
template<typename Signature>
-auto mangled_storage_impl::get_constructor() -> ctor_sym
+auto mangled_storage_impl::get_constructor() const -> ctor_sym
{
using namespace parser;
@@ -236,7 +242,7 @@ auto mangled_storage_impl::get_constructor() -> ctor_sym
}
template<typename Class>
-auto mangled_storage_impl::get_destructor() -> dtor_sym
+auto mangled_storage_impl::get_destructor() const -> dtor_sym
{
std::string dtor_name; // = class_name + "::" + name;
std::string unscoped_cname; //the unscoped class-name
@@ -279,7 +285,42 @@ auto mangled_storage_impl::get_destructor() -> dtor_sym
}
+template<typename T>
+std::string mangled_storage_impl::get_type_info() const
+{
+ std::string id = "typeinfo for " + get_name<T>();
+
+
+ auto predicate = [&](const mangled_storage_base::entry & e)
+ {
+ return e.demangled == id;
+ };
+
+ auto found = std::find_if(storage_.begin(), storage_.end(), predicate);
+
+
+ if (found != storage_.end())
+ return found->mangled;
+ else
+ return "";
+}
+
+template<typename T>
+std::vector<std::string> mangled_storage_impl::get_related() const
+{
+ std::vector<std::string> ret;
+ auto name = get_name<T>();
+
+ for (auto & c : storage_)
+ {
+ if (c.demangled.find(name) != std::string::npos)
+ ret.push_back(c.demangled);
+ }
+
+ return ret;
+}
+
}}}
-#endif /* INCLUDE_BOOST_DLL_DETAIL_DEMANGLING_ITANIUM_HPP_ */
+#endif /* BOOST_DLL_DETAIL_DEMANGLING_ITANIUM_HPP_ */
diff --git a/boost/dll/detail/demangling/mangled_storage_base.hpp b/boost/dll/detail/demangling/mangled_storage_base.hpp
index e4bf3753f9..b9cfd64fa2 100644
--- a/boost/dll/detail/demangling/mangled_storage_base.hpp
+++ b/boost/dll/detail/demangling/mangled_storage_base.hpp
@@ -12,7 +12,8 @@
#include <map>
#include <boost/dll/detail/demangling/demangle_symbol.hpp>
#include <boost/dll/library_info.hpp>
-#include <boost/type_index/stl_type_index.hpp>
+#include <boost/type_index/ctti_type_index.hpp>
+#include <boost/type_traits/remove_reference.hpp>
namespace boost { namespace dll { namespace detail {
@@ -33,7 +34,7 @@ struct mangled_storage_base
protected:
std::vector<entry> storage_;
///if a unknown class is imported it can be overloaded by this type
- std::map<boost::typeindex::stl_type_index, std::string> aliases_;
+ std::map<boost::typeindex::ctti_type_index, std::string> aliases_;
public:
void assign(const mangled_storage_base & storage)
{
@@ -50,11 +51,12 @@ public:
storage_.clear();
aliases_.clear();
}
- const std::vector<entry> & get_storage() const {return storage_;};
+ std::vector<entry> & get_storage() {return storage_;};
template<typename T>
std::string get_name() const
{
- auto tx = boost::typeindex::stl_type_index::type_id<T>();
+ using boost::typeindex::ctti_type_index;
+ auto tx = ctti_type_index::type_id<T>();
auto val = (aliases_.count(tx) > 0) ? aliases_.at(tx) : tx.pretty_name();
return val;
}
@@ -93,7 +95,7 @@ public:
template<typename Alias> void add_alias(const std::string& name)
{
aliases_.emplace(
- boost::typeindex::stl_type_index::type_id<Alias>(),
+ boost::typeindex::ctti_type_index::type_id<Alias>(),
name
);
}
@@ -115,4 +117,4 @@ public:
}}}
-#endif /* INCLUDE_BOOST_DLL_DETAIL_MANGLE_STORAGE_HPP_ */
+#endif /* BOOST_DLL_DETAIL_MANGLE_STORAGE_HPP_ */
diff --git a/boost/dll/detail/demangling/msvc.hpp b/boost/dll/detail/demangling/msvc.hpp
index 4cab143266..b5d526b581 100644
--- a/boost/dll/detail/demangling/msvc.hpp
+++ b/boost/dll/detail/demangling/msvc.hpp
@@ -27,12 +27,12 @@ class mangled_storage_impl : public mangled_storage_base
struct dummy {};
template<typename Return, typename ...Args>
- std::vector<std::string> get_func_params(dummy<Return(Args...)>)
+ std::vector<std::string> get_func_params(dummy<Return(Args...)>) const
{
return {get_name<Args>()...};
}
template<typename Return, typename ...Args>
- std::string get_return_type(dummy<Return(Args...)>)
+ std::string get_return_type(dummy<Return(Args...)>) const
{
return get_name<Return>();
}
@@ -46,19 +46,19 @@ public:
using mangled_storage_base::mangled_storage_base;
template<typename T>
- std::string get_variable(const std::string &name);
+ std::string get_variable(const std::string &name) const;
template<typename Func>
- std::string get_function(const std::string &name);
+ std::string get_function(const std::string &name) const;
template<typename Class, typename Func>
- std::string get_mem_fn(const std::string &name);
+ std::string get_mem_fn(const std::string &name) const;
template<typename Signature>
- ctor_sym get_constructor();
+ ctor_sym get_constructor() const;
template<typename Class>
- dtor_sym get_destructor();
+ dtor_sym get_destructor() const;
template<typename T> //overload, does not need to virtual.
std::string get_name() const
@@ -67,6 +67,13 @@ public:
trim_typename(nm);
return nm;
}
+
+ template<typename T>
+ std::string get_vtable() const;
+
+ template<typename T>
+ std::vector<std::string> get_related() const;
+
};
void mangled_storage_impl::trim_typename(std::string & val)
@@ -185,7 +192,7 @@ namespace parser
}
-template<typename T> std::string mangled_storage_impl::get_variable(const std::string &name)
+template<typename T> std::string mangled_storage_impl::get_variable(const std::string &name) const
{
using namespace std;
using namespace boost;
@@ -219,7 +226,7 @@ template<typename T> std::string mangled_storage_impl::get_variable(const std::s
return "";
}
-template<typename Func> std::string mangled_storage_impl::get_function(const std::string &name)
+template<typename Func> std::string mangled_storage_impl::get_function(const std::string &name) const
{
namespace x3 = spirit::x3;
using namespace parser;
@@ -257,7 +264,7 @@ template<typename Func> std::string mangled_storage_impl::get_function(const std
}
template<typename Class, typename Func>
-std::string mangled_storage_impl::get_mem_fn(const std::string &name)
+std::string mangled_storage_impl::get_mem_fn(const std::string &name) const
{
namespace x3 = spirit::x3;
using namespace parser;
@@ -295,7 +302,7 @@ std::string mangled_storage_impl::get_mem_fn(const std::string &name)
template<typename Signature>
-auto mangled_storage_impl::get_constructor() -> ctor_sym
+auto mangled_storage_impl::get_constructor() const -> ctor_sym
{
namespace x3 = spirit::x3;
using namespace parser;
@@ -345,7 +352,7 @@ auto mangled_storage_impl::get_constructor() -> ctor_sym
}
template<typename Class>
-auto mangled_storage_impl::get_destructor() -> dtor_sym
+auto mangled_storage_impl::get_destructor() const -> dtor_sym
{
namespace x3 = spirit::x3;
using namespace parser;
@@ -390,11 +397,43 @@ auto mangled_storage_impl::get_destructor() -> dtor_sym
return "";
}
+template<typename T>
+std::string mangled_storage_impl::get_vtable() const
+{
+ std::string id = "const " + get_name<T>() + "::`vftable'";
+
+ auto predicate = [&](const mangled_storage_base::entry & e)
+ {
+ return e.demangled == id;
+ };
+
+ auto found = std::find_if(storage_.begin(), storage_.end(), predicate);
+
+ if (found != storage_.end())
+ return found->mangled;
+ else
+ return "";
+}
+
+template<typename T>
+std::vector<std::string> mangled_storage_impl::get_related() const
+{
+ std::vector<std::string> ret;
+ auto name = get_name<T>();
+
+ for (auto & c : storage_)
+ {
+ if (c.demangled.find(name) != std::string::npos)
+ ret.push_back(c.demangled);
+ }
+
+ return ret;
+}
}}}
-#endif /* INCLUDE_BOOST_DLL_DETAIL_DEMANGLING_MSVC_HPP_ */
+#endif /* BOOST_DLL_DETAIL_DEMANGLING_MSVC_HPP_ */
diff --git a/boost/dll/detail/get_mem_fn_type.hpp b/boost/dll/detail/get_mem_fn_type.hpp
index 65cead20bc..b9dffdf4fe 100644
--- a/boost/dll/detail/get_mem_fn_type.hpp
+++ b/boost/dll/detail/get_mem_fn_type.hpp
@@ -6,8 +6,8 @@
// For more information, see http://www.boost.org
-#ifndef BOOST_DLL_SMART_LIBRARY_HPP_
-#define BOOST_DLL_SMART_LIBRARY_HPP_
+#ifndef BOOST_DLL_DETAIL_GET_MEM_FN_TYPE_HPP_
+#define BOOST_DLL_DETAIL_GET_MEM_FN_TYPE_HPP_
namespace boost { namespace dll { namespace detail {
@@ -37,4 +37,4 @@ struct get_mem_fn_type<const volatile Class, Return(Args...)> {
}}} // namespace boost::dll::detail
-#endif /* INCLUDE_BOOST_DLL_SMART_LIBRARY_HPP_ */
+#endif /* BOOST_DLL_SMART_LIBRARY_HPP_ */
diff --git a/boost/dll/detail/import_mangled_helpers.hpp b/boost/dll/detail/import_mangled_helpers.hpp
new file mode 100644
index 0000000000..c5942f69a8
--- /dev/null
+++ b/boost/dll/detail/import_mangled_helpers.hpp
@@ -0,0 +1,284 @@
+// Copyright 2015-2016 Klemens D. Morgenstern
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DLL_DETAIL_IMPORT_MANGLED_HELPERS_HPP_
+#define BOOST_DLL_DETAIL_IMPORT_MANGLED_HELPERS_HPP_
+
+
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace dll { namespace experimental { namespace detail {
+
+//the following could be done by fusion, though it's simple enough to just declare it here.
+template<class ...Args>
+struct sequence {};
+
+template<class Value, class Seq> struct push_front;
+template<class Value, class ...Args>
+struct push_front<Value, sequence<Args...>>
+{
+ typedef sequence<Value, Args...> type;
+};
+
+template<class Lhs, class Rhs>
+struct unqalified_is_same :
+ boost::is_same<
+ typename boost::remove_cv<Lhs>::type,
+ typename boost::remove_cv<Rhs>::type
+ >
+{
+};
+
+/* ********************************** function sequence type traits ******************************/
+
+//determine if it's a sequence of functions.
+template<class T> struct is_function_seq;
+
+//type-trait for function overloads
+template<class Class, class...Args> struct is_function_seq<sequence<Class, Args...>>
+ : boost::conditional<
+ boost::is_function<Class>::value,
+ is_function_seq<sequence<Args...>>,
+ boost::false_type>::type
+{};
+
+template<class Class>
+struct is_function_seq<sequence<Class>> : boost::is_function<Class>
+{
+};
+
+template<>
+struct is_function_seq<sequence<>> : boost::false_type
+{
+};
+
+/* ********************************* Function Tuple *************************** */
+
+//a tuple of plain functions.
+template <class ...Ts>
+struct function_tuple;
+
+template <class Return, class...Args, class T2, class ...Ts>
+struct function_tuple<Return(Args...), T2, Ts...> : function_tuple<T2, Ts...>
+{
+ constexpr function_tuple(Return(* t)(Args...), T2* t2, Ts* ... ts) : function_tuple<T2, Ts...>(t2, ts...), _f(t) {};
+ Return(*_f)(Args...);
+
+ Return operator()(Args...args)
+ {
+ return (*_f)(static_cast<Args>(args)...);
+ }
+ using function_tuple<T2, Ts...>::operator();
+
+};
+
+template <class Return, class...Args>
+struct function_tuple<Return(Args...)>
+{
+ constexpr function_tuple(Return(* t)(Args...)) : _f(t) {};
+ Return(*_f)(Args...);
+
+ Return operator()(Args...args)
+ {
+ return (*_f)(static_cast<Args>(args)...);
+ }
+};
+
+
+/* ********************************** MemFn sequence type traits ******************************/
+
+template<class Class, class Func>
+struct mem_fn_def
+{
+ typedef Class class_type;
+ typedef Func func_type;
+ typedef typename boost::dll::detail::get_mem_fn_type<Class, Func>::mem_fn mem_fn;
+};
+
+template<class ...Args>
+struct make_mem_fn_seq;
+
+// B: is T1 another version of T0?
+template<bool, class T0, class T1, class T2>
+struct make_mem_fn_seq_getter;
+
+template<class T0, class T1, class T2>
+struct make_mem_fn_seq_getter<true, T0, T1, T2>
+{
+ typedef mem_fn_def<T1, T2> type;
+};
+
+template<class T0, class T1, class T2>
+struct make_mem_fn_seq_getter<false, T0, T1, T2>
+{
+ typedef mem_fn_def<T0, T1> type;
+};
+
+template<class Class, class Signature>
+struct make_mem_fn_seq<Class, Signature>
+{
+ typedef mem_fn_def<Class, Signature> mem_fn;
+ typedef sequence<mem_fn> type;
+};
+
+template<class Class>
+struct make_mem_fn_seq<Class>
+{
+ typedef sequence<> type;
+};
+
+template<class T0, class T1, class T2, class ... Args>
+struct make_mem_fn_seq<T0, T1, T2, Args...>
+{
+ /* Since we might have ovls, it might be :
+ * Class, void(int), void(int, int) //--> just us class for both
+ * Class, const Class, void(int)//--> ovl class.
+ *
+ */
+ static_assert(boost::is_object<T0>::value, "");
+ typedef typename make_mem_fn_seq_getter<
+ unqalified_is_same<T0, T1>::value, T0, T1, T2>::type mem_fn_type;
+
+ typedef typename boost::conditional<
+ unqalified_is_same<T0, T1>::value,
+ make_mem_fn_seq<T1, Args...>,
+ make_mem_fn_seq<T0, T2, Args...>> ::type next;
+
+ typedef typename push_front<mem_fn_type, typename next::type>::type type;
+};
+
+
+
+
+/* Ok, this needs to be documented, so here's some pseudo-code:
+ *
+ * @code
+ *
+ * bool unqalified_is_same(lhs, rhs)
+ * {
+ * return remove_cv(lhs) == remove_cv(rhs);
+ * }
+ *
+ * mem_fn make_mem_fn_seq_getter(b, cl, T2, T3)
+ * {
+ * if (b) //b means, that T2 is another version of cl, i.e. qualified
+ * return get_mem_fn_type(T2, T3);
+ * else //means that T2 is a function.
+ * return get_mem_fn_type(cl, T2);
+ * }
+ *
+ * sequence make_mem_fn_seq(type cl, type T2, type T3, types...)
+ * {
+ * mem_fn = make_mem_fn_seq_getter(
+ * unqalified_is_same(cl, T2), cl, T2, T3);
+ *
+ * next = unqalified_is_same(cl, T2) ?
+ * make_mem_fn_seq(T2, types...) //because: T2 is another version of cl, hence i use this. T3 was already consumed.
+ * :
+ * make_mem_fn_seq(Class, T3, types...) //because: T2 was a function, hence it is consumed and class remains unchanged.
+ * ;
+ * return push_front(mem_fn, next) ;
+ * };
+ * @endcode
+ */
+
+
+
+template<class T, class U, class ...Args>
+struct is_mem_fn_seq_impl
+{
+ typedef typename boost::conditional<
+ boost::is_function<U>::value || boost::dll::experimental::detail::unqalified_is_same<T, U>::value,
+ typename is_mem_fn_seq_impl<T, Args...>::type,
+ boost::false_type>::type type;
+};
+
+template<class T, class U>
+struct is_mem_fn_seq_impl<T, U>
+{
+ typedef typename boost::conditional<
+ boost::is_function<U>::value && boost::is_object<T>::value,
+ boost::true_type, boost::false_type>::type type;
+};
+
+template<class T, class U, class Last>
+struct is_mem_fn_seq_impl<T, U, Last>
+{
+ typedef typename boost::conditional<
+ (boost::is_function<U>::value || boost::dll::experimental::detail::unqalified_is_same<T, U>::value)
+ && boost::is_function<Last>::value,
+ boost::true_type, boost::false_type>::type type;
+};
+
+template<class T> struct is_mem_fn_seq : boost::false_type {};
+
+//If only two arguments are provided at all.
+template<class T, class U>
+struct is_mem_fn_seq<sequence<T, U>> : boost::conditional<
+ boost::is_object<T>::value && boost::is_function<U>::value,
+ boost::true_type, boost::false_type>::type
+{
+};
+
+
+template<class T, class Func, class ...Args>
+struct is_mem_fn_seq<sequence<T, Func, Args...>> :
+ boost::conditional<
+ boost::is_class<T>::value && boost::is_function<Func>::value,
+ typename is_mem_fn_seq_impl<T, Args...>::type,
+ boost::false_type>::type {};
+
+
+/* ********************************** mem fn sequence tuple ******************************/
+
+/* A tuple of member functions
+ * Unlike for plain functions a sequence here might contain classes as well as functions.
+ */
+template <class ...Ts>
+struct mem_fn_tuple;
+
+template <class Class, class Return, class...Args, class T2, class ...Ts>
+struct mem_fn_tuple<mem_fn_def<Class, Return(Args...)>, T2, Ts...> : mem_fn_tuple<T2, Ts...>
+{
+ typedef typename boost::dll::detail::get_mem_fn_type<Class, Return(Args...)>::mem_fn mem_fn;
+
+ constexpr mem_fn_tuple(mem_fn f, typename T2::mem_fn t2, typename Ts::mem_fn ... ts)
+ : mem_fn_tuple<T2, Ts...>(t2, ts...), _f(f) {};
+ mem_fn _f;
+
+ Return operator()(Class* const cl, Args...args)
+ {
+ return (cl->*_f)(static_cast<Args>(args)...);
+ }
+ using mem_fn_tuple<T2, Ts...>::operator();
+
+};
+
+template <class Class, class Return, class...Args>
+struct mem_fn_tuple<mem_fn_def<Class, Return(Args...)>>
+{
+ typedef typename boost::dll::detail::get_mem_fn_type<Class, Return(Args...)>::mem_fn mem_fn;
+
+ constexpr mem_fn_tuple(mem_fn f) : _f(f) {};
+ mem_fn _f;
+
+ Return operator()(Class * const cl, Args...args)
+ {
+ return (cl->*_f)(static_cast<Args>(args)...);
+ }
+};
+
+}}}}
+#endif /* BOOST_DLL_DETAIL_IMPORT_MANGLED_HELPERS_HPP_ */
diff --git a/boost/dll/detail/pe_info.hpp b/boost/dll/detail/pe_info.hpp
index 7f1584a656..341a12323b 100644
--- a/boost/dll/detail/pe_info.hpp
+++ b/boost/dll/detail/pe_info.hpp
@@ -320,8 +320,10 @@ public:
section_end_addr = section_begin_addr + image_section_header.SizeOfRawData;
}
}
- BOOST_ASSERT(section_begin_addr);
- BOOST_ASSERT(section_end_addr);
+
+ // returning empty result if section was not found
+ if(section_begin_addr == 0 || section_end_addr == 0)
+ return ret;
}
const exports_t exprt = exports(h);
diff --git a/boost/dll/detail/type_info.hpp b/boost/dll/detail/type_info.hpp
new file mode 100644
index 0000000000..798ae20042
--- /dev/null
+++ b/boost/dll/detail/type_info.hpp
@@ -0,0 +1,83 @@
+// Copyright 2016 Klemens Morgenstern, Antony Polukhin
+//
+// Distributed under the 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
+
+#ifndef BOOST_DLL_DETAIL_TYPE_INFO_HPP_
+#define BOOST_DLL_DETAIL_TYPE_INFO_HPP_
+
+#include <typeinfo>
+#include <cstring>
+
+namespace boost { namespace dll { namespace detail {
+
+#if defined(BOOST_MSVC) || defined(BOOST_MSVC_VER)
+
+#if defined ( _WIN64 )
+
+template<typename Class, typename Lib, typename Storage>
+const std::type_info& load_type_info(Lib & lib, Storage & storage)
+{
+ struct RTTICompleteObjectLocator
+ {
+ boost::detail::winapi::DWORD_ signature; //always zero ?
+ boost::detail::winapi::DWORD_ offset; //offset of this vtable in the complete class
+ boost::detail::winapi::DWORD_ cdOffset; //constructor displacement offset
+ boost::detail::winapi::DWORD_ pTypeDescriptorOffset; //TypeDescriptor of the complete class
+ boost::detail::winapi::DWORD_ pClassDescriptorOffset; //describes inheritance hierarchy (ignored)
+ };
+
+ RTTICompleteObjectLocator** vtable_p = &lib.template get<RTTICompleteObjectLocator*>(storage.template get_vtable<Class>());
+
+ vtable_p--;
+ auto vtable = *vtable_p;
+
+ auto nat = reinterpret_cast<const char*>(lib.native());
+
+ nat += vtable->pTypeDescriptorOffset;
+
+ return *reinterpret_cast<const std::type_info*>(nat);
+
+}
+
+#else
+
+template<typename Class, typename Lib, typename Storage>
+const std::type_info& load_type_info(Lib & lib, Storage & storage)
+{
+ struct RTTICompleteObjectLocator
+ {
+ boost::detail::winapi::DWORD_ signature; //always zero ?
+ boost::detail::winapi::DWORD_ offset; //offset of this vtable in the complete class
+ boost::detail::winapi::DWORD_ cdOffset; //constructor displacement offset
+ const std::type_info* pTypeDescriptor; //TypeDescriptor of the complete class
+ void* pClassDescriptor; //describes inheritance hierarchy (ignored)
+ };
+
+ RTTICompleteObjectLocator** vtable_p = &lib.template get<RTTICompleteObjectLocator*>(storage.template get_vtable<Class>());
+
+ vtable_p--;
+ auto vtable = *vtable_p;
+ return *vtable->pTypeDescriptor;
+
+}
+
+#endif //_WIN64
+
+#else
+
+template<typename Class, typename Lib, typename Storage>
+const std::type_info& load_type_info(Lib & lib, Storage & storage)
+{
+ return lib.template get<const std::type_info>(storage.template get_type_info<Class>());
+
+}
+
+#endif
+
+
+}}}
+#endif /* BOOST_DLL_DETAIL_TYPE_INFO_HPP_ */
diff --git a/boost/dll/import_class.hpp b/boost/dll/import_class.hpp
new file mode 100644
index 0000000000..866fc9c045
--- /dev/null
+++ b/boost/dll/import_class.hpp
@@ -0,0 +1,558 @@
+// Copyright 2015-2016 Klemens D. Morgenstern
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DLL_IMPORT_CLASS_HPP_
+#define BOOST_DLL_IMPORT_CLASS_HPP_
+
+#include <boost/dll/smart_library.hpp>
+#include <boost/dll/import_mangled.hpp>
+#include <memory>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace dll { namespace experimental {
+
+namespace detail
+{
+
+template<typename T>
+struct deleter
+{
+ destructor<T> dtor;
+ bool use_deleting;
+
+ deleter(const destructor<T> & dtor, bool use_deleting = false) :
+ dtor(dtor), use_deleting(use_deleting) {}
+
+ void operator()(T*t)
+ {
+ if (use_deleting)
+ dtor.call_deleting(t);
+ else
+ {
+ dtor.call_standard(t);
+ //the thing is actually an array, so delete[]
+ auto p = reinterpret_cast<char*>(t);
+ delete [] p;
+ }
+ }
+};
+
+template<class T, class = void>
+struct mem_fn_call_proxy;
+
+template<class Class, class U>
+struct mem_fn_call_proxy<Class, boost::dll::experimental::detail::mangled_library_mem_fn<Class, U>>
+{
+ typedef boost::dll::experimental::detail::mangled_library_mem_fn<Class, U> mem_fn_t;
+ Class* t;
+ mem_fn_t & mem_fn;
+
+ mem_fn_call_proxy(mem_fn_call_proxy&&) = default;
+ mem_fn_call_proxy(const mem_fn_call_proxy & ) = delete;
+ mem_fn_call_proxy(Class * t, mem_fn_t & mem_fn)
+ : t(t), mem_fn(mem_fn) {}
+
+ template<typename ...Args>
+ auto operator()(Args&&...args) const
+ {
+ return mem_fn(t, std::forward<Args>(args)...);
+ }
+
+};
+
+template<class T, class Return, class ...Args>
+struct mem_fn_call_proxy<T, Return(Args...)>
+{
+ T* t;
+ const std::string &name;
+ smart_library &_lib;
+
+ mem_fn_call_proxy(mem_fn_call_proxy&&) = default;
+ mem_fn_call_proxy(const mem_fn_call_proxy&) = delete;
+ mem_fn_call_proxy(T *t, const std::string &name, smart_library & _lib)
+ : t(t), name(name), _lib(_lib) {};
+
+ Return operator()(Args...args) const
+ {
+ auto f = _lib.get_mem_fn<T, Return(Args...)>(name);
+ return (t->*f)(static_cast<Args>(args)...);
+ }
+};
+
+}
+
+template<typename T>
+class imported_class;
+
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib, Args...args);
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib, const std::string & alias_name, Args...args);
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib, std::size_t size, Args...args);
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib, std::size_t size,
+ const std::string & alias_name, Args...args);
+
+
+/*! This class represents an imported class.
+ *
+ * \note It must be constructed via \ref boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ *
+ * \tparam The type or type-alias of the imported class.
+ */
+template<typename T>
+class imported_class
+{
+ smart_library _lib;
+ std::unique_ptr<T, detail::deleter<T>> _data;
+ bool _is_allocating;
+ std::size_t _size;
+ const std::type_info& _ti;
+
+ template<typename ... Args>
+ inline std::unique_ptr<T, detail::deleter<T>> make_data(const smart_library& lib, Args ... args);
+ template<typename ... Args>
+ inline std::unique_ptr<T, detail::deleter<T>> make_data(const smart_library& lib, std::size_t size, Args...args);
+
+ template<typename ...Args>
+ imported_class(detail::sequence<Args...> *, const smart_library& lib, Args...args);
+
+ template<typename ...Args>
+ imported_class(detail::sequence<Args...> *, const smart_library& lib, std::size_t size, Args...args);
+
+ template<typename ...Args>
+ imported_class(detail::sequence<Args...> *, smart_library&& lib, Args...args);
+
+ template<typename ...Args>
+ imported_class(detail::sequence<Args...> *, smart_library&& lib, std::size_t size, Args...args);
+public:
+ //alias to construct with explicit parameter list
+ template<typename ...Args>
+ static imported_class<T> make(smart_library&& lib, Args...args)
+ {
+ typedef detail::sequence<Args...> *seq;
+ return imported_class(seq(), boost::move(lib), static_cast<Args>(args)...);
+ }
+
+ template<typename ...Args>
+ static imported_class<T> make(smart_library&& lib, std::size_t size, Args...args)
+ {
+ typedef detail::sequence<Args...> *seq;
+ return imported_class(seq(), boost::move(lib), size, static_cast<Args>(args)...);
+ }
+ template<typename ...Args>
+ static imported_class<T> make(const smart_library& lib, Args...args)
+ {
+ typedef detail::sequence<Args...> *seq;
+ return imported_class(seq(), lib, static_cast<Args>(args)...);
+ }
+
+ template<typename ...Args>
+ static imported_class<T> make(const smart_library& lib, std::size_t size, Args...args)
+ {
+ typedef detail::sequence<Args...> *seq;
+ return imported_class(seq(), lib, size, static_cast<Args>(args)...);
+ }
+
+ typedef imported_class<T> base_t;
+ ///Returns a pointer to the underlying class
+ T* get() {return _data.get();}
+ imported_class() = delete;
+
+ imported_class(imported_class&) = delete;
+ imported_class(imported_class&&) = default; ///<Move constructor
+ imported_class& operator=(imported_class&) = delete;
+ imported_class& operator=(imported_class&&) = default; ///<Move assignmend
+
+ ///Check if the imported class is move-constructible
+ bool is_move_constructible() {return !_lib.symbol_storage().template get_constructor<T(T&&)> ().empty();}
+ ///Check if the imported class is move-assignable
+ bool is_move_assignable() {return !_lib.symbol_storage().template get_mem_fn<T, T&(T&&)> ("operator=").empty();}
+ ///Check if the imported class is copy-constructible
+ bool is_copy_constructible() {return !_lib.symbol_storage().template get_constructor<T(const T&)>().empty();}
+ ///Check if the imported class is copy-assignable
+ bool is_copy_assignable() {return !_lib.symbol_storage().template get_mem_fn<T, T&(const T&)>("operator=").empty();}
+
+ imported_class<T> copy() const; ///<Invoke the copy constructor. \attention Undefined behaviour if the imported object is not copy constructible.
+ imported_class<T> move(); ///<Invoke the move constructor. \attention Undefined behaviour if the imported object is not move constructible.
+
+ ///Invoke the copy assignment. \attention Undefined behaviour if the imported object is not copy assignable.
+ void copy_assign(const imported_class<T> & lhs) const;
+ ///Invoke the move assignment. \attention Undefined behaviour if the imported object is not move assignable.
+ void move_assign( imported_class<T> & lhs);
+
+ ///Check if the class is loaded.
+ explicit operator bool() const {return _data;}
+
+ ///Get a const reference to the std::type_info.
+ const std::type_info& get_type_info() {return _ti;};
+
+ /*! Call a member function. This returns a proxy to the function.
+ * The proxy mechanic mechanic is necessary, so the signaute can be passed.
+ *
+ * \b Example
+ *
+ * \code
+ * im_class.call<void(const char*)>("function_name")("MyString");
+ * \endcode
+ */
+ template<class Signature>
+ const detail::mem_fn_call_proxy<T, Signature> call(const std::string& name)
+ {
+ return detail::mem_fn_call_proxy<T, Signature>(_data.get(), name, _lib);
+ }
+ /*! Call a qualified member function, i.e. const and or volatile.
+ *
+ * \b Example
+ *
+ * \code
+ * im_class.call<const type_alias, void(const char*)>("function_name")("MyString");
+ * \endcode
+ */
+ template<class Tin, class Signature, class = boost::enable_if<detail::unqalified_is_same<T, Tin>>>
+ const detail::mem_fn_call_proxy<Tin, Signature> call(const std::string& name)
+ {
+ return detail::mem_fn_call_proxy<Tin, Signature>(_data.get(), name, _lib);
+ }
+ ///Overload of ->* for an imported method.
+ template<class Tin, class T2>
+ const detail::mem_fn_call_proxy<Tin, boost::dll::experimental::detail::mangled_library_mem_fn<Tin, T2>>
+ operator->*(detail::mangled_library_mem_fn<Tin, T2>& mn)
+ {
+ return detail::mem_fn_call_proxy<Tin, boost::dll::experimental::detail::mangled_library_mem_fn<Tin, T2>>(_data.get(), mn);
+ }
+
+ ///Import a method of the class.
+ template <class ...Args>
+ typename boost::dll::experimental::detail::mangled_import_type<boost::dll::experimental::detail::sequence<T, Args...>>::type
+ import(const std::string & name)
+ {
+ return boost::dll::experimental::import_mangled<T, Args...>(_lib, name);
+ }
+};
+
+
+
+//helper function, uses the allocating
+template<typename T>
+template<typename ... Args>
+inline std::unique_ptr<T, detail::deleter<T>> imported_class<T>::make_data(const smart_library& lib, Args ... args)
+{
+ constructor<T(Args...)> ctor = lib.get_constructor<T(Args...)>();
+ destructor<T> dtor = lib.get_destructor <T>();
+
+ if (!ctor.has_allocating() || !dtor.has_deleting())
+ {
+ boost::system::error_code ec;
+
+ ec = boost::system::error_code(
+ boost::system::errc::bad_file_descriptor,
+ boost::system::generic_category()
+ );
+
+ // report_error() calls dlsym, do not use it here!
+ boost::throw_exception(
+ boost::system::system_error(
+ ec, "boost::dll::detail::make_data() failed: no allocating ctor or dtor was found"
+ )
+ );
+ }
+
+ return std::unique_ptr<T, detail::deleter<T>> (
+ ctor.call_allocating(static_cast<Args>(args)...),
+ detail::deleter<T>(dtor, false /* not deleting dtor*/));
+}
+
+//helper function, using the standard
+template<typename T>
+template<typename ... Args>
+inline std::unique_ptr<T, detail::deleter<T>> imported_class<T>::make_data(const smart_library& lib, std::size_t size, Args...args)
+{
+ constructor<T(Args...)> ctor = lib.get_constructor<T(Args...)>();
+ destructor<T> dtor = lib.get_destructor <T>();
+
+ if (!ctor.has_standard() || !dtor.has_standard())
+ {
+ boost::system::error_code ec;
+
+ ec = boost::system::error_code(
+ boost::system::errc::bad_file_descriptor,
+ boost::system::generic_category()
+ );
+
+ // report_error() calls dlsym, do not use it here!
+ boost::throw_exception(
+ boost::system::system_error(
+ ec, "boost::dll::detail::make_data() failed: no regular ctor or dtor was found"
+ )
+ );
+ }
+
+ T *data = reinterpret_cast<T*>(new char[size]);
+
+ ctor.call_standard(data, static_cast<Args>(args)...);
+
+ return std::unique_ptr<T, detail::deleter<T>> (
+ reinterpret_cast<T*>(data),
+ detail::deleter<T>(dtor, false /* not deleting dtor*/));
+
+}
+
+
+template<typename T>
+template<typename ...Args>
+imported_class<T>::imported_class(detail::sequence<Args...> *, const smart_library & lib, Args...args)
+ : _lib(lib),
+ _data(make_data<Args...>(lib, static_cast<Args>(args)...)),
+ _is_allocating(false),
+ _size(0),
+ _ti(lib.get_type_info<T>())
+{
+
+}
+
+template<typename T>
+template<typename ...Args>
+imported_class<T>::imported_class(detail::sequence<Args...> *, const smart_library & lib, std::size_t size, Args...args)
+ : _lib(lib),
+ _data(make_data<Args...>(lib, size, static_cast<Args>(args)...)),
+ _is_allocating(true),
+ _size(size),
+ _ti(lib.get_type_info<T>())
+{
+
+}
+
+template<typename T>
+template<typename ...Args>
+imported_class<T>::imported_class(detail::sequence<Args...> *, smart_library && lib, Args...args)
+ : _lib(boost::move(lib)),
+ _data(make_data<Args...>(lib, static_cast<Args>(args)...)),
+ _is_allocating(false),
+ _size(0),
+ _ti(lib.get_type_info<T>())
+{
+
+}
+
+template<typename T>
+template<typename ...Args>
+imported_class<T>::imported_class(detail::sequence<Args...> *, smart_library && lib, std::size_t size, Args...args)
+ : _lib(boost::move(lib)),
+ _data(make_data<Args...>(lib, size, static_cast<Args>(args)...)),
+ _is_allocating(true),
+ _size(size),
+ _ti(lib.get_type_info<T>())
+{
+
+}
+
+template<typename T>
+inline imported_class<T> boost::dll::experimental::imported_class<T>::copy() const
+{
+ if (this->_is_allocating)
+ return imported_class<T>::template make<const T&>(_lib, *_data);
+ else
+ return imported_class<T>::template make<const T&>(_lib, _size, *_data);
+}
+
+template<typename T>
+inline imported_class<T> boost::dll::experimental::imported_class<T>::move()
+{
+ if (this->_is_allocating)
+ return imported_class<T>::template make<T&&>(_lib, *_data);
+ else
+ return imported_class<T>::template make<T&&>(_lib, _size, *_data);
+}
+
+template<typename T>
+inline void boost::dll::experimental::imported_class<T>::copy_assign(const imported_class<T>& lhs) const
+{
+ this->call<T&(const T&)>("operator=")(*lhs._data);
+}
+
+template<typename T>
+inline void boost::dll::experimental::imported_class<T>::move_assign(imported_class<T>& lhs)
+{
+ this->call<T&(T&&)>("operator=")(static_cast<T&&>(*lhs._data));
+}
+
+
+
+/*!
+* Returns an instance of \ref imported_class which allows to call or import more functions.
+* It takes a copy of the smart_libray, so no added type_aliases will be visible,
+* for the object.
+*
+* Few compilers do implement an allocating constructor, which allows the construction
+* of the class without knowing the size. That is not portable, so the actual size of the class
+* shall always be provided.
+*
+* \b Example:
+*
+* \code
+* auto import_class<class type_alias, const std::string&, std::size_t>(lib, "class_name", 20, "param1", 42);
+* \endcode
+*
+* In this example we construct an instance of the class "class_name" with the size 20, which has "type_alias" as an alias,
+* through a constructor which takes a const-ref of std::string and an std::size_t parameter.
+*
+* \tparam T Class type or alias
+* \tparam Args Constructor argument list.
+* \param lib Path to shared library or shared library to load function from.
+* \param name Null-terminated C or C++ mangled name of the function to import. Can handle std::string, char*, const char*.
+* \param mode An mode that will be used on library load.
+*
+* \return class object.
+*
+* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
+* Overload that accepts path also throws std::bad_alloc in case of insufficient memory.
+*/
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib_, std::size_t size, Args...args)
+{
+ smart_library lib(lib_);
+
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib_, Args...args)
+{
+ smart_library lib(lib_);
+ return imported_class<T>::template make<Args...>(boost::move(lib), static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib_, const std::string & alias_name, Args...args)
+{
+ smart_library lib(lib_);
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib_, std::size_t size, const std::string & alias_name, Args...args)
+{
+ smart_library lib(lib_);
+
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(const smart_library& lib_, const std::string & alias_name, std::size_t size, Args...args)
+{
+ smart_library lib(lib_);
+
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library && lib, Args...args)
+{
+ return imported_class<T>::template make<Args...>(boost::move(lib), static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library && lib, const std::string & alias_name, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library && lib, std::size_t size, Args...args)
+{
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library && lib, std::size_t size, const std::string & alias_name, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+//! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library && lib, const std::string & alias_name, std::size_t size, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(boost::move(lib), size, static_cast<Args>(args)...);
+}
+
+
+
+/*! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ * \note This function does add the type alias to the \ref boost::dll::experimental::smart_library.
+ */
+
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library & lib, Args...args)
+{
+ return imported_class<T>::template make<Args...>(lib, static_cast<Args>(args)...);
+}
+
+/*! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ * \note This function does add the type alias to the \ref boost::dll::experimental::smart_library.
+ */
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library & lib, const std::string & alias_name, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(lib, static_cast<Args>(args)...);
+}
+
+/*! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ * \note This function does add the type alias to the \ref boost::dll::experimental::smart_library.
+ */
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library & lib, std::size_t size, Args...args)
+{
+ return imported_class<T>::template make<Args...>(lib, size, static_cast<Args>(args)...);
+}
+
+/*! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ * \note This function does add the type alias to the \ref boost::dll::experimental::smart_library.
+ */
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library & lib, std::size_t size, const std::string & alias_name, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(lib, size, static_cast<Args>(args)...);
+}
+
+/*! \overload boost::dll::import_class(const smart_library& lib, std::size_t, Args...)
+ * \note This function does add the type alias to the \ref boost::dll::experimental::smart_library.
+ */
+template<typename T, typename ... Args> imported_class<T>
+import_class(smart_library & lib, const std::string & alias_name, std::size_t size, Args...args)
+{
+ lib.add_type_alias<T>(alias_name);
+ return imported_class<T>::template make<Args...>(lib, size, static_cast<Args>(args)...);
+}
+
+}
+}
+}
+
+
+
+#endif /* BOOST_DLL_IMPORT_CLASS_HPP_ */
diff --git a/boost/dll/import_mangled.hpp b/boost/dll/import_mangled.hpp
new file mode 100644
index 0000000000..7463168e10
--- /dev/null
+++ b/boost/dll/import_mangled.hpp
@@ -0,0 +1,306 @@
+// Copyright 2015-2016 Klemens D. Morgenstern
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_DLL_IMPORT_MANGLED_HPP_
+#define BOOST_DLL_IMPORT_MANGLED_HPP_
+
+#include <boost/config.hpp>
+#include <boost/make_shared.hpp>
+#include <boost/move/move.hpp>
+#include <boost/dll/smart_library.hpp>
+#include <boost/dll/detail/import_mangled_helpers.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_object.hpp>
+
+
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace dll { namespace experimental {
+
+namespace detail
+{
+
+
+
+template <class ... Ts>
+class mangled_library_function {
+ // Copying of `boost::dll::shared_library` is very expensive, so we use a `shared_ptr` to make it faster.
+ boost::shared_ptr<function_tuple<Ts...>> f_;
+
+public:
+ inline mangled_library_function(const boost::shared_ptr<shared_library>& lib, Ts*... func_ptr) BOOST_NOEXCEPT
+ : f_(lib, new function_tuple<Ts...>(func_ptr...))
+ {}
+
+
+ // Compilation error at this point means that imported function
+ // was called with unmatching parameters.
+ //
+ // Example:
+ // auto f = dll::import_mangled<void(int), void(double)>("function", "lib.so");
+ // f("Hello"); // error: invalid conversion from 'const char*' to 'int'
+ // f(1, 2); // error: too many arguments to function
+ // f(); // error: too few arguments to function
+ template <class... Args>
+ inline auto operator()(Args&&... args) const
+ -> decltype( (*f_)(static_cast<Args&&>(args)...) )
+ {
+ return (*f_)(static_cast<Args&&>(args)...);
+ }
+};
+
+
+template<class Class, class Sequence>
+class mangled_library_mem_fn;
+
+template <class Class, class ... Ts>
+class mangled_library_mem_fn<Class, sequence<Ts...>> {
+ // Copying of `boost::dll::shared_library` is very expensive, so we use a `shared_ptr` to make it faster.
+ typedef mem_fn_tuple<Ts...> call_tuple_t;
+ boost::shared_ptr<call_tuple_t> f_;
+
+public:
+ inline mangled_library_mem_fn(const boost::shared_ptr<shared_library>& lib,
+ typename Ts::mem_fn... func_ptr) BOOST_NOEXCEPT
+ : f_(lib, new call_tuple_t(func_ptr...))
+ {}
+
+ template <class ClassIn, class... Args>
+ inline auto operator()(ClassIn *cl, Args&&... args) const -> decltype( (*f_)(cl, static_cast<Args&&>(args)...) )
+ {
+ return (*f_)(cl, static_cast<Args&&>(args)...);
+ }
+};
+
+
+
+
+// simple enough to be here
+template<class Seq> struct is_variable : boost::false_type {};
+template<typename T> struct is_variable<sequence<T>> : boost::is_object<T> {};
+
+template <class Sequence,
+ bool isFunction = is_function_seq<Sequence>::value,
+ bool isMemFn = is_mem_fn_seq <Sequence>::value,
+ bool isVariable = is_variable <Sequence>::value>
+struct mangled_import_type;
+
+template <class ...Args>
+struct mangled_import_type<sequence<Args...>, true,false,false> //is function
+{
+ typedef boost::dll::experimental::detail::mangled_library_function<Args...> type;
+ static type make(
+ const boost::dll::experimental::smart_library& p,
+ const std::string& name)
+ {
+ return type(
+ boost::make_shared<shared_library>(p.shared_lib()),
+ boost::addressof(p.get_function<Args>(name))...);
+ }
+};
+
+template <class Class, class ...Args>
+struct mangled_import_type<sequence<Class, Args...>, false, true, false> //is member-function
+{
+ typedef typename boost::dll::experimental::detail::make_mem_fn_seq<Class, Args...>::type actual_sequence;
+ typedef typename boost::dll::experimental::detail::mangled_library_mem_fn<Class, actual_sequence> type;
+
+
+ template<class ... ArgsIn>
+ static type make_impl(
+ const boost::dll::experimental::smart_library& p,
+ const std::string & name,
+ sequence<ArgsIn...> * )
+ {
+ return type(boost::make_shared<shared_library>(p.shared_lib()),
+ p.get_mem_fn<typename ArgsIn::class_type, typename ArgsIn::func_type>(name)...);
+ }
+
+ static type make(
+ const boost::dll::experimental::smart_library& p,
+ const std::string& name)
+ {
+ return make_impl(p, name, static_cast<actual_sequence*>(nullptr));
+ }
+
+};
+
+template <class T>
+struct mangled_import_type<sequence<T>, false, false, true> //is variable
+{
+ typedef boost::shared_ptr<T> type;
+
+ static type make(
+ const boost::dll::experimental::smart_library& p,
+ const std::string& name)
+ {
+ return type(
+ boost::make_shared<shared_library>(p.shared_lib()),
+ boost::addressof(p.get_variable<T>(name)));
+ }
+
+};
+
+
+} // namespace detail
+
+
+#ifndef BOOST_DLL_DOXYGEN
+# define BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE inline typename \
+ boost::dll::experimental::detail::mangled_import_type<boost::dll::experimental::detail::sequence<Args...>>::type
+#endif
+
+/*
+ * Variants:
+ * import_mangled<int>("Stuff");
+ * import_mangled<thingy(xyz)>("Function");
+ * import mangled<thingy, void(int)>("Function");
+ */
+
+/*!
+* Returns callable object or boost::shared_ptr<T> that holds the symbol imported
+* from the loaded library. Returned value refcounts usage
+* of the loaded shared library, so that it won't get unload until all copies of return value
+* are not destroyed.
+*
+* For importing symbols by \b alias names use \forcedlink{import_alias} method.
+*
+* \b Examples:
+*
+* \code
+* boost::function<int(int)> f = import_mangled<int(int)>("test_lib.so", "integer_func_name");
+*
+* auto f_cpp11 = import_mangled<int(int)>("test_lib.so", "integer_func_name");
+* \endcode
+*
+* \code
+* boost::shared_ptr<int> i = import_mangled<int>("test_lib.so", "integer_name");
+* \endcode
+*
+* Additionally you can also import overloaded symbols, including member-functions.
+*
+* \code
+* auto fp = import_mangled<void(int), void(double)>("test_lib.so", "func");
+* \endcode
+*
+* \code
+* auto fp = import_mangled<my_class, void(int), void(double)>("test_lib.so", "func");
+* \endcode
+*
+* If qualified member-functions are needed, this can be set by repeating the class name with const or volatile.
+* All following signatures after the redifintion will use this, i.e. the latest.
+*
+* * * \code
+* auto fp = import_mangled<my_class, void(int), void(double),
+* const my_class, void(int), void(double)>("test_lib.so", "func");
+* \endcode
+*
+* \b Template \b parameter \b T: Type of the symbol that we are going to import. Must be explicitly specified.
+*
+* \param lib Path to shared library or shared library to load function from.
+* \param name Null-terminated C or C++ mangled name of the function to import. Can handle std::string, char*, const char*.
+* \param mode An mode that will be used on library load.
+*
+* \return callable object if T is a function type, or boost::shared_ptr<T> if T is an object type.
+*
+* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
+* Overload that accepts path also throws std::bad_alloc in case of insufficient memory.
+*/
+
+
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const boost::filesystem::path& lib, const char* name,
+ load_mode::type mode = load_mode::default_mode)
+{
+ typedef typename boost::dll::experimental::detail::mangled_import_type<
+ boost::dll::experimental::detail::sequence<Args...>> type;
+
+ boost::dll::experimental::smart_library p(lib, mode);
+ //the load
+ return type::make(p, name);
+}
+
+
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const boost::filesystem::path& lib, const std::string& name,
+ load_mode::type mode = load_mode::default_mode)
+{
+ return import_mangled<Args...>(lib, name.c_str(), mode);
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const smart_library& lib, const char* name) {
+ typedef typename boost::dll::experimental::detail::mangled_import_type<detail::sequence<Args...>> type;
+
+ return type::make(lib, name);
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const smart_library& lib, const std::string& name) {
+ return import_mangled<Args...>(lib, name.c_str());
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(BOOST_RV_REF(smart_library) lib, const char* name) {
+ typedef typename boost::dll::experimental::detail::mangled_import_type<detail::sequence<Args...>> type;
+
+ return type::make(lib, name);
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(BOOST_RV_REF(smart_library) lib, const std::string& name) {
+ return import_mangled<Args...>(boost::move(lib), name.c_str());
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const shared_library& lib, const char* name) {
+ typedef typename boost::dll::experimental::detail::mangled_import_type<detail::sequence<Args...>> type;
+
+ boost::shared_ptr<boost::dll::experimental::smart_library> p = boost::make_shared<boost::dll::experimental::smart_library>(lib);
+ return type::make(p, name);
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(const shared_library& lib, const std::string& name) {
+ return import_mangled<Args...>(lib, name.c_str());
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(BOOST_RV_REF(shared_library) lib, const char* name) {
+ typedef typename boost::dll::experimental::detail::mangled_import_type<detail::sequence<Args...>> type;
+
+ boost::dll::experimental::smart_library p(boost::move(lib));
+
+ return type::make(p, name);
+}
+
+//! \overload boost::dll::import(const boost::filesystem::path& lib, const char* name, load_mode::type mode)
+template <class ...Args>
+BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE import_mangled(BOOST_RV_REF(shared_library) lib, const std::string& name) {
+ return import_mangled<Args...>(boost::move(lib), name.c_str());
+}
+
+#undef BOOST_DLL_MANGLED_IMPORT_RESULT_TYPE
+
+}}}
+
+
+#endif /* BOOST_DLL_IMPORT_MANGLED_HPP_ */
diff --git a/boost/dll/smart_library.hpp b/boost/dll/smart_library.hpp
index 718820b2fb..03bade8100 100644
--- a/boost/dll/smart_library.hpp
+++ b/boost/dll/smart_library.hpp
@@ -4,20 +4,13 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef INCLUDE_BOOST_DLL_SMART_LIBRARY_HPP_
-#define INCLUDE_BOOST_DLL_SMART_LIBRARY_HPP_
+#ifndef BOOST_DLL_SMART_LIBRARY_HPP_
+#define BOOST_DLL_SMART_LIBRARY_HPP_
/// \file boost/dll/smart_library.hpp
/// \warning Extremely experimental! Requires C++14! Will change in next version of Boost! boost/dll/smart_library.hpp is not included in boost/dll.hpp
/// \brief Contains the boost::dll::experimental::smart_library class for loading mangled symbols.
-#include <boost/dll/shared_library.hpp>
-#include <boost/dll/detail/get_mem_fn_type.hpp>
-#include <boost/dll/detail/ctor_dtor.hpp>
-
-#include <boost/predef/compiler.h>
-
-
#if BOOST_COMP_GNUC || BOOST_COMP_CLANG || BOOST_COMP_HPACC || BOOST_COMP_IBM
#include <boost/dll/detail/demangling/itanium.hpp>
#elif BOOST_COMP_MSVC
@@ -26,6 +19,17 @@
#error "Compiler not supported"
#endif
+#include <boost/dll/shared_library.hpp>
+#include <boost/dll/detail/get_mem_fn_type.hpp>
+#include <boost/dll/detail/ctor_dtor.hpp>
+#include <boost/dll/detail/type_info.hpp>
+#include <boost/type_traits/is_object.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/predef/compiler.h>
+
+
+
namespace boost {
namespace dll {
namespace experimental {
@@ -82,6 +86,9 @@ public:
*/
const mangled_storage &symbol_storage() const {return _storage;}
+ ///Overload, for current development.
+ mangled_storage &symbol_storage() {return _storage;}
+
//! \copydoc shared_library::shared_library()
smart_library() BOOST_NOEXCEPT {};
@@ -100,13 +107,60 @@ public:
smart_library(const boost::filesystem::path& lib_path, load_mode::type mode, boost::system::error_code& ec) {
load(lib_path, mode, ec);
}
-
- //! \copydoc shared_library::shared_library(BOOST_RV_REF(smart_library) lib)
- smart_library(BOOST_RV_REF(smart_library) lib) BOOST_NOEXCEPT // Move ctor
- : _lib(boost::move(static_cast<shared_library&>(lib._lib))), _storage(boost::move(lib._storage))
+ /*!
+ * copy a smart_library object.
+ *
+ * \param lib A smart_library to move from.
+ *
+ * \throw Nothing.
+ */
+ smart_library(const smart_library & lib) BOOST_NOEXCEPT
+ : _lib(lib._lib), _storage(lib._storage)
+ {}
+ /*!
+ * Move a smart_library object.
+ *
+ * \param lib A smart_library to move from.
+ *
+ * \throw Nothing.
+ */
+ smart_library(BOOST_RV_REF(smart_library) lib) BOOST_NOEXCEPT
+ : _lib(boost::move(lib._lib)), _storage(boost::move(lib._storage))
{}
- //! \copydoc shared_library::~shared_library()
+ /*!
+ * Construct from a shared_library object.
+ *
+ * \param lib A shared_library to move from.
+ *
+ * \throw Nothing.
+ */
+ explicit smart_library(const shared_library & lib) BOOST_NOEXCEPT
+ : _lib(lib)
+ {
+ _storage.load(lib.location());
+ }
+ /*!
+ * Construct from a shared_library object.
+ *
+ * \param lib A shared_library to move from.
+ *
+ * \throw Nothing.
+ */
+ explicit smart_library(BOOST_RV_REF(shared_library) lib) BOOST_NOEXCEPT
+ : _lib(boost::move(static_cast<shared_library&>(lib)))
+ {
+ _storage.load(lib.location());
+ }
+
+ /*!
+ * Destroys the smart_library.
+ * `unload()` is called if the DLL/DSO was loaded. If library was loaded multiple times
+ * by different instances of shared_library, the actual DLL/DSO won't be unloaded until
+ * there is at least one instance of shared_library.
+ *
+ * \throw Nothing.
+ */
~smart_library() BOOST_NOEXCEPT {};
//! \copydoc shared_library::load(const boost::filesystem::path& lib_path, load_mode::type mode = load_mode::default_mode)
@@ -148,7 +202,7 @@ public:
* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
*/
template<typename T>
- T& get_variable(const std::string &name) {
+ T& get_variable(const std::string &name) const {
return _lib.get<T>(_storage.get_variable<T>(name));
}
@@ -174,7 +228,7 @@ public:
* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
*/
template<typename Func>
- Func& get_function(const std::string &name) {
+ Func& get_function(const std::string &name) const {
return _lib.get<Func>(_storage.get_function<Func>(name));
}
@@ -203,9 +257,9 @@ public:
* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
*/
template<typename Class, typename Func>
- typename detail::get_mem_fn_type<Class, Func>::mem_fn get_mem_fn(const std::string& name) {
- return _lib.get<typename detail::get_mem_fn_type<Class, Func>::mem_fn>(
- _storage.get_mem_fn<Class, Func>(name)
+ typename boost::dll::detail::get_mem_fn_type<Class, Func>::mem_fn get_mem_fn(const std::string& name) const {
+ return _lib.get<typename boost::dll::detail::get_mem_fn_type<Class, Func>::mem_fn>(
+ _storage.get_mem_fn<Class, Func>(name)
);
}
@@ -226,8 +280,8 @@ public:
* \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
*/
template<typename Signature>
- constructor<Signature> get_constructor() {
- return detail::load_ctor<Signature>(_lib, _storage.get_constructor<Signature>());
+ constructor<Signature> get_constructor() const {
+ return boost::dll::detail::load_ctor<Signature>(_lib, _storage.get_constructor<Signature>());
}
/*!
@@ -248,8 +302,30 @@ public:
*
*/
template<typename Class>
- destructor<Class> get_destructor() {
- return detail::load_dtor<Class>(_lib, _storage.get_destructor<Class>());
+ destructor<Class> get_destructor() const {
+ return boost::dll::detail::load_dtor<Class>(_lib, _storage.get_destructor<Class>());
+ }
+ /*!
+ * Load the typeinfo of the given type.
+ *
+ * \b Example (import class is MyClass, which is available inside the library and the host):
+ *
+ * \code
+ * smart_library lib("test_lib.so");
+ *
+ * std::type_info &ti = lib.get_Type_info<MyClass>();
+ * \endcode
+ *
+ * \tparam Class The class whichs typeinfo shall be loaded
+ * \return A reference to a type_info object.
+ *
+ * \throw boost::system::system_error if symbol does not exist or if the DLL/DSO was not loaded.
+ *
+ */
+ template<typename Class>
+ const std::type_info& get_type_info() const
+ {
+ return boost::dll::detail::load_type_info<Class>(_lib, _storage);
}
/**
* This function can be used to add a type alias.
@@ -340,8 +416,47 @@ inline void swap(smart_library& lhs, smart_library& rhs) BOOST_NOEXCEPT {
}
+#ifdef BOOST_DLL_DOXYGEN
+/** Helper functions for overloads.
+ *
+ * Gets either a variable, function or member-function, depending on the signature.
+ *
+ * @code
+ * smart_library sm("lib.so");
+ * get<int>(sm, "space::value"); //import a variable
+ * get<void(int)>(sm, "space::func"); //import a function
+ * get<some_class, void(int)>(sm, "space::class_::mem_fn"); //import a member function
+ * @endcode
+ *
+ * @param sm A reference to the @ref smart_library
+ * @param name The name of the entity to import
+ */
+template<class T, class T2>
+void get(const smart_library& sm, const std::string &name);
+#endif
+
+template<class T>
+T& get(const smart_library& sm, const std::string &name, typename boost::enable_if<boost::is_object<T>,T>::type* = nullptr)
+
+{
+ return sm.get_variable<T>(name);
+}
+
+template<class T>
+auto get(const smart_library& sm, const std::string &name, typename boost::enable_if<boost::is_function<T>>::type* = nullptr)
+{
+ return sm.get_function<T>(name);
+}
+
+template<class Class, class Signature>
+auto get(const smart_library& sm, const std::string &name) -> typename detail::get_mem_fn_type<Class, Signature>::mem_fn
+{
+ return sm.get_mem_fn<Class, Signature>(name);
+}
+
+
} /* namespace experimental */
} /* namespace dll */
} /* namespace boost */
-#endif /* INCLUDE_BOOST_DLL_SMART_LIBRARY_HPP_ */
+#endif /* BOOST_DLL_SMART_LIBRARY_HPP_ */
diff --git a/boost/dynamic_bitset/dynamic_bitset.hpp b/boost/dynamic_bitset/dynamic_bitset.hpp
index f6002d84e8..86b5428597 100644
--- a/boost/dynamic_bitset/dynamic_bitset.hpp
+++ b/boost/dynamic_bitset/dynamic_bitset.hpp
@@ -305,6 +305,9 @@ public:
size_type num_blocks() const BOOST_NOEXCEPT;
size_type max_size() const BOOST_NOEXCEPT;
bool empty() const BOOST_NOEXCEPT;
+ size_type capacity() const BOOST_NOEXCEPT;
+ void reserve(size_type num_bits);
+ void shrink_to_fit();
bool is_subset_of(const dynamic_bitset& a) const;
bool is_proper_subset_of(const dynamic_bitset& a) const;
@@ -750,15 +753,15 @@ push_back(bool bit)
template <typename Block, typename Allocator>
void dynamic_bitset<Block, Allocator>::
-pop_back()
+pop_back()
{
const size_type old_num_blocks = num_blocks();
const size_type required_blocks = calc_num_blocks(m_num_bits - 1);
-
+
if (required_blocks != old_num_blocks) {
- m_bits.pop_back();
+ m_bits.pop_back();
}
-
+
--m_num_bits;
m_zero_unused_bits();
}
@@ -1268,6 +1271,27 @@ inline bool dynamic_bitset<Block, Allocator>::empty() const BOOST_NOEXCEPT
}
template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::capacity() const BOOST_NOEXCEPT
+{
+ return m_bits.capacity() * bits_per_block;
+}
+
+template <typename Block, typename Allocator>
+inline void dynamic_bitset<Block, Allocator>::reserve(size_type num_bits)
+{
+ m_bits.reserve(calc_num_blocks(num_bits));
+}
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::shrink_to_fit()
+{
+ if (m_bits.size() < m_bits.capacity()) {
+ buffer_type(m_bits).swap(m_bits);
+ }
+}
+
+template <typename Block, typename Allocator>
bool dynamic_bitset<Block, Allocator>::
is_subset_of(const dynamic_bitset<Block, Allocator>& a) const
{
diff --git a/boost/exception/detail/error_info_impl.hpp b/boost/exception/detail/error_info_impl.hpp
index 12e601b556..dbe0afdb21 100644
--- a/boost/exception/detail/error_info_impl.hpp
+++ b/boost/exception/detail/error_info_impl.hpp
@@ -12,6 +12,8 @@
#pragma warning(push,1)
#endif
+#include <boost/config.hpp>
+#include <utility>
#include <string>
namespace
@@ -41,11 +43,16 @@ boost
error_info:
public exception_detail::error_info_base
{
- public:
+ public:
typedef T value_type;
error_info( value_type const & value );
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ error_info( error_info const & );
+ error_info( value_type && value ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(value))));
+ error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.value_))));
+#endif
~error_info() throw();
value_type const &
@@ -60,7 +67,11 @@ boost
return value_;
}
- private:
+ private:
+ error_info & operator=( error_info const & );
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ error_info & operator=( error_info && x );
+#endif
std::string name_value_string() const;
diff --git a/boost/exception/errinfo_errno.hpp b/boost/exception/errinfo_errno.hpp
index 2cf7cabe56..657b5f76d5 100644
--- a/boost/exception/errinfo_errno.hpp
+++ b/boost/exception/errinfo_errno.hpp
@@ -10,6 +10,7 @@
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
+#pragma warning(disable:4996)
#endif
#include "boost/exception/info.hpp"
@@ -33,7 +34,7 @@ boost
{
std::ostringstream tmp;
int v=e.value();
- tmp << v << ", \"" << strerror(v) << "\"";
+ tmp << '[' << error_info_name(e) << "] = " << v << ", \"" << strerror(v) << "\"\n";
return tmp.str();
}
}
diff --git a/boost/exception/exception.hpp b/boost/exception/exception.hpp
index 1f2bd9c200..213af3dbb8 100644
--- a/boost/exception/exception.hpp
+++ b/boost/exception/exception.hpp
@@ -182,6 +182,18 @@ boost
template <>
struct get_info<throw_line>;
+ template <class>
+ struct set_info_rv;
+
+ template <>
+ struct set_info_rv<throw_function>;
+
+ template <>
+ struct set_info_rv<throw_file>;
+
+ template <>
+ struct set_info_rv<throw_line>;
+
char const * get_diagnostic_information( exception const &, char const * );
void copy_boost_exception( exception *, exception const * );
@@ -264,6 +276,11 @@ boost
friend struct exception_detail::get_info<throw_function>;
friend struct exception_detail::get_info<throw_file>;
friend struct exception_detail::get_info<throw_line>;
+ template <class>
+ friend struct exception_detail::set_info_rv;
+ friend struct exception_detail::set_info_rv<throw_function>;
+ friend struct exception_detail::set_info_rv<throw_file>;
+ friend struct exception_detail::set_info_rv<throw_line>;
friend void exception_detail::copy_boost_exception( exception *, exception const * );
#endif
mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
diff --git a/boost/exception/info.hpp b/boost/exception/info.hpp
index 762a950f86..f955e09845 100644
--- a/boost/exception/info.hpp
+++ b/boost/exception/info.hpp
@@ -46,6 +46,30 @@ boost
{
}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class Tag,class T>
+ inline
+ error_info<Tag,T>::
+ error_info( error_info const & x ):
+ value_(x.value_)
+ {
+ }
+ template <class Tag,class T>
+ inline
+ error_info<Tag,T>::
+ error_info( value_type && value ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(value)))):
+ value_(std::move(value))
+ {
+ }
+ template <class Tag,class T>
+ inline
+ error_info<Tag,T>::
+ error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.value_)))):
+ value_(std::move(x.value_))
+ {
+ }
+#endif
+
template <class Tag,class T>
inline
error_info<Tag,T>::
@@ -175,6 +199,85 @@ boost
return x;
}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class E,class Tag,class T>
+ E const & set_info( E const &, error_info<Tag,T> && );
+ template <class T>
+ class set_info_rv;
+ template <class Tag,class T>
+ class
+ set_info_rv<error_info<Tag,T> >
+ {
+ template <class E,class Tag1,class T1>
+ friend E const & set_info( E const &, error_info<Tag1,T1> && );
+ template <class E>
+ static
+ E const &
+ set( E const & x, error_info<Tag,T> && v )
+ {
+ typedef error_info<Tag,T> error_info_tag_t;
+ shared_ptr<error_info_tag_t> p( new error_info_tag_t(std::move(v)) );
+ exception_detail::error_info_container * c=x.data_.get();
+ if( !c )
+ x.data_.adopt(c=new exception_detail::error_info_container_impl);
+ c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
+ return x;
+ }
+ };
+ template <>
+ class
+ set_info_rv<throw_function>
+ {
+ template <class E,class Tag1,class T1>
+ friend E const & set_info( E const &, error_info<Tag1,T1> && );
+ template <class E>
+ static
+ E const &
+ set( E const & x, throw_function && y )
+ {
+ x.throw_function_=y.v_;
+ return x;
+ }
+ };
+ template <>
+ class
+ set_info_rv<throw_file>
+ {
+ template <class E,class Tag1,class T1>
+ friend E const & set_info( E const &, error_info<Tag1,T1> && );
+ template <class E>
+ static
+ E const &
+ set( E const & x, throw_file && y )
+ {
+ x.throw_file_=y.v_;
+ return x;
+ }
+ };
+ template <>
+ class
+ set_info_rv<throw_line>
+ {
+ template <class E,class Tag1,class T1>
+ friend E const & set_info( E const &, error_info<Tag1,T1> && );
+ template <class E>
+ static
+ E const &
+ set( E const & x, throw_line && y )
+ {
+ x.throw_line_=y.v_;
+ return x;
+ }
+ };
+ template <class E,class Tag,class T>
+ inline
+ E const &
+ set_info( E const & x, error_info<Tag,T> && v )
+ {
+ return set_info_rv<error_info<Tag,T> >::template set<E>(x,std::move(v));
+ }
+#endif
+
template <class T>
struct
derives_boost_exception
@@ -190,6 +293,16 @@ boost
{
return exception_detail::set_info(x,v);
}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class E,class Tag,class T>
+ inline
+ typename enable_if<exception_detail::derives_boost_exception<E>,E const &>::type
+ operator<<( E const & x, error_info<Tag,T> && v )
+ {
+ return exception_detail::set_info(x,std::move(v));
+ }
+#endif
}
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
diff --git a/boost/fiber/algo/algorithm.hpp b/boost/fiber/algo/algorithm.hpp
new file mode 100644
index 0000000000..515fc5ed5c
--- /dev/null
+++ b/boost/fiber/algo/algorithm.hpp
@@ -0,0 +1,114 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_ALGO_ALGORITHM_H
+#define BOOST_FIBERS_ALGO_ALGORITHM_H
+
+#include <cstddef>
+#include <chrono>
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+
+#include <boost/fiber/properties.hpp>
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+class context;
+
+namespace algo {
+
+struct BOOST_FIBERS_DECL algorithm {
+ virtual ~algorithm() {}
+
+ virtual void awakened( context *) noexcept = 0;
+
+ virtual context * pick_next() noexcept = 0;
+
+ virtual bool has_ready_fibers() const noexcept = 0;
+
+ virtual void suspend_until( std::chrono::steady_clock::time_point const&) noexcept = 0;
+
+ virtual void notify() noexcept = 0;
+};
+
+class BOOST_FIBERS_DECL algorithm_with_properties_base : public algorithm {
+public:
+ // called by fiber_properties::notify() -- don't directly call
+ virtual void property_change_( context * f, fiber_properties * props) noexcept = 0;
+
+protected:
+ static fiber_properties* get_properties( context * f) noexcept;
+ static void set_properties( context * f, fiber_properties * p) noexcept;
+};
+
+template< typename PROPS >
+struct algorithm_with_properties : public algorithm_with_properties_base {
+ typedef algorithm_with_properties_base super;
+
+ // Mark this override 'final': algorithm_with_properties subclasses
+ // must override awakened() with properties parameter instead. Otherwise
+ // you'd have to remember to start every subclass awakened() override
+ // with: algorithm_with_properties<PROPS>::awakened(fb);
+ virtual void awakened( context * f) noexcept override final {
+ fiber_properties * props = super::get_properties( f);
+ if ( nullptr == props) {
+ // TODO: would be great if PROPS could be allocated on the new
+ // fiber's stack somehow
+ props = new_properties( f);
+ // It is not good for new_properties() to return 0.
+ BOOST_ASSERT_MSG(props, "new_properties() must return non-NULL");
+ // new_properties() must return instance of (a subclass of) PROPS
+ BOOST_ASSERT_MSG( dynamic_cast< PROPS * >( props),
+ "new_properties() must return properties class");
+ super::set_properties( f, props);
+ }
+ // Set algo_ again every time this fiber becomes READY. That
+ // handles the case of a fiber migrating to a new thread with a new
+ // algorithm subclass instance.
+ props->set_algorithm( this);
+
+ // Okay, now forward the call to subclass override.
+ awakened( f, properties(f) );
+ }
+
+ // subclasses override this method instead of the original awakened()
+ virtual void awakened( context *, PROPS& ) noexcept = 0;
+
+ // used for all internal calls
+ PROPS & properties( context * f) noexcept {
+ return static_cast< PROPS & >( * super::get_properties( f) );
+ }
+
+ // override this to be notified by PROPS::notify()
+ virtual void property_change( context * f, PROPS & props) noexcept {
+ }
+
+ // implementation for algorithm_with_properties_base method
+ void property_change_( context * f, fiber_properties * props ) noexcept override final {
+ property_change( f, * static_cast< PROPS * >( props) );
+ }
+
+ // Override this to customize instantiation of PROPS, e.g. use a different
+ // allocator. Each PROPS instance is associated with a particular
+ // context.
+ virtual fiber_properties * new_properties( context * f) {
+ return new PROPS( f);
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_ALGO_ALGORITHM_H
diff --git a/boost/fiber/algo/detail/chase_lev_queue.hpp b/boost/fiber/algo/detail/chase_lev_queue.hpp
new file mode 100644
index 0000000000..f51556020d
--- /dev/null
+++ b/boost/fiber/algo/detail/chase_lev_queue.hpp
@@ -0,0 +1,172 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_ALGO_DETAIL_CHASE_LEV_QUEUE_H
+#define BOOST_FIBERS_ALGO_DETAIL_CHASE_LEV_QUEUE_H
+
+#include <atomic>
+#include <cstddef>
+#include <memory>
+#include <type_traits>
+#include <vector>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/context.hpp>
+
+// David Chase and Yossi Lev. Dynamic circular work-stealing deque.
+// In SPAA ’05: Proceedings of the seventeenth annual ACM symposium
+// on Parallelism in algorithms and architectures, pages 21–28,
+// New York, NY, USA, 2005. ACM.
+//
+// Nhat Minh Lê, Antoniu Pop, Albert Cohen, and Francesco Zappa Nardelli. 2013.
+// Correct and efficient work-stealing for weak memory models.
+// In Proceedings of the 18th ACM SIGPLAN symposium on Principles and practice
+// of parallel programming (PPoPP '13). ACM, New York, NY, USA, 69-80.
+namespace boost {
+namespace fibers {
+namespace algo {
+namespace detail {
+
+class chase_lev_queue {
+private:
+ class circular_buffer {
+ private:
+ typedef typename std::aligned_storage< sizeof( context *), alignof( context *) >::type storage_t;
+
+ int64_t size_;
+ context ** items;
+ chase_lev_queue * queue_;
+
+ public:
+ circular_buffer( int64_t size, chase_lev_queue * queue) noexcept :
+ size_{ size },
+ items{ reinterpret_cast< context ** >( new storage_t[size_] ) },
+ queue_{ queue } {
+ }
+
+ ~circular_buffer() {
+ delete [] reinterpret_cast< storage_t * >( items);
+ }
+
+ int64_t size() const noexcept {
+ return size_;
+ }
+
+ context * get( int64_t idx) noexcept {
+ BOOST_ASSERT( 0 <= idx);
+ return * (items + (idx & (size() - 1)));
+ }
+
+ void put( int64_t idx, context * ctx) noexcept {
+ BOOST_ASSERT( 0 <= idx);
+ * (items + (idx & (size() - 1))) = ctx;
+ }
+
+ circular_buffer * grow( int64_t top, int64_t bottom) {
+ BOOST_ASSERT( 0 <= top);
+ BOOST_ASSERT( 0 <= bottom);
+ circular_buffer * buffer = new circular_buffer{ size() * 2, queue_ };
+ queue_->old_buffers_.push_back( this);
+ for ( int64_t i = top; i != bottom; ++i) {
+ buffer->put( i, get( i) );
+ }
+ return buffer;
+ }
+ };
+
+ std::atomic< int64_t > top_{ 0 };
+ std::atomic< int64_t > bottom_{ 0 };
+ std::atomic< circular_buffer * > buffer_;
+ std::vector< circular_buffer * > old_buffers_;
+
+public:
+ chase_lev_queue() :
+ buffer_{ new circular_buffer{ 1024, this } } {
+ old_buffers_.resize( 10);
+ }
+
+ ~chase_lev_queue() {
+ delete buffer_.load( std::memory_order_seq_cst);
+ for ( circular_buffer * buffer : old_buffers_) {
+ delete buffer;
+ }
+ }
+
+ chase_lev_queue( chase_lev_queue const&) = delete;
+ chase_lev_queue( chase_lev_queue &&) = delete;
+
+ chase_lev_queue & operator=( chase_lev_queue const&) = delete;
+ chase_lev_queue & operator=( chase_lev_queue &&) = delete;
+
+ bool empty() const noexcept {
+ int64_t bottom = bottom_.load( std::memory_order_relaxed);
+ int64_t top = top_.load( std::memory_order_relaxed);
+ return bottom <= top;
+ }
+
+ void push( context * ctx) {
+ int64_t bottom = bottom_.load( std::memory_order_relaxed);
+ int64_t top = top_.load( std::memory_order_acquire);
+ circular_buffer * buffer = buffer_.load( std::memory_order_relaxed);
+ if ( (bottom - top) > buffer->size() - 1) {
+ // queue is full
+ buffer = buffer->grow( top, bottom);
+ buffer_.store( buffer, std::memory_order_release);
+ }
+ buffer->put( bottom, ctx);
+ std::atomic_thread_fence( std::memory_order_release);
+ bottom_.store( bottom + 1, std::memory_order_relaxed);
+ }
+
+ context * pop() {
+ int64_t bottom = bottom_.load( std::memory_order_relaxed) - 1;
+ circular_buffer * buffer = buffer_.load( std::memory_order_relaxed);
+ bottom_.store( bottom, std::memory_order_relaxed);
+ std::atomic_thread_fence( std::memory_order_seq_cst);
+ int64_t top = top_.load( std::memory_order_relaxed);
+ context * ctx = nullptr;
+ if ( top <= bottom) {
+ // queue is not empty
+ ctx = buffer->get( bottom);
+ // last element
+ if ( top == bottom) {
+ if ( ! top_.compare_exchange_strong( top, top + 1,
+ std::memory_order_seq_cst, std::memory_order_relaxed) ) {
+ return nullptr;
+ }
+ bottom_.store( bottom + 1, std::memory_order_relaxed);
+ }
+ } else {
+ // queue is empty
+ bottom_.store( bottom + 1, std::memory_order_relaxed);
+ }
+ return ctx;
+ }
+
+ context * steal() {
+ int64_t top = top_.load( std::memory_order_acquire);
+ std::atomic_thread_fence( std::memory_order_seq_cst);
+ int64_t bottom = bottom_.load( std::memory_order_acquire);
+ context * ctx = nullptr;
+ if ( top < bottom) {
+ // queue is not empty
+ circular_buffer * buffer = buffer_.load( std::memory_order_consume);
+ ctx = buffer->get( top);
+ if ( ! top_.compare_exchange_strong( top, top + 1,
+ std::memory_order_seq_cst, std::memory_order_relaxed) ) {
+ return nullptr;
+ }
+ }
+ return ctx;
+ }
+};
+
+}}}}
+
+#endif // #define BOOST_FIBERS_ALGO_DETAIL_CHASE_LEV_QUEUE_H
diff --git a/boost/fiber/algo/round_robin.hpp b/boost/fiber/algo/round_robin.hpp
new file mode 100644
index 0000000000..038b424529
--- /dev/null
+++ b/boost/fiber/algo/round_robin.hpp
@@ -0,0 +1,69 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_ALGO_ROUND_ROBIN_H
+#define BOOST_FIBERS_ALGO_ROUND_ROBIN_H
+
+#include <condition_variable>
+#include <chrono>
+#include <mutex>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/algo/algorithm.hpp>
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/scheduler.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+namespace algo {
+
+class BOOST_FIBERS_DECL round_robin : public algorithm {
+private:
+ typedef scheduler::ready_queue_t rqueue_t;
+
+ rqueue_t rqueue_{};
+ std::mutex mtx_{};
+ std::condition_variable cnd_{};
+ bool flag_{ false };
+
+public:
+ round_robin() = default;
+
+ round_robin( round_robin const&) = delete;
+ round_robin & operator=( round_robin const&) = delete;
+
+ virtual void awakened( context *) noexcept;
+
+ virtual context * pick_next() noexcept;
+
+ virtual bool has_ready_fibers() const noexcept;
+
+ virtual void suspend_until( std::chrono::steady_clock::time_point const&) noexcept;
+
+ virtual void notify() noexcept;
+};
+
+}}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_ALGO_ROUND_ROBIN_H
diff --git a/boost/fiber/algo/shared_work.hpp b/boost/fiber/algo/shared_work.hpp
new file mode 100644
index 0000000000..e648c5b19f
--- /dev/null
+++ b/boost/fiber/algo/shared_work.hpp
@@ -0,0 +1,86 @@
+
+// Copyright Nat Goodspeed + Oliver Kowalke 2015.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_ALGO_SHARED_WORK_H
+#define BOOST_FIBERS_ALGO_SHARED_WORK_H
+
+#include <condition_variable>
+#include <chrono>
+#include <deque>
+#include <mutex>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/algo/algorithm.hpp>
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/scheduler.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+namespace algo {
+
+class BOOST_FIBERS_DECL shared_work : public algorithm {
+private:
+ typedef std::deque< context * > rqueue_t;
+ typedef scheduler::ready_queue_t lqueue_t;
+
+ static rqueue_t rqueue_;
+ static std::mutex rqueue_mtx_;
+
+ lqueue_t lqueue_{};
+ std::mutex mtx_{};
+ std::condition_variable cnd_{};
+ bool flag_{ false };
+ bool suspend_;
+
+public:
+ shared_work() = default;
+
+ shared_work( bool suspend) :
+ suspend_{ suspend } {
+ }
+
+ shared_work( shared_work const&) = delete;
+ shared_work( shared_work &&) = delete;
+
+ shared_work & operator=( shared_work const&) = delete;
+ shared_work & operator=( shared_work &&) = delete;
+
+ void awakened( context * ctx) noexcept;
+
+ context * pick_next() noexcept;
+
+ bool has_ready_fibers() const noexcept {
+ std::unique_lock< std::mutex > lock( rqueue_mtx_);
+ return ! rqueue_.empty() || ! lqueue_.empty();
+ }
+
+ void suspend_until( std::chrono::steady_clock::time_point const& time_point) noexcept;
+
+ void notify() noexcept;
+};
+
+}}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_ALGO_SHARED_WORK_H
diff --git a/boost/fiber/all.hpp b/boost/fiber/all.hpp
new file mode 100644
index 0000000000..21620a99b9
--- /dev/null
+++ b/boost/fiber/all.hpp
@@ -0,0 +1,34 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_H
+#define BOOST_FIBERS_H
+
+#include <boost/fiber/algo/algorithm.hpp>
+#include <boost/fiber/algo/round_robin.hpp>
+#include <boost/fiber/algo/shared_work.hpp>
+#include <boost/fiber/barrier.hpp>
+#include <boost/fiber/bounded_channel.hpp>
+#include <boost/fiber/condition_variable.hpp>
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/fiber.hpp>
+#include <boost/fiber/fixedsize_stack.hpp>
+#include <boost/fiber/future.hpp>
+#include <boost/fiber/fss.hpp>
+#include <boost/fiber/mutex.hpp>
+#include <boost/fiber/operations.hpp>
+#include <boost/fiber/policy.hpp>
+#include <boost/fiber/pooled_fixedsize_stack.hpp>
+#include <boost/fiber/protected_fixedsize_stack.hpp>
+#include <boost/fiber/recursive_mutex.hpp>
+#include <boost/fiber/recursive_timed_mutex.hpp>
+#include <boost/fiber/scheduler.hpp>
+#include <boost/fiber/segmented_stack.hpp>
+#include <boost/fiber/timed_mutex.hpp>
+#include <boost/fiber/unbounded_channel.hpp>
+
+#endif // BOOST_FIBERS_H
diff --git a/boost/fiber/barrier.hpp b/boost/fiber/barrier.hpp
new file mode 100644
index 0000000000..debe7d725a
--- /dev/null
+++ b/boost/fiber/barrier.hpp
@@ -0,0 +1,48 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_BARRIER_H
+#define BOOST_FIBERS_BARRIER_H
+
+#include <cstddef>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/condition_variable.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/mutex.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+class BOOST_FIBERS_DECL barrier {
+private:
+ std::size_t initial_;
+ std::size_t current_;
+ bool cycle_{ true };
+ mutex mtx_{};
+ condition_variable cond_{};
+
+public:
+ explicit barrier( std::size_t);
+
+ barrier( barrier const&) = delete;
+ barrier & operator=( barrier const&) = delete;
+
+ bool wait();
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_BARRIER_H
diff --git a/boost/fiber/bounded_channel.hpp b/boost/fiber/bounded_channel.hpp
new file mode 100644
index 0000000000..716080bd2d
--- /dev/null
+++ b/boost/fiber/bounded_channel.hpp
@@ -0,0 +1,431 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_FIBERS_BOUNDED_CHANNEL_H
+#define BOOST_FIBERS_BOUNDED_CHANNEL_H
+
+#include <algorithm>
+#include <atomic>
+#include <chrono>
+#include <cstddef>
+#include <memory>
+#include <mutex>
+#include <system_error>
+#include <utility>
+
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/condition_variable.hpp>
+#include <boost/fiber/mutex.hpp>
+#include <boost/fiber/channel_op_status.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+template< typename T,
+ typename Allocator = std::allocator< T >
+>
+class bounded_channel {
+public:
+ typedef T value_type;
+
+private:
+ struct node {
+ typedef intrusive_ptr< node > ptr_t;
+ typedef typename std::allocator_traits< Allocator >::template rebind_alloc<
+ node
+ > allocator_t;
+ typedef std::allocator_traits< allocator_t > allocator_traits_t;
+
+#if ! defined(BOOST_FIBERS_NO_ATOMICS)
+ std::atomic< std::size_t > use_count{ 0 };
+#else
+ std::size_t use_count{ 0 };
+#endif
+ allocator_t alloc;
+ T va;
+ ptr_t nxt{};
+
+ node( T const& t, allocator_t const& alloc_) noexcept :
+ alloc{ alloc_ },
+ va{ t } {
+ }
+
+ node( T && t, allocator_t & alloc_) noexcept :
+ alloc{ alloc_ },
+ va{ std::move( t) } {
+ }
+
+ friend
+ void intrusive_ptr_add_ref( node * p) noexcept {
+ ++p->use_count;
+ }
+
+ friend
+ void intrusive_ptr_release( node * p) noexcept {
+ if ( 0 == --p->use_count) {
+ allocator_t alloc( p->alloc);
+ allocator_traits_t::destroy( alloc, p);
+ allocator_traits_t::deallocate( alloc, p, 1);
+ }
+ }
+ };
+
+ using ptr_t = typename node::ptr_t;
+ using allocator_t = typename node::allocator_t;
+ using allocator_traits_t = typename node::allocator_traits_t;
+
+ enum class queue_status {
+ open = 0,
+ closed
+ };
+
+ allocator_t alloc_;
+ queue_status state_{ queue_status::open };
+ std::size_t count_{ 0 };
+ ptr_t head_{};
+ ptr_t * tail_;
+ mutable mutex mtx_{};
+ condition_variable not_empty_cond_{};
+ condition_variable not_full_cond_{};
+ std::size_t hwm_;
+ std::size_t lwm_;
+
+ bool is_closed_() const noexcept {
+ return queue_status::closed == state_;
+ }
+
+ void close_( std::unique_lock< boost::fibers::mutex > & lk) noexcept {
+ state_ = queue_status::closed;
+ lk.unlock();
+ not_empty_cond_.notify_all();
+ not_full_cond_.notify_all();
+ }
+
+ std::size_t size_() const noexcept {
+ return count_;
+ }
+
+ bool is_empty_() const noexcept {
+ return ! head_;
+ }
+
+ bool is_full_() const noexcept {
+ return count_ >= hwm_;
+ }
+
+ channel_op_status push_( ptr_t new_node,
+ std::unique_lock< boost::fibers::mutex > & lk) {
+ if ( is_closed_() ) {
+ return channel_op_status::closed;
+ }
+ not_full_cond_.wait( lk,
+ [this](){
+ return ! is_full_();
+ });
+ return push_and_notify_( new_node, lk);
+ }
+
+ channel_op_status try_push_( ptr_t new_node,
+ std::unique_lock< boost::fibers::mutex > & lk) noexcept {
+ if ( is_closed_() ) {
+ return channel_op_status::closed;
+ }
+ if ( is_full_() ) {
+ return channel_op_status::full;
+ }
+ return push_and_notify_( new_node, lk);
+ }
+
+ template< typename Clock, typename Duration >
+ channel_op_status push_wait_until_( ptr_t new_node,
+ std::chrono::time_point< Clock, Duration > const& timeout_time,
+ std::unique_lock< boost::fibers::mutex > & lk) {
+ if ( is_closed_() ) {
+ return channel_op_status::closed;
+ }
+ if ( ! not_full_cond_.wait_until( lk, timeout_time,
+ [this](){
+ return ! is_full_();
+ })) {
+ return channel_op_status::timeout;
+ }
+ return push_and_notify_( new_node, lk);
+ }
+
+ channel_op_status push_and_notify_( ptr_t new_node,
+ std::unique_lock< boost::fibers::mutex > & lk) noexcept {
+ push_tail_( new_node);
+ lk.unlock();
+ not_empty_cond_.notify_one();
+ return channel_op_status::success;
+ }
+
+ void push_tail_( ptr_t new_node) noexcept {
+ * tail_ = new_node;
+ tail_ = & new_node->nxt;
+ ++count_;
+ }
+
+ value_type value_pop_( std::unique_lock< boost::fibers::mutex > & lk) {
+ BOOST_ASSERT( ! is_empty_() );
+ auto old_head = pop_head_();
+ if ( size_() <= lwm_) {
+ if ( lwm_ == hwm_) {
+ lk.unlock();
+ not_full_cond_.notify_one();
+ } else {
+ lk.unlock();
+ // more than one producer could be waiting
+ // to push a value
+ not_full_cond_.notify_all();
+ }
+ }
+ return std::move( old_head->va);
+ }
+
+ ptr_t pop_head_() noexcept {
+ auto old_head = head_;
+ head_ = old_head->nxt;
+ if ( ! head_) {
+ tail_ = & head_;
+ }
+ old_head->nxt.reset();
+ --count_;
+ return old_head;
+ }
+
+public:
+ bounded_channel( std::size_t hwm, std::size_t lwm,
+ Allocator const& alloc = Allocator() ) :
+ alloc_{ alloc },
+ tail_{ & head_ },
+ hwm_{ hwm },
+ lwm_{ lwm } {
+ if ( hwm_ <= lwm_) {
+ throw fiber_error( std::make_error_code( std::errc::invalid_argument),
+ "boost fiber: high-watermark is less than or equal to low-watermark for bounded_channel");
+ }
+ if ( 0 == hwm) {
+ throw fiber_error( std::make_error_code( std::errc::invalid_argument),
+ "boost fiber: high-watermark is zero");
+ }
+ }
+
+ bounded_channel( std::size_t wm,
+ Allocator const& alloc = Allocator() ) :
+ alloc_{ alloc },
+ tail_{ & head_ },
+ hwm_{ wm },
+ lwm_{ wm - 1 } {
+ if ( 0 == wm) {
+ throw fiber_error( std::make_error_code( std::errc::invalid_argument),
+ "boost fiber: watermark is zero");
+ }
+ }
+
+ bounded_channel( bounded_channel const&) = delete;
+ bounded_channel & operator=( bounded_channel const&) = delete;
+
+ std::size_t upper_bound() const noexcept {
+ return hwm_;
+ }
+
+ std::size_t lower_bound() const noexcept {
+ return lwm_;
+ }
+
+ void close() noexcept {
+ std::unique_lock< mutex > lk( mtx_);
+ close_( lk);
+ }
+
+ channel_op_status push( value_type const& va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct( alloc_, ptr, va, alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_( { detail::convert( ptr) }, lk);
+ }
+
+ channel_op_status push( value_type && va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct(
+ alloc_, ptr, std::move( va), alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_( { detail::convert( ptr) }, lk);
+ }
+
+ template< typename Rep, typename Period >
+ channel_op_status push_wait_for( value_type const& va,
+ std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return push_wait_until( va,
+ std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ template< typename Rep, typename Period >
+ channel_op_status push_wait_for( value_type && va,
+ std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return push_wait_until( std::forward< value_type >( va),
+ std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ template< typename Clock, typename Duration >
+ channel_op_status push_wait_until( value_type const& va,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct( alloc_, ptr, va, alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_wait_until_( { detail::convert( ptr) }, timeout_time, lk);
+ }
+
+ template< typename Clock, typename Duration >
+ channel_op_status push_wait_until( value_type && va,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct(
+ alloc_, ptr, std::move( va), alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_wait_until_( { detail::convert( ptr) }, timeout_time, lk);
+ }
+
+ channel_op_status try_push( value_type const& va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct( alloc_, ptr, va, alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return try_push_( { detail::convert( ptr) }, lk);
+ }
+
+ channel_op_status try_push( value_type && va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct(
+ alloc_, ptr, std::move( va), alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return try_push_( { detail::convert( ptr) }, lk);
+ }
+
+ channel_op_status pop( value_type & va) {
+ std::unique_lock< mutex > lk( mtx_);
+ not_empty_cond_.wait( lk,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ });
+ if ( is_closed_() && is_empty_() ) {
+ return channel_op_status::closed;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+
+ value_type value_pop() {
+ std::unique_lock< mutex > lk( mtx_);
+ not_empty_cond_.wait( lk,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ });
+ if ( is_closed_() && is_empty_() ) {
+ throw fiber_error(
+ std::make_error_code( std::errc::operation_not_permitted),
+ "boost fiber: queue is closed");
+ }
+ return value_pop_( lk);
+ }
+
+ channel_op_status try_pop( value_type & va) {
+ std::unique_lock< mutex > lk( mtx_);
+ if ( is_closed_() && is_empty_() ) {
+ // let other fibers run
+ lk.unlock();
+ this_fiber::yield();
+ return channel_op_status::closed;
+ }
+ if ( is_empty_() ) {
+ // let other fibers run
+ lk.unlock();
+ this_fiber::yield();
+ return channel_op_status::empty;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+
+ template< typename Rep, typename Period >
+ channel_op_status pop_wait_for( value_type & va,
+ std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return pop_wait_until( va,
+ std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ template< typename Clock, typename Duration >
+ channel_op_status pop_wait_until( value_type & va,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ std::unique_lock< mutex > lk( mtx_);
+ if ( ! not_empty_cond_.wait_until( lk,
+ timeout_time,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ })) {
+ return channel_op_status::timeout;
+ }
+ if ( is_closed_() && is_empty_() ) {
+ return channel_op_status::closed;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_BOUNDED_CHANNEL_H
diff --git a/boost/fiber/channel_op_status.hpp b/boost/fiber/channel_op_status.hpp
new file mode 100644
index 0000000000..78fd9bd6d0
--- /dev/null
+++ b/boost/fiber/channel_op_status.hpp
@@ -0,0 +1,34 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_QUEUE_OP_STATUS_H
+#define BOOST_FIBERS_QUEUE_OP_STATUS_H
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+enum class channel_op_status {
+ success = 0,
+ empty,
+ full,
+ closed,
+ timeout
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_QUEUE_OP_STATUS_H
diff --git a/boost/fiber/condition_variable.hpp b/boost/fiber/condition_variable.hpp
new file mode 100644
index 0000000000..03a91b03e7
--- /dev/null
+++ b/boost/fiber/condition_variable.hpp
@@ -0,0 +1,261 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_CONDITION_VARIABLE_H
+#define BOOST_FIBERS_CONDITION_VARIABLE_H
+
+#include <algorithm>
+#include <atomic>
+#include <chrono>
+#include <functional>
+#include <mutex>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/mutex.hpp>
+#include <boost/fiber/operations.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+enum class cv_status {
+ no_timeout = 1,
+ timeout
+};
+
+class BOOST_FIBERS_DECL condition_variable_any {
+private:
+ typedef context::wait_queue_t wait_queue_t;
+
+ wait_queue_t wait_queue_{};
+ detail::spinlock wait_queue_splk_{};
+
+public:
+ condition_variable_any() = default;
+
+ ~condition_variable_any() {
+ BOOST_ASSERT( wait_queue_.empty() );
+ }
+
+ condition_variable_any( condition_variable_any const&) = delete;
+ condition_variable_any & operator=( condition_variable_any const&) = delete;
+
+ void notify_one() noexcept;
+
+ void notify_all() noexcept;
+
+ template< typename LockType >
+ void wait( LockType & lt) {
+ context * ctx = context::active();
+ // atomically call lt.unlock() and block on *this
+ // store this fiber in waiting-queue
+ detail::spinlock_lock lk( wait_queue_splk_);
+ BOOST_ASSERT( ! ctx->wait_is_linked() );
+ ctx->wait_link( wait_queue_);
+ // unlock external lt
+ lt.unlock();
+ // suspend this fiber
+ ctx->suspend( lk);
+ // relock local lk
+ lk.lock();
+ // remove from waiting-queue
+ ctx->wait_unlink();
+ // unlock local lk
+ lk.unlock();
+ // relock external again before returning
+ try {
+ lt.lock();
+ } catch (...) {
+ std::terminate();
+ }
+ // post-conditions
+ BOOST_ASSERT( ! ctx->wait_is_linked() );
+ }
+
+ template< typename LockType, typename Pred >
+ void wait( LockType & lt, Pred pred) {
+ while ( ! pred() ) {
+ wait( lt);
+ }
+ }
+
+ template< typename LockType, typename Clock, typename Duration >
+ cv_status wait_until( LockType & lt, std::chrono::time_point< Clock, Duration > const& timeout_time_) {
+ cv_status status = cv_status::no_timeout;
+ std::chrono::steady_clock::time_point timeout_time(
+ detail::convert( timeout_time_) );
+ context * ctx = context::active();
+ // atomically call lt.unlock() and block on *this
+ // store this fiber in waiting-queue
+ detail::spinlock_lock lk( wait_queue_splk_);
+ BOOST_ASSERT( ! ctx->wait_is_linked() );
+ ctx->wait_link( wait_queue_);
+ // unlock external lt
+ lt.unlock();
+ // suspend this fiber
+ if ( ! ctx->wait_until( timeout_time, lk) ) {
+ status = cv_status::timeout;
+ }
+ // relock local lk
+ lk.lock();
+ // remove from waiting-queue
+ ctx->wait_unlink();
+ // unlock local lk
+ lk.unlock();
+ // relock external again before returning
+ try {
+ lt.lock();
+ } catch (...) {
+ std::terminate();
+ }
+ // post-conditions
+ BOOST_ASSERT( ! ctx->wait_is_linked() );
+ return status;
+ }
+
+ template< typename LockType, typename Clock, typename Duration, typename Pred >
+ bool wait_until( LockType & lt,
+ std::chrono::time_point< Clock, Duration > const& timeout_time, Pred pred) {
+ while ( ! pred() ) {
+ if ( cv_status::timeout == wait_until( lt, timeout_time) ) {
+ return pred();
+ }
+ }
+ return true;
+ }
+
+ template< typename LockType, typename Rep, typename Period >
+ cv_status wait_for( LockType & lt, std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return wait_until( lt,
+ std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ template< typename LockType, typename Rep, typename Period, typename Pred >
+ bool wait_for( LockType & lt, std::chrono::duration< Rep, Period > const& timeout_duration, Pred pred) {
+ return wait_until( lt,
+ std::chrono::steady_clock::now() + timeout_duration,
+ pred);
+ }
+};
+
+class BOOST_FIBERS_DECL condition_variable {
+private:
+ condition_variable_any cnd_;
+
+public:
+ condition_variable() = default;
+
+ condition_variable( condition_variable const&) = delete;
+ condition_variable & operator=( condition_variable const&) = delete;
+
+ void notify_one() noexcept {
+ cnd_.notify_one();
+ }
+
+ void notify_all() noexcept {
+ cnd_.notify_all();
+ }
+
+ void wait( std::unique_lock< mutex > & lt) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ cnd_.wait( lt);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ }
+
+ template< typename Pred >
+ void wait( std::unique_lock< mutex > & lt, Pred pred) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ cnd_.wait( lt, pred);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ }
+
+ template< typename Clock, typename Duration >
+ cv_status wait_until( std::unique_lock< mutex > & lt,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ cv_status result = cnd_.wait_until( lt, timeout_time);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ return result;
+ }
+
+ template< typename Clock, typename Duration, typename Pred >
+ bool wait_until( std::unique_lock< mutex > & lt,
+ std::chrono::time_point< Clock, Duration > const& timeout_time, Pred pred) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ bool result = cnd_.wait_until( lt, timeout_time, pred);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ return result;
+ }
+
+ template< typename Rep, typename Period >
+ cv_status wait_for( std::unique_lock< mutex > & lt,
+ std::chrono::duration< Rep, Period > const& timeout_duration) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ cv_status result = cnd_.wait_for( lt, timeout_duration);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ return result;
+ }
+
+ template< typename Rep, typename Period, typename Pred >
+ bool wait_for( std::unique_lock< mutex > & lt,
+ std::chrono::duration< Rep, Period > const& timeout_duration, Pred pred) {
+ // pre-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ bool result = cnd_.wait_for( lt, timeout_duration, pred);
+ // post-condition
+ BOOST_ASSERT( lt.owns_lock() );
+ BOOST_ASSERT( context::active() == lt.mutex()->owner_);
+ return result;
+ }
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_CONDITION_VARIABLE_H
diff --git a/boost/fiber/context.hpp b/boost/fiber/context.hpp
new file mode 100644
index 0000000000..40cef59d12
--- /dev/null
+++ b/boost/fiber/context.hpp
@@ -0,0 +1,558 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_CONTEXT_H
+#define BOOST_FIBERS_CONTEXT_H
+
+#include <atomic>
+#include <chrono>
+#include <exception>
+#include <functional>
+#include <map>
+#include <memory>
+#include <type_traits>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/context/detail/apply.hpp>
+#include <boost/context/execution_context.hpp>
+#include <boost/context/stack_context.hpp>
+#include <boost/intrusive/list.hpp>
+#include <boost/intrusive/parent_from_member.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/intrusive/set.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/data.hpp>
+#include <boost/fiber/detail/decay_copy.hpp>
+#include <boost/fiber/detail/fss.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+#include <boost/fiber/detail/wrap.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/fixedsize_stack.hpp>
+#include <boost/fiber/policy.hpp>
+#include <boost/fiber/properties.hpp>
+#include <boost/fiber/segmented_stack.hpp>
+#include <boost/fiber/type.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class context;
+class fiber;
+class scheduler;
+
+namespace detail {
+
+struct wait_tag;
+typedef intrusive::list_member_hook<
+ intrusive::tag< wait_tag >,
+ intrusive::link_mode<
+ intrusive::auto_unlink
+ >
+> wait_hook;
+// declaration of the functor that converts between
+// the context class and the wait-hook
+struct wait_functor {
+ // required types
+ typedef wait_hook hook_type;
+ typedef hook_type * hook_ptr;
+ typedef const hook_type * const_hook_ptr;
+ typedef context value_type;
+ typedef value_type * pointer;
+ typedef const value_type * const_pointer;
+
+ // required static functions
+ static hook_ptr to_hook_ptr( value_type &value);
+ static const_hook_ptr to_hook_ptr( value_type const& value);
+ static pointer to_value_ptr( hook_ptr n);
+ static const_pointer to_value_ptr( const_hook_ptr n);
+};
+
+struct ready_tag;
+typedef intrusive::list_member_hook<
+ intrusive::tag< ready_tag >,
+ intrusive::link_mode<
+ intrusive::auto_unlink
+ >
+> ready_hook;
+
+struct sleep_tag;
+typedef intrusive::set_member_hook<
+ intrusive::tag< sleep_tag >,
+ intrusive::link_mode<
+ intrusive::auto_unlink
+ >
+> sleep_hook;
+
+struct terminated_tag;
+typedef intrusive::list_member_hook<
+ intrusive::tag< terminated_tag >,
+ intrusive::link_mode<
+ intrusive::auto_unlink
+ >
+> terminated_hook;
+
+struct worker_tag;
+typedef intrusive::list_member_hook<
+ intrusive::tag< worker_tag >,
+ intrusive::link_mode<
+ intrusive::auto_unlink
+ >
+> worker_hook;
+
+}
+
+struct main_context_t {};
+const main_context_t main_context{};
+
+struct dispatcher_context_t {};
+const dispatcher_context_t dispatcher_context{};
+
+struct worker_context_t {};
+const worker_context_t worker_context{};
+
+class BOOST_FIBERS_DECL context {
+private:
+ friend class scheduler;
+
+ enum flag_t {
+ flag_terminated = 1 << 1
+ };
+
+ struct fss_data {
+ void * vp{ nullptr };
+ detail::fss_cleanup_function::ptr_t cleanup_function{};
+
+ fss_data() noexcept {
+ }
+
+ fss_data( void * vp_,
+ detail::fss_cleanup_function::ptr_t const& fn) noexcept :
+ vp( vp_),
+ cleanup_function( fn) {
+ BOOST_ASSERT( cleanup_function);
+ }
+
+ void do_cleanup() {
+ ( * cleanup_function)( vp);
+ }
+ };
+
+ typedef std::map< uintptr_t, fss_data > fss_data_t;
+
+#if ! defined(BOOST_FIBERS_NO_ATOMICS)
+ std::atomic< std::size_t > use_count_{ 0 };
+ std::atomic< unsigned int > flags_;
+ std::atomic< type > type_;
+#else
+ std::size_t use_count_{ 0 };
+ unsigned int flags_;
+ type type_;
+#endif
+ launch policy_{ launch::post };
+ scheduler * scheduler_{ nullptr };
+#if (BOOST_EXECUTION_CONTEXT==1)
+ boost::context::execution_context ctx_;
+#else
+ boost::context::execution_context< detail::data_t * > ctx_;
+#endif
+
+ void resume_( detail::data_t &) noexcept;
+ void set_ready_( context *) noexcept;
+
+#if (BOOST_EXECUTION_CONTEXT==1)
+ template< typename Fn, typename Tpl >
+ void run_( Fn && fn_, Tpl && tpl_, detail::data_t * dp) noexcept {
+ {
+ // fn and tpl must be destroyed before calling set_terminated()
+ typename std::decay< Fn >::type fn = std::forward< Fn >( fn_);
+ typename std::decay< Tpl >::type tpl = std::forward< Tpl >( tpl_);
+ if ( nullptr != dp->lk) {
+ dp->lk->unlock();
+ } else if ( nullptr != dp->ctx) {
+ active()->set_ready_( dp->ctx);
+ }
+ boost::context::detail::apply( std::move( fn), std::move( tpl) );
+ }
+ // terminate context
+ set_terminated();
+ BOOST_ASSERT_MSG( false, "fiber already terminated");
+ }
+#else
+ template< typename Fn, typename Tpl >
+ boost::context::execution_context< detail::data_t * >
+ run_( boost::context::execution_context< detail::data_t * > ctx, Fn && fn_, Tpl && tpl_, detail::data_t * dp) noexcept {
+ {
+ // fn and tpl must be destroyed before calling set_terminated()
+ typename std::decay< Fn >::type fn = std::forward< Fn >( fn_);
+ typename std::decay< Tpl >::type tpl = std::forward< Tpl >( tpl_);
+ // update execution_context of calling fiber
+ dp->from->ctx_ = std::move( ctx);
+ if ( nullptr != dp->lk) {
+ dp->lk->unlock();
+ } else if ( nullptr != dp->ctx) {
+ active()->set_ready_( dp->ctx);
+ }
+ boost::context::detail::apply( std::move( fn), std::move( tpl) );
+ }
+ // terminate context
+ return set_terminated();
+ }
+#endif
+
+public:
+ detail::ready_hook ready_hook_{};
+ detail::sleep_hook sleep_hook_{};
+ detail::terminated_hook terminated_hook_{};
+ detail::wait_hook wait_hook_{};
+ detail::worker_hook worker_hook_{};
+ std::chrono::steady_clock::time_point tp_{ (std::chrono::steady_clock::time_point::max)() };
+
+ typedef intrusive::list<
+ context,
+ intrusive::function_hook< detail::wait_functor >,
+ intrusive::constant_time_size< false > > wait_queue_t;
+
+private:
+ fss_data_t fss_data_{};
+ wait_queue_t wait_queue_{};
+ detail::spinlock splk_{};
+ fiber_properties * properties_{ nullptr };
+
+public:
+ class id {
+ private:
+ context * impl_{ nullptr };
+
+ public:
+ id() noexcept {
+ }
+
+ explicit id( context * impl) noexcept :
+ impl_( impl) {
+ }
+
+ bool operator==( id const& other) const noexcept {
+ return impl_ == other.impl_;
+ }
+
+ bool operator!=( id const& other) const noexcept {
+ return impl_ != other.impl_;
+ }
+
+ bool operator<( id const& other) const noexcept {
+ return impl_ < other.impl_;
+ }
+
+ bool operator>( id const& other) const noexcept {
+ return other.impl_ < impl_;
+ }
+
+ bool operator<=( id const& other) const noexcept {
+ return ! ( * this > other);
+ }
+
+ bool operator>=( id const& other) const noexcept {
+ return ! ( * this < other);
+ }
+
+ template< typename charT, class traitsT >
+ friend std::basic_ostream< charT, traitsT > &
+ operator<<( std::basic_ostream< charT, traitsT > & os, id const& other) {
+ if ( nullptr != other.impl_) {
+ return os << other.impl_;
+ } else {
+ return os << "{not-valid}";
+ }
+ }
+
+ explicit operator bool() const noexcept {
+ return nullptr != impl_;
+ }
+
+ bool operator!() const noexcept {
+ return nullptr == impl_;
+ }
+ };
+
+ static context * active() noexcept;
+
+ static void reset_active() noexcept;
+
+ // main fiber context
+ explicit context( main_context_t) noexcept;
+
+ // dispatcher fiber context
+ context( dispatcher_context_t, boost::context::preallocated const&,
+ default_stack const&, scheduler *);
+
+ // worker fiber context
+ template< typename StackAlloc,
+ typename Fn,
+ typename Tpl
+ >
+ context( worker_context_t,
+ launch policy,
+ boost::context::preallocated palloc, StackAlloc salloc,
+ Fn && fn, Tpl && tpl) :
+ use_count_{ 1 }, // fiber instance or scheduler owner
+ flags_{ 0 },
+ type_{ type::worker_context },
+ policy_{ policy },
+#if (BOOST_EXECUTION_CONTEXT==1)
+# if defined(BOOST_NO_CXX14_GENERIC_LAMBDAS)
+ ctx_{ std::allocator_arg, palloc, salloc,
+ detail::wrap(
+ [this]( typename std::decay< Fn >::type & fn, typename std::decay< Tpl >::type & tpl,
+ boost::context::execution_context & ctx, void * vp) mutable noexcept {
+ run_( std::move( fn), std::move( tpl), static_cast< detail::data_t * >( vp) );
+ },
+ std::forward< Fn >( fn),
+ std::forward< Tpl >( tpl),
+ boost::context::execution_context::current() )
+ }
+# else
+ ctx_{ std::allocator_arg, palloc, salloc,
+ [this,fn=detail::decay_copy( std::forward< Fn >( fn) ),tpl=std::forward< Tpl >( tpl),
+ ctx=boost::context::execution_context::current()] (void * vp) mutable noexcept {
+ run_( std::move( fn), std::move( tpl), static_cast< detail::data_t * >( vp) );
+ }}
+# endif
+#else
+# if defined(BOOST_NO_CXX14_GENERIC_LAMBDAS)
+ ctx_{ std::allocator_arg, palloc, salloc,
+ detail::wrap(
+ [this]( typename std::decay< Fn >::type & fn, typename std::decay< Tpl >::type & tpl,
+ boost::context::execution_context< detail::data_t * > ctx, detail::data_t * dp) mutable noexcept {
+ return run_( std::move( ctx), std::move( fn), std::move( tpl), dp);
+ },
+ std::forward< Fn >( fn),
+ std::forward< Tpl >( tpl) )}
+
+# else
+ ctx_{ std::allocator_arg, palloc, salloc,
+ [this,fn=detail::decay_copy( std::forward< Fn >( fn) ),tpl=std::forward< Tpl >( tpl)]
+ (boost::context::execution_context< detail::data_t * > ctx, detail::data_t * dp) mutable noexcept {
+ return run_( std::move( ctx), std::move( fn), std::move( tpl), dp);
+ }}
+# endif
+#endif
+ {}
+
+ context( context const&) = delete;
+ context & operator=( context const&) = delete;
+
+ virtual ~context();
+
+ scheduler * get_scheduler() const noexcept;
+
+ id get_id() const noexcept;
+
+ void resume() noexcept;
+ void resume( detail::spinlock_lock &) noexcept;
+ void resume( context *) noexcept;
+
+ void suspend() noexcept;
+ void suspend( detail::spinlock_lock &) noexcept;
+
+#if (BOOST_EXECUTION_CONTEXT==1)
+ void set_terminated() noexcept;
+#else
+ boost::context::execution_context< detail::data_t * > suspend_with_cc() noexcept;
+ boost::context::execution_context< detail::data_t * > set_terminated() noexcept;
+#endif
+ void join();
+
+ void yield() noexcept;
+
+ bool wait_until( std::chrono::steady_clock::time_point const&) noexcept;
+ bool wait_until( std::chrono::steady_clock::time_point const&,
+ detail::spinlock_lock &) noexcept;
+
+ void set_ready( context *) noexcept;
+
+ bool is_context( type t) const noexcept {
+ return type::none != ( type_ & t);
+ }
+
+ bool is_terminated() const noexcept {
+ return 0 != ( flags_ & flag_terminated);
+ }
+
+ void * get_fss_data( void const * vp) const;
+
+ void set_fss_data(
+ void const * vp,
+ detail::fss_cleanup_function::ptr_t const& cleanup_fn,
+ void * data,
+ bool cleanup_existing);
+
+ void set_properties( fiber_properties * props) noexcept;
+
+ fiber_properties * get_properties() const noexcept {
+ return properties_;
+ }
+
+ launch get_policy() const noexcept {
+ return policy_;
+ }
+
+ bool ready_is_linked() const noexcept;
+
+ bool sleep_is_linked() const noexcept;
+
+ bool terminated_is_linked() const noexcept;
+
+ bool wait_is_linked() const noexcept;
+
+ bool worker_is_linked() const noexcept;
+
+ template< typename List >
+ void ready_link( List & lst) noexcept {
+ static_assert( std::is_same< typename List::value_traits::hook_type, detail::ready_hook >::value, "not a ready-queue");
+ lst.push_back( * this);
+ }
+
+ template< typename Set >
+ void sleep_link( Set & set) noexcept {
+ static_assert( std::is_same< typename Set::value_traits::hook_type,detail::sleep_hook >::value, "not a sleep-queue");
+ set.insert( * this);
+ }
+
+ template< typename List >
+ void terminated_link( List & lst) noexcept {
+ static_assert( std::is_same< typename List::value_traits::hook_type, detail::terminated_hook >::value, "not a terminated-queue");
+ lst.push_back( * this);
+ }
+
+ template< typename List >
+ void wait_link( List & lst) noexcept {
+ static_assert( std::is_same< typename List::value_traits::hook_type, detail::wait_hook >::value, "not a wait-queue");
+ lst.push_back( * this);
+ }
+
+ template< typename List >
+ void worker_link( List & lst) noexcept {
+ static_assert( std::is_same< typename List::value_traits::hook_type, detail::worker_hook >::value, "not a worker-queue");
+ lst.push_back( * this);
+ }
+
+ void ready_unlink() noexcept;
+
+ void sleep_unlink() noexcept;
+
+ void wait_unlink() noexcept;
+
+ void worker_unlink() noexcept;
+
+ void detach() noexcept;
+
+ void attach( context *) noexcept;
+
+ friend void intrusive_ptr_add_ref( context * ctx) noexcept {
+ BOOST_ASSERT( nullptr != ctx);
+ ++ctx->use_count_;
+ }
+
+ friend void intrusive_ptr_release( context * ctx) noexcept {
+ BOOST_ASSERT( nullptr != ctx);
+ if ( 0 == --ctx->use_count_) {
+#if (BOOST_EXECUTION_CONTEXT==1)
+ boost::context::execution_context ec( ctx->ctx_);
+ // destruct context
+ // deallocates stack (execution_context is ref counted)
+ ctx->~context();
+#else
+ boost::context::execution_context< detail::data_t * > cc( std::move( ctx->ctx_) );
+ // destruct context
+ ctx->~context();
+ // deallocated stack
+ cc( nullptr);
+#endif
+ }
+ }
+};
+
+inline
+bool operator<( context const& l, context const& r) noexcept {
+ return l.get_id() < r.get_id();
+}
+
+template< typename StackAlloc, typename Fn, typename ... Args >
+static intrusive_ptr< context > make_worker_context( launch policy,
+ StackAlloc salloc,
+ Fn && fn, Args && ... args) {
+ boost::context::stack_context sctx = salloc.allocate();
+#if defined(BOOST_NO_CXX14_CONSTEXPR) || defined(BOOST_NO_CXX11_STD_ALIGN)
+ // reserve space for control structure
+ const std::size_t size = sctx.size - sizeof( context);
+ void * sp = static_cast< char * >( sctx.sp) - sizeof( context);
+#else
+ constexpr std::size_t func_alignment = 64; // alignof( context);
+ constexpr std::size_t func_size = sizeof( context);
+ // reserve space on stack
+ void * sp = static_cast< char * >( sctx.sp) - func_size - func_alignment;
+ // align sp pointer
+ std::size_t space = func_size + func_alignment;
+ sp = std::align( func_alignment, func_size, sp, space);
+ BOOST_ASSERT( nullptr != sp);
+ // calculate remaining size
+ const std::size_t size = sctx.size - ( static_cast< char * >( sctx.sp) - static_cast< char * >( sp) );
+#endif
+ // placement new of context on top of fiber's stack
+ return intrusive_ptr< context >(
+ ::new ( sp) context(
+ worker_context,
+ policy,
+ boost::context::preallocated( sp, size, sctx),
+ salloc,
+ std::forward< Fn >( fn),
+ std::make_tuple( std::forward< Args >( args) ... ) ) );
+}
+
+namespace detail {
+
+inline
+wait_functor::hook_ptr wait_functor::to_hook_ptr( wait_functor::value_type & value) {
+ return & value.wait_hook_;
+}
+
+inline
+wait_functor::const_hook_ptr wait_functor::to_hook_ptr( wait_functor::value_type const& value) {
+ return & value.wait_hook_;
+}
+
+inline
+wait_functor::pointer wait_functor::to_value_ptr( wait_functor::hook_ptr n) {
+ return intrusive::get_parent_from_member< context >( n, & context::wait_hook_);
+}
+
+inline
+wait_functor::const_pointer wait_functor::to_value_ptr( wait_functor::const_hook_ptr n) {
+ return intrusive::get_parent_from_member< context >( n, & context::wait_hook_);
+}
+
+}}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_CONTEXT_H
diff --git a/boost/fiber/detail/config.hpp b/boost/fiber/detail/config.hpp
new file mode 100644
index 0000000000..92a4c5fc3c
--- /dev/null
+++ b/boost/fiber/detail/config.hpp
@@ -0,0 +1,38 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_CONFIG_H
+#define BOOST_FIBERS_DETAIL_CONFIG_H
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_FIBERS_DECL
+# undef BOOST_FIBERS_DECL
+#endif
+
+#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FIBERS_DYN_LINK) ) && ! defined(BOOST_FIBERS_STATIC_LINK)
+# if defined(BOOST_FIBERS_SOURCE)
+# define BOOST_FIBERS_DECL BOOST_SYMBOL_EXPORT
+# define BOOST_FIBERS_BUILD_DLL
+# else
+# define BOOST_FIBERS_DECL BOOST_SYMBOL_IMPORT
+# endif
+#endif
+
+#if ! defined(BOOST_FIBERS_DECL)
+# define BOOST_FIBERS_DECL
+#endif
+
+#if ! defined(BOOST_FIBERS_SOURCE) && ! defined(BOOST_ALL_NO_LIB) && ! defined(BOOST_FIBERS_NO_LIB)
+# define BOOST_LIB_NAME boost_fiber
+# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FIBERS_DYN_LINK)
+# define BOOST_DYN_LINK
+# endif
+# include <boost/config/auto_link.hpp>
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_CONFIG_H
diff --git a/boost/fiber/detail/convert.hpp b/boost/fiber/detail/convert.hpp
new file mode 100644
index 0000000000..ac190d8528
--- /dev/null
+++ b/boost/fiber/detail/convert.hpp
@@ -0,0 +1,59 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_CONVERT_H
+#define BOOST_FIBERS_DETAIL_CONVERT_H
+
+#include <chrono>
+#include <memory>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+inline
+std::chrono::steady_clock::time_point convert(
+ std::chrono::steady_clock::time_point const& timeout_time) noexcept {
+ return timeout_time;
+}
+
+template< typename Clock, typename Duration >
+std::chrono::steady_clock::time_point convert(
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ return std::chrono::steady_clock::now() + ( timeout_time - Clock::now() );
+}
+
+// suggested by Howard Hinnant
+template< typename T >
+inline
+T * convert( T * p) noexcept {
+ return p;
+}
+
+template< typename Pointer >
+inline
+typename std::pointer_traits< Pointer >::element_type *
+convert( Pointer p) noexcept {
+ return nullptr != p
+ ? to_raw_pointer( p.operator->() )
+ : nullptr;
+}
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_CONVERT_H
diff --git a/boost/fiber/detail/data.hpp b/boost/fiber/detail/data.hpp
new file mode 100644
index 0000000000..a3e8a7e347
--- /dev/null
+++ b/boost/fiber/detail/data.hpp
@@ -0,0 +1,71 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_DATA_H
+#define BOOST_FIBERS_DETAIL_DATA_H
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+class context;
+
+namespace detail {
+
+#if (BOOST_EXECUTION_CONTEXT==1)
+struct data_t {
+ spinlock_lock * lk{ nullptr };
+ context * ctx{ nullptr };
+
+ constexpr data_t() noexcept = default;
+
+ explicit data_t( spinlock_lock * lk_) noexcept :
+ lk{ lk_ } {
+ }
+
+ explicit data_t( context * ctx_) noexcept :
+ ctx{ ctx_ } {
+ }
+};
+#else
+struct data_t {
+ spinlock_lock * lk{ nullptr };
+ context * ctx{ nullptr };
+ context * from;
+
+ explicit data_t( context * from_) noexcept :
+ from{ from_ } {
+ }
+
+ explicit data_t( spinlock_lock * lk_,
+ context * from_) noexcept :
+ lk{ lk_ },
+ from{ from_ } {
+ }
+
+ explicit data_t( context * ctx_,
+ context * from_) noexcept :
+ ctx{ ctx_ },
+ from{ from_ } {
+ }
+};
+#endif
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_DATA_H
diff --git a/boost/fiber/detail/decay_copy.hpp b/boost/fiber/detail/decay_copy.hpp
new file mode 100644
index 0000000000..eecfdd0ef6
--- /dev/null
+++ b/boost/fiber/detail/decay_copy.hpp
@@ -0,0 +1,36 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBER_DETAIL_DECAY_COPY_H
+#define BOOST_FIBER_DETAIL_DECAY_COPY_H
+
+#include <type_traits>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename T >
+typename std::decay< T >::type
+decay_copy( T && t) {
+ return std::forward< T >( t);
+}
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+#include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBER_DETAIL_DECAY_COPY_H
diff --git a/boost/fiber/detail/disable_overload.hpp b/boost/fiber/detail/disable_overload.hpp
new file mode 100644
index 0000000000..0c69804523
--- /dev/null
+++ b/boost/fiber/detail/disable_overload.hpp
@@ -0,0 +1,34 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBER_DETAIL_DISABLE_OVERLOAD_H
+#define BOOST_FIBER_DETAIL_DISABLE_OVERLOAD_H
+
+#include <type_traits>
+
+#include <boost/config.hpp>
+#include <boost/context/detail/disable_overload.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename X, typename Y >
+using disable_overload = boost::context::detail::disable_overload< X, Y >;
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+#include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBER_DETAIL_DISABLE_OVERLOAD_H
diff --git a/boost/fiber/detail/fss.hpp b/boost/fiber/detail/fss.hpp
new file mode 100644
index 0000000000..54dc5b79d3
--- /dev/null
+++ b/boost/fiber/detail/fss.hpp
@@ -0,0 +1,58 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// based on tss.hpp from boost.thread
+
+#ifndef BOOST_FIBERS_DETAIL_FSS_H
+#define BOOST_FIBERS_DETAIL_FSS_H
+
+#include <atomic>
+#include <cstddef>
+
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+class fss_cleanup_function {
+private:
+ std::atomic< std::size_t > use_count_{ 0 };
+
+public:
+ typedef intrusive_ptr< fss_cleanup_function > ptr_t;
+
+ fss_cleanup_function() noexcept = default;
+
+ virtual ~fss_cleanup_function() = default;
+
+ virtual void operator()( void * data) = 0;
+
+ friend inline
+ void intrusive_ptr_add_ref( fss_cleanup_function * p) noexcept {
+ ++p->use_count_;
+ }
+
+ friend inline
+ void intrusive_ptr_release( fss_cleanup_function * p) noexcept {
+ if ( --p->use_count_ == 0) {
+ delete p;
+ }
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_FSS_H
diff --git a/boost/fiber/detail/spinlock.hpp b/boost/fiber/detail/spinlock.hpp
new file mode 100644
index 0000000000..e2af3a86c7
--- /dev/null
+++ b/boost/fiber/detail/spinlock.hpp
@@ -0,0 +1,42 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// based on boost::interprocess::sync::interprocess_spin::mutex
+
+#ifndef BOOST_FIBERS_SPINLOCK_H
+#define BOOST_FIBERS_SPINLOCK_H
+
+#include <mutex>
+
+#include <boost/fiber/detail/config.hpp>
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+struct non_spinlock {
+ constexpr non_spinlock() noexcept {}
+ void lock() noexcept {}
+ void unlock() noexcept {}
+};
+
+struct non_lock {
+ constexpr non_lock( non_spinlock) noexcept {}
+ void lock() noexcept {}
+ void unlock() noexcept {}
+};
+
+#if ! defined(BOOST_FIBERS_NO_ATOMICS)
+typedef std::mutex spinlock;
+using spinlock_lock = std::unique_lock< spinlock >;
+#else
+typedef non_spinlock spinlock;
+using spinlock_lock = non_lock;
+#endif
+
+}}}
+
+#endif // BOOST_FIBERS_SPINLOCK_H
diff --git a/boost/fiber/detail/wrap.hpp b/boost/fiber/detail/wrap.hpp
new file mode 100644
index 0000000000..850763b4c8
--- /dev/null
+++ b/boost/fiber/detail/wrap.hpp
@@ -0,0 +1,113 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBER_DETAIL_WRAP_H
+#define BOOST_FIBER_DETAIL_WRAP_H
+
+#include <type_traits>
+
+#include <boost/config.hpp>
+#include <boost/context/detail/invoke.hpp>
+#include <boost/context/execution_context.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/data.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+#if (BOOST_EXECUTION_CONTEXT==1)
+template< typename Fn1, typename Fn2, typename Tpl >
+class wrapper {
+private:
+ typename std::decay< Fn1 >::type fn1_;
+ typename std::decay< Fn2 >::type fn2_;
+ typename std::decay< Tpl >::type tpl_;
+ boost::context::execution_context ctx_;
+
+public:
+ wrapper( Fn1 && fn1, Fn2 && fn2, Tpl && tpl,
+ boost::context::execution_context const& ctx) :
+ fn1_( std::move( fn1) ),
+ fn2_( std::move( fn2) ),
+ tpl_( std::move( tpl) ),
+ ctx_{ ctx } {
+ }
+
+ wrapper( wrapper const&) = delete;
+ wrapper & operator=( wrapper const&) = delete;
+
+ wrapper( wrapper && other) = default;
+ wrapper & operator=( wrapper && other) = default;
+
+ void operator()( void * vp) {
+ boost::context::detail::invoke(
+ std::move( fn1_),
+ fn2_, tpl_, ctx_, vp);
+ }
+};
+
+template< typename Fn1, typename Fn2, typename Tpl >
+wrapper< Fn1, Fn2, Tpl >
+wrap( Fn1 && fn1, Fn2 && fn2, Tpl && tpl,
+ boost::context::execution_context const& ctx) {
+ return wrapper< Fn1, Fn2, Tpl >(
+ std::forward< Fn1 >( fn1),
+ std::forward< Fn2 >( fn2),
+ std::forward< Tpl >( tpl),
+ ctx);
+}
+#else
+template< typename Fn1, typename Fn2, typename Tpl >
+class wrapper {
+private:
+ typename std::decay< Fn1 >::type fn1_;
+ typename std::decay< Fn2 >::type fn2_;
+ typename std::decay< Tpl >::type tpl_;
+
+public:
+ wrapper( Fn1 && fn1, Fn2 && fn2, Tpl && tpl) :
+ fn1_( std::move( fn1) ),
+ fn2_( std::move( fn2) ),
+ tpl_( std::move( tpl) ) {
+ }
+
+ wrapper( wrapper const&) = delete;
+ wrapper & operator=( wrapper const&) = delete;
+
+ wrapper( wrapper && other) = default;
+ wrapper & operator=( wrapper && other) = default;
+
+ boost::context::execution_context< data_t * >
+ operator()( boost::context::execution_context< data_t * > ctx, data_t * dp) {
+ return boost::context::detail::invoke(
+ std::move( fn1_),
+ fn2_, tpl_, std::move( ctx), dp);
+ }
+};
+
+template< typename Fn1, typename Fn2, typename Tpl >
+wrapper< Fn1, Fn2, Tpl >
+wrap( Fn1 && fn1, Fn2 && fn2, Tpl && tpl) {
+ return wrapper< Fn1, Fn2, Tpl >(
+ std::forward< Fn1 >( fn1),
+ std::forward< Fn2 >( fn2),
+ std::forward< Tpl >( tpl) );
+}
+#endif
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+#include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBER_DETAIL_WRAP_H
diff --git a/boost/fiber/exceptions.hpp b/boost/fiber/exceptions.hpp
new file mode 100644
index 0000000000..ddbf45eadf
--- /dev/null
+++ b/boost/fiber/exceptions.hpp
@@ -0,0 +1,148 @@
+//
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// based on boost.thread
+
+#ifndef BOOST_fiber_errorS_H
+#define BOOST_fiber_errorS_H
+
+#include <future>
+#include <stdexcept>
+#include <string>
+#include <system_error>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+class fiber_error : public std::system_error {
+public:
+ fiber_error( std::error_code ec) :
+ std::system_error( ec) {
+ }
+
+ fiber_error( std::error_code ec, const char * what_arg) :
+ std::system_error( ec, what_arg) {
+ }
+
+ fiber_error( std::error_code ec, std::string const& what_arg) :
+ std::system_error( ec, what_arg) {
+ }
+
+ virtual ~fiber_error() = default;
+};
+
+class lock_error : public fiber_error {
+public:
+ lock_error( std::error_code ec) :
+ fiber_error( ec) {
+ }
+
+ lock_error( std::error_code ec, const char * what_arg) :
+ fiber_error( ec, what_arg) {
+ }
+
+ lock_error( std::error_code ec, std::string const& what_arg) :
+ fiber_error( ec, what_arg) {
+ }
+};
+
+enum class future_errc {
+ broken_promise = 1,
+ future_already_retrieved,
+ promise_already_satisfied,
+ no_state
+};
+
+BOOST_FIBERS_DECL
+std::error_category const& future_category() noexcept;
+
+}}
+
+namespace std {
+
+template<>
+struct is_error_code_enum< boost::fibers::future_errc > : public true_type {
+};
+
+inline
+std::error_code make_error_code( boost::fibers::future_errc e) noexcept {
+ return std::error_code( static_cast< int >( e), boost::fibers::future_category() );
+}
+
+inline
+std::error_condition make_error_condition( boost::fibers::future_errc e) noexcept {
+ return std::error_condition( static_cast< int >( e), boost::fibers::future_category() );
+}
+
+}
+
+namespace boost {
+namespace fibers {
+
+class future_error : public fiber_error {
+public:
+ future_error( std::error_code ec) :
+ fiber_error( ec) {
+ }
+};
+
+class future_uninitialized : public future_error {
+public:
+ future_uninitialized() :
+ future_error( std::make_error_code( future_errc::no_state) ) {
+ }
+};
+
+class future_already_retrieved : public future_error {
+public:
+ future_already_retrieved() :
+ future_error( std::make_error_code( future_errc::future_already_retrieved) ) {
+ }
+};
+
+class broken_promise : public future_error {
+public:
+ broken_promise() :
+ future_error( std::make_error_code( future_errc::broken_promise) ) {
+ }
+};
+
+class promise_already_satisfied : public future_error {
+public:
+ promise_already_satisfied() :
+ future_error( std::make_error_code( future_errc::promise_already_satisfied) ) {
+ }
+};
+
+class promise_uninitialized : public future_error {
+public:
+ promise_uninitialized() :
+ future_error( std::make_error_code( future_errc::no_state) ) {
+ }
+};
+
+class packaged_task_uninitialized : public future_error {
+public:
+ packaged_task_uninitialized() :
+ future_error( std::make_error_code( future_errc::no_state) ) {
+ }
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_fiber_errorS_H
diff --git a/boost/fiber/fiber.hpp b/boost/fiber/fiber.hpp
new file mode 100644
index 0000000000..db161d3772
--- /dev/null
+++ b/boost/fiber/fiber.hpp
@@ -0,0 +1,160 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_FIBER_H
+#define BOOST_FIBERS_FIBER_H
+
+#include <algorithm>
+#include <exception>
+#include <memory>
+#include <utility>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/disable_overload.hpp>
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/fixedsize_stack.hpp>
+#include <boost/fiber/policy.hpp>
+#include <boost/fiber/properties.hpp>
+#include <boost/fiber/segmented_stack.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class BOOST_FIBERS_DECL fiber {
+private:
+ friend class context;
+
+ typedef intrusive_ptr< context > ptr_t;
+
+ ptr_t impl_{};
+
+ void start_() noexcept;
+
+public:
+ typedef context::id id;
+
+ constexpr fiber() noexcept = default;
+
+ template< typename Fn,
+ typename ... Args,
+ typename = detail::disable_overload< fiber, Fn >
+ >
+ fiber( Fn && fn, Args && ... args) :
+ fiber{ launch::post,
+ std::allocator_arg, default_stack(),
+ std::forward< Fn >( fn), std::forward< Args >( args) ... } {
+ }
+
+ template< typename Fn,
+ typename ... Args,
+ typename = detail::disable_overload< fiber, Fn >
+ >
+ fiber( launch policy, Fn && fn, Args && ... args) :
+ fiber{ policy,
+ std::allocator_arg, default_stack(),
+ std::forward< Fn >( fn), std::forward< Args >( args) ... } {
+ }
+
+ template< typename StackAllocator,
+ typename Fn,
+ typename ... Args
+ >
+ fiber( std::allocator_arg_t, StackAllocator salloc, Fn && fn, Args && ... args) :
+ fiber{ launch::post,
+ std::allocator_arg, salloc,
+ std::forward< Fn >( fn), std::forward< Args >( args) ... } {
+ }
+
+ template< typename StackAllocator,
+ typename Fn,
+ typename ... Args
+ >
+ fiber( launch policy, std::allocator_arg_t, StackAllocator salloc, Fn && fn, Args && ... args) :
+ impl_{ make_worker_context( policy, salloc, std::forward< Fn >( fn), std::forward< Args >( args) ... ) } {
+ start_();
+ }
+
+ ~fiber() {
+ if ( joinable() ) {
+ std::terminate();
+ }
+ }
+
+ fiber( fiber const&) = delete;
+ fiber & operator=( fiber const&) = delete;
+
+ fiber( fiber && other) noexcept :
+ impl_{} {
+ impl_.swap( other.impl_);
+ }
+
+ fiber & operator=( fiber && other) noexcept {
+ if ( joinable() ) {
+ std::terminate();
+ }
+ if ( this == & other) return * this;
+ impl_.swap( other.impl_);
+ return * this;
+ }
+
+ void swap( fiber & other) noexcept {
+ impl_.swap( other.impl_);
+ }
+
+ id get_id() const noexcept {
+ return impl_ ? impl_->get_id() : id();
+ }
+
+ bool joinable() const noexcept {
+ return nullptr != impl_;
+ }
+
+ void join();
+
+ void detach();
+
+ template< typename PROPS >
+ PROPS & properties() {
+ auto props = impl_->get_properties();
+ BOOST_ASSERT_MSG(props, "fiber::properties not set");
+ return dynamic_cast< PROPS & >( * props );
+ }
+};
+
+inline
+bool operator<( fiber const& l, fiber const& r) noexcept {
+ return l.get_id() < r.get_id();
+}
+
+inline
+void swap( fiber & l, fiber & r) noexcept {
+ return l.swap( r);
+}
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_FIBER_H
diff --git a/boost/fiber/fixedsize_stack.hpp b/boost/fiber/fixedsize_stack.hpp
new file mode 100644
index 0000000000..f3ed4d45fb
--- /dev/null
+++ b/boost/fiber/fixedsize_stack.hpp
@@ -0,0 +1,33 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_FIXEDSIZE_STACK_H
+#define BOOST_FIBERS_FIXEDSIZE_STACK_H
+
+#include <boost/config.hpp>
+#include <boost/context/fixedsize_stack.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+using fixedsize_stack = boost::context::fixedsize_stack;
+#if !defined(BOOST_USE_SEGMENTED_STACKS)
+using default_stack = boost::context::default_stack;
+#endif
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_FIXEDSIZE_STACK_H
diff --git a/boost/fiber/fss.hpp b/boost/fiber/fss.hpp
new file mode 100644
index 0000000000..a578d40a7f
--- /dev/null
+++ b/boost/fiber/fss.hpp
@@ -0,0 +1,107 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// based on tss.hpp from boost.thread
+
+#ifndef BOOST_FIBERS_FSS_H
+#define BOOST_FIBERS_FSS_H
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/fss.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+template< typename T >
+class fiber_specific_ptr {
+private:
+ struct default_cleanup_function : public detail::fss_cleanup_function {
+ void operator()( void * data) noexcept {
+ delete static_cast< T * >( data);
+ }
+ };
+
+ struct custom_cleanup_function : public detail::fss_cleanup_function {
+ void (*fn)(T*);
+
+ explicit custom_cleanup_function( void(*fn_)(T*) ) noexcept :
+ fn{ fn_ } {
+ }
+
+ void operator()( void* data) {
+ if ( fn) {
+ fn( static_cast< T * >( data) );
+ }
+ }
+ };
+
+ detail::fss_cleanup_function::ptr_t cleanup_fn_;
+
+public:
+ typedef T element_type;
+
+ fiber_specific_ptr() :
+ cleanup_fn_{ new default_cleanup_function() } {
+ }
+
+ explicit fiber_specific_ptr( void(*fn)(T*) ) :
+ cleanup_fn_{ new custom_cleanup_function( fn) } {
+ }
+
+ ~fiber_specific_ptr() {
+ context * f = context::active();
+ if ( nullptr != f) {
+ f->set_fss_data(
+ this, cleanup_fn_, nullptr, true);
+ }
+ }
+
+ fiber_specific_ptr( fiber_specific_ptr const&) = delete;
+ fiber_specific_ptr & operator=( fiber_specific_ptr const&) = delete;
+
+ T * get() const noexcept {
+ BOOST_ASSERT( context::active() );
+ void * vp = context::active()->get_fss_data( this);
+ return static_cast< T * >( vp);
+ }
+
+ T * operator->() const noexcept {
+ return get();
+ }
+
+ T & operator*() const noexcept {
+ return * get();
+ }
+
+ T * release() {
+ T * tmp = get();
+ context::active()->set_fss_data(
+ this, cleanup_fn_, nullptr, false);
+ return tmp;
+ }
+
+ void reset( T * t) {
+ T * c = get();
+ if ( c != t) {
+ context::active()->set_fss_data(
+ this, cleanup_fn_, t, true);
+ }
+ }
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_FSS_H
diff --git a/boost/fiber/future.hpp b/boost/fiber/future.hpp
new file mode 100644
index 0000000000..2e5d3b7744
--- /dev/null
+++ b/boost/fiber/future.hpp
@@ -0,0 +1,10 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/fiber/future/async.hpp>
+#include <boost/fiber/future/future.hpp>
+#include <boost/fiber/future/packaged_task.hpp>
+#include <boost/fiber/future/promise.hpp>
diff --git a/boost/fiber/future/async.hpp b/boost/fiber/future/async.hpp
new file mode 100644
index 0000000000..f3adbc60b4
--- /dev/null
+++ b/boost/fiber/future/async.hpp
@@ -0,0 +1,89 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_ASYNC_HPP
+#define BOOST_FIBERS_ASYNC_HPP
+
+#include <algorithm>
+#include <memory>
+#include <type_traits>
+#include <utility>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/future/future.hpp>
+#include <boost/fiber/future/packaged_task.hpp>
+#include <boost/fiber/policy.hpp>
+
+namespace boost {
+namespace fibers {
+
+template< typename Fn, typename ... Args >
+future<
+ typename std::result_of<
+ typename std::enable_if<
+ ! detail::is_launch_policy< typename std::decay< Fn >::type >::value,
+ typename std::decay< Fn >::type
+ >::type( typename std::decay< Args >::type ... )
+ >::type
+>
+async( Fn && fn, Args && ... args) {
+ typedef typename std::result_of<
+ typename std::decay< Fn >::type( typename std::decay< Args >::type ... )
+ >::type result_t;
+
+ packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{
+ std::forward< Fn >( fn) };
+ future< result_t > f{ pt.get_future() };
+ fiber{ std::move( pt), std::forward< Args >( args) ... }.detach();
+ return f;
+}
+
+template< typename Policy, typename Fn, typename ... Args >
+future<
+ typename std::result_of<
+ typename std::enable_if<
+ detail::is_launch_policy< Policy >::value,
+ typename std::decay< Fn >::type
+ >::type( typename std::decay< Args >::type ...)
+ >::type
+>
+async( Policy policy, Fn && fn, Args && ... args) {
+ typedef typename std::result_of<
+ typename std::decay< Fn >::type( typename std::decay< Args >::type ... )
+ >::type result_t;
+
+ packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{
+ std::forward< Fn >( fn) };
+ future< result_t > f{ pt.get_future() };
+ fiber{ policy, std::move( pt), std::forward< Args >( args) ... }.detach();
+ return f;
+}
+
+template< typename Policy, typename StackAllocator, typename Fn, typename ... Args >
+future<
+ typename std::result_of<
+ typename std::enable_if<
+ detail::is_launch_policy< Policy >::value,
+ typename std::decay< Fn >::type
+ >::type( typename std::decay< Args >::type ... )
+ >::type
+>
+async( Policy policy, std::allocator_arg_t, StackAllocator salloc, Fn && fn, Args && ... args) {
+ typedef typename std::result_of<
+ typename std::decay< Fn >::type( typename std::decay< Args >::type ... )
+ >::type result_t;
+
+ packaged_task< result_t( typename std::decay< Args >::type ... ) > pt{
+ std::allocator_arg, salloc, std::forward< Fn >( fn) };
+ future< result_t > f{ pt.get_future() };
+ fiber{ policy, std::move( pt), std::forward< Args >( args) ... }.detach();
+ return f;
+}
+
+}}
+
+#endif // BOOST_FIBERS_ASYNC_HPP
diff --git a/boost/fiber/future/detail/shared_state.hpp b/boost/fiber/future/detail/shared_state.hpp
new file mode 100644
index 0000000000..9c1b347fbf
--- /dev/null
+++ b/boost/fiber/future/detail/shared_state.hpp
@@ -0,0 +1,312 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_SHARED_STATE_H
+#define BOOST_FIBERS_DETAIL_SHARED_STATE_H
+
+#include <algorithm>
+#include <atomic>
+#include <chrono>
+#include <cstddef>
+#include <exception>
+#include <memory>
+#include <mutex>
+#include <type_traits>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/future/future_status.hpp>
+#include <boost/fiber/condition_variable.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/mutex.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+class shared_state_base {
+private:
+ std::atomic< std::size_t > use_count_{ 0 };
+ mutable condition_variable waiters_{};
+
+protected:
+ mutable mutex mtx_{};
+ bool ready_{ false };
+ std::exception_ptr except_{};
+
+ void mark_ready_and_notify_( std::unique_lock< mutex > & lk) noexcept {
+ BOOST_ASSERT( lk.owns_lock() );
+ ready_ = true;
+ lk.unlock();
+ waiters_.notify_all();
+ }
+
+ void owner_destroyed_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ! ready_) {
+ set_exception_(
+ std::make_exception_ptr( broken_promise() ),
+ lk);
+ }
+ }
+
+ void set_exception_( std::exception_ptr except, std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ready_) {
+ throw promise_already_satisfied();
+ }
+ except_ = except;
+ mark_ready_and_notify_( lk);
+ }
+
+ std::exception_ptr get_exception_ptr_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ wait_( lk);
+ return except_;
+ }
+
+ void wait_( std::unique_lock< mutex > & lk) const {
+ BOOST_ASSERT( lk.owns_lock() );
+ waiters_.wait( lk, [this](){ return ready_; });
+ }
+
+ template< typename Rep, typename Period >
+ future_status wait_for_( std::unique_lock< mutex > & lk,
+ std::chrono::duration< Rep, Period > const& timeout_duration) const {
+ BOOST_ASSERT( lk.owns_lock() );
+ return waiters_.wait_for( lk, timeout_duration, [this](){ return ready_; })
+ ? future_status::ready
+ : future_status::timeout;
+ }
+
+ template< typename Clock, typename Duration >
+ future_status wait_until_( std::unique_lock< mutex > & lk,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) const {
+ BOOST_ASSERT( lk.owns_lock() );
+ return waiters_.wait_until( lk, timeout_time, [this](){ return ready_; })
+ ? future_status::ready
+ : future_status::timeout;
+ }
+
+ virtual void deallocate_future() noexcept = 0;
+
+public:
+ shared_state_base() = default;
+
+ virtual ~shared_state_base() = default;
+
+ shared_state_base( shared_state_base const&) = delete;
+ shared_state_base & operator=( shared_state_base const&) = delete;
+
+ void owner_destroyed() {
+ std::unique_lock< mutex > lk( mtx_);
+ owner_destroyed_( lk);
+ }
+
+ void set_exception( std::exception_ptr except) {
+ std::unique_lock< mutex > lk( mtx_);
+ set_exception_( except, lk);
+ }
+
+ std::exception_ptr get_exception_ptr() {
+ std::unique_lock< mutex > lk( mtx_);
+ return get_exception_ptr_( lk);
+ }
+
+ void wait() const {
+ std::unique_lock< mutex > lk( mtx_);
+ wait_( lk);
+ }
+
+ template< typename Rep, typename Period >
+ future_status wait_for( std::chrono::duration< Rep, Period > const& timeout_duration) const {
+ std::unique_lock< mutex > lk( mtx_);
+ return wait_for_( lk, timeout_duration);
+ }
+
+ template< typename Clock, typename Duration >
+ future_status wait_until( std::chrono::time_point< Clock, Duration > const& timeout_time) const {
+ std::unique_lock< mutex > lk( mtx_);
+ return wait_until_( lk, timeout_time);
+ }
+
+ friend inline
+ void intrusive_ptr_add_ref( shared_state_base * p) noexcept {
+ ++p->use_count_;
+ }
+
+ friend inline
+ void intrusive_ptr_release( shared_state_base * p) noexcept {
+ if ( 0 == --p->use_count_) {
+ p->deallocate_future();
+ }
+ }
+};
+
+template< typename R >
+class shared_state : public shared_state_base {
+private:
+ typename std::aligned_storage< sizeof( R), alignof( R) >::type storage_{};
+
+ void set_value_( R const& value, std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ready_) {
+ throw promise_already_satisfied();
+ }
+ ::new ( static_cast< void * >( std::addressof( storage_) ) ) R( value);
+ mark_ready_and_notify_( lk);
+ }
+
+ void set_value_( R && value, std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ready_) {
+ throw promise_already_satisfied();
+ }
+ ::new ( static_cast< void * >( std::addressof( storage_) ) ) R( std::move( value) );
+ mark_ready_and_notify_( lk);
+ }
+
+ R & get_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ wait_( lk);
+ if ( except_) {
+ std::rethrow_exception( except_);
+ }
+ return * reinterpret_cast< R * >( std::addressof( storage_) );
+ }
+
+public:
+ typedef intrusive_ptr< shared_state > ptr_t;
+
+ shared_state() = default;
+
+ virtual ~shared_state() {
+ if ( ready_ && ! except_) {
+ reinterpret_cast< R * >( & storage_)->~R();
+ }
+ }
+
+ shared_state( shared_state const&) = delete;
+ shared_state & operator=( shared_state const&) = delete;
+
+ void set_value( R const& value) {
+ std::unique_lock< mutex > lk( mtx_);
+ set_value_( value, lk);
+ }
+
+ void set_value( R && value) {
+ std::unique_lock< mutex > lk( mtx_);
+ set_value_( std::move( value), lk);
+ }
+
+ R & get() {
+ std::unique_lock< mutex > lk( mtx_);
+ return get_( lk);
+ }
+};
+
+template< typename R >
+class shared_state< R & > : public shared_state_base {
+private:
+ R * value_{ nullptr };
+
+ void set_value_( R & value, std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ready_) {
+ throw promise_already_satisfied();
+ }
+ value_ = std::addressof( value);
+ mark_ready_and_notify_( lk);
+ }
+
+ R & get_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ wait_( lk);
+ if ( except_) {
+ std::rethrow_exception( except_);
+ }
+ return * value_;
+ }
+
+public:
+ typedef intrusive_ptr< shared_state > ptr_t;
+
+ shared_state() = default;
+
+ virtual ~shared_state() = default;
+
+ shared_state( shared_state const&) = delete;
+ shared_state & operator=( shared_state const&) = delete;
+
+ void set_value( R & value) {
+ std::unique_lock< mutex > lk( mtx_);
+ set_value_( value, lk);
+ }
+
+ R & get() {
+ std::unique_lock< mutex > lk( mtx_);
+ return get_( lk);
+ }
+};
+
+template<>
+class shared_state< void > : public shared_state_base {
+private:
+ inline
+ void set_value_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ if ( ready_) {
+ throw promise_already_satisfied();
+ }
+ mark_ready_and_notify_( lk);
+ }
+
+ inline
+ void get_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( lk.owns_lock() );
+ wait_( lk);
+ if ( except_) {
+ std::rethrow_exception( except_);
+ }
+ }
+
+public:
+ typedef intrusive_ptr< shared_state > ptr_t;
+
+ shared_state() = default;
+
+ virtual ~shared_state() = default;
+
+ shared_state( shared_state const&) = delete;
+ shared_state & operator=( shared_state const&) = delete;
+
+ inline
+ void set_value() {
+ std::unique_lock< mutex > lk( mtx_);
+ set_value_( lk);
+ }
+
+ inline
+ void get() {
+ std::unique_lock< mutex > lk( mtx_);
+ get_( lk);
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_SHARED_STATE_H
diff --git a/boost/fiber/future/detail/shared_state_object.hpp b/boost/fiber/future/detail/shared_state_object.hpp
new file mode 100644
index 0000000000..dcdafef65c
--- /dev/null
+++ b/boost/fiber/future/detail/shared_state_object.hpp
@@ -0,0 +1,57 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_SHARED_STATE_OBJECT_H
+#define BOOST_FIBERS_DETAIL_SHARED_STATE_OBJECT_H
+
+#include <memory>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/future/detail/shared_state.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename R, typename Allocator >
+class shared_state_object : public shared_state< R > {
+public:
+ typedef typename std::allocator_traits< Allocator >::template rebind_alloc<
+ shared_state_object
+ > allocator_t;
+
+ shared_state_object( allocator_t const& alloc) :
+ shared_state< R >(), alloc_( alloc) {
+ }
+
+protected:
+ void deallocate_future() noexcept override final {
+ destroy_( alloc_, this);
+ }
+
+private:
+ allocator_t alloc_;
+
+ static void destroy_( allocator_t const& alloc, shared_state_object * p) noexcept {
+ allocator_t a{ alloc };
+ a.destroy( p);
+ a.deallocate( p, 1);
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_SHARED_STATE_OBJECT_H
diff --git a/boost/fiber/future/detail/task_base.hpp b/boost/fiber/future/detail/task_base.hpp
new file mode 100644
index 0000000000..907e820470
--- /dev/null
+++ b/boost/fiber/future/detail/task_base.hpp
@@ -0,0 +1,41 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_TASK_BASE_H
+#define BOOST_FIBERS_DETAIL_TASK_BASE_H
+
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/future/detail/shared_state.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename R, typename ... Args >
+struct task_base : public shared_state< R > {
+ typedef intrusive_ptr< task_base > ptr_t;
+
+ virtual ~task_base() {
+ }
+
+ virtual void run( Args && ... args) = 0;
+
+ virtual ptr_t reset() = 0;
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_TASK_BASE_H
diff --git a/boost/fiber/future/detail/task_object.hpp b/boost/fiber/future/detail/task_object.hpp
new file mode 100644
index 0000000000..37bfd3fd11
--- /dev/null
+++ b/boost/fiber/future/detail/task_object.hpp
@@ -0,0 +1,156 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_DETAIL_TASK_OBJECT_H
+#define BOOST_FIBERS_DETAIL_TASK_OBJECT_H
+
+#include <exception>
+#include <memory>
+#include <utility>
+
+#include <boost/config.hpp>
+#include <boost/context/detail/apply.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/future/detail/task_base.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename Fn, typename Allocator, typename R, typename ... Args >
+class task_object : public task_base< R, Args ... > {
+private:
+ typedef task_base< R, Args ... > base_t;
+
+public:
+ typedef typename std::allocator_traits< Allocator >::template rebind_alloc<
+ task_object
+ > allocator_t;
+
+ task_object( allocator_t const& alloc, Fn const& fn) :
+ base_t(),
+ fn_( fn),
+ alloc_( alloc) {
+ }
+
+ task_object( allocator_t const& alloc, Fn && fn) :
+ base_t(),
+ fn_( std::move( fn) ),
+ alloc_( alloc) {
+ }
+
+ void run( Args && ... args) override final {
+ try {
+ this->set_value(
+ boost::context::detail::apply(
+ fn_, std::make_tuple( std::forward< Args >( args) ... ) ) );
+ } catch (...) {
+ this->set_exception( std::current_exception() );
+ }
+ }
+
+ typename base_t::ptr_t reset() override final {
+ typedef std::allocator_traits< allocator_t > traits_t;
+
+ typename traits_t::pointer ptr{ traits_t::allocate( alloc_, 1) };
+ try {
+ traits_t::construct( alloc_, ptr, alloc_, std::move( fn_) );
+ } catch (...) {
+ traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ return { convert( ptr) };
+ }
+
+protected:
+ void deallocate_future() noexcept override final {
+ destroy_( alloc_, this);
+ }
+
+private:
+ Fn fn_;
+ allocator_t alloc_;
+
+ static void destroy_( allocator_t const& alloc, task_object * p) noexcept {
+ allocator_t a{ alloc };
+ a.destroy( p);
+ a.deallocate( p, 1);
+ }
+};
+
+template< typename Fn, typename Allocator, typename ... Args >
+class task_object< Fn, Allocator, void, Args ... > : public task_base< void, Args ... > {
+private:
+ typedef task_base< void, Args ... > base_t;
+
+public:
+ typedef typename Allocator::template rebind<
+ task_object< Fn, Allocator, void, Args ... >
+ >::other allocator_t;
+
+ task_object( allocator_t const& alloc, Fn const& fn) :
+ base_t(),
+ fn_( fn),
+ alloc_( alloc) {
+ }
+
+ task_object( allocator_t const& alloc, Fn && fn) :
+ base_t(),
+ fn_( std::move( fn) ),
+ alloc_( alloc) {
+ }
+
+ void run( Args && ... args) override final {
+ try {
+ boost::context::detail::apply(
+ fn_, std::make_tuple( std::forward< Args >( args) ... ) );
+ this->set_value();
+ } catch (...) {
+ this->set_exception( std::current_exception() );
+ }
+ }
+
+ typename base_t::ptr_t reset() override final {
+ typedef std::allocator_traits< allocator_t > traits_t;
+
+ typename traits_t::pointer ptr{ traits_t::allocate( alloc_, 1) };
+ try {
+ traits_t::construct( alloc_, ptr, alloc_, std::move( fn_) );
+ } catch (...) {
+ traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ return { convert( ptr) };
+ }
+
+protected:
+ void deallocate_future() noexcept override final {
+ destroy_( alloc_, this);
+ }
+
+private:
+ Fn fn_;
+ allocator_t alloc_;
+
+ static void destroy_( allocator_t const& alloc, task_object * p) noexcept {
+ allocator_t a{ alloc };
+ a.destroy( p);
+ a.deallocate( p, 1);
+ }
+};
+
+}}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_DETAIL_TASK_OBJECT_H
diff --git a/boost/fiber/future/future.hpp b/boost/fiber/future/future.hpp
new file mode 100644
index 0000000000..9d91f3a1b7
--- /dev/null
+++ b/boost/fiber/future/future.hpp
@@ -0,0 +1,463 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_FUTURE_HPP
+#define BOOST_FIBERS_FUTURE_HPP
+
+#include <algorithm>
+#include <chrono>
+#include <exception>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/future/detail/shared_state.hpp>
+#include <boost/fiber/future/future_status.hpp>
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename R >
+struct future_base {
+ typedef typename shared_state< R >::ptr_t ptr_t;
+
+ ptr_t state_{};
+
+ constexpr future_base() noexcept = default;
+
+ explicit future_base( ptr_t const& p) noexcept :
+ state_{ p } {
+ }
+
+ ~future_base() = default;
+
+ future_base( future_base const& other) :
+ state_{ other.state_ } {
+ }
+
+ future_base( future_base && other) noexcept :
+ state_{ other.state_ } {
+ other.state_.reset();
+ }
+
+ future_base & operator=( future_base const& other) noexcept {
+ if ( this == & other) return * this;
+ state_ = other.state_;
+ return * this;
+ }
+
+ future_base & operator=( future_base && other) noexcept {
+ if ( this == & other) return * this;
+ state_ = other.state_;
+ other.state_.reset();
+ return * this;
+ }
+
+ bool valid() const noexcept {
+ return nullptr != state_.get();
+ }
+
+ std::exception_ptr get_exception_ptr() {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ return state_->get_exception_ptr();
+ }
+
+ void wait() const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ state_->wait();
+ }
+
+ template< typename Rep, typename Period >
+ future_status wait_for( std::chrono::duration< Rep, Period > const& timeout_duration) const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ return state_->wait_for( timeout_duration);
+ }
+
+ template< typename Clock, typename Duration >
+ future_status wait_until( std::chrono::time_point< Clock, Duration > const& timeout_time) const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ return state_->wait_until( timeout_time);
+ }
+};
+
+template< typename R >
+struct promise_base;
+
+}
+
+template< typename R >
+class shared_future;
+
+template< typename Signature >
+class packaged_task;
+
+template< typename R >
+class future : private detail::future_base< R > {
+private:
+ typedef detail::future_base< R > base_t;
+
+ friend struct detail::promise_base< R >;
+ friend class shared_future< R >;
+ template< typename Signature >
+ friend class packaged_task;
+
+ explicit future( typename base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr future() noexcept = default;
+
+ future( future const&) = delete;
+ future & operator=( future const&) = delete;
+
+ future( future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ future & operator=( future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ shared_future< R > share();
+
+ R get() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ typename base_t::ptr_t tmp{};
+ tmp.swap( base_t::state_);
+ return std::move( tmp->get() );
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+template< typename R >
+class future< R & > : private detail::future_base< R & > {
+private:
+ typedef detail::future_base< R & > base_t;
+
+ friend struct detail::promise_base< R & >;
+ friend class shared_future< R & >;
+ template< typename Signature >
+ friend class packaged_task;
+
+ explicit future( typename base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr future() noexcept = default;
+
+ future( future const&) = delete;
+ future & operator=( future const&) = delete;
+
+ future( future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ future & operator=( future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ shared_future< R & > share();
+
+ R & get() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ typename base_t::ptr_t tmp{};
+ tmp.swap( base_t::state_);
+ return tmp->get();
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+template<>
+class future< void > : private detail::future_base< void > {
+private:
+ typedef detail::future_base< void > base_t;
+
+ friend struct detail::promise_base< void >;
+ friend class shared_future< void >;
+ template< typename Signature >
+ friend class packaged_task;
+
+ explicit future( base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr future() noexcept = default;
+
+ future( future const&) = delete;
+ future & operator=( future const&) = delete;
+
+ inline
+ future( future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ inline
+ future & operator=( future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ shared_future< void > share();
+
+ inline
+ void get() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ base_t::ptr_t tmp{};
+ tmp.swap( base_t::state_);
+ tmp->get();
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+
+template< typename R >
+class shared_future : private detail::future_base< R > {
+private:
+ typedef detail::future_base< R > base_t;
+
+ explicit shared_future( typename base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr shared_future() noexcept = default;
+
+ ~shared_future() = default;
+
+ shared_future( shared_future const& other) :
+ base_t{ other } {
+ }
+
+ shared_future( shared_future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ shared_future( future< R > && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ shared_future & operator=( shared_future const& other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( other);
+ return * this;
+ }
+
+ shared_future & operator=( shared_future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ shared_future & operator=( future< R > && other) noexcept {
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ R const& get() const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ return base_t::state_->get();
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+template< typename R >
+class shared_future< R & > : private detail::future_base< R & > {
+private:
+ typedef detail::future_base< R & > base_t;
+
+ explicit shared_future( typename base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr shared_future() noexcept = default;
+
+ ~shared_future() = default;
+
+ shared_future( shared_future const& other) :
+ base_t{ other } {
+ }
+
+ shared_future( shared_future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ shared_future( future< R & > && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ shared_future & operator=( shared_future const& other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( other);
+ return * this;
+ }
+
+ shared_future & operator=( shared_future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ shared_future & operator=( future< R & > && other) noexcept {
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ R & get() const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ return base_t::state_->get();
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+template<>
+class shared_future< void > : private detail::future_base< void > {
+private:
+ typedef detail::future_base< void > base_t;
+
+ explicit shared_future( base_t::ptr_t const& p) noexcept :
+ base_t{ p } {
+ }
+
+public:
+ constexpr shared_future() noexcept = default;
+
+ ~shared_future() = default;
+
+ inline
+ shared_future( shared_future const& other) :
+ base_t{ other } {
+ }
+
+ inline
+ shared_future( shared_future && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ inline
+ shared_future( future< void > && other) noexcept :
+ base_t{ std::move( other) } {
+ }
+
+ inline
+ shared_future & operator=( shared_future const& other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( other);
+ return * this;
+ }
+
+ inline
+ shared_future & operator=( shared_future && other) noexcept {
+ if ( this == & other) return * this;
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ inline
+ shared_future & operator=( future< void > && other) noexcept {
+ base_t::operator=( std::move( other) );
+ return * this;
+ }
+
+ inline
+ void get() const {
+ if ( ! valid() ) {
+ throw future_uninitialized{};
+ }
+ base_t::state_->get();
+ }
+
+ using base_t::valid;
+ using base_t::get_exception_ptr;
+ using base_t::wait;
+ using base_t::wait_for;
+ using base_t::wait_until;
+};
+
+
+template< typename R >
+shared_future< R >
+future< R >::share() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ return shared_future< R >{ std::move( * this) };
+}
+
+template< typename R >
+shared_future< R & >
+future< R & >::share() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ return shared_future< R & >{ std::move( * this) };
+}
+
+inline
+shared_future< void >
+future< void >::share() {
+ if ( ! base_t::valid() ) {
+ throw future_uninitialized{};
+ }
+ return shared_future< void >{ std::move( * this) };
+}
+
+}}
+
+#endif
diff --git a/boost/fiber/future/future_status.hpp b/boost/fiber/future/future_status.hpp
new file mode 100644
index 0000000000..f9ac02c713
--- /dev/null
+++ b/boost/fiber/future/future_status.hpp
@@ -0,0 +1,27 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_FUTURE_STATUS_HPP
+#define BOOST_FIBERS_FUTURE_STATUS_HPP
+
+#include <future>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+namespace boost {
+namespace fibers {
+
+enum class future_status {
+ ready = 1,
+ timeout,
+ deferred
+};
+
+}}
+
+#endif // BOOST_FIBERS_FUTURE_STATUS_HPP
diff --git a/boost/fiber/future/packaged_task.hpp b/boost/fiber/future/packaged_task.hpp
new file mode 100644
index 0000000000..7ea16bfee7
--- /dev/null
+++ b/boost/fiber/future/packaged_task.hpp
@@ -0,0 +1,140 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_PACKAGED_TASK_HPP
+#define BOOST_FIBERS_PACKAGED_TASK_HPP
+
+#include <algorithm>
+#include <memory>
+#include <type_traits>
+#include <utility>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/detail/disable_overload.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/future/detail/task_base.hpp>
+#include <boost/fiber/future/detail/task_object.hpp>
+#include <boost/fiber/future/future.hpp>
+
+namespace boost {
+namespace fibers {
+
+template< typename Signature >
+class packaged_task;
+
+template< typename R, typename ... Args >
+class packaged_task< R( Args ... ) > {
+private:
+ typedef typename detail::task_base< R, Args ... >::ptr_t ptr_t;
+
+ bool obtained_{ false };
+ ptr_t task_{};
+
+public:
+ constexpr packaged_task() noexcept = default;
+
+ template< typename Fn,
+ typename = detail::disable_overload< packaged_task, Fn >
+ >
+ explicit packaged_task( Fn && fn) :
+ packaged_task{ std::allocator_arg,
+ std::allocator< packaged_task >{},
+ std::forward< Fn >( fn) } {
+ }
+
+ template< typename Fn,
+ typename Allocator
+ >
+ explicit packaged_task( std::allocator_arg_t, Allocator const& alloc, Fn && fn) {
+ typedef detail::task_object<
+ typename std::decay< Fn >::type, Allocator, R, Args ...
+ > object_t;
+ typedef std::allocator_traits<
+ typename object_t::allocator_t
+ > traits_t;
+
+ typename object_t::allocator_t a{ alloc };
+ typename traits_t::pointer ptr{ traits_t::allocate( a, 1) };
+ try {
+ traits_t::construct( a, ptr, a, std::forward< Fn >( fn) );
+ } catch (...) {
+ traits_t::deallocate( a, ptr, 1);
+ throw;
+ }
+ task_.reset( convert( ptr) );
+ }
+
+ ~packaged_task() {
+ if ( task_) {
+ task_->owner_destroyed();
+ }
+ }
+
+ packaged_task( packaged_task const&) = delete;
+ packaged_task & operator=( packaged_task const&) = delete;
+
+ packaged_task( packaged_task && other) noexcept :
+ obtained_{ other.obtained_ },
+ task_{ std::move( other.task_) } {
+ other.obtained_ = false;
+ }
+
+ packaged_task & operator=( packaged_task && other) noexcept {
+ if ( this == & other) return * this;
+ packaged_task tmp{ std::move( other) };
+ swap( tmp);
+ return * this;
+ }
+
+ void swap( packaged_task & other) noexcept {
+ std::swap( obtained_, other.obtained_);
+ task_.swap( other.task_);
+ }
+
+ bool valid() const noexcept {
+ return nullptr != task_.get();
+ }
+
+ future< R > get_future() {
+ if ( obtained_) {
+ throw future_already_retrieved{};
+ }
+ if ( ! valid() ) {
+ throw packaged_task_uninitialized{};
+ }
+ obtained_ = true;
+ return future< R >{
+ boost::static_pointer_cast< detail::shared_state< R > >( task_) };
+ }
+
+ void operator()( Args ... args) {
+ if ( ! valid() ) {
+ throw packaged_task_uninitialized{};
+ }
+ task_->run( std::forward< Args >( args) ... );
+ }
+
+ void reset() {
+ if ( ! valid() ) {
+ throw packaged_task_uninitialized{};
+ }
+ packaged_task tmp;
+ tmp.task_ = task_;
+ task_ = tmp.task_->reset();
+ obtained_ = false;
+ }
+};
+
+template< typename Signature >
+void swap( packaged_task< Signature > & l, packaged_task< Signature > & r) noexcept {
+ l.swap( r);
+}
+
+}}
+
+#endif // BOOST_FIBERS_PACKAGED_TASK_HPP
diff --git a/boost/fiber/future/promise.hpp b/boost/fiber/future/promise.hpp
new file mode 100644
index 0000000000..278c839700
--- /dev/null
+++ b/boost/fiber/future/promise.hpp
@@ -0,0 +1,219 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_PROMISE_HPP
+#define BOOST_FIBERS_PROMISE_HPP
+
+#include <algorithm>
+#include <memory>
+#include <utility>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/future/detail/shared_state.hpp>
+#include <boost/fiber/future/detail/shared_state_object.hpp>
+#include <boost/fiber/future/future.hpp>
+
+namespace boost {
+namespace fibers {
+namespace detail {
+
+template< typename R >
+struct promise_base {
+ typedef typename shared_state< R >::ptr_t ptr_t;
+
+ bool obtained_{ false };
+ ptr_t future_{};
+
+ promise_base() :
+ promise_base{ std::allocator_arg, std::allocator< promise_base >{} } {
+ }
+
+ template< typename Allocator >
+ promise_base( std::allocator_arg_t, Allocator alloc) {
+ typedef detail::shared_state_object< R, Allocator > object_t;
+ typedef std::allocator_traits< typename object_t::allocator_t > traits_t;
+ typename object_t::allocator_t a{ alloc };
+ typename traits_t::pointer ptr{ traits_t::allocate( a, 1) };
+
+ try {
+ traits_t::construct( a, ptr, a);
+ } catch (...) {
+ traits_t::deallocate( a, ptr, 1);
+ throw;
+ }
+ future_.reset( convert( ptr) );
+ }
+
+ ~promise_base() {
+ if ( future_) {
+ future_->owner_destroyed();
+ }
+ }
+
+ promise_base( promise_base const&) = delete;
+ promise_base & operator=( promise_base const&) = delete;
+
+ promise_base( promise_base && other) noexcept :
+ obtained_{ other.obtained_ },
+ future_{ std::move( other.future_) } {
+ other.obtained_ = false;
+ }
+
+ promise_base & operator=( promise_base && other) noexcept {
+ if ( this == & other) return * this;
+ promise_base tmp{ std::move( other) };
+ swap( tmp);
+ return * this;
+ }
+
+ future< R > get_future() {
+ if ( obtained_) {
+ throw future_already_retrieved{};
+ }
+ if ( ! future_) {
+ throw promise_uninitialized{};
+ }
+ obtained_ = true;
+ return future< R >{ future_ };
+ }
+
+ void swap( promise_base & other) noexcept {
+ std::swap( obtained_, other.obtained_);
+ future_.swap( other.future_);
+ }
+
+ void set_exception( std::exception_ptr p) {
+ if ( ! future_) {
+ throw promise_uninitialized{};
+ }
+ future_->set_exception( p);
+ }
+};
+
+}
+
+template< typename R >
+class promise : private detail::promise_base< R > {
+private:
+ typedef detail::promise_base< R > base_t;
+
+public:
+ promise() = default;
+
+ template< typename Allocator >
+ promise( std::allocator_arg_t, Allocator alloc) :
+ base_t{ std::allocator_arg, alloc } {
+ }
+
+ promise( promise const&) = delete;
+ promise & operator=( promise const&) = delete;
+
+ promise( promise && other) noexcept = default;
+ promise & operator=( promise && other) = default;
+
+ void set_value( R const& value) {
+ if ( ! base_t::future_) {
+ throw promise_uninitialized{};
+ }
+ base_t::future_->set_value( value);
+ }
+
+ void set_value( R && value) {
+ if ( ! base_t::future_) {
+ throw promise_uninitialized{};
+ }
+ base_t::future_->set_value( std::move( value) );
+ }
+
+ void swap( promise & other) noexcept {
+ base_t::swap( other);
+ }
+
+ using base_t::get_future;
+ using base_t::set_exception;
+};
+
+template< typename R >
+class promise< R & > : private detail::promise_base< R & > {
+private:
+ typedef detail::promise_base< R & > base_t;
+
+public:
+ promise() = default;
+
+ template< typename Allocator >
+ promise( std::allocator_arg_t, Allocator alloc) :
+ base_t{ std::allocator_arg, alloc } {
+ }
+
+ promise( promise const&) = delete;
+ promise & operator=( promise const&) = delete;
+
+ promise( promise && other) noexcept = default;
+ promise & operator=( promise && other) noexcept = default;
+
+ void set_value( R & value) {
+ if ( ! base_t::future_) {
+ throw promise_uninitialized{};
+ }
+ base_t::future_->set_value( value);
+ }
+
+ void swap( promise & other) noexcept {
+ base_t::swap( other);
+ }
+
+ using base_t::get_future;
+ using base_t::set_exception;
+};
+
+template<>
+class promise< void > : private detail::promise_base< void > {
+private:
+ typedef detail::promise_base< void > base_t;
+
+public:
+ promise() = default;
+
+ template< typename Allocator >
+ promise( std::allocator_arg_t, Allocator alloc) :
+ base_t{ std::allocator_arg, alloc } {
+ }
+
+ promise( promise const&) = delete;
+ promise & operator=( promise const&) = delete;
+
+ promise( promise && other) noexcept = default;
+ promise & operator=( promise && other) noexcept = default;
+
+ inline
+ void set_value() {
+ if ( ! base_t::future_) {
+ throw promise_uninitialized{};
+ }
+ base_t::future_->set_value();
+ }
+
+ inline
+ void swap( promise & other) noexcept {
+ base_t::swap( other);
+ }
+
+ using base_t::get_future;
+ using base_t::set_exception;
+};
+
+template< typename R >
+void swap( promise< R > & l, promise< R > & r) noexcept {
+ l.swap( r);
+}
+
+}}
+
+#endif // BOOST_FIBERS_PROMISE_HPP
diff --git a/boost/fiber/mutex.hpp b/boost/fiber/mutex.hpp
new file mode 100644
index 0000000000..b56e96802a
--- /dev/null
+++ b/boost/fiber/mutex.hpp
@@ -0,0 +1,70 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_MUTEX_H
+#define BOOST_FIBERS_MUTEX_H
+
+#include <boost/config.hpp>
+
+#include <boost/assert.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class condition_variable;
+
+class BOOST_FIBERS_DECL mutex {
+private:
+ friend class condition_variable;
+
+ typedef context::wait_queue_t wait_queue_t;
+
+ context * owner_{ nullptr };
+ wait_queue_t wait_queue_{};
+ detail::spinlock wait_queue_splk_{};
+
+public:
+ mutex() = default;
+
+ ~mutex() {
+ BOOST_ASSERT( nullptr == owner_);
+ BOOST_ASSERT( wait_queue_.empty() );
+ }
+
+ mutex( mutex const&) = delete;
+ mutex & operator=( mutex const&) = delete;
+
+ void lock();
+
+ bool try_lock();
+
+ void unlock();
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_MUTEX_H
diff --git a/boost/fiber/operations.hpp b/boost/fiber/operations.hpp
new file mode 100644
index 0000000000..490ba462f6
--- /dev/null
+++ b/boost/fiber/operations.hpp
@@ -0,0 +1,92 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THIS_FIBER_OPERATIONS_H
+#define BOOST_THIS_FIBER_OPERATIONS_H
+
+#include <chrono>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/fiber.hpp>
+#include <boost/fiber/scheduler.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace this_fiber {
+
+inline
+fibers::fiber::id get_id() noexcept {
+ return fibers::context::active()->get_id();
+}
+
+inline
+void yield() noexcept {
+ fibers::context::active()->yield();
+}
+
+template< typename Clock, typename Duration >
+void sleep_until( std::chrono::time_point< Clock, Duration > const& sleep_time_) {
+ std::chrono::steady_clock::time_point sleep_time(
+ boost::fibers::detail::convert( sleep_time_) );
+ fibers::context::active()->wait_until( sleep_time);
+}
+
+template< typename Rep, typename Period >
+void sleep_for( std::chrono::duration< Rep, Period > const& timeout_duration) {
+ fibers::context::active()->wait_until(
+ std::chrono::steady_clock::now() + timeout_duration);
+}
+
+template< typename PROPS >
+PROPS & properties() {
+ fibers::fiber_properties * props =
+ fibers::context::active()->get_properties();
+ if ( ! props) {
+ // props could be nullptr if the thread's main fiber has not yet
+ // yielded (not yet passed through algorithm_with_properties::
+ // awakened()). Address that by yielding right now.
+ yield();
+ // Try again to obtain the fiber_properties subclass instance ptr.
+ // Walk through the whole chain again because who knows WHAT might
+ // have happened while we were yielding!
+ props = fibers::context::active()->get_properties();
+ // Could still be hosed if the running manager isn't a subclass of
+ // algorithm_with_properties.
+ BOOST_ASSERT_MSG(props, "this_fiber::properties not set");
+ }
+ return dynamic_cast< PROPS & >( * props );
+}
+
+}
+
+namespace fibers {
+
+inline
+bool has_ready_fibers() noexcept {
+ return boost::fibers::context::active()->get_scheduler()->has_ready_fibers();
+}
+
+template< typename SchedAlgo, typename ... Args >
+void use_scheduling_algorithm( Args && ... args) noexcept {
+ boost::fibers::context::active()->get_scheduler()
+ ->set_algo(
+ std::unique_ptr< SchedAlgo >(
+ new SchedAlgo( std::forward< Args >( args) ... ) ) );
+}
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_THIS_FIBER_OPERATIONS_H
diff --git a/boost/fiber/policy.hpp b/boost/fiber/policy.hpp
new file mode 100644
index 0000000000..de82ff9e93
--- /dev/null
+++ b/boost/fiber/policy.hpp
@@ -0,0 +1,46 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_POLICY_H
+#define BOOST_FIBERS_POLICY_H
+
+#include <type_traits>
+
+#include <boost/config.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+enum class launch {
+ dispatch,
+ post
+};
+
+namespace detail {
+
+template< typename Fn >
+struct is_launch_policy : public std::false_type {
+};
+
+template<>
+struct is_launch_policy< boost::fibers::launch > : public std::true_type {
+};
+
+}
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_POLICY_H
diff --git a/boost/fiber/pooled_fixedsize_stack.hpp b/boost/fiber/pooled_fixedsize_stack.hpp
new file mode 100644
index 0000000000..24ea144793
--- /dev/null
+++ b/boost/fiber/pooled_fixedsize_stack.hpp
@@ -0,0 +1,30 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_POOLED_FIXEDSIZE_STACK_H
+#define BOOST_FIBERS_POOLED_FIXEDSIZE_STACK_H
+
+#include <boost/config.hpp>
+#include <boost/context/pooled_fixedsize_stack.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+using pooled_fixedsize_stack = boost::context::pooled_fixedsize_stack;
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_POOLED_FIXEDSIZE_STACK_H
diff --git a/boost/fiber/properties.hpp b/boost/fiber/properties.hpp
new file mode 100644
index 0000000000..09ac7405d6
--- /dev/null
+++ b/boost/fiber/properties.hpp
@@ -0,0 +1,79 @@
+// Copyright Nat Goodspeed 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Define fiber_properties, a base class from which a library consumer can
+// derive a subclass with specific properties important to a user-coded
+// scheduler.
+
+#ifndef BOOST_FIBERS_PROPERTIES_HPP
+#define BOOST_FIBERS_PROPERTIES_HPP
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4275)
+# endif
+
+namespace boost {
+namespace fibers {
+
+class context;
+
+namespace algo {
+
+struct algorithm;
+
+}
+
+class BOOST_FIBERS_DECL fiber_properties {
+protected:
+ // initialized by constructor
+ context * ctx_;
+ // set every time this fiber becomes READY
+ algo::algorithm * algo_{ nullptr };
+
+ // Inform the relevant algorithm instance that something important
+ // has changed, so it can (presumably) adjust its data structures
+ // accordingly.
+ void notify() noexcept;
+
+public:
+ // Any specific property setter method, after updating the relevant
+ // instance variable, can/should call notify().
+
+ // fiber_properties, and by implication every subclass, must accept a back
+ // pointer to its context.
+ fiber_properties( context * ctx) noexcept :
+ ctx_{ ctx } {
+ }
+
+ // We need a virtual destructor (hence a vtable) because fiber_properties
+ // is stored polymorphically (as fiber_properties*) in context, and
+ // destroyed via that pointer.
+ virtual ~fiber_properties() = default;
+
+ // not really intended for public use, but algorithm_with_properties
+ // must be able to call this
+ void set_algorithm( algo::algorithm * algo) noexcept {
+ algo_ = algo;
+ }
+};
+
+}} // namespace boost::fibers
+
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_PROPERTIES_HPP
diff --git a/boost/fiber/protected_fixedsize_stack.hpp b/boost/fiber/protected_fixedsize_stack.hpp
new file mode 100644
index 0000000000..f2c01ac1e2
--- /dev/null
+++ b/boost/fiber/protected_fixedsize_stack.hpp
@@ -0,0 +1,30 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_PROTECTED_FIXEDSIZE_STACK_H
+#define BOOST_FIBERS_PROTECTED_FIXEDSIZE_STACK_H
+
+#include <boost/config.hpp>
+#include <boost/context/protected_fixedsize_stack.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+using protected_fixedsize_stack = boost::context::protected_fixedsize_stack;
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_PROTECTED_FIXEDSIZE_STACK_H
diff --git a/boost/fiber/recursive_mutex.hpp b/boost/fiber/recursive_mutex.hpp
new file mode 100644
index 0000000000..66fb5aa7c3
--- /dev/null
+++ b/boost/fiber/recursive_mutex.hpp
@@ -0,0 +1,76 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// based on boost::interprocess::sync::interprocess_spinlock
+
+#ifndef BOOST_FIBERS_RECURSIVE_MUTEX_H
+#define BOOST_FIBERS_RECURSIVE_MUTEX_H
+
+#include <cstddef>
+
+#include <boost/config.hpp>
+
+#include <boost/assert.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class condition_variable;
+
+class BOOST_FIBERS_DECL recursive_mutex {
+private:
+ friend class condition_variable;
+
+ typedef context::wait_queue_t wait_queue_t;
+
+ context * owner_{ nullptr };
+ std::size_t count_{ 0 };
+ wait_queue_t wait_queue_{};
+ detail::spinlock wait_queue_splk_{};
+
+public:
+ recursive_mutex() = default;
+
+ ~recursive_mutex() {
+ BOOST_ASSERT( nullptr == owner_);
+ BOOST_ASSERT( 0 == count_);
+ BOOST_ASSERT( wait_queue_.empty() );
+ }
+
+ recursive_mutex( recursive_mutex const&) = delete;
+ recursive_mutex & operator=( recursive_mutex const&) = delete;
+
+ void lock();
+
+ bool try_lock() noexcept;
+
+ void unlock();
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_RECURSIVE_MUTEX_H
diff --git a/boost/fiber/recursive_timed_mutex.hpp b/boost/fiber/recursive_timed_mutex.hpp
new file mode 100644
index 0000000000..2852252cd0
--- /dev/null
+++ b/boost/fiber/recursive_timed_mutex.hpp
@@ -0,0 +1,92 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// based on boost::interprocess::sync::interprocess_spinlock
+
+#ifndef BOOST_FIBERS_RECURSIVE_TIMED_MUTEX_H
+#define BOOST_FIBERS_RECURSIVE_TIMED_MUTEX_H
+
+#include <chrono>
+#include <cstddef>
+
+#include <boost/config.hpp>
+
+#include <boost/assert.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class condition_variable;
+
+class BOOST_FIBERS_DECL recursive_timed_mutex {
+private:
+ friend class condition_variable;
+
+ typedef context::wait_queue_t wait_queue_t;
+
+ context * owner_{ nullptr };
+ std::size_t count_{ 0 };
+ wait_queue_t wait_queue_{};
+ detail::spinlock wait_queue_splk_{};
+
+ bool try_lock_until_( std::chrono::steady_clock::time_point const& timeout_time) noexcept;
+
+public:
+ recursive_timed_mutex() = default;
+
+ ~recursive_timed_mutex() {
+ BOOST_ASSERT( nullptr == owner_);
+ BOOST_ASSERT( 0 == count_);
+ BOOST_ASSERT( wait_queue_.empty() );
+ }
+
+ recursive_timed_mutex( recursive_timed_mutex const&) = delete;
+ recursive_timed_mutex & operator=( recursive_timed_mutex const&) = delete;
+
+ void lock();
+
+ bool try_lock() noexcept;
+
+ template< typename Clock, typename Duration >
+ bool try_lock_until( std::chrono::time_point< Clock, Duration > const& timeout_time_) {
+ std::chrono::steady_clock::time_point timeout_time(
+ detail::convert( timeout_time_) );
+ return try_lock_until_( timeout_time);
+ }
+
+ template< typename Rep, typename Period >
+ bool try_lock_for( std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return try_lock_until_( std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ void unlock();
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_RECURSIVE_TIMED_MUTEX_H
diff --git a/boost/fiber/scheduler.hpp b/boost/fiber/scheduler.hpp
new file mode 100644
index 0000000000..0b61f01d85
--- /dev/null
+++ b/boost/fiber/scheduler.hpp
@@ -0,0 +1,153 @@
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_FIBER_MANAGER_H
+#define BOOST_FIBERS_FIBER_MANAGER_H
+
+#include <chrono>
+#include <functional>
+#include <memory>
+#include <mutex>
+#include <vector>
+
+#include <boost/config.hpp>
+#include <boost/context/execution_context.hpp>
+#include <boost/intrusive/list.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/intrusive/set.hpp>
+
+#include <boost/fiber/algo/algorithm.hpp>
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/data.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class BOOST_FIBERS_DECL scheduler {
+public:
+ struct timepoint_less {
+ bool operator()( context const& l, context const& r) const noexcept {
+ return l.tp_ < r.tp_;
+ }
+ };
+
+ typedef intrusive::list<
+ context,
+ intrusive::member_hook<
+ context, detail::ready_hook, & context::ready_hook_ >,
+ intrusive::constant_time_size< false > > ready_queue_t;
+private:
+ typedef std::vector< context * > remote_ready_queue_t;
+ typedef intrusive::set<
+ context,
+ intrusive::member_hook<
+ context, detail::sleep_hook, & context::sleep_hook_ >,
+ intrusive::constant_time_size< false >,
+ intrusive::compare< timepoint_less > > sleep_queue_t;
+ typedef intrusive::list<
+ context,
+ intrusive::member_hook<
+ context, detail::terminated_hook, & context::terminated_hook_ >,
+ intrusive::constant_time_size< false > > terminated_queue_t;
+ typedef intrusive::list<
+ context,
+ intrusive::member_hook<
+ context, detail::worker_hook, & context::worker_hook_ >,
+ intrusive::constant_time_size< false > > worker_queue_t;
+
+ std::unique_ptr< algo::algorithm > algo_;
+ context * main_ctx_{ nullptr };
+ intrusive_ptr< context > dispatcher_ctx_{};
+ // worker-queue contains all context' mananged by this scheduler
+ // except main-context and dispatcher-context
+ // unlink happens on destruction of a context
+ worker_queue_t worker_queue_{};
+ // terminated-queue contains context' which have been terminated
+ terminated_queue_t terminated_queue_{};
+ // remote ready-queue contains context' signaled by schedulers
+ // running in other threads
+ remote_ready_queue_t remote_ready_queue_{};
+ // sleep-queue cotnains context' whic hahve been called
+ // scheduler::wait_until()
+ sleep_queue_t sleep_queue_{};
+ bool shutdown_{ false };
+ std::mutex remote_ready_mtx_{};
+
+ context * get_next_() noexcept;
+
+ void release_terminated_() noexcept;
+
+ void remote_ready2ready_() noexcept;
+
+ void sleep2ready_() noexcept;
+
+public:
+ scheduler() noexcept;
+
+ scheduler( scheduler const&) = delete;
+ scheduler & operator=( scheduler const&) = delete;
+
+ virtual ~scheduler();
+
+ void set_ready( context *) noexcept;
+
+ void set_remote_ready( context *) noexcept;
+
+#if (BOOST_EXECUTION_CONTEXT==1)
+ void dispatch() noexcept;
+
+ void set_terminated( context *) noexcept;
+#else
+ boost::context::execution_context< detail::data_t * > dispatch() noexcept;
+
+ boost::context::execution_context< detail::data_t * > set_terminated( context *) noexcept;
+#endif
+
+ void yield( context *) noexcept;
+
+ bool wait_until( context *,
+ std::chrono::steady_clock::time_point const&) noexcept;
+ bool wait_until( context *,
+ std::chrono::steady_clock::time_point const&,
+ detail::spinlock_lock &) noexcept;
+
+ void suspend() noexcept;
+ void suspend( detail::spinlock_lock &) noexcept;
+
+ bool has_ready_fibers() const noexcept;
+
+ void set_algo( std::unique_ptr< algo::algorithm >) noexcept;
+
+ void attach_main_context( context *) noexcept;
+
+ void attach_dispatcher_context( intrusive_ptr< context >) noexcept;
+
+ void attach_worker_context( context *) noexcept;
+
+ void detach_worker_context( context *) noexcept;
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_FIBER_MANAGER_H
diff --git a/boost/fiber/segmented_stack.hpp b/boost/fiber/segmented_stack.hpp
new file mode 100644
index 0000000000..868ddf4acd
--- /dev/null
+++ b/boost/fiber/segmented_stack.hpp
@@ -0,0 +1,35 @@
+
+// Copyright Oliver Kowalke 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_SEGMENTED_STACK_H
+#define BOOST_FIBERS_SEGMENTED_STACK_H
+
+#include <boost/config.hpp>
+#include <boost/context/segmented_stack.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+#if defined(BOOST_USE_SEGMENTED_STACKS)
+# if ! defined(BOOST_WINDOWS)
+using segmented_stack = boost::context::segmented_stack;
+using default_stack = boost::context::default_stack;
+# endif
+#endif
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_SEGMENTED_STACK_H
diff --git a/boost/fiber/timed_mutex.hpp b/boost/fiber/timed_mutex.hpp
new file mode 100644
index 0000000000..ed6dbd458e
--- /dev/null
+++ b/boost/fiber/timed_mutex.hpp
@@ -0,0 +1,86 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_TIMED_MUTEX_H
+#define BOOST_FIBERS_TIMED_MUTEX_H
+
+#include <chrono>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+
+#include <boost/fiber/context.hpp>
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif
+
+namespace boost {
+namespace fibers {
+
+class condition_variable;
+
+class BOOST_FIBERS_DECL timed_mutex {
+private:
+ friend class condition_variable;
+
+ typedef context::wait_queue_t wait_queue_t;
+
+ context * owner_{ nullptr };
+ wait_queue_t wait_queue_{};
+ detail::spinlock wait_queue_splk_{};
+
+ bool try_lock_until_( std::chrono::steady_clock::time_point const& timeout_time) noexcept;
+
+public:
+ timed_mutex() = default;
+
+ ~timed_mutex() {
+ BOOST_ASSERT( nullptr == owner_);
+ BOOST_ASSERT( wait_queue_.empty() );
+ }
+
+ timed_mutex( timed_mutex const&) = delete;
+ timed_mutex & operator=( timed_mutex const&) = delete;
+
+ void lock();
+
+ bool try_lock();
+
+ template< typename Clock, typename Duration >
+ bool try_lock_until( std::chrono::time_point< Clock, Duration > const& timeout_time_) {
+ std::chrono::steady_clock::time_point timeout_time(
+ detail::convert( timeout_time_) );
+ return try_lock_until_( timeout_time);
+ }
+
+ template< typename Rep, typename Period >
+ bool try_lock_for( std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return try_lock_until_( std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ void unlock();
+};
+
+}}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_TIMED_MUTEX_H
diff --git a/boost/fiber/type.hpp b/boost/fiber/type.hpp
new file mode 100644
index 0000000000..9346265856
--- /dev/null
+++ b/boost/fiber/type.hpp
@@ -0,0 +1,108 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_FIBERS_TYPE_H
+#define BOOST_FIBERS_TYPE_H
+
+#include <atomic>
+#include <chrono>
+#include <exception>
+#include <functional>
+#include <map>
+#include <memory>
+#include <type_traits>
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/context/detail/apply.hpp>
+#include <boost/context/execution_context.hpp>
+#include <boost/context/stack_context.hpp>
+#include <boost/intrusive/list.hpp>
+#include <boost/intrusive/parent_from_member.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/intrusive/set.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/detail/data.hpp>
+#include <boost/fiber/detail/decay_copy.hpp>
+#include <boost/fiber/detail/fss.hpp>
+#include <boost/fiber/detail/spinlock.hpp>
+#include <boost/fiber/detail/wrap.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/fixedsize_stack.hpp>
+#include <boost/fiber/properties.hpp>
+#include <boost/fiber/segmented_stack.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+enum class type {
+ none = 0,
+ main_context = 1 << 1,
+ dispatcher_context = 1 << 2,
+ worker_context = 1 << 3,
+ pinned_context = main_context | dispatcher_context
+};
+
+inline
+constexpr type
+operator&( type l, type r) {
+ return static_cast< type >(
+ static_cast< unsigned int >( l) & static_cast< unsigned int >( r) );
+}
+
+inline
+constexpr type
+operator|( type l, type r) {
+ return static_cast< type >(
+ static_cast< unsigned int >( l) | static_cast< unsigned int >( r) );
+}
+
+inline
+constexpr type
+operator^( type l, type r) {
+ return static_cast< type >(
+ static_cast< unsigned int >( l) ^ static_cast< unsigned int >( r) );
+}
+
+inline
+constexpr type
+operator~( type l) {
+ return static_cast< type >( ~static_cast< unsigned int >( l) );
+}
+
+inline
+type &
+operator&=( type & l, type r) {
+ l = l & r;
+ return l;
+}
+
+inline
+type &
+operator|=( type & l, type r) {
+ l = l | r;
+ return l;
+}
+
+inline
+type &
+operator^=( type & l, type r) {
+ l = l ^ r;
+ return l;
+}
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_TYPE_H
diff --git a/boost/fiber/unbounded_channel.hpp b/boost/fiber/unbounded_channel.hpp
new file mode 100644
index 0000000000..58c966080f
--- /dev/null
+++ b/boost/fiber/unbounded_channel.hpp
@@ -0,0 +1,270 @@
+
+// Copyright Oliver Kowalke 2013.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_FIBERS_UNBOUNDED_CHANNEL_H
+#define BOOST_FIBERS_UNBOUNDED_CHANNEL_H
+
+#include <atomic>
+#include <algorithm>
+#include <chrono>
+#include <cstddef>
+#include <deque>
+#include <memory>
+#include <mutex>
+#include <utility>
+
+#include <boost/config.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#include <boost/fiber/detail/config.hpp>
+#include <boost/fiber/channel_op_status.hpp>
+#include <boost/fiber/condition_variable.hpp>
+#include <boost/fiber/detail/convert.hpp>
+#include <boost/fiber/exceptions.hpp>
+#include <boost/fiber/mutex.hpp>
+#include <boost/fiber/operations.hpp>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace fibers {
+
+template< typename T,
+ typename Allocator = std::allocator< T >
+>
+class unbounded_channel {
+public:
+ typedef T value_type;
+
+private:
+ struct node {
+ typedef intrusive_ptr< node > ptr_t;
+ typedef typename std::allocator_traits< Allocator >::template rebind_alloc<
+ node
+ > allocator_t;
+ typedef std::allocator_traits< allocator_t > allocator_traits_t;
+
+#if ! defined(BOOST_FIBERS_NO_ATOMICS)
+ std::atomic< std::size_t > use_count{ 0 };
+#else
+ std::size_t use_count{ 0 };
+#endif
+ allocator_t alloc;
+ T va;
+ ptr_t nxt{};
+
+ node( T const& t, allocator_t const& alloc_) noexcept :
+ alloc{ alloc_ },
+ va{ t } {
+ }
+
+ node( T && t, allocator_t const& alloc_) noexcept :
+ alloc{ alloc_ },
+ va{ std::move( t) } {
+ }
+
+ friend
+ void intrusive_ptr_add_ref( node * p) noexcept {
+ ++p->use_count;
+ }
+
+ friend
+ void intrusive_ptr_release( node * p) noexcept {
+ if ( 0 == --p->use_count) {
+ allocator_t alloc( p->alloc);
+ allocator_traits_t::destroy( alloc, p);
+ allocator_traits_t::deallocate( alloc, p, 1);
+ }
+ }
+ };
+
+ using ptr_t = typename node::ptr_t;
+ using allocator_t = typename node::allocator_t;
+ using allocator_traits_t = typename node::allocator_traits_t;
+
+ enum class queue_status {
+ open = 0,
+ closed
+ };
+
+ allocator_t alloc_;
+ queue_status state_{ queue_status::open };
+ ptr_t head_{};
+ ptr_t * tail_;
+ mutable mutex mtx_{};
+ condition_variable not_empty_cond_{};
+
+ bool is_closed_() const noexcept {
+ return queue_status::closed == state_;
+ }
+
+ void close_( std::unique_lock< mutex > & lk) noexcept {
+ state_ = queue_status::closed;
+ lk.unlock();
+ not_empty_cond_.notify_all();
+ }
+
+ bool is_empty_() const noexcept {
+ return ! head_;
+ }
+
+ channel_op_status push_( ptr_t new_node,
+ std::unique_lock< mutex > & lk) noexcept {
+ if ( is_closed_() ) {
+ return channel_op_status::closed;
+ }
+ return push_and_notify_( new_node, lk);
+ }
+
+ channel_op_status push_and_notify_( ptr_t new_node,
+ std::unique_lock< mutex > & lk) noexcept {
+ push_tail_( new_node);
+ lk.unlock();
+ not_empty_cond_.notify_one();
+ return channel_op_status::success;
+ }
+
+ void push_tail_( ptr_t new_node) noexcept {
+ * tail_ = new_node;
+ tail_ = & new_node->nxt;
+ }
+
+ value_type value_pop_( std::unique_lock< mutex > & lk) {
+ BOOST_ASSERT( ! is_empty_() );
+ auto old_head = pop_head_();
+ return std::move( old_head->va);
+ }
+
+ ptr_t pop_head_() noexcept {
+ auto old_head = head_;
+ head_ = old_head->nxt;
+ if ( ! head_) {
+ tail_ = & head_;
+ }
+ old_head->nxt.reset();
+ return old_head;
+ }
+
+public:
+ explicit unbounded_channel( Allocator const& alloc = Allocator() ) noexcept :
+ alloc_{ alloc },
+ tail_{ & head_ } {
+ }
+
+ unbounded_channel( unbounded_channel const&) = delete;
+ unbounded_channel & operator=( unbounded_channel const&) = delete;
+
+ void close() noexcept {
+ std::unique_lock< mutex > lk( mtx_);
+ close_( lk);
+ }
+
+ channel_op_status push( value_type const& va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct( alloc_, ptr, va, alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_( { detail::convert( ptr) }, lk);
+ }
+
+ channel_op_status push( value_type && va) {
+ typename allocator_traits_t::pointer ptr{
+ allocator_traits_t::allocate( alloc_, 1) };
+ try {
+ allocator_traits_t::construct(
+ alloc_, ptr, std::move( va), alloc_);
+ } catch (...) {
+ allocator_traits_t::deallocate( alloc_, ptr, 1);
+ throw;
+ }
+ std::unique_lock< mutex > lk( mtx_);
+ return push_( { detail::convert( ptr) }, lk);
+ }
+
+ channel_op_status pop( value_type & va) {
+ std::unique_lock< mutex > lk( mtx_);
+ not_empty_cond_.wait( lk,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ });
+ if ( is_closed_() && is_empty_() ) {
+ return channel_op_status::closed;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+
+ value_type value_pop() {
+ std::unique_lock< mutex > lk( mtx_);
+ not_empty_cond_.wait( lk,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ });
+ if ( is_closed_() && is_empty_() ) {
+ throw fiber_error(
+ std::make_error_code( std::errc::operation_not_permitted),
+ "boost fiber: queue is closed");
+ }
+ return value_pop_( lk);
+ }
+
+ channel_op_status try_pop( value_type & va) {
+ std::unique_lock< mutex > lk( mtx_);
+ if ( is_closed_() && is_empty_() ) {
+ // let other fibers run
+ lk.unlock();
+ this_fiber::yield();
+ return channel_op_status::closed;
+ }
+ if ( is_empty_() ) {
+ // let other fibers run
+ lk.unlock();
+ this_fiber::yield();
+ return channel_op_status::empty;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+
+ template< typename Rep, typename Period >
+ channel_op_status pop_wait_for( value_type & va,
+ std::chrono::duration< Rep, Period > const& timeout_duration) {
+ return pop_wait_until( va, std::chrono::steady_clock::now() + timeout_duration);
+ }
+
+ template< typename Clock, typename Duration >
+ channel_op_status pop_wait_until( value_type & va,
+ std::chrono::time_point< Clock, Duration > const& timeout_time) {
+ std::unique_lock< mutex > lk( mtx_);
+ if ( ! not_empty_cond_.wait_until( lk, timeout_time,
+ [this](){
+ return is_closed_() || ! is_empty_();
+ })) {
+ return channel_op_status::timeout;
+ }
+ if ( is_closed_() && is_empty_() ) {
+ return channel_op_status::closed;
+ }
+ va = value_pop_( lk);
+ return channel_op_status::success;
+ }
+};
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // BOOST_FIBERS_UNBOUNDED_CHANNEL_H
diff --git a/boost/format/parsing.hpp b/boost/format/parsing.hpp
index 04ddf368e1..bfddfef761 100644
--- a/boost/format/parsing.hpp
+++ b/boost/format/parsing.hpp
@@ -19,6 +19,7 @@
#include <boost/format/exceptions.hpp>
#include <boost/throw_exception.hpp>
#include <boost/assert.hpp>
+#include <boost/config.hpp>
namespace boost {
@@ -267,6 +268,7 @@ namespace detail {
switch ( wrap_narrow(fac, *start, 0) ) {
case 'X':
fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ BOOST_FALLTHROUGH;
case 'p': // pointer => set hex.
case 'x':
fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
@@ -280,6 +282,7 @@ namespace detail {
case 'E':
fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ BOOST_FALLTHROUGH;
case 'e':
fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
fpar->fmtstate_.flags_ |= std::ios_base::scientific;
@@ -291,6 +294,7 @@ namespace detail {
case 'f':
fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
fpar->fmtstate_.flags_ |= std::ios_base::fixed;
+ BOOST_FALLTHROUGH;
case 'u':
case 'd':
case 'i':
diff --git a/boost/function/function_base.hpp b/boost/function/function_base.hpp
index 35c1995ece..21a0c0da7f 100644
--- a/boost/function/function_base.hpp
+++ b/boost/function/function_base.hpp
@@ -16,9 +16,9 @@
#include <memory>
#include <new>
#include <boost/config.hpp>
-#include <boost/detail/sp_typeinfo.hpp>
#include <boost/assert.hpp>
#include <boost/integer.hpp>
+#include <boost/type_index.hpp>
#include <boost/type_traits/has_trivial_copy.hpp>
#include <boost/type_traits/has_trivial_destructor.hpp>
#include <boost/type_traits/is_const.hpp>
@@ -41,28 +41,6 @@
# pragma warning( push )
# pragma warning( disable : 4793 ) // complaint about native code generation
# pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif
-
-// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
-#ifdef BOOST_NO_STD_TYPEINFO
-// Embedded VC++ does not have type_info in namespace std
-# define BOOST_FUNCTION_STD_NS
-#else
-# define BOOST_FUNCTION_STD_NS std
-#endif
-
-// Borrowed from Boost.Python library: determines the cases where we
-// need to use std::type_info::name to compare instead of operator==.
-#if defined( BOOST_NO_TYPEID )
-# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
-#elif defined(__GNUC__) \
- || defined(_AIX) \
- || ( defined(__sgi) && defined(__host_mips))
-# include <cstring>
-# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \
- (std::strcmp((X).name(),(Y).name()) == 0)
-# else
-# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
#endif
#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
@@ -87,15 +65,16 @@ namespace boost {
* object pointers, and a structure that resembles a bound
* member function pointer.
*/
- union function_buffer
+ union function_buffer_members
{
// For pointers to function objects
- mutable void* obj_ptr;
+ typedef void* obj_ptr_t;
+ mutable obj_ptr_t obj_ptr;
// For pointers to std::type_info objects
struct type_t {
// (get_functor_type_tag, check_functor_type_tag).
- const detail::sp_typeinfo* type;
+ const boost::typeindex::type_info* type;
// Whether the type is const-qualified.
bool const_qualified;
@@ -104,7 +83,8 @@ namespace boost {
} type;
// For function pointers of all kinds
- mutable void (*func_ptr)();
+ typedef void (*func_ptr_t)();
+ mutable func_ptr_t func_ptr;
// For bound member pointers
struct bound_memfunc_ptr_t {
@@ -119,9 +99,15 @@ namespace boost {
bool is_const_qualified;
bool is_volatile_qualified;
} obj_ref;
+ };
+
+ union function_buffer
+ {
+ // Type-specific union members
+ mutable function_buffer_members members;
// To relax aliasing constraints
- mutable char data;
+ mutable char data[sizeof(function_buffer_members)];
};
/**
@@ -188,45 +174,42 @@ namespace boost {
struct reference_manager
{
static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op)
{
switch (op) {
- case clone_functor_tag:
- out_buffer.obj_ref = in_buffer.obj_ref;
+ case clone_functor_tag:
+ out_buffer.members.obj_ref = in_buffer.members.obj_ref;
return;
case move_functor_tag:
- out_buffer.obj_ref = in_buffer.obj_ref;
- in_buffer.obj_ref.obj_ptr = 0;
+ out_buffer.members.obj_ref = in_buffer.members.obj_ref;
+ in_buffer.members.obj_ref.obj_ptr = 0;
return;
case destroy_functor_tag:
- out_buffer.obj_ref.obj_ptr = 0;
+ out_buffer.members.obj_ref.obj_ptr = 0;
return;
case check_functor_type_tag:
{
- const detail::sp_typeinfo& check_type
- = *out_buffer.type.type;
-
// Check whether we have the same type. We can add
// cv-qualifiers, but we can't take them away.
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F))
- && (!in_buffer.obj_ref.is_const_qualified
- || out_buffer.type.const_qualified)
- && (!in_buffer.obj_ref.is_volatile_qualified
- || out_buffer.type.volatile_qualified))
- out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr;
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
+ && (!in_buffer.members.obj_ref.is_const_qualified
+ || out_buffer.members.type.const_qualified)
+ && (!in_buffer.members.obj_ref.is_volatile_qualified
+ || out_buffer.members.type.volatile_qualified))
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ref.obj_ptr;
else
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
}
return;
case get_functor_type_tag:
- out_buffer.type.type = &BOOST_SP_TYPEID(F);
- out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified;
- out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified;
+ out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
+ out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
+ out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
return;
}
}
@@ -240,9 +223,9 @@ namespace boost {
struct function_allows_small_object_optimization
{
BOOST_STATIC_CONSTANT
- (bool,
+ (bool,
value = ((sizeof(F) <= sizeof(function_buffer) &&
- (alignment_of<function_buffer>::value
+ (alignment_of<function_buffer>::value
% alignment_of<F>::value == 0))));
};
@@ -254,7 +237,7 @@ namespace boost {
A(a)
{
}
-
+
functor_wrapper(const functor_wrapper& f) :
F(static_cast<const F&>(f)),
A(static_cast<const A&>(f))
@@ -273,61 +256,57 @@ namespace boost {
// Function pointers
static inline void
- manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op)
{
if (op == clone_functor_tag)
- out_buffer.func_ptr = in_buffer.func_ptr;
+ out_buffer.members.func_ptr = in_buffer.members.func_ptr;
else if (op == move_functor_tag) {
- out_buffer.func_ptr = in_buffer.func_ptr;
- in_buffer.func_ptr = 0;
+ out_buffer.members.func_ptr = in_buffer.members.func_ptr;
+ in_buffer.members.func_ptr = 0;
} else if (op == destroy_functor_tag)
- out_buffer.func_ptr = 0;
+ out_buffer.members.func_ptr = 0;
else if (op == check_functor_type_tag) {
- const boost::detail::sp_typeinfo& check_type
- = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
- out_buffer.obj_ptr = &in_buffer.func_ptr;
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
else
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
}
}
// Function objects that fit in the small-object buffer.
static inline void
- manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op)
{
if (op == clone_functor_tag || op == move_functor_tag) {
- const functor_type* in_functor =
- reinterpret_cast<const functor_type*>(&in_buffer.data);
- new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
+ const functor_type* in_functor =
+ reinterpret_cast<const functor_type*>(in_buffer.data);
+ new (reinterpret_cast<void*>(out_buffer.data)) functor_type(*in_functor);
if (op == move_functor_tag) {
- functor_type* f = reinterpret_cast<functor_type*>(&in_buffer.data);
+ functor_type* f = reinterpret_cast<functor_type*>(in_buffer.data);
(void)f; // suppress warning about the value of f not being used (MSVC)
f->~Functor();
}
} else if (op == destroy_functor_tag) {
// Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
- functor_type* f = reinterpret_cast<functor_type*>(&out_buffer.data);
+ functor_type* f = reinterpret_cast<functor_type*>(out_buffer.data);
(void)f; // suppress warning about the value of f not being used (MSVC)
f->~Functor();
} else if (op == check_functor_type_tag) {
- const detail::sp_typeinfo& check_type
- = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
- out_buffer.obj_ptr = &in_buffer.data;
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.data;
else
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
}
}
};
@@ -340,7 +319,7 @@ namespace boost {
// Function pointers
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, function_ptr_tag)
{
functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
@@ -348,15 +327,15 @@ namespace boost {
// Function objects that fit in the small-object buffer.
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, mpl::true_)
{
functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
}
-
+
// Function objects that require heap allocation
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, mpl::false_)
{
if (op == clone_functor_tag) {
@@ -366,29 +345,27 @@ namespace boost {
// jewillco: Changing this to static_cast because GCC 2.95.3 is
// obsolete.
const functor_type* f =
- static_cast<const functor_type*>(in_buffer.obj_ptr);
+ static_cast<const functor_type*>(in_buffer.members.obj_ptr);
functor_type* new_f = new functor_type(*f);
- out_buffer.obj_ptr = new_f;
+ out_buffer.members.obj_ptr = new_f;
} else if (op == move_functor_tag) {
- out_buffer.obj_ptr = in_buffer.obj_ptr;
- in_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ in_buffer.members.obj_ptr = 0;
} else if (op == destroy_functor_tag) {
/* Cast from the void pointer to the functor pointer type */
functor_type* f =
- static_cast<functor_type*>(out_buffer.obj_ptr);
+ static_cast<functor_type*>(out_buffer.members.obj_ptr);
delete f;
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
- const detail::sp_typeinfo& check_type
- = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
- out_buffer.obj_ptr = in_buffer.obj_ptr;
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
else
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
}
}
@@ -396,7 +373,7 @@ namespace boost {
// object can use the small-object optimization buffer or
// whether we need to allocate it on the heap.
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, function_obj_tag)
{
manager(in_buffer, out_buffer, op,
@@ -405,7 +382,7 @@ namespace boost {
// For member pointers, we use the small-object optimization buffer.
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, member_ptr_tag)
{
manager(in_buffer, out_buffer, op, mpl::true_());
@@ -415,15 +392,15 @@ namespace boost {
/* Dispatch to an appropriate manager based on whether we have a
function pointer or a function object pointer. */
static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op)
{
typedef typename get_function_tag<functor_type>::type tag_type;
switch (op) {
case get_functor_type_tag:
- out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
return;
default:
@@ -441,7 +418,7 @@ namespace boost {
// Function pointers
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, function_ptr_tag)
{
functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
@@ -449,15 +426,15 @@ namespace boost {
// Function objects that fit in the small-object buffer.
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, mpl::true_)
{
functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
}
-
+
// Function objects that require heap allocation
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, mpl::false_)
{
typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
@@ -470,36 +447,34 @@ namespace boost {
// GCC 2.95.3 gets the CV qualifiers wrong here, so we
// can't do the static_cast that we should do.
const functor_wrapper_type* f =
- static_cast<const functor_wrapper_type*>(in_buffer.obj_ptr);
+ static_cast<const functor_wrapper_type*>(in_buffer.members.obj_ptr);
wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
wrapper_allocator.construct(copy, *f);
// Get back to the original pointer type
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
- out_buffer.obj_ptr = new_f;
+ out_buffer.members.obj_ptr = new_f;
} else if (op == move_functor_tag) {
- out_buffer.obj_ptr = in_buffer.obj_ptr;
- in_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ in_buffer.members.obj_ptr = 0;
} else if (op == destroy_functor_tag) {
/* Cast from the void pointer to the functor_wrapper_type */
functor_wrapper_type* victim =
- static_cast<functor_wrapper_type*>(in_buffer.obj_ptr);
+ static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
wrapper_allocator.destroy(victim);
wrapper_allocator.deallocate(victim,1);
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
- const detail::sp_typeinfo& check_type
- = *out_buffer.type.type;
- if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
- out_buffer.obj_ptr = in_buffer.obj_ptr;
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
else
- out_buffer.obj_ptr = 0;
+ out_buffer.members.obj_ptr = 0;
} else /* op == get_functor_type_tag */ {
- out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
}
}
@@ -507,7 +482,7 @@ namespace boost {
// object can use the small-object optimization buffer or
// whether we need to allocate it on the heap.
static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op, function_obj_tag)
{
manager(in_buffer, out_buffer, op,
@@ -518,15 +493,15 @@ namespace boost {
/* Dispatch to an appropriate manager based on whether we have a
function pointer or a function object pointer. */
static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
functor_manager_operation_type op)
{
typedef typename get_function_tag<functor_type>::type tag_type;
switch (op) {
case get_functor_type_tag:
- out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
- out_buffer.type.const_qualified = false;
- out_buffer.type.volatile_qualified = false;
+ out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
return;
default:
@@ -604,8 +579,8 @@ namespace boost {
*/
struct vtable_base
{
- void (*manager)(const function_buffer& in_buffer,
- function_buffer& out_buffer,
+ void (*manager)(const function_buffer& in_buffer,
+ function_buffer& out_buffer,
functor_manager_operation_type op);
};
} // end namespace function
@@ -625,15 +600,15 @@ public:
/** Determine if the function is empty (i.e., has no target). */
bool empty() const { return !vtable; }
- /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void)
+ /** Retrieve the type of the stored function object, or type_id<void>()
if this is empty. */
- const detail::sp_typeinfo& target_type() const
+ const boost::typeindex::type_info& target_type() const
{
- if (!vtable) return BOOST_SP_TYPEID(void);
+ if (!vtable) return boost::typeindex::type_id<void>().type_info();
detail::function::function_buffer type;
get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
- return *type.type.type;
+ return *type.members.type.type;
}
template<typename Functor>
@@ -642,12 +617,12 @@ public:
if (!vtable) return 0;
detail::function::function_buffer type_result;
- type_result.type.type = &BOOST_SP_TYPEID(Functor);
- type_result.type.const_qualified = is_const<Functor>::value;
- type_result.type.volatile_qualified = is_volatile<Functor>::value;
- get_vtable()->manager(functor, type_result,
+ type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.const_qualified = is_const<Functor>::value;
+ type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
detail::function::check_functor_type_tag);
- return static_cast<Functor*>(type_result.obj_ptr);
+ return static_cast<Functor*>(type_result.members.obj_ptr);
}
template<typename Functor>
@@ -656,14 +631,14 @@ public:
if (!vtable) return 0;
detail::function::function_buffer type_result;
- type_result.type.type = &BOOST_SP_TYPEID(Functor);
- type_result.type.const_qualified = true;
- type_result.type.volatile_qualified = is_volatile<Functor>::value;
- get_vtable()->manager(functor, type_result,
+ type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.const_qualified = true;
+ type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
detail::function::check_functor_type_tag);
// GCC 2.95.3 gets the CV qualifiers wrong here, so we
// can't do the static_cast that we should do.
- return static_cast<const Functor*>(type_result.obj_ptr);
+ return static_cast<const Functor*>(type_result.members.obj_ptr);
}
template<typename F>
@@ -883,10 +858,9 @@ namespace detail {
} // end namespace boost
#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
-#undef BOOST_FUNCTION_COMPARE_TYPE_ID
#if defined(BOOST_MSVC)
# pragma warning( pop )
-#endif
+#endif
#endif // BOOST_FUNCTION_BASE_HEADER
diff --git a/boost/function/function_template.hpp b/boost/function/function_template.hpp
index 211b81dbe3..82c81d7697 100644
--- a/boost/function/function_template.hpp
+++ b/boost/function/function_template.hpp
@@ -16,7 +16,7 @@
#if defined(BOOST_MSVC)
# pragma warning( push )
# pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif
+#endif
#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
@@ -97,7 +97,7 @@ namespace boost {
static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
BOOST_FUNCTION_PARMS)
{
- FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
return f(BOOST_FUNCTION_ARGS);
}
};
@@ -114,7 +114,7 @@ namespace boost {
BOOST_FUNCTION_PARMS)
{
- FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));
}
};
@@ -132,9 +132,9 @@ namespace boost {
{
FunctionObj* f;
if (function_allows_small_object_optimization<FunctionObj>::value)
- f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
else
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
return (*f)(BOOST_FUNCTION_ARGS);
}
};
@@ -153,9 +153,9 @@ namespace boost {
{
FunctionObj* f;
if (function_allows_small_object_optimization<FunctionObj>::value)
- f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
else
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
}
};
@@ -171,8 +171,8 @@ namespace boost {
BOOST_FUNCTION_PARMS)
{
- FunctionObj* f =
- reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
return (*f)(BOOST_FUNCTION_ARGS);
}
};
@@ -189,8 +189,8 @@ namespace boost {
BOOST_FUNCTION_PARMS)
{
- FunctionObj* f =
- reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
}
};
@@ -208,8 +208,8 @@ namespace boost {
BOOST_FUNCTION_PARMS)
{
- MemberPtr* f =
- reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
}
};
@@ -226,8 +226,8 @@ namespace boost {
BOOST_FUNCTION_PARMS)
{
- MemberPtr* f =
- reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
}
};
@@ -322,7 +322,7 @@ namespace boost {
/* Given the tag returned by get_function_tag, retrieve the
actual invoker that will be used for the given function
- object.
+ object.
Each specialization contains an "apply" nested class template
that accepts the function object, return type, function
@@ -513,21 +513,21 @@ namespace boost {
private:
// Function pointers
template<typename FunctionPtr>
- bool
+ bool
assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
{
this->clear(functor);
if (f) {
// should be a reinterpret cast, but some compilers insist
// on giving cv-qualifiers to free functions
- functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ functor.members.func_ptr = reinterpret_cast<void (*)()>(f);
return true;
} else {
return false;
}
}
template<typename FunctionPtr,typename Allocator>
- bool
+ bool
assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
{
return assign_to(f,functor,function_ptr_tag());
@@ -566,13 +566,13 @@ namespace boost {
// Function objects
// Assign to a function object using the small object optimization
template<typename FunctionObj>
- void
+ void
assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
{
- new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ new (reinterpret_cast<void*>(functor.data)) FunctionObj(f);
}
template<typename FunctionObj,typename Allocator>
- void
+ void
assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
{
assign_functor(f,functor,mpl::true_());
@@ -580,13 +580,13 @@ namespace boost {
// Assign to a function object allocated on the heap.
template<typename FunctionObj>
- void
+ void
assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
{
- functor.obj_ptr = new FunctionObj(f);
+ functor.members.obj_ptr = new FunctionObj(f);
}
template<typename FunctionObj,typename Allocator>
- void
+ void
assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
{
typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
@@ -597,15 +597,15 @@ namespace boost {
wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
- functor.obj_ptr = new_f;
+ functor.members.obj_ptr = new_f;
}
template<typename FunctionObj>
- bool
+ bool
assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
{
if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
- assign_functor(f, functor,
+ assign_functor(f, functor,
mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
return true;
} else {
@@ -613,7 +613,7 @@ namespace boost {
}
}
template<typename FunctionObj,typename Allocator>
- bool
+ bool
assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
{
if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
@@ -627,18 +627,18 @@ namespace boost {
// Reference to a function object
template<typename FunctionObj>
- bool
- assign_to(const reference_wrapper<FunctionObj>& f,
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
function_buffer& functor, function_obj_ref_tag) const
{
- functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
- functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
- functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.members.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.members.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
return true;
}
template<typename FunctionObj,typename Allocator>
- bool
- assign_to_a(const reference_wrapper<FunctionObj>& f,
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
function_buffer& functor, Allocator, function_obj_ref_tag) const
{
return assign_to(f,functor,function_obj_ref_tag());
@@ -752,14 +752,14 @@ namespace boost {
{
this->assign_to_own(f);
}
-
+
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
{
this->move_assign(f);
}
#endif
-
+
~BOOST_FUNCTION_FUNCTION() { clear(); }
result_type operator()(BOOST_FUNCTION_PARMS) const
@@ -840,12 +840,11 @@ namespace boost {
BOOST_CATCH_END
return *this;
}
-
+
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
// Move assignment from another BOOST_FUNCTION_FUNCTION
BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
{
-
if (&f == this)
return *this;
@@ -922,10 +921,10 @@ namespace boost {
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
typedef typename get_invoker::
- template apply<Functor, R BOOST_FUNCTION_COMMA
+ template apply<Functor, R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS>
handler_type;
-
+
typedef typename handler_type::invoker_type invoker_type;
typedef typename handler_type::manager_type manager_type;
@@ -933,7 +932,7 @@ namespace boost {
// static initialization. Otherwise, we will have a race
// condition here in multi-threaded code. See
// http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
- static const vtable_type stored_vtable =
+ static const vtable_type stored_vtable =
{ { &manager_type::manage }, &invoker_type::invoke };
if (stored_vtable.assign_to(f, functor)) {
@@ -944,7 +943,7 @@ namespace boost {
boost::detail::function::function_allows_small_object_optimization<Functor>::value)
value |= static_cast<std::size_t>(0x01);
vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
- } else
+ } else
vtable = 0;
}
@@ -956,11 +955,11 @@ namespace boost {
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
typedef typename get_invoker::
- template apply_a<Functor, R BOOST_FUNCTION_COMMA
+ template apply_a<Functor, R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS,
Allocator>
handler_type;
-
+
typedef typename handler_type::invoker_type invoker_type;
typedef typename handler_type::manager_type manager_type;
@@ -971,7 +970,7 @@ namespace boost {
static const vtable_type stored_vtable =
{ { &manager_type::manage }, &invoker_type::invoke };
- if (stored_vtable.assign_to_a(f, functor, a)) {
+ if (stored_vtable.assign_to_a(f, functor, a)) {
std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
// coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
if (boost::has_trivial_copy_constructor<Functor>::value &&
@@ -979,15 +978,15 @@ namespace boost {
boost::detail::function::function_allows_small_object_optimization<Functor>::value)
value |= static_cast<std::size_t>(0x01);
vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
- } else
+ } else
vtable = 0;
}
- // Moves the value from the specified argument to *this. If the argument
- // has its function object allocated on the heap, move_assign will pass
- // its buffer to *this, and set the argument's buffer pointer to NULL.
- void move_assign(BOOST_FUNCTION_FUNCTION& f)
- {
+ // Moves the value from the specified argument to *this. If the argument
+ // has its function object allocated on the heap, move_assign will pass
+ // its buffer to *this, and set the argument's buffer pointer to NULL.
+ void move_assign(BOOST_FUNCTION_FUNCTION& f)
+ {
if (&f == this)
return;
@@ -1098,7 +1097,7 @@ public:
function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
#endif
-
+
self_type& operator=(const self_type& f)
{
self_type(f).swap(*this);
@@ -1111,7 +1110,7 @@ public:
self_type(static_cast<self_type&&>(f)).swap(*this);
return *this;
}
-#endif
+#endif
template<typename Functor>
#ifndef BOOST_NO_SFINAE
@@ -1140,14 +1139,14 @@ public:
self_type(f).swap(*this);
return *this;
}
-
+
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
self_type& operator=(base_type&& f)
{
self_type(static_cast<base_type&&>(f)).swap(*this);
return *this;
}
-#endif
+#endif
};
#undef BOOST_FUNCTION_PARTIAL_SPEC
@@ -1187,4 +1186,4 @@ public:
#if defined(BOOST_MSVC)
# pragma warning( pop )
-#endif
+#endif
diff --git a/boost/functional/forward_adapter.hpp b/boost/functional/forward_adapter.hpp
index 796abd2bc4..6023fc2ae5 100644
--- a/boost/functional/forward_adapter.hpp
+++ b/boost/functional/forward_adapter.hpp
@@ -144,8 +144,30 @@ namespace boost
: boost::result_of< BOOST_DEDUCED_TYPENAME c<Self>::t() >
{ };
- template< class MD, class F, class FC >
- struct forward_adapter_impl<MD,F,FC,0,0>
+ // WHen operator()() doesn't have any parameters, it can't
+ // be templatized and can't use SFINAE, so intead use class
+ // template parameter SFINAE to decide whether to instantiate it.
+
+ template <typename T, typename R = void>
+ struct forward_adapter_sfinae
+ {
+ typedef T type;
+ };
+
+ // This is the fallback for when there isn't an operator()(),
+ // need to create an operator() that will never instantiate
+ // so that using parent::operator() will work okay.
+ template< class MD, class F, class FC, class Enable = void>
+ struct forward_adapter_impl_zero
+ {
+ template <typename T> struct never_instantiate {};
+ template <typename T>
+ typename never_instantiate<T>::type operator()(T) const {}
+ };
+
+ template< class MD, class F, class FC>
+ struct forward_adapter_impl_zero<MD, F, FC,
+ typename forward_adapter_sfinae<typename boost::result_of< FC() >::type>::type>
{
inline typename boost::result_of< FC() >::type
operator()() const
@@ -158,6 +180,13 @@ namespace boost
{
return static_cast<MD*>(this)->target_function()();
}
+ };
+
+ template< class MD, class F, class FC >
+ struct forward_adapter_impl<MD,F,FC,0,0>
+ : forward_adapter_impl_zero<MD,F,FC>
+ {
+ using forward_adapter_impl_zero<MD,F,FC>::operator();
// closing brace gets generated by preprocessing code, below
diff --git a/boost/functional/hash/hash.hpp b/boost/functional/hash/hash.hpp
index 2fb9f21116..0a8ceeb474 100644
--- a/boost/functional/hash/hash.hpp
+++ b/boost/functional/hash/hash.hpp
@@ -212,7 +212,6 @@ namespace boost
seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
- template <typename SizeT>
inline void hash_combine_impl(boost::uint32_t& h1,
boost::uint32_t k1)
{
@@ -229,12 +228,11 @@ namespace boost
}
-// Don't define 64-bit hash combine on platforms with 64 bit integers,
+// Don't define 64-bit hash combine on platforms without 64 bit integers,
// and also not for 32-bit gcc as it warns about the 64-bit constant.
#if !defined(BOOST_NO_INT64_T) && \
!(defined(__GNUC__) && ULONG_MAX == 0xffffffff)
- template <typename SizeT>
inline void hash_combine_impl(boost::uint64_t& h,
boost::uint64_t k)
{
@@ -247,6 +245,10 @@ namespace boost
h ^= k;
h *= m;
+
+ // Completely arbitrary number, to prevent 0's
+ // from hashing to 0.
+ h += 0xe6546b64;
}
#endif // BOOST_NO_INT64_T
diff --git a/boost/functional/lightweight_forward_adapter.hpp b/boost/functional/lightweight_forward_adapter.hpp
index 637aa9e19c..2706d299dd 100644
--- a/boost/functional/lightweight_forward_adapter.hpp
+++ b/boost/functional/lightweight_forward_adapter.hpp
@@ -149,8 +149,31 @@ namespace boost
: boost::result_of< BOOST_DEDUCED_TYPENAME c<Self>::t() >
{ };
- template< class MD, class F, class FC >
- struct lightweight_forward_adapter_impl<MD,F,FC,0,0>
+ // When operator() doesn't have any parameters, it can't
+ // be templatized and can't use SFINAE, so intead use class
+ // template parameter SFINAE to decide whether to instantiate it.
+
+ template <typename T, typename R = void>
+ struct lightweight_forward_adapter_sfinae
+ {
+ typedef T type;
+ };
+
+ // This is the fallback for when there isn't an operator()(),
+ // need to create an operator() that will never instantiate
+ // so that using parent::operator() will work okay.
+ template< class MD, class F, class FC, class Enable = void>
+ struct lightweight_forward_adapter_impl_zero
+ : lightweight_forward_adapter_result
+ {
+ template <typename T> struct never_instantiate {};
+ template <typename T>
+ typename never_instantiate<T>::type operator()(T) const {}
+ };
+
+ template< class MD, class F, class FC>
+ struct lightweight_forward_adapter_impl_zero<MD, F, FC,
+ typename lightweight_forward_adapter_sfinae<typename boost::result_of< FC() >::type>::type>
: lightweight_forward_adapter_result
{
inline typename boost::result_of< FC() >::type
@@ -166,6 +189,12 @@ namespace boost
}
};
+ template< class MD, class F, class FC >
+ struct lightweight_forward_adapter_impl<MD,F,FC,0,0>
+ : lightweight_forward_adapter_impl_zero<MD,F,FC>
+ {
+ };
+
# define BOOST_PP_FILENAME_1 \
<boost/functional/lightweight_forward_adapter.hpp>
# define BOOST_PP_ITERATION_LIMITS \
diff --git a/boost/geometry/algorithms/append.hpp b/boost/geometry/algorithms/append.hpp
index 894f52c68b..5cfad0c520 100644
--- a/boost/geometry/algorithms/append.hpp
+++ b/boost/geometry/algorithms/append.hpp
@@ -284,7 +284,7 @@ struct append
int ring_index,
int multi_index)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::append<Geometry, RangeOrPoint>::apply(geometry,
range_or_point,
ring_index,
diff --git a/boost/geometry/algorithms/area.hpp b/boost/geometry/algorithms/area.hpp
index cb1501d8c9..4751d4e742 100644
--- a/boost/geometry/algorithms/area.hpp
+++ b/boost/geometry/algorithms/area.hpp
@@ -82,7 +82,7 @@ struct ring_area
static inline typename Strategy::return_type
apply(Ring const& ring, Strategy const& strategy)
{
- BOOST_CONCEPT_ASSERT( (geometry::concept::AreaStrategy<Strategy>) );
+ BOOST_CONCEPT_ASSERT( (geometry::concepts::AreaStrategy<Strategy>) );
assert_dimension<Ring, 2>();
// Ignore warning (because using static method sometimes) on strategy
@@ -266,7 +266,7 @@ and Geographic as well.
template <typename Geometry>
inline typename default_area_result<Geometry>::type area(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
// TODO put this into a resolve_strategy stage
// (and take the return type from resolve_variant)
@@ -310,7 +310,7 @@ template <typename Geometry, typename Strategy>
inline typename Strategy::return_type area(
Geometry const& geometry, Strategy const& strategy)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
// detail::throw_on_empty_input(geometry);
diff --git a/boost/geometry/algorithms/assign.hpp b/boost/geometry/algorithms/assign.hpp
index e3d664de38..589a5c545b 100644
--- a/boost/geometry/algorithms/assign.hpp
+++ b/boost/geometry/algorithms/assign.hpp
@@ -69,7 +69,7 @@ namespace boost { namespace geometry
template <typename Geometry, typename Range>
inline void assign_points(Geometry& geometry, Range const& range)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
clear(geometry);
geometry::append(geometry, range, -1, 0);
@@ -96,7 +96,7 @@ collect the minimum bounding box of a geometry.
template <typename Geometry>
inline void assign_inverse(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::assign_inverse
<
@@ -116,7 +116,7 @@ inline void assign_inverse(Geometry& geometry)
template <typename Geometry>
inline void assign_zero(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::assign_zero
<
@@ -146,7 +146,7 @@ inline void assign_zero(Geometry& geometry)
template <typename Geometry, typename Type>
inline void assign_values(Geometry& geometry, Type const& c1, Type const& c2)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::assign
<
@@ -179,7 +179,7 @@ template <typename Geometry, typename Type>
inline void assign_values(Geometry& geometry,
Type const& c1, Type const& c2, Type const& c3)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::assign
<
@@ -206,7 +206,7 @@ template <typename Geometry, typename Type>
inline void assign_values(Geometry& geometry,
Type const& c1, Type const& c2, Type const& c3, Type const& c4)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::assign
<
@@ -227,9 +227,9 @@ struct assign
static inline void
apply(Geometry1& geometry1, const Geometry2& geometry2)
{
- concept::check<Geometry1>();
- concept::check<Geometry2 const>();
- concept::check_concepts_and_equal_dimensions<Geometry1, Geometry2 const>();
+ concepts::check<Geometry1>();
+ concepts::check<Geometry2 const>();
+ concepts::check_concepts_and_equal_dimensions<Geometry1, Geometry2 const>();
static bool const same_point_order
= point_order<Geometry1>::value == point_order<Geometry2>::value;
diff --git a/boost/geometry/algorithms/buffer.hpp b/boost/geometry/algorithms/buffer.hpp
index 5dfe9d8846..e1d3c20e44 100644
--- a/boost/geometry/algorithms/buffer.hpp
+++ b/boost/geometry/algorithms/buffer.hpp
@@ -182,8 +182,8 @@ template <typename Input, typename Output, typename Distance>
inline void buffer(Input const& geometry_in, Output& geometry_out,
Distance const& distance, Distance const& chord_length = -1)
{
- concept::check<Input const>();
- concept::check<Output>();
+ concepts::check<Input const>();
+ concepts::check<Output>();
resolve_variant::buffer<Input>::apply(geometry_in, distance, chord_length, geometry_out);
}
@@ -204,8 +204,8 @@ inline void buffer(Input const& geometry_in, Output& geometry_out,
template <typename Output, typename Input, typename Distance>
Output return_buffer(Input const& geometry, Distance const& distance, Distance const& chord_length = -1)
{
- concept::check<Input const>();
- concept::check<Output>();
+ concepts::check<Input const>();
+ concepts::check<Output>();
Output geometry_out;
@@ -256,8 +256,8 @@ inline void buffer(GeometryIn const& geometry_in,
PointStrategy const& point_strategy)
{
typedef typename boost::range_value<MultiPolygon>::type polygon_type;
- concept::check<GeometryIn const>();
- concept::check<polygon_type>();
+ concepts::check<GeometryIn const>();
+ concepts::check<polygon_type>();
typedef typename point_type<GeometryIn>::type point_type;
typedef typename rescale_policy_type<point_type>::type rescale_policy_type;
diff --git a/boost/geometry/algorithms/centroid.hpp b/boost/geometry/algorithms/centroid.hpp
index 8ef017a3f1..fc2908ab1c 100644
--- a/boost/geometry/algorithms/centroid.hpp
+++ b/boost/geometry/algorithms/centroid.hpp
@@ -545,7 +545,7 @@ struct centroid
template <typename Point, typename Strategy>
static inline void apply(Geometry const& geometry, Point& out, Strategy const& strategy)
{
- concept::check_concepts_and_equal_dimensions<Point, Geometry const>();
+ concepts::check_concepts_and_equal_dimensions<Point, Geometry const>();
resolve_strategy::centroid<Geometry>::apply(geometry, out, strategy);
}
};
diff --git a/boost/geometry/algorithms/clear.hpp b/boost/geometry/algorithms/clear.hpp
index 54b2162767..97f5efa451 100644
--- a/boost/geometry/algorithms/clear.hpp
+++ b/boost/geometry/algorithms/clear.hpp
@@ -185,7 +185,7 @@ struct clear<variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
template <typename Geometry>
inline void clear(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
resolve_variant::clear<Geometry>::apply(geometry);
}
diff --git a/boost/geometry/algorithms/convert.hpp b/boost/geometry/algorithms/convert.hpp
index 78618aed2d..6a8ba1acb6 100644
--- a/boost/geometry/algorithms/convert.hpp
+++ b/boost/geometry/algorithms/convert.hpp
@@ -494,7 +494,7 @@ struct convert
{
static inline void apply(Geometry1 const& geometry1, Geometry2& geometry2)
{
- concept::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2>();
+ concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2>();
dispatch::convert<Geometry1, Geometry2>::apply(geometry1, geometry2);
}
};
diff --git a/boost/geometry/algorithms/convex_hull.hpp b/boost/geometry/algorithms/convex_hull.hpp
index 19d28bc7b5..26bb8509e3 100644
--- a/boost/geometry/algorithms/convex_hull.hpp
+++ b/boost/geometry/algorithms/convex_hull.hpp
@@ -154,7 +154,7 @@ struct convex_hull
OutputGeometry& out,
Strategy const& strategy)
{
- BOOST_CONCEPT_ASSERT( (geometry::concept::ConvexHullStrategy<Strategy>) );
+ BOOST_CONCEPT_ASSERT( (geometry::concepts::ConvexHullStrategy<Strategy>) );
dispatch::convex_hull<Geometry>::apply(geometry, out, strategy);
}
@@ -179,7 +179,7 @@ struct convex_hull_insert
OutputIterator& out,
Strategy const& strategy)
{
- BOOST_CONCEPT_ASSERT( (geometry::concept::ConvexHullStrategy<Strategy>) );
+ BOOST_CONCEPT_ASSERT( (geometry::concepts::ConvexHullStrategy<Strategy>) );
return dispatch::convex_hull_insert<
geometry::point_order<Geometry>::value,
@@ -212,7 +212,7 @@ struct convex_hull
template <typename OutputGeometry, typename Strategy>
static inline void apply(Geometry const& geometry, OutputGeometry& out, Strategy const& strategy)
{
- concept::check_concepts_and_equal_dimensions<
+ concepts::check_concepts_and_equal_dimensions<
const Geometry,
OutputGeometry
>();
@@ -258,8 +258,8 @@ struct convex_hull_insert
static inline OutputIterator apply(Geometry const& geometry, OutputIterator& out, Strategy const& strategy)
{
// Concept: output point type = point type of input geometry
- concept::check<Geometry const>();
- concept::check<typename point_type<Geometry>::type>();
+ concepts::check<Geometry const>();
+ concepts::check<typename point_type<Geometry>::type>();
return resolve_strategy::convex_hull_insert::apply(geometry, out, strategy);
}
diff --git a/boost/geometry/algorithms/correct.hpp b/boost/geometry/algorithms/correct.hpp
index 11ed6ecff9..5d3b6939af 100644
--- a/boost/geometry/algorithms/correct.hpp
+++ b/boost/geometry/algorithms/correct.hpp
@@ -283,7 +283,7 @@ struct correct
{
static inline void apply(Geometry& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
dispatch::correct<Geometry>::apply(geometry);
}
};
diff --git a/boost/geometry/algorithms/covered_by.hpp b/boost/geometry/algorithms/covered_by.hpp
index eb8e732409..2001d5810c 100644
--- a/boost/geometry/algorithms/covered_by.hpp
+++ b/boost/geometry/algorithms/covered_by.hpp
@@ -260,15 +260,15 @@ struct covered_by
Geometry2 const& geometry2,
Strategy const& strategy)
{
- concept::within::check
+ concepts::within::check
<
typename tag<Geometry1>::type,
typename tag<Geometry2>::type,
typename tag_cast<typename tag<Geometry2>::type, areal_tag>::type,
Strategy
>();
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
assert_dimension_equal<Geometry1, Geometry2>();
return dispatch::covered_by<Geometry1, Geometry2>::apply(geometry1,
diff --git a/boost/geometry/algorithms/crosses.hpp b/boost/geometry/algorithms/crosses.hpp
index 9546a5335b..73d86ef529 100644
--- a/boost/geometry/algorithms/crosses.hpp
+++ b/boost/geometry/algorithms/crosses.hpp
@@ -72,8 +72,8 @@ namespace resolve_variant
const Geometry1& geometry1,
const Geometry2& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return dispatch::crosses<Geometry1, Geometry2>::apply(geometry1, geometry2);
}
diff --git a/boost/geometry/algorithms/detail/assign_box_corners.hpp b/boost/geometry/algorithms/detail/assign_box_corners.hpp
index 669d6d3655..bd8b84afcf 100644
--- a/boost/geometry/algorithms/detail/assign_box_corners.hpp
+++ b/boost/geometry/algorithms/detail/assign_box_corners.hpp
@@ -54,8 +54,8 @@ inline void assign_box_corners(Box const& box,
Point& lower_left, Point& lower_right,
Point& upper_left, Point& upper_right)
{
- concept::check<Box const>();
- concept::check<Point>();
+ concepts::check<Box const>();
+ concepts::check<Point>();
detail::assign::assign_box_2d_corner
<min_corner, min_corner>(box, lower_left);
diff --git a/boost/geometry/algorithms/detail/assign_indexed_point.hpp b/boost/geometry/algorithms/detail/assign_indexed_point.hpp
index acfc37e250..e5d9358c13 100644
--- a/boost/geometry/algorithms/detail/assign_indexed_point.hpp
+++ b/boost/geometry/algorithms/detail/assign_indexed_point.hpp
@@ -46,8 +46,8 @@ namespace detail
template <std::size_t Index, typename Geometry, typename Point>
inline void assign_point_to_index(Point const& point, Geometry& geometry)
{
- concept::check<Point const>();
- concept::check<Geometry>();
+ concepts::check<Point const>();
+ concepts::check<Geometry>();
detail::assign::assign_point_to_index
<
@@ -74,8 +74,8 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
template <std::size_t Index, typename Point, typename Geometry>
inline void assign_point_from_index(Geometry const& geometry, Point& point)
{
- concept::check<Geometry const>();
- concept::check<Point>();
+ concepts::check<Geometry const>();
+ concepts::check<Point>();
detail::assign::assign_point_from_index
<
diff --git a/boost/geometry/algorithms/detail/azimuth.hpp b/boost/geometry/algorithms/detail/azimuth.hpp
index f0a8d65c86..8948bf6afd 100644
--- a/boost/geometry/algorithms/detail/azimuth.hpp
+++ b/boost/geometry/algorithms/detail/azimuth.hpp
@@ -49,7 +49,7 @@ struct azimuth<ReturnType, geographic_tag>
template <typename P1, typename P2, typename Spheroid>
static inline ReturnType apply(P1 const& p1, P2 const& p2, Spheroid const& spheroid)
{
- return geometry::detail::vincenty_inverse<ReturnType, false, true>
+ return geometry::detail::vincenty_inverse<ReturnType, false, true>().apply
( get_as_radian<0>(p1), get_as_radian<1>(p1),
get_as_radian<0>(p2), get_as_radian<1>(p2),
spheroid ).azimuth;
diff --git a/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp b/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
index c0fa7b0e33..c1f04f93b5 100644
--- a/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
+++ b/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
@@ -58,14 +58,14 @@ public :
static inline void apply(std::size_t size_at_start,
Rings& rings, typename boost::range_value<Rings>::type& ring,
Turns& turns,
- typename boost::range_value<Turns>::type const& turn,
+ typename boost::range_value<Turns>::type const& /*turn*/,
Operation& operation,
- detail::overlay::traverse_error_type traverse_error,
+ detail::overlay::traverse_error_type /*traverse_error*/,
Geometry const& ,
Geometry const& ,
RobustPolicy const& ,
state_type& state,
- Visitor& visitor
+ Visitor& /*visitor*/
)
{
#if defined(BOOST_GEOMETRY_COUNT_BACKTRACK_WARNINGS)
@@ -92,17 +92,17 @@ g_backtrack_warning_count++;
struct buffer_overlay_visitor
{
public :
- void print(char const* header)
+ void print(char const* /*header*/)
{
}
template <typename Turns>
- void print(char const* header, Turns const& turns, int turn_index)
+ void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/)
{
}
template <typename Turns>
- void print(char const* header, Turns const& turns, int turn_index, int op_index)
+ void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/, int /*op_index*/)
{
}
@@ -113,7 +113,7 @@ public :
void visit_clusters(Clusters const& , Turns const& ) {}
template <typename Turns, typename Turn, typename Operation>
- void visit_traverse(Turns const& turns, Turn const& turn, Operation const& op, const char* header)
+ void visit_traverse(Turns const& /*turns*/, Turn const& /*turn*/, Operation const& /*op*/, const char* /*header*/)
{
}
diff --git a/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp b/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
index 3fc3c2347a..e7214428e6 100644
--- a/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
+++ b/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
@@ -35,6 +35,7 @@
#include <boost/geometry/algorithms/detail/buffer/buffered_ring.hpp>
#include <boost/geometry/algorithms/detail/buffer/buffer_policies.hpp>
+#include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp>
#include <boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp>
#include <boost/geometry/algorithms/detail/buffer/turn_in_piece_visitor.hpp>
#include <boost/geometry/algorithms/detail/buffer/turn_in_original_visitor.hpp>
@@ -297,7 +298,7 @@ struct buffered_piece_collection
typedef std::map
<
signed_size_type,
- std::set<signed_size_type>
+ detail::overlay::cluster_info
> cluster_type;
cluster_type m_clusters;
@@ -1216,9 +1217,8 @@ struct buffered_piece_collection
typename cs_tag<Ring>::type
>::type side_strategy_type;
- enrich_intersection_points<false, false, overlay_union>(m_turns,
- m_clusters, detail::overlay::operation_union,
- offsetted_rings, offsetted_rings,
+ enrich_intersection_points<false, false, overlay_buffer>(m_turns,
+ m_clusters, offsetted_rings, offsetted_rings,
m_robust_policy, side_strategy_type());
}
@@ -1330,17 +1330,12 @@ struct buffered_piece_collection
for (typename boost::range_iterator<turn_vector_type>::type it =
boost::begin(m_turns); it != boost::end(m_turns); ++it)
{
- if (it->location != location_ok)
+ buffer_turn_info_type& turn = *it;
+ if (turn.location != location_ok)
{
- // Set it to blocked. They should not be discarded, to avoid
- // generating rings over these turns
- // Performance goes down a tiny bit from 161 s to 173 because there
- // are sometimes much more turns.
- // We might speed it up a bit by keeping only one blocked
- // intersection per segment, but that is complex to program
- // because each turn involves two segments
- it->operations[0].operation = detail::overlay::operation_blocked;
- it->operations[1].operation = detail::overlay::operation_blocked;
+ // Discard this turn (don't set it to blocked to avoid colocated
+ // clusters being discarded afterwards
+ turn.discarded = true;
}
}
}
@@ -1352,7 +1347,7 @@ struct buffered_piece_collection
false, false,
buffered_ring_collection<buffered_ring<Ring> >,
buffered_ring_collection<buffered_ring<Ring > >,
- detail::overlay::operation_union,
+ overlay_buffer,
backtrack_for_buffer
> traverser;
diff --git a/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp b/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
index db6136e1ae..4fd24b1451 100644
--- a/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
+++ b/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
@@ -16,6 +16,8 @@
#include <boost/geometry/core/assert.hpp>
#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/closure.hpp>
+#include <boost/geometry/core/point_order.hpp>
#include <boost/geometry/core/point_type.hpp>
#include <boost/geometry/strategies/buffer.hpp>
@@ -147,6 +149,20 @@ struct ring_type
typedef Ring type;
};
+
+// There is a specific tag, so this specialization cannot be placed in traits
+template <typename Ring>
+struct point_order<detail::buffer::buffered_ring_collection_tag,
+ geometry::detail::buffer::buffered_ring_collection
+ <
+ geometry::detail::buffer::buffered_ring<Ring>
+ > >
+{
+ static const order_selector value
+ = core_dispatch::point_order<ring_tag, Ring>::value;
+};
+
+
}
diff --git a/boost/geometry/algorithms/detail/comparable_distance/interface.hpp b/boost/geometry/algorithms/detail/comparable_distance/interface.hpp
index 86eec4c036..3e48a05ba9 100644
--- a/boost/geometry/algorithms/detail/comparable_distance/interface.hpp
+++ b/boost/geometry/algorithms/detail/comparable_distance/interface.hpp
@@ -318,8 +318,8 @@ inline typename comparable_distance_result<Geometry1, Geometry2, Strategy>::type
comparable_distance(Geometry1 const& geometry1, Geometry2 const& geometry2,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return resolve_variant::comparable_distance
<
@@ -350,8 +350,8 @@ template <typename Geometry1, typename Geometry2>
inline typename default_comparable_distance_result<Geometry1, Geometry2>::type
comparable_distance(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return geometry::comparable_distance(geometry1, geometry2, default_strategy());
}
diff --git a/boost/geometry/algorithms/detail/disjoint/interface.hpp b/boost/geometry/algorithms/detail/disjoint/interface.hpp
index 18c010731e..ce7fe6d45c 100644
--- a/boost/geometry/algorithms/detail/disjoint/interface.hpp
+++ b/boost/geometry/algorithms/detail/disjoint/interface.hpp
@@ -73,7 +73,7 @@ struct disjoint
{
static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
- concept::check_concepts_and_equal_dimensions
+ concepts::check_concepts_and_equal_dimensions
<
Geometry1 const,
Geometry2 const
diff --git a/boost/geometry/algorithms/detail/distance/interface.hpp b/boost/geometry/algorithms/detail/distance/interface.hpp
index 1e7cc433ef..53d24d9920 100644
--- a/boost/geometry/algorithms/detail/distance/interface.hpp
+++ b/boost/geometry/algorithms/detail/distance/interface.hpp
@@ -361,8 +361,8 @@ distance(Geometry1 const& geometry1,
Geometry2 const& geometry2,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
detail::throw_on_empty_input(geometry1);
detail::throw_on_empty_input(geometry2);
@@ -392,8 +392,8 @@ inline typename default_distance_result<Geometry1, Geometry2>::type
distance(Geometry1 const& geometry1,
Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return geometry::distance(geometry1, geometry2, default_strategy());
}
diff --git a/boost/geometry/algorithms/detail/envelope/interface.hpp b/boost/geometry/algorithms/detail/envelope/interface.hpp
index 997ac1b23e..befe4e42db 100644
--- a/boost/geometry/algorithms/detail/envelope/interface.hpp
+++ b/boost/geometry/algorithms/detail/envelope/interface.hpp
@@ -40,8 +40,8 @@ struct envelope
template <typename Box>
static inline void apply(Geometry const& geometry, Box& box)
{
- concept::check<Geometry const>();
- concept::check<Box>();
+ concepts::check<Geometry const>();
+ concepts::check<Box>();
dispatch::envelope<Geometry>::apply(geometry, box);
}
diff --git a/boost/geometry/algorithms/detail/envelope/transform_units.hpp b/boost/geometry/algorithms/detail/envelope/transform_units.hpp
index 0c5382a47b..790f6e386b 100644
--- a/boost/geometry/algorithms/detail/envelope/transform_units.hpp
+++ b/boost/geometry/algorithms/detail/envelope/transform_units.hpp
@@ -92,7 +92,7 @@ inline void transform_units(GeometryIn const& geometry_in,
<
GeometryIn, GeometryOut
>::apply(geometry_in, geometry_out);
-};
+}
}} // namespace detail::envelope
diff --git a/boost/geometry/algorithms/detail/equals/collect_vectors.hpp b/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
index dc1cd74900..eab73ea680 100644
--- a/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
+++ b/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
@@ -19,11 +19,14 @@
#include <boost/numeric/conversion/cast.hpp>
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
+#include <boost/geometry/algorithms/detail/normalize.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/interior_rings.hpp>
#include <boost/geometry/core/tags.hpp>
+#include <boost/geometry/formulas/spherical.hpp>
+
#include <boost/geometry/geometries/concepts/check.hpp>
#include <boost/geometry/util/math.hpp>
@@ -33,31 +36,61 @@
namespace boost { namespace geometry
{
-// TODO: if Boost.LA of Emil Dotchevski is accepted, adapt this
-template <typename T>
+// Since these vectors (though ray would be a better name) are used in the
+// implementation of equals() for Areal geometries the internal representation
+// should be consistent with the default side strategy for CS because currently
+// it's used in other relops.
+
+template <
+ typename T,
+ typename Geometry,
+ typename CSTag = typename cs_tag<Geometry>::type
+>
struct collected_vector
{
typedef T type;
-
+
inline collected_vector()
{}
inline collected_vector(T const& px, T const& py,
- T const& pdx, T const& pdy)
+ T const& pdx, T const& pdy)
: x(px)
, y(py)
, dx(pdx)
, dy(pdy)
- , dx_0(T())
- , dy_0(T())
+ //, dx_0(dx)
+ //, dy_0(dy)
{}
- T x, y;
- T dx, dy;
- T dx_0, dy_0;
+ template <typename Point>
+ inline collected_vector(Point const& p1, Point const& p2)
+ : x(get<0>(p1))
+ , y(get<1>(p1))
+ , dx(get<0>(p2) - x)
+ , dy(get<1>(p2) - y)
+ //, dx_0(dx)
+ //, dy_0(dy)
+ {}
+
+ bool normalize()
+ {
+ T magnitude = math::sqrt(
+ boost::numeric_cast<T>(dx * dx + dy * dy));
+
+ // NOTE: shouldn't here math::equals() be called?
+ if (magnitude > 0)
+ {
+ dx /= magnitude;
+ dy /= magnitude;
+ return true;
+ }
+
+ return false;
+ }
// For sorting
- inline bool operator<(collected_vector<T> const& other) const
+ inline bool operator<(collected_vector const& other) const
{
if (math::equals(x, other.x))
{
@@ -74,7 +107,21 @@ struct collected_vector
return x < other.x;
}
- inline bool same_direction(collected_vector<T> const& other) const
+ inline bool next_is_collinear(collected_vector const& other) const
+ {
+ return same_direction(other);
+ }
+
+ // For std::equals
+ inline bool operator==(collected_vector const& other) const
+ {
+ return math::equals(x, other.x)
+ && math::equals(y, other.y)
+ && same_direction(other);
+ }
+
+private:
+ inline bool same_direction(collected_vector const& other) const
{
// For high precision arithmetic, we have to be
// more relaxed then using ==
@@ -84,13 +131,156 @@ struct collected_vector
&& math::equals_with_epsilon(dy, other.dy);
}
+ T x, y;
+ T dx, dy;
+ //T dx_0, dy_0;
+};
+
+template <typename T, typename Geometry>
+struct collected_vector<T, Geometry, spherical_equatorial_tag>
+{
+ typedef T type;
+
+ typedef typename coordinate_system<Geometry>::type cs_type;
+ typedef model::point<T, 2, cs_type> point_type;
+ typedef model::point<T, 3, cs::cartesian> vector_type;
+
+ collected_vector()
+ {}
+
+ template <typename Point>
+ collected_vector(Point const& p1, Point const& p2)
+ : origin(get<0>(p1), get<1>(p1))
+ {
+ origin = detail::return_normalized<point_type>(origin);
+
+ using namespace geometry::formula;
+ prev = sph_to_cart3d<vector_type>(p1);
+ next = sph_to_cart3d<vector_type>(p2);
+ direction = cross_product(prev, next);
+ }
+
+ bool normalize()
+ {
+ T magnitude_sqr = dot_product(direction, direction);
+
+ // NOTE: shouldn't here math::equals() be called?
+ if (magnitude_sqr > 0)
+ {
+ divide_value(direction, math::sqrt(magnitude_sqr));
+ return true;
+ }
+
+ return false;
+ }
+
+ bool operator<(collected_vector const& other) const
+ {
+ if (math::equals(get<0>(origin), get<0>(other.origin)))
+ {
+ if (math::equals(get<1>(origin), get<1>(other.origin)))
+ {
+ if (math::equals(get<0>(direction), get<0>(other.direction)))
+ {
+ if (math::equals(get<1>(direction), get<1>(other.direction)))
+ {
+ return get<2>(direction) < get<2>(other.direction);
+ }
+ return get<1>(direction) < get<1>(other.direction);
+ }
+ return get<0>(direction) < get<0>(other.direction);
+ }
+ return get<1>(origin) < get<1>(other.origin);
+ }
+ return get<0>(origin) < get<0>(other.origin);
+ }
+
+ // For consistency with side and intersection strategies used by relops
+ // IMPORTANT: this method should be called for previous vector
+ // and next vector should be passed as parameter
+ bool next_is_collinear(collected_vector const& other) const
+ {
+ return formula::sph_side_value(direction, other.next) == 0;
+ }
+
// For std::equals
- inline bool operator==(collected_vector<T> const& other) const
+ bool operator==(collected_vector const& other) const
{
- return math::equals(x, other.x)
- && math::equals(y, other.y)
- && same_direction(other);
+ return math::equals(get<0>(origin), get<0>(other.origin))
+ && math::equals(get<1>(origin), get<1>(other.origin))
+ && is_collinear(other);
+ }
+
+private:
+ // For consistency with side and intersection strategies used by relops
+ bool is_collinear(collected_vector const& other) const
+ {
+ return formula::sph_side_value(direction, other.prev) == 0
+ && formula::sph_side_value(direction, other.next) == 0;
}
+
+ /*bool same_direction(collected_vector const& other) const
+ {
+ return math::equals_with_epsilon(get<0>(direction), get<0>(other.direction))
+ && math::equals_with_epsilon(get<1>(direction), get<1>(other.direction))
+ && math::equals_with_epsilon(get<2>(direction), get<2>(other.direction));
+ }*/
+
+ point_type origin; // used for sorting and equality check
+ vector_type direction; // used for sorting, only in operator<
+ vector_type prev; // used for collinearity check, only in operator==
+ vector_type next; // used for collinearity check
+};
+
+template <typename T, typename Geometry>
+struct collected_vector<T, Geometry, spherical_polar_tag>
+ : public collected_vector<T, Geometry, spherical_equatorial_tag>
+{
+ typedef collected_vector<T, Geometry, spherical_equatorial_tag> base_type;
+
+ collected_vector() {}
+
+ template <typename Point>
+ collected_vector(Point const& p1, Point const& p2)
+ : base_type(to_equatorial(p1), to_equatorial(p2))
+ {}
+
+private:
+ template <typename Point>
+ Point polar_to_equatorial(Point const& p)
+ {
+ typedef typename coordinate_type<Point>::type coord_type;
+
+ typedef math::detail::constants_on_spheroid
+ <
+ coord_type,
+ typename coordinate_system<Point>::type::units
+ > constants;
+
+ coord_type const pi_2 = constants::half_period() / 2;
+
+ Point res = p;
+ set<1>(res, pi_2 - get<1>(p));
+ return res;
+ }
+};
+
+// This is consistent with the currently used default geographic side
+// and intersection strategies. Spherical strategies are used by default.
+// When default strategies are changed in the future this specialization
+// should be changed too.
+template <typename T, typename Geometry>
+struct collected_vector<T, Geometry, geographic_tag>
+ : public collected_vector<T, Geometry, spherical_equatorial_tag>
+{
+ typedef collected_vector<T, Geometry, spherical_equatorial_tag> base_type;
+
+ collected_vector() {}
+
+ template <typename Point>
+ collected_vector(Point const& p1, Point const& p2)
+ : base_type(p1, p2)
+ {}
};
@@ -117,39 +307,26 @@ struct range_collect_vectors
typedef typename boost::range_iterator<Range const>::type iterator;
- bool first = true;
+ bool is_first = true;
iterator it = boost::begin(range);
for (iterator prev = it++;
it != boost::end(range);
prev = it++)
{
- typename boost::range_value<Collection>::type v;
-
- v.x = get<0>(*prev);
- v.y = get<1>(*prev);
- v.dx = get<0>(*it) - v.x;
- v.dy = get<1>(*it) - v.y;
- v.dx_0 = v.dx;
- v.dy_0 = v.dy;
+ typename boost::range_value<Collection>::type v(*prev, *it);
// Normalize the vector -> this results in points+direction
// and is comparible between geometries
- calculation_type magnitude = math::sqrt(
- boost::numeric_cast<calculation_type>(v.dx * v.dx + v.dy * v.dy));
-
// Avoid non-duplicate points (AND division by zero)
- if (magnitude > 0)
+ if (v.normalize())
{
- v.dx /= magnitude;
- v.dy /= magnitude;
-
// Avoid non-direction changing points
- if (first || ! v.same_direction(collection.back()))
+ if (is_first || ! collection.back().next_is_collinear(v))
{
collection.push_back(v);
}
- first = false;
+ is_first = false;
}
}
@@ -160,7 +337,7 @@ struct range_collect_vectors
typedef typename boost::range_iterator<Collection>::type c_iterator;
c_iterator first = range::pos(collection, c_old_size);
- if ( first->same_direction(collection.back()) )
+ if (collection.back().next_is_collinear(*first) )
{
//collection.erase(first);
// O(1) instead of O(N)
@@ -172,7 +349,8 @@ struct range_collect_vectors
};
-template <typename Box, typename Collection>
+// Default version (cartesian)
+template <typename Box, typename Collection, typename CSTag = typename cs_tag<Box>::type>
struct box_collect_vectors
{
// Calculate on coordinate type, but if it is integer,
@@ -183,9 +361,9 @@ struct box_collect_vectors
static inline void apply(Collection& collection, Box const& box)
{
typename point_type<Box>::type lower_left, lower_right,
- upper_left, upper_right;
+ upper_left, upper_right;
geometry::detail::assign_box_corners(box, lower_left, lower_right,
- upper_left, upper_right);
+ upper_left, upper_right);
typedef typename boost::range_value<Collection>::type item;
@@ -196,6 +374,37 @@ struct box_collect_vectors
}
};
+// NOTE: This is not fully correct because Box in spherical and geographic
+// cordinate systems cannot be seen as Polygon
+template <typename Box, typename Collection>
+struct box_collect_vectors<Box, Collection, spherical_equatorial_tag>
+{
+ static inline void apply(Collection& collection, Box const& box)
+ {
+ typename point_type<Box>::type lower_left, lower_right,
+ upper_left, upper_right;
+ geometry::detail::assign_box_corners(box, lower_left, lower_right,
+ upper_left, upper_right);
+
+ typedef typename boost::range_value<Collection>::type item;
+
+ collection.push_back(item(lower_left, upper_left));
+ collection.push_back(item(upper_left, upper_right));
+ collection.push_back(item(upper_right, lower_right));
+ collection.push_back(item(lower_right, lower_left));
+ }
+};
+
+template <typename Box, typename Collection>
+struct box_collect_vectors<Box, Collection, spherical_polar_tag>
+ : box_collect_vectors<Box, Collection, spherical_equatorial_tag>
+{};
+
+template <typename Box, typename Collection>
+struct box_collect_vectors<Box, Collection, geographic_tag>
+ : box_collect_vectors<Box, Collection, spherical_equatorial_tag>
+{};
+
template <typename Polygon, typename Collection>
struct polygon_collect_vectors
@@ -312,7 +521,7 @@ struct collect_vectors<multi_polygon_tag, Collection, MultiPolygon>
template <typename Collection, typename Geometry>
inline void collect_vectors(Collection& collection, Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
dispatch::collect_vectors
<
diff --git a/boost/geometry/algorithms/detail/expand/interface.hpp b/boost/geometry/algorithms/detail/expand/interface.hpp
index 01936387a7..140754af4e 100644
--- a/boost/geometry/algorithms/detail/expand/interface.hpp
+++ b/boost/geometry/algorithms/detail/expand/interface.hpp
@@ -42,9 +42,9 @@ struct expand
template <typename Box>
static inline void apply(Box& box, Geometry const& geometry)
{
- concept::check<Box>();
- concept::check<Geometry const>();
- concept::check_concepts_and_equal_dimensions<Box, Geometry const>();
+ concepts::check<Box>();
+ concepts::check<Geometry const>();
+ concepts::check_concepts_and_equal_dimensions<Box, Geometry const>();
dispatch::expand<Box, Geometry>::apply(box, geometry);
}
@@ -100,7 +100,7 @@ inline void expand(Box& box, Geometry const& geometry,
StrategyLess const& strategy_less,
StrategyGreater const& strategy_greater)
{
- concept::check_concepts_and_equal_dimensions<Box, Geometry const>();
+ concepts::check_concepts_and_equal_dimensions<Box, Geometry const>();
dispatch::expand<Box, Geometry>::apply(box, geometry);
}
diff --git a/boost/geometry/algorithms/detail/extreme_points.hpp b/boost/geometry/algorithms/detail/extreme_points.hpp
index 61839d296a..65795cd05b 100644
--- a/boost/geometry/algorithms/detail/extreme_points.hpp
+++ b/boost/geometry/algorithms/detail/extreme_points.hpp
@@ -492,15 +492,15 @@ struct extreme_points<MultiPolygon, Dimension, multi_polygon_tag>
template <std::size_t Edge, typename Geometry, typename Extremes, typename Intruders>
inline bool extreme_points(Geometry const& geometry, Extremes& extremes, Intruders& intruders)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
// Extremes is not required to follow a geometry concept (but it should support an output iterator),
// but its elements should fulfil the point-concept
- concept::check<typename boost::range_value<Extremes>::type>();
+ concepts::check<typename boost::range_value<Extremes>::type>();
// Intruders should contain collections which value type is point-concept
// Extremes might be anything (supporting an output iterator), but its elements should fulfil the point-concept
- concept::check
+ concepts::check
<
typename boost::range_value
<
diff --git a/boost/geometry/algorithms/detail/intersection/interface.hpp b/boost/geometry/algorithms/detail/intersection/interface.hpp
index fd989866dd..e0955de3d8 100644
--- a/boost/geometry/algorithms/detail/intersection/interface.hpp
+++ b/boost/geometry/algorithms/detail/intersection/interface.hpp
@@ -110,8 +110,8 @@ struct intersection
const Geometry2& geometry2,
GeometryOut& geometry_out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename geometry::rescale_overlay_policy_type
<
@@ -123,7 +123,7 @@ struct intersection
= geometry::get_rescale_policy<rescale_policy_type>(geometry1,
geometry2);
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<Geometry1>::type,
Geometry1,
diff --git a/boost/geometry/algorithms/detail/is_simple/interface.hpp b/boost/geometry/algorithms/detail/is_simple/interface.hpp
index fd84826970..6d425232b0 100644
--- a/boost/geometry/algorithms/detail/is_simple/interface.hpp
+++ b/boost/geometry/algorithms/detail/is_simple/interface.hpp
@@ -30,7 +30,7 @@ struct is_simple
{
static inline bool apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::is_simple<Geometry>::apply(geometry);
}
};
diff --git a/boost/geometry/algorithms/detail/is_valid/interface.hpp b/boost/geometry/algorithms/detail/is_valid/interface.hpp
index 0ec13b1b38..5a04a92824 100644
--- a/boost/geometry/algorithms/detail/is_valid/interface.hpp
+++ b/boost/geometry/algorithms/detail/is_valid/interface.hpp
@@ -37,7 +37,7 @@ struct is_valid
template <typename VisitPolicy>
static inline bool apply(Geometry const& geometry, VisitPolicy& visitor)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::is_valid<Geometry>::apply(geometry, visitor);
}
};
diff --git a/boost/geometry/algorithms/detail/overlay/cluster_info.hpp b/boost/geometry/algorithms/detail/overlay/cluster_info.hpp
new file mode 100644
index 0000000000..5b460919f1
--- /dev/null
+++ b/boost/geometry/algorithms/detail/overlay/cluster_info.hpp
@@ -0,0 +1,49 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CLUSTER_INFO_HPP
+#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CLUSTER_INFO_HPP
+
+
+#include <set>
+#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace overlay
+{
+
+
+struct cluster_info
+{
+ std::set<signed_size_type> turn_indices;
+
+ bool switch_source; // For clusters with a touch, conform turn_info uu
+
+ //! Number of open spaces (e.g. 2 for touch)
+ std::size_t open_count;
+
+ inline cluster_info()
+ : switch_source(false)
+ , open_count(0)
+ {}
+};
+
+
+}} // namespace detail::overlay
+#endif //DOXYGEN_NO_DETAIL
+
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_CLUSTER_INFO_HPP
+
diff --git a/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp b/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp
index 790819917c..795523d7a0 100644
--- a/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp
+++ b/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp
@@ -284,7 +284,7 @@ inline bool copy_segment_point(Geometry const& geometry,
SegmentIdentifier const& seg_id, int offset,
PointOut& point_out)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::copy_segment_point
<
@@ -313,8 +313,8 @@ inline bool copy_segment_point(Geometry1 const& geometry1, Geometry2 const& geom
SegmentIdentifier const& seg_id, int offset,
PointOut& point_out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
BOOST_GEOMETRY_ASSERT(seg_id.source_index == 0 || seg_id.source_index == 1);
@@ -361,8 +361,8 @@ inline bool copy_segment_points(Geometry1 const& geometry1, Geometry2 const& geo
SegmentIdentifier const& seg_id,
PointOut& point1, PointOut& point2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return copy_segment_point<Reverse1, Reverse2>(geometry1, geometry2, seg_id, 0, point1)
&& copy_segment_point<Reverse1, Reverse2>(geometry1, geometry2, seg_id, 1, point2);
@@ -384,8 +384,8 @@ inline bool copy_segment_points(Geometry1 const& geometry1, Geometry2 const& geo
SegmentIdentifier const& seg_id,
PointOut& point1, PointOut& point2, PointOut& point3)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return copy_segment_point<Reverse1, Reverse2>(geometry1, geometry2, seg_id, 0, point1)
&& copy_segment_point<Reverse1, Reverse2>(geometry1, geometry2, seg_id, 1, point2)
diff --git a/boost/geometry/algorithms/detail/overlay/copy_segments.hpp b/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
index 2eefa03c67..fe1a034f8b 100644
--- a/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
+++ b/boost/geometry/algorithms/detail/overlay/copy_segments.hpp
@@ -349,7 +349,7 @@ inline void copy_segments(Geometry const& geometry,
RobustPolicy const& robust_policy,
RangeOut& range_out)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
dispatch::copy_segments
<
diff --git a/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp b/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
index c79c9cf500..5cab2b4cb8 100644
--- a/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
+++ b/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
@@ -66,7 +66,7 @@ inline void enrich_sort(Operations& operations,
Geometry1 const& geometry1,
Geometry2 const& geometry2,
RobustPolicy const& robust_policy,
- Strategy const& strategy)
+ Strategy const& /*strategy*/)
{
std::sort(boost::begin(operations),
boost::end(operations),
@@ -159,6 +159,7 @@ inline void enrich_assign(Operations& operations, Turns& turns)
<< " nxt=" << op.enriched.next_ip_index
<< " / " << op.enriched.travels_to_ip_index
<< " [vx " << op.enriched.travels_to_vertex_index << "]"
+ << std::boolalpha << turns[it->turn_index].discarded
<< std::endl;
;
}
@@ -235,11 +236,12 @@ inline void create_map(Turns const& turns,
\ingroup overlay
\tparam Turns type of intersection container
(e.g. vector of "intersection/turn point"'s)
+\tparam Clusters type of cluster container
\tparam Geometry1 \tparam_geometry
\tparam Geometry2 \tparam_geometry
\tparam Strategy side strategy type
-\param turns container containing intersectionpoints
-\param for_operation operation_type (union or intersection)
+\param turns container containing intersection points
+\param clusters container containing clusters
\param geometry1 \param_geometry
\param geometry2 \param_geometry
\param robust_policy policy to handle robustness issues
@@ -257,11 +259,12 @@ template
>
inline void enrich_intersection_points(Turns& turns,
Clusters& clusters,
- detail::overlay::operation_type for_operation,
Geometry1 const& geometry1, Geometry2 const& geometry2,
RobustPolicy const& robust_policy,
Strategy const& strategy)
{
+ static const detail::overlay::operation_type for_operation
+ = detail::overlay::operation_from_overlay<OverlayType>::value;
typedef typename boost::range_value<Turns>::type turn_type;
typedef typename turn_type::turn_operation_type op_type;
typedef detail::overlay::indexed_turn_operation
@@ -328,7 +331,7 @@ inline void enrich_intersection_points(Turns& turns,
if (has_colocations)
{
- detail::overlay::assign_startable_in_clusters<Reverse1, Reverse2>(
+ detail::overlay::gather_cluster_properties<Reverse1, Reverse2>(
clusters, turns, for_operation, geometry1, geometry2);
}
diff --git a/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp b/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp
index f5c5cc6a2e..cc55414870 100644
--- a/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp
+++ b/boost/geometry/algorithms/detail/overlay/enrichment_info.hpp
@@ -9,6 +9,8 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ENRICHMENT_INFO_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_ENRICHMENT_INFO_HPP
+#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
+
namespace boost { namespace geometry
{
@@ -25,7 +27,7 @@ namespace detail { namespace overlay
of the overlay process). The information is gathered during the
enrichment phase
*/
-template<typename P>
+template<typename Point>
struct enrichment_info
{
inline enrichment_info()
@@ -35,6 +37,7 @@ struct enrichment_info
, startable(true)
, count_left(0)
, count_right(0)
+ , zone(-1)
{}
// vertex to which is free travel after this IP,
@@ -53,6 +56,7 @@ struct enrichment_info
// Counts if polygons left/right of this operation
std::size_t count_left;
std::size_t count_right;
+ signed_size_type zone; // open zone, in cluster
};
diff --git a/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp b/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp
index 4668189924..99281eaecb 100644
--- a/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp
@@ -49,7 +49,7 @@ struct get_turn_without_info
RobustPolicy const& robust_policy,
OutputIterator out)
{
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<typename TurnInfo::point_type>::type,
Point1,
@@ -109,7 +109,7 @@ inline void get_intersection_points(Geometry1 const& geometry1,
RobustPolicy const& robust_policy,
Turns& turns)
{
- concept::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
+ concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
typedef detail::get_intersection_points::get_turn_without_info
<
diff --git a/boost/geometry/algorithms/detail/overlay/get_relative_order.hpp b/boost/geometry/algorithms/detail/overlay/get_relative_order.hpp
index d71f4ad51f..ea9aa29f19 100644
--- a/boost/geometry/algorithms/detail/overlay/get_relative_order.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_relative_order.hpp
@@ -10,7 +10,7 @@
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_GET_RELATIVE_ORDER_HPP
-#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_strategies.hpp>
namespace boost { namespace geometry
diff --git a/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
index ac36c530bf..a4cce3fd32 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp
@@ -19,7 +19,7 @@
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/assert.hpp>
-#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_strategies.hpp>
#include <boost/geometry/algorithms/convert.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
@@ -989,6 +989,7 @@ struct get_turn_info
// Swap p/q
side_calculator
<
+ typename inters_info::cs_tag,
typename inters_info::robust_point2_type,
typename inters_info::robust_point1_type
> swapped_side_calc(inters.rqi(), inters.rqj(), inters.rqk(),
diff --git a/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp
index 0b3cb72747..85cdfbc02d 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp
@@ -400,6 +400,8 @@ struct get_turn_info_for_endpoint
IntersectionInfo const& inters, unsigned int ip_index,
operation_type & op1, operation_type & op2)
{
+ typedef typename cs_tag<typename TurnInfo::point_type>::type cs_tag;
+
boost::ignore_unused_variable_warning(i2);
boost::ignore_unused_variable_warning(j2);
boost::ignore_unused_variable_warning(ip_index);
@@ -425,7 +427,7 @@ struct get_turn_info_for_endpoint
}
else if ( ip_j2 )
{
- side_calculator<RobustPoint1, RobustPoint2, RobustPoint2>
+ side_calculator<cs_tag, RobustPoint1, RobustPoint2, RobustPoint2>
side_calc(ri2, ri1, rj1, ri2, rj2, rk2);
std::pair<operation_type, operation_type>
@@ -476,7 +478,7 @@ struct get_turn_info_for_endpoint
}
else if ( ip_j2 )
{
- side_calculator<RobustPoint1, RobustPoint2, RobustPoint2>
+ side_calculator<cs_tag, RobustPoint1, RobustPoint2, RobustPoint2>
side_calc(ri2, rj1, ri1, ri2, rj2, rk2);
std::pair<operation_type, operation_type>
diff --git a/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp b/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp
index ee0a93ae7e..3e7da1d797 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp
@@ -36,14 +36,19 @@ struct turn_operation_linear
bool is_collinear; // valid only for Linear geometry
};
-template <typename PointP, typename PointQ,
+template <typename TurnPointCSTag, typename PointP, typename PointQ,
typename Pi = PointP, typename Pj = PointP, typename Pk = PointP,
typename Qi = PointQ, typename Qj = PointQ, typename Qk = PointQ
>
struct side_calculator
{
- // todo: get from coordinate system
- typedef boost::geometry::strategy::side::side_by_triangle<> side;
+ // This strategy should be the same as side strategy defined in
+ // intersection_strategies<> which is used in various places
+ // of the library
+ typedef typename strategy::side::services::default_strategy
+ <
+ TurnPointCSTag
+ >::type side;
inline side_calculator(Pi const& pi, Pj const& pj, Pk const& pk,
Qi const& qi, Qj const& qj, Qk const& qk)
@@ -94,7 +99,7 @@ struct robust_points
robust_point2_type m_rqi, m_rqj, m_rqk;
};
-template <typename Point1, typename Point2, typename RobustPolicy>
+template <typename Point1, typename Point2, typename TurnPoint, typename RobustPolicy>
class intersection_info_base
: private robust_points<Point1, Point2, RobustPolicy>
{
@@ -107,7 +112,9 @@ public:
typedef typename base::robust_point1_type robust_point1_type;
typedef typename base::robust_point2_type robust_point2_type;
- typedef side_calculator<robust_point1_type, robust_point2_type> side_calculator_type;
+ typedef typename cs_tag<TurnPoint>::type cs_tag;
+
+ typedef side_calculator<cs_tag, robust_point1_type, robust_point2_type> side_calculator_type;
intersection_info_base(Point1 const& pi, Point1 const& pj, Point1 const& pk,
Point2 const& qi, Point2 const& qj, Point2 const& qk,
@@ -148,8 +155,8 @@ private:
point2_type const& m_qk;
};
-template <typename Point1, typename Point2>
-class intersection_info_base<Point1, Point2, detail::no_rescale_policy>
+template <typename Point1, typename Point2, typename TurnPoint>
+class intersection_info_base<Point1, Point2, TurnPoint, detail::no_rescale_policy>
{
public:
typedef Point1 point1_type;
@@ -158,7 +165,9 @@ public:
typedef Point1 robust_point1_type;
typedef Point2 robust_point2_type;
- typedef side_calculator<Point1, Point2> side_calculator_type;
+ typedef typename cs_tag<TurnPoint>::type cs_tag;
+
+ typedef side_calculator<cs_tag, Point1, Point2> side_calculator_type;
intersection_info_base(Point1 const& pi, Point1 const& pj, Point1 const& pk,
Point2 const& qi, Point2 const& qj, Point2 const& qk,
@@ -197,13 +206,13 @@ template
typename RobustPolicy
>
class intersection_info
- : public intersection_info_base<Point1, Point2, RobustPolicy>
+ : public intersection_info_base<Point1, Point2, TurnPoint, RobustPolicy>
{
- typedef intersection_info_base<Point1, Point2, RobustPolicy> base;
+ typedef intersection_info_base<Point1, Point2, TurnPoint, RobustPolicy> base;
- typedef typename strategy_intersection
+ typedef typename intersection_strategies
<
- typename cs_tag<TurnPoint>::type,
+ typename base::cs_tag,
Point1,
Point2,
TurnPoint,
@@ -298,9 +307,9 @@ private:
{
typedef model::referring_segment<Point const> seg;
- typedef strategy_intersection
+ typedef intersection_strategies
<
- typename cs_tag<Point>::type, Point, Point, Point, RobustPolicy
+ typename base::cs_tag, Point, Point, Point, RobustPolicy
> si;
typedef typename si::segment_intersection_strategy_type strategy;
diff --git a/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp
index ccb42d4c92..121728d822 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp
@@ -106,6 +106,7 @@ struct get_turn_info_linear_areal
// Swap p/q
side_calculator
<
+ typename inters_info::cs_tag,
typename inters_info::robust_point2_type,
typename inters_info::robust_point1_type
> swapped_side_calc(inters.rqi(), inters.rqj(), inters.rqk(),
@@ -752,6 +753,7 @@ struct get_turn_info_linear_areal
{
side_calculator
<
+ typename IntersectionInfo::cs_tag,
typename IntersectionInfo::robust_point1_type,
typename IntersectionInfo::robust_point2_type,
typename IntersectionInfo::robust_point2_type
@@ -770,6 +772,7 @@ struct get_turn_info_linear_areal
{
side_calculator
<
+ typename IntersectionInfo::cs_tag,
typename IntersectionInfo::robust_point1_type,
typename IntersectionInfo::robust_point2_type,
typename IntersectionInfo::robust_point2_type,
@@ -826,6 +829,7 @@ struct get_turn_info_linear_areal
{
side_calculator
<
+ typename IntersectionInfo::cs_tag,
typename IntersectionInfo::robust_point1_type,
typename IntersectionInfo::robust_point2_type,
typename IntersectionInfo::robust_point2_type
diff --git a/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp b/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp
index 19f0859cbb..6bb3a74bb8 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp
@@ -101,6 +101,7 @@ struct get_turn_info_linear_linear
// Swap p/q
side_calculator
<
+ typename inters_info::cs_tag,
typename inters_info::robust_point2_type,
typename inters_info::robust_point1_type
> swapped_side_calc(inters.rqi(), inters.rqj(), inters.rqk(),
diff --git a/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/boost/geometry/algorithms/detail/overlay/get_turns.hpp
index b2b97c0337..1eb18b74d4 100644
--- a/boost/geometry/algorithms/detail/overlay/get_turns.hpp
+++ b/boost/geometry/algorithms/detail/overlay/get_turns.hpp
@@ -3,8 +3,8 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2014.
-// Modifications copyright (c) 2014 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014, 2016.
+// Modifications copyright (c) 2014, 2016 Oracle and/or its affiliates.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -46,7 +46,7 @@
#include <boost/geometry/iterators/ever_circling_iterator.hpp>
#include <boost/geometry/strategies/cartesian/cart_intersect.hpp>
-#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_strategies.hpp>
#include <boost/geometry/strategies/intersection_result.hpp>
#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
@@ -972,7 +972,7 @@ inline void get_turns(Geometry1 const& geometry1,
Turns& turns,
InterruptPolicy& interrupt_policy)
{
- concept::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
+ concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
typedef detail::overlay::get_turn_info<AssignPolicy> TurnPolicy;
//typedef detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy> TurnPolicy;
diff --git a/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp b/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp
index ad75127fab..110e1be2f1 100644
--- a/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp
+++ b/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp
@@ -15,6 +15,9 @@
#include <vector>
#include <boost/range.hpp>
+#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/do_reverse.hpp>
#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
@@ -201,7 +204,6 @@ inline signed_size_type add_turn_to_cluster(Turn const& turn,
template
<
- bool Reverse1, bool Reverse2,
typename Turns,
typename ClusterPerSegment,
typename Operations,
@@ -212,7 +214,7 @@ inline void handle_colocation_cluster(Turns& turns,
signed_size_type& cluster_id,
ClusterPerSegment& cluster_per_segment,
Operations const& operations,
- Geometry1 const& geometry1, Geometry2 const& geometry2)
+ Geometry1 const& /*geometry1*/, Geometry2 const& /*geometry2*/)
{
typedef typename boost::range_value<Turns>::type turn_type;
typedef typename turn_type::turn_operation_type turn_operation_type;
@@ -318,7 +320,7 @@ inline void assign_cluster_to_turns(Turns& turns,
std::cout << " CONFLICT " << std::endl;
}
turn.cluster_id = it->second;
- clusters[turn.cluster_id].insert(turn_index);
+ clusters[turn.cluster_id].turn_indices.insert(turn_index);
}
}
}
@@ -339,7 +341,8 @@ inline void remove_clusters(Turns& turns, Clusters& clusters)
typename Clusters::iterator current_it = it;
++it;
- std::set<signed_size_type> const& turn_indices = current_it->second;
+ std::set<signed_size_type> const& turn_indices
+ = current_it->second.turn_indices;
if (turn_indices.size() == 1)
{
signed_size_type turn_index = *turn_indices.begin();
@@ -349,6 +352,134 @@ inline void remove_clusters(Turns& turns, Clusters& clusters)
}
}
+template <typename Turn, typename IdSet>
+inline void discard_ie_turn(Turn& turn, IdSet& ids, signed_size_type id)
+{
+ turn.discarded = true;
+ turn.cluster_id = -1;
+ // To remove it later from clusters
+ ids.insert(id);
+}
+
+template <bool Reverse>
+inline bool is_interior(segment_identifier const& seg_id)
+{
+ return Reverse ? seg_id.ring_index == -1 : seg_id.ring_index >= 0;
+}
+
+template <bool Reverse0, bool Reverse1>
+inline bool is_ie_turn(segment_identifier const& ext_seg_0,
+ segment_identifier const& ext_seg_1,
+ segment_identifier const& int_seg_0,
+ segment_identifier const& other_seg_1)
+{
+ // Compares two segment identifiers from two turns (external / one internal)
+
+ // From first turn [0], both are from same polygon (multi_index),
+ // one is exterior (-1), the other is interior (>= 0),
+ // and the second turn [1] handles the same ring
+
+ // For difference, where the rings are processed in reversal, all interior
+ // rings become exterior and vice versa. But also the multi property changes:
+ // rings originally from the same multi should now be considered as from
+ // different multi polygons.
+ // But this is not always the case, and at this point hard to figure out
+ // (not yet implemented, TODO)
+
+ bool const same_multi0 = ! Reverse0
+ && ext_seg_0.multi_index == int_seg_0.multi_index;
+
+ bool const same_multi1 = ! Reverse1
+ && ext_seg_1.multi_index == other_seg_1.multi_index;
+
+ return same_multi0
+ && same_multi1
+ && ! is_interior<Reverse0>(ext_seg_0)
+ && is_interior<Reverse0>(int_seg_0)
+ && ext_seg_1.ring_index == other_seg_1.ring_index;
+
+ // The other way round is tested in another call
+}
+
+template
+<
+ bool Reverse0, bool Reverse1, // Reverse interpretation interior/exterior
+ typename Turns,
+ typename Clusters
+>
+inline void discard_interior_exterior_turns(Turns& turns, Clusters& clusters)
+{
+ typedef std::set<signed_size_type>::const_iterator set_iterator;
+ typedef typename boost::range_value<Turns>::type turn_type;
+
+ std::set<signed_size_type> ids_to_remove;
+
+ for (typename Clusters::iterator cit = clusters.begin();
+ cit != clusters.end(); ++cit)
+ {
+ cluster_info& cinfo = cit->second;
+ std::set<signed_size_type>& ids = cinfo.turn_indices;
+
+ ids_to_remove.clear();
+
+ for (set_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ turn_type& turn = turns[*it];
+ segment_identifier const& seg_0 = turn.operations[0].seg_id;
+ segment_identifier const& seg_1 = turn.operations[1].seg_id;
+
+ if (turn.both(operation_intersection)
+ && Reverse0 == Reverse1)
+ {
+ if ( is_interior<Reverse0>(seg_0)
+ && is_interior<Reverse1>(seg_1))
+ {
+ // ii touch with, two interior rings
+ discard_ie_turn(turn, ids_to_remove, *it);
+ }
+
+ continue;
+ }
+
+ if (! (turn.both(operation_union)
+ || turn.combination(operation_union, operation_blocked)))
+ {
+ // Not a uu/ux, so cannot be colocated with a iu turn
+ continue;
+ }
+
+ for (set_iterator int_it = ids.begin(); int_it != ids.end(); ++int_it)
+ {
+ if (*it == *int_it)
+ {
+ continue;
+ }
+
+ // Turn with, possibly, an interior ring involved
+ turn_type& int_turn = turns[*int_it];
+ segment_identifier const& int_seg_0 = int_turn.operations[0].seg_id;
+ segment_identifier const& int_seg_1 = int_turn.operations[1].seg_id;
+
+ if (is_ie_turn<Reverse0, Reverse1>(seg_0, seg_1, int_seg_0, int_seg_1))
+ {
+ discard_ie_turn(int_turn, ids_to_remove, *int_it);
+ }
+ if (is_ie_turn<Reverse1, Reverse0>(seg_1, seg_0, int_seg_1, int_seg_0))
+ {
+ discard_ie_turn(int_turn, ids_to_remove, *int_it);
+ }
+ }
+ }
+
+ // Erase from the ids (which cannot be done above)
+ for (set_iterator sit = ids_to_remove.begin();
+ sit != ids_to_remove.end(); ++sit)
+ {
+ ids.erase(*sit);
+ }
+ }
+}
+
// Checks colocated turns and flags combinations of uu/other, possibly a
// combination of a ring touching another geometry's interior ring which is
@@ -434,13 +565,17 @@ inline bool handle_colocations(Turns& turns, Clusters& clusters,
{
if (it->second.size() > 1u)
{
- handle_colocation_cluster<Reverse1, Reverse2>(turns, cluster_id,
- cluster_per_segment, it->second,
- geometry1, geometry2);
+ handle_colocation_cluster(turns, cluster_id, cluster_per_segment,
+ it->second, geometry1, geometry2);
}
}
assign_cluster_to_turns(turns, clusters, cluster_per_segment);
+ discard_interior_exterior_turns
+ <
+ do_reverse<geometry::point_order<Geometry1>::value>::value != Reverse1,
+ do_reverse<geometry::point_order<Geometry2>::value>::value != Reverse2
+ >(turns, clusters);
remove_clusters(turns, clusters);
#if defined(BOOST_GEOMETRY_DEBUG_HANDLE_COLOCATIONS)
@@ -497,7 +632,7 @@ template
typename Geometry1,
typename Geometry2
>
-inline void assign_startable_in_clusters(Clusters& clusters, Turns& turns,
+inline void gather_cluster_properties(Clusters& clusters, Turns& turns,
operation_type for_operation,
Geometry1 const& geometry1, Geometry2 const& geometry2)
{
@@ -515,7 +650,8 @@ inline void assign_startable_in_clusters(Clusters& clusters, Turns& turns,
for (typename Clusters::iterator mit = clusters.begin();
mit != clusters.end(); ++mit)
{
- std::set<signed_size_type> const& ids = mit->second;
+ cluster_info& cinfo = mit->second;
+ std::set<signed_size_type> const& ids = cinfo.turn_indices;
if (ids.empty())
{
continue;
@@ -545,30 +681,32 @@ inline void assign_startable_in_clusters(Clusters& clusters, Turns& turns,
sbs.find_open();
- // Unset the startable flag for all 'closed' spaces
+ // Unset the startable flag for all 'closed' zones
for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
{
const typename sbs_type::rp& ranked = sbs.m_ranked_points[i];
turn_type& turn = turns[ranked.turn_index];
- turn_operation_type& op = turn.operations[ranked.op_index];
+ turn_operation_type& op = turn.operations[ranked.operation_index];
- if (ranked.index != sort_by_side::index_to)
+ if (ranked.direction != sort_by_side::dir_to)
{
continue;
}
- op.enriched.count_left = ranked.left_count;
- op.enriched.count_right = ranked.right_count;
+ op.enriched.count_left = ranked.count_left;
+ op.enriched.count_right = ranked.count_right;
+ op.enriched.zone = ranked.zone;
if ((for_operation == operation_union
- && ranked.left_count != 0)
+ && ranked.count_left != 0)
|| (for_operation == operation_intersection
- && ranked.right_count != 2))
+ && ranked.count_right != 2))
{
op.enriched.startable = false;
}
}
+ cinfo.open_count = sbs.open_count(turns);
}
}
diff --git a/boost/geometry/algorithms/detail/overlay/handle_touch.hpp b/boost/geometry/algorithms/detail/overlay/handle_touch.hpp
deleted file mode 100644
index 1febefc83a..0000000000
--- a/boost/geometry/algorithms/detail/overlay/handle_touch.hpp
+++ /dev/null
@@ -1,336 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-
-// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
-
-// 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)
-
-#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_HANDLE_TOUCH_HPP
-#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_HANDLE_TOUCH_HPP
-
-#include <cstddef>
-
-#include <boost/range.hpp>
-
-#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
-#include <boost/geometry/geometries/concepts/check.hpp>
-#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
-#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace overlay
-{
-
-
-template <typename Turns, typename Visitor>
-class handle_touch_uu
-{
-private :
- typedef typename boost::range_value<Turns>::type turn_type;
- typedef typename boost::range_iterator<Turns>::type turn_iterator;
- typedef typename boost::range_iterator<Turns const>::type turn_const_iterator;
-
- typedef typename boost::range_iterator
- <
- typename turn_type::container_type const
- >::type operation_const_iterator;
-
-public :
-
- handle_touch_uu(Visitor& visitor)
- : m_visitor(visitor)
- {}
-
- inline void apply(detail::overlay::operation_type operation, Turns& turns)
- {
- if (! has_uu(turns))
- {
- // Performance - if there is no u/u at all, nothing to be done
- return;
- }
-
- // Iterate through all u/u points
- int turn_index = 0;
- for (turn_iterator it = boost::begin(turns);
- it != boost::end(turns);
- ++it, ++turn_index)
- {
- turn_type& turn = *it;
- if (! turn.both(operation_union))
- {
- continue;
- }
-
- m_visitor.print("handle_touch uu:", turns, turn_index);
-
- bool const traverse = turn_should_be_traversed(turns, turn, turn_index);
- bool const start = traverse
- && turn_should_be_startable(turns, turn, turn_index);
- m_visitor.print("handle_touch, ready ", turns, turn_index);
-// << std::boolalpha
-// << traverse << " " << start
-
- if (traverse)
- {
- // Indicate the sources should switch here to create
- // separate rings (outer ring / inner ring)
- turn.switch_source = true;
- }
- // TODO: this is often not correct, fix this
- turn.operations[0].enriched.startable = start;
- turn.operations[1].enriched.startable = start;
- }
- }
-
-private :
-
- // Generic utility to be moved somewhere else
- static inline
- ring_identifier ring_id_from_seg_id(const segment_identifier& seg_id)
- {
- return ring_identifier(seg_id.source_index,
- seg_id.multi_index,
- seg_id.ring_index);
- }
-
- static inline
- ring_identifier ring_id_from_op(const turn_type& turn,
- int operation_index)
- {
- return ring_id_from_seg_id(turn.operations[operation_index].seg_id);
- }
-
- static inline bool in_range(const Turns& turns, signed_size_type index)
- {
- signed_size_type const turns_size =
- static_cast<signed_size_type>(boost::size(turns));
- return index >= 0 && index < turns_size;
- }
-
- static inline bool has_uu(const Turns& turns)
- {
- for (turn_const_iterator it = boost::begin(turns);
- it != boost::end(turns);
- ++it)
- {
- const turn_type& turn = *it;
- if (turn.both(operation_union))
- {
- return true;
- }
- }
- return false;
- }
-
- static inline
- bool turn_should_be_startable(const Turns& turns,
- const turn_type& uu_turn,
- signed_size_type uu_turn_index)
- {
- return turn_startable(turns, uu_turn, 0, uu_turn_index)
- || turn_startable(turns, uu_turn, 1, uu_turn_index);
-
- }
-
- static inline
- bool turn_startable(const Turns& turns,
- const turn_type& uu_turn,
- std::size_t op_index,
- signed_size_type original_turn_index,
- std::size_t iteration = 0)
- {
- if (iteration >= boost::size(turns))
- {
- // Defensive check to avoid infinite recursion
- return false;
- }
-
- signed_size_type const index
- = uu_turn.operations[op_index].enriched.travels_to_ip_index;
- if (index == original_turn_index)
- {
- // Completely traveled, having u/u only, via this op_index
- return true;
- }
-
- if (! in_range(turns, index))
- {
- return false;
- }
-
- const turn_type& new_turn = turns[index];
-
- if (new_turn.operations[0].enriched.startable)
- {
- // Already selectable - no need to select u/u turn too
- return false;
- }
-
- // If this u/u turn is traversed normally (without skipping), sources are switched
- return turn_startable(turns, new_turn, 1 - op_index,
- original_turn_index, iteration + 1);
- }
-
- inline bool turn_should_be_traversed(const Turns& turns,
- const turn_type& uu_turn,
- signed_size_type uu_turn_index)
- {
- return turn_should_be_traversed(turns, uu_turn, uu_turn_index, 0)
- || turn_should_be_traversed(turns, uu_turn, uu_turn_index, 1);
- }
-
- inline bool turn_should_be_traversed(const Turns& turns,
- const turn_type& uu_turn,
- signed_size_type uu_turn_index,
- int uu_operation_index)
- {
- // Suppose this is a u/u turn between P and Q
- // Examine all other turns on P and check if Q can be reached
- // Use one of the operations and check if you can reach the other
- signed_size_type const to_turn_index
- = uu_turn.operations[uu_operation_index].enriched.travels_to_ip_index;
- if (! in_range(turns, to_turn_index))
- {
- return false;
- }
-
- m_visitor.print("Examine:", turns, to_turn_index);
- ring_identifier const other_ring_id
- = ring_id_from_op(uu_turn, 1 - uu_operation_index);
-
- bool complete = false;
- return can_reach(complete, turns, turns[to_turn_index], uu_operation_index,
- other_ring_id, uu_turn_index, to_turn_index);
- }
-
- inline bool can_reach(bool& complete, const Turns& turns,
- const turn_type& turn,
- signed_size_type uu_operation_index,
- const ring_identifier& target_ring_id,
- signed_size_type uu_turn_index,
- signed_size_type to_turn_index,
- std::size_t iteration = 0)
- {
- if (complete)
- {
- return false;
- }
-
- if (turn.cluster_id >= 0)
- {
- // Clustered turns are yet not supported
- return false;
- }
-
- if (iteration >= boost::size(turns))
- {
- m_visitor.print("Too much iterations");
- // Defensive check to avoid infinite recursion
- return false;
- }
-
- if (uu_operation_index != -1 && turn.both(operation_union))
- {
- // If we end up in a u/u turn, check the way how, for this operation
- m_visitor.print("Via u/u");
- return can_reach_via(complete, turns, uu_operation_index,
- turn.operations[uu_operation_index],
- target_ring_id,
- uu_turn_index, to_turn_index, iteration);
- }
- else
- {
- // Check if specified ring can be reached via one of both operations
- return can_reach_via(complete, turns, 0, turn.operations[0], target_ring_id,
- uu_turn_index, to_turn_index, iteration)
- || can_reach_via(complete, turns, 1, turn.operations[1], target_ring_id,
- uu_turn_index, to_turn_index, iteration);
- }
- }
-
- template <typename Operation>
- inline bool can_reach_via(bool& complete, const Turns& turns,
- signed_size_type operation_index,
- const Operation& operation,
- const ring_identifier& target_ring_id,
- signed_size_type uu_turn_index,
- signed_size_type to_turn_index,
- std::size_t iteration = 0)
- {
- if (operation.operation != operation_union
- && operation.operation != operation_continue)
- {
- return false;
- }
-
- signed_size_type const index = operation.enriched.travels_to_ip_index;
- if (index == to_turn_index)
- {
- m_visitor.print("Dead end at", turns, index);
- // Completely traveled, the target is not found
- return false;
- }
- if (index == uu_turn_index)
- {
- // End up where trial was started
- m_visitor.print("Travel complete at", turns, index);
- complete = true;
- return false;
- }
-
- if (! in_range(turns, index))
- {
- return false;
- }
-
- m_visitor.print("Now to", turns, index, operation_index);
- const turn_type& new_turn = turns[index];
-
- if (new_turn.both(operation_union))
- {
- ring_identifier const ring_id = ring_id_from_op(new_turn, operation_index);
- if (ring_id == target_ring_id)
- {
- m_visitor.print("Found (at u/u)!");
- return true;
- }
- }
- else
- {
- ring_identifier const ring_id1 = ring_id_from_op(new_turn, 0);
- ring_identifier const ring_id2 = ring_id_from_op(new_turn, 1);
- if (ring_id1 == target_ring_id || ring_id2 == target_ring_id)
- {
- m_visitor.print("Found!");
- return true;
- }
- }
-
- // Recursively check this turn
- return can_reach(complete, turns, new_turn, operation_index, target_ring_id,
- uu_turn_index, to_turn_index, iteration + 1);
- }
-
-private :
- Visitor m_visitor;
-};
-
-template <typename Turns, typename Visitor>
-inline void handle_touch(detail::overlay::operation_type operation,
- Turns& turns, Visitor& visitor)
-{
- handle_touch_uu<Turns, Visitor> handler(visitor);
- handler.apply(operation, turns);
-}
-
-}} // namespace detail::overlay
-#endif // DOXYGEN_NO_DETAIL
-
-}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_HANDLE_TOUCH_HPP
diff --git a/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
index 59c8f6f1ff..bb82003a23 100644
--- a/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
+++ b/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp
@@ -993,8 +993,8 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1,
OutputIterator out,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename Strategy::rescale_policy_type rescale_policy_type;
rescale_policy_type robust_policy
@@ -1034,15 +1034,15 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1,
Geometry2 const& geometry2,
OutputIterator out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename geometry::rescale_policy_type
<
typename geometry::point_type<Geometry1>::type // TODO from both
>::type rescale_policy_type;
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<GeometryOut>::type,
Geometry1,
diff --git a/boost/geometry/algorithms/detail/overlay/overlay.hpp b/boost/geometry/algorithms/detail/overlay/overlay.hpp
index c3ecaa0b01..09c80025a0 100644
--- a/boost/geometry/algorithms/detail/overlay/overlay.hpp
+++ b/boost/geometry/algorithms/detail/overlay/overlay.hpp
@@ -23,10 +23,10 @@
#include <boost/mpl/assert.hpp>
+#include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp>
#include <boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp>
#include <boost/geometry/algorithms/detail/overlay/enrichment_info.hpp>
#include <boost/geometry/algorithms/detail/overlay/get_turns.hpp>
-#include <boost/geometry/algorithms/detail/overlay/handle_touch.hpp>
#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
#include <boost/geometry/algorithms/detail/overlay/traverse.hpp>
#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
@@ -220,11 +220,9 @@ struct overlay
typedef std::map
<
signed_size_type,
- std::set<signed_size_type>
+ cluster_info
> cluster_type;
- cluster_type clusters;
-
turn_container_type turns;
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
@@ -239,18 +237,14 @@ std::cout << "get turns" << std::endl;
visitor.visit_turns(1, turns);
- static const operation_type op_type
- = OverlayType == overlay_union
- ? geometry::detail::overlay::operation_union
- : geometry::detail::overlay::operation_intersection;
-
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
std::cout << "enrich" << std::endl;
#endif
typename Strategy::side_strategy_type side_strategy;
+ cluster_type clusters;
+
geometry::enrich_intersection_points<Reverse1, Reverse2, OverlayType>(turns,
- clusters, op_type,
- geometry1, geometry2,
+ clusters, geometry1, geometry2,
robust_policy,
side_strategy);
@@ -258,19 +252,6 @@ std::cout << "enrich" << std::endl;
visitor.visit_clusters(clusters, turns);
-
-#if 0
- // TODO: does not work always correctly, move to traverse and fix
- if (op_type == geometry::detail::overlay::operation_union)
- {
- #ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
- std::cout << "handle_touch" << std::endl;
- #endif
-
- handle_touch(op_type, turns, visitor);
- }
-#endif
-
#ifdef BOOST_GEOMETRY_DEBUG_ASSEMBLE
std::cout << "traverse" << std::endl;
#endif
@@ -278,7 +259,7 @@ std::cout << "traverse" << std::endl;
// Note that these rings are always in clockwise order, even in CCW polygons,
// and are marked as "to be reversed" below
ring_container_type rings;
- traverse<Reverse1, Reverse2, Geometry1, Geometry2, op_type>::apply
+ traverse<Reverse1, Reverse2, Geometry1, Geometry2, OverlayType>::apply
(
geometry1, geometry2,
robust_policy,
diff --git a/boost/geometry/algorithms/detail/overlay/overlay_type.hpp b/boost/geometry/algorithms/detail/overlay/overlay_type.hpp
index af62131f0e..0f60840973 100644
--- a/boost/geometry/algorithms/detail/overlay/overlay_type.hpp
+++ b/boost/geometry/algorithms/detail/overlay/overlay_type.hpp
@@ -14,14 +14,52 @@
namespace boost { namespace geometry
{
+// TODO: move to detail
enum overlay_type
{
overlay_union,
overlay_intersection,
overlay_difference,
+ overlay_buffer,
overlay_dissolve
};
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace overlay
+{
+
+enum operation_type
+{
+ operation_none,
+ operation_union,
+ operation_intersection,
+ operation_blocked,
+ operation_continue,
+ operation_opposite
+};
+
+
+template <overlay_type OverlayType>
+struct operation_from_overlay
+{
+ static const operation_type value = operation_union;
+};
+
+template <>
+struct operation_from_overlay<overlay_intersection>
+{
+ static const operation_type value = operation_intersection;
+};
+
+template <>
+struct operation_from_overlay<overlay_difference>
+{
+ static const operation_type value = operation_intersection;
+};
+
+}} // namespace detail::overlay
+#endif //DOXYGEN_NO_DETAIL
+
}} // namespace boost::geometry
diff --git a/boost/geometry/algorithms/detail/overlay/select_rings.hpp b/boost/geometry/algorithms/detail/overlay/select_rings.hpp
index 1b3cd866d7..de5eac8acb 100644
--- a/boost/geometry/algorithms/detail/overlay/select_rings.hpp
+++ b/boost/geometry/algorithms/detail/overlay/select_rings.hpp
@@ -165,11 +165,8 @@ namespace dispatch
template<overlay_type OverlayType>
struct decide
-{};
-
-template<>
-struct decide<overlay_union>
{
+ // Default implementation (union, inflate, deflate, dissolve)
static bool include(ring_identifier const& , ring_turn_info const& info)
{
return ! info.within_other;
@@ -179,6 +176,7 @@ struct decide<overlay_union>
{
return false;
}
+
};
template<>
diff --git a/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
index a74cb83f77..aedf22e1fb 100644
--- a/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
+++ b/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
@@ -276,7 +276,7 @@ inline void self_turns(Geometry const& geometry,
RobustPolicy const& robust_policy,
Turns& turns, InterruptPolicy& interrupt_policy)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
typedef detail::overlay::get_turn_info<detail::overlay::assign_null_policy> turn_policy;
diff --git a/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp b/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp
index 894cddab87..91b0f8ae24 100644
--- a/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp
+++ b/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp
@@ -23,42 +23,44 @@ namespace boost { namespace geometry
namespace detail { namespace overlay { namespace sort_by_side
{
-enum index_type { index_unknown = -1, index_from = 0, index_to = 1 };
+enum direction_type { dir_unknown = -1, dir_from = 0, dir_to = 1 };
// Point-wrapper, adding some properties
template <typename Point>
struct ranked_point
{
ranked_point()
- : main_rank(0)
+ : rank(0)
, turn_index(-1)
- , op_index(-1)
- , index(index_unknown)
- , left_count(0)
- , right_count(0)
+ , operation_index(-1)
+ , direction(dir_unknown)
+ , count_left(0)
+ , count_right(0)
, operation(operation_none)
{}
ranked_point(const Point& p, signed_size_type ti, signed_size_type oi,
- index_type i, operation_type op, segment_identifier sid)
+ direction_type d, operation_type op, segment_identifier sid)
: point(p)
- , main_rank(0)
+ , rank(0)
+ , zone(-1)
, turn_index(ti)
- , op_index(oi)
- , index(i)
- , left_count(0)
- , right_count(0)
+ , operation_index(oi)
+ , direction(d)
+ , count_left(0)
+ , count_right(0)
, operation(op)
, seg_id(sid)
{}
Point point;
- std::size_t main_rank;
+ std::size_t rank;
+ signed_size_type zone; // index of closed zone, in uu turn there would be 2 zones
signed_size_type turn_index;
- signed_size_type op_index;
- index_type index;
- std::size_t left_count;
- std::size_t right_count;
+ signed_size_type operation_index;
+ direction_type direction;
+ std::size_t count_left;
+ std::size_t count_right;
operation_type operation;
segment_identifier seg_id;
};
@@ -81,9 +83,9 @@ struct less_by_index
inline bool operator()(const T& first, const T& second) const
{
// First order by from/to
- if (first.index != second.index)
+ if (first.direction != second.direction)
{
- return first.index < second.index;
+ return first.direction < second.direction;
}
// All the same, order by turn index (we might consider length too)
return first.turn_index < second.turn_index;
@@ -200,8 +202,8 @@ struct side_sorter
op.seg_id, point1, point2, point3);
Point const& point_to = op.fraction.is_one() ? point3 : point2;
- m_ranked_points.push_back(rp(point1, turn_index, op_index, index_from, op.operation, op.seg_id));
- m_ranked_points.push_back(rp(point_to, turn_index, op_index, index_to, op.operation, op.seg_id));
+ m_ranked_points.push_back(rp(point1, turn_index, op_index, dir_from, op.operation, op.seg_id));
+ m_ranked_points.push_back(rp(point_to, turn_index, op_index, dir_to, op.operation, op.seg_id));
if (is_origin)
{
@@ -233,7 +235,7 @@ struct side_sorter
colinear_rank++;
}
- m_ranked_points[i].main_rank = colinear_rank;
+ m_ranked_points[i].rank = colinear_rank;
}
}
@@ -243,7 +245,7 @@ struct side_sorter
for (std::size_t i = 0; i < m_ranked_points.size(); i++)
{
const rp& ranked = m_ranked_points[i];
- if (ranked.index != index_from)
+ if (ranked.direction != dir_from)
{
continue;
}
@@ -290,6 +292,8 @@ struct side_sorter
&segment_identifier::source_index
>(handled);
}
+
+ assign_zones();
}
void reverse()
@@ -299,25 +303,25 @@ struct side_sorter
return;
}
- int const last = 1 + m_ranked_points.back().main_rank;
+ int const last = 1 + m_ranked_points.back().rank;
- // Move iterator after main_rank==0
+ // Move iterator after rank==0
bool has_first = false;
typename container_type::iterator it = m_ranked_points.begin() + 1;
- for (; it != m_ranked_points.end() && it->main_rank == 0; ++it)
+ for (; it != m_ranked_points.end() && it->rank == 0; ++it)
{
has_first = true;
}
if (has_first)
{
- // Reverse first part (having main_rank == 0), if any,
+ // Reverse first part (having rank == 0), if any,
// but skip the very first row
std::reverse(m_ranked_points.begin() + 1, it);
for (typename container_type::iterator fit = m_ranked_points.begin();
fit != it; ++fit)
{
- BOOST_ASSERT(fit->main_rank == 0);
+ BOOST_ASSERT(fit->rank == 0);
}
}
@@ -325,11 +329,41 @@ struct side_sorter
std::reverse(it, m_ranked_points.end());
for (; it != m_ranked_points.end(); ++it)
{
- BOOST_ASSERT(it->main_rank > 0);
- it->main_rank = last - it->main_rank;
+ BOOST_ASSERT(it->rank > 0);
+ it->rank = last - it->rank;
}
}
+ //! Check how many open spaces there are
+ template <typename Turns>
+ std::size_t open_count(Turns const& turns) const
+ {
+ typedef typename boost::range_value<Turns>::type turn_type;
+ typedef typename turn_type::turn_operation_type turn_operation_type;
+
+ std::size_t result = 0;
+ std::size_t last_rank = 0;
+ for (std::size_t i = 0; i < m_ranked_points.size(); i++)
+ {
+ rp const& ranked_point = m_ranked_points[i];
+
+ if (ranked_point.rank > last_rank
+ && ranked_point.direction == sort_by_side::dir_to)
+ {
+ // TODO: take count-left / count_right from rank itself
+ turn_type const& ranked_turn = turns[ranked_point.turn_index];
+ turn_operation_type const& ranked_op = ranked_turn.operations[ranked_point.operation_index];
+ if (ranked_op.enriched.count_left == 0
+ && ranked_op.enriched.count_right > 0)
+ {
+ result++;
+ last_rank = ranked_point.rank;
+ }
+ }
+ }
+ return result;
+ }
+
//protected :
typedef std::vector<rp> container_type;
@@ -366,19 +400,19 @@ private :
// if min=5,max=2: assign from 5,6,7,1,2
bool const in_range
= max_rank >= min_rank
- ? ranked.main_rank >= min_rank && ranked.main_rank <= max_rank
- : ranked.main_rank >= min_rank || ranked.main_rank <= max_rank
+ ? ranked.rank >= min_rank && ranked.rank <= max_rank
+ : ranked.rank >= min_rank || ranked.rank <= max_rank
;
if (in_range)
{
if (side_index == 1)
{
- ranked.left_count++;
+ ranked.count_left++;
}
else if (side_index == 2)
{
- ranked.right_count++;
+ ranked.count_right++;
}
}
}
@@ -389,8 +423,8 @@ private :
std::size_t start_index)
{
int state = 1; // 'closed', because start_index is "from", arrives at the turn
- std::size_t last_from_rank = m_ranked_points[start_index].main_rank;
- std::size_t previous_rank = m_ranked_points[start_index].main_rank;
+ std::size_t last_from_rank = m_ranked_points[start_index].rank;
+ std::size_t previous_rank = m_ranked_points[start_index].rank;
for (std::size_t index = move<Member>(the_index, start_index);
;
@@ -398,7 +432,7 @@ private :
{
rp& ranked = m_ranked_points[index];
- if (ranked.main_rank != previous_rank && state == 0)
+ if (ranked.rank != previous_rank && state == 0)
{
assign_ranks(last_from_rank, previous_rank - 1, 1);
assign_ranks(last_from_rank + 1, previous_rank, 2);
@@ -409,19 +443,91 @@ private :
return;
}
- if (ranked.index == index_from)
+ if (ranked.direction == dir_from)
{
- last_from_rank = ranked.main_rank;
+ last_from_rank = ranked.rank;
state++;
}
- else if (ranked.index == index_to)
+ else if (ranked.direction == dir_to)
{
state--;
}
- previous_rank = ranked.main_rank;
+ previous_rank = ranked.rank;
}
}
+
+ //! Find closed zones and assign it
+ void assign_zones()
+ {
+ // Find a starting point (the first rank after an outgoing rank
+ // with no polygons on the left side)
+ std::size_t start_rank = m_ranked_points.size() + 1;
+ std::size_t start_index = 0;
+ std::size_t max_rank = 0;
+ for (std::size_t i = 0; i < m_ranked_points.size(); i++)
+ {
+ rp const& ranked_point = m_ranked_points[i];
+ if (ranked_point.rank > max_rank)
+ {
+ max_rank = ranked_point.rank;
+ }
+ if (ranked_point.direction == sort_by_side::dir_to
+ && ranked_point.count_left == 0
+ && ranked_point.count_right > 0)
+ {
+ start_rank = ranked_point.rank + 1;
+ }
+ if (ranked_point.rank == start_rank && start_index == 0)
+ {
+ start_index = i;
+ }
+ }
+
+ // Assign the zones
+ std::size_t const undefined_rank = max_rank + 1;
+ std::size_t zone_id = 0;
+ std::size_t last_rank = 0;
+ std::size_t rank_at_next_zone = undefined_rank;
+ std::size_t index = start_index;
+ for (std::size_t i = 0; i < m_ranked_points.size(); i++)
+ {
+ rp& ranked_point = m_ranked_points[index];
+
+ // Implement cyclic behavior
+ index++;
+ if (index == m_ranked_points.size())
+ {
+ index = 0;
+ }
+
+ if (ranked_point.rank != last_rank)
+ {
+ if (ranked_point.rank == rank_at_next_zone)
+ {
+ zone_id++;
+ rank_at_next_zone = undefined_rank;
+ }
+
+ if (ranked_point.direction == sort_by_side::dir_to
+ && ranked_point.count_left == 0
+ && ranked_point.count_right > 0)
+ {
+ rank_at_next_zone = ranked_point.rank + 1;
+ if (rank_at_next_zone > max_rank)
+ {
+ rank_at_next_zone = 0;
+ }
+ }
+
+ last_rank = ranked_point.rank;
+ }
+
+ ranked_point.zone = zone_id;
+ }
+ }
+
+
};
diff --git a/boost/geometry/algorithms/detail/overlay/traversal.hpp b/boost/geometry/algorithms/detail/overlay/traversal.hpp
new file mode 100644
index 0000000000..1156644bc3
--- /dev/null
+++ b/boost/geometry/algorithms/detail/overlay/traversal.hpp
@@ -0,0 +1,672 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_HPP
+#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/assert.hpp>
+
+#if defined(BOOST_GEOMETRY_DEBUG_INTERSECTION) \
+ || defined(BOOST_GEOMETRY_OVERLAY_REPORT_WKT) \
+ || defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
+# include <string>
+# include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
+# include <boost/geometry/io/wkt/wkt.hpp>
+#endif
+
+namespace boost { namespace geometry
+{
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace overlay
+{
+
+template <typename Turn, typename Operation>
+#ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
+inline void debug_traverse(Turn const& turn, Operation op,
+ std::string const& header)
+{
+ std::cout << header
+ << " at " << op.seg_id
+ << " meth: " << method_char(turn.method)
+ << " op: " << operation_char(op.operation)
+ << " vis: " << visited_char(op.visited)
+ << " of: " << operation_char(turn.operations[0].operation)
+ << operation_char(turn.operations[1].operation)
+ << " " << geometry::wkt(turn.point)
+ << std::endl;
+
+ if (boost::contains(header, "Finished"))
+ {
+ std::cout << std::endl;
+ }
+}
+#else
+inline void debug_traverse(Turn const& , Operation, const char*)
+{
+}
+#endif
+
+
+//! Metafunction to define side_order (clockwise, ccw) by operation_type
+template <operation_type OpType>
+struct side_compare {};
+
+template <>
+struct side_compare<operation_union>
+{
+ typedef std::greater<int> type;
+};
+
+template <>
+struct side_compare<operation_intersection>
+{
+ typedef std::less<int> type;
+};
+
+
+template
+<
+ bool Reverse1,
+ bool Reverse2,
+ overlay_type OverlayType,
+ typename Geometry1,
+ typename Geometry2,
+ typename Turns,
+ typename Clusters,
+ typename RobustPolicy,
+ typename Visitor
+>
+struct traversal
+{
+ static const operation_type target_operation = operation_from_overlay<OverlayType>::value;
+
+ typedef typename side_compare<target_operation>::type side_compare_type;
+ typedef typename boost::range_value<Turns>::type turn_type;
+ typedef typename turn_type::turn_operation_type turn_operation_type;
+
+ typedef typename geometry::point_type<Geometry1>::type point_type;
+ typedef sort_by_side::side_sorter
+ <
+ Reverse1, Reverse2,
+ point_type, side_compare_type
+ > sbs_type;
+
+ inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2,
+ Turns& turns, Clusters const& clusters,
+ RobustPolicy const& robust_policy, Visitor& visitor)
+ : m_geometry1(geometry1)
+ , m_geometry2(geometry2)
+ , m_turns(turns)
+ , m_clusters(clusters)
+ , m_robust_policy(robust_policy)
+ , m_visitor(visitor)
+ {
+ }
+
+ inline void finalize_visit_info()
+ {
+ for (typename boost::range_iterator<Turns>::type
+ it = boost::begin(m_turns);
+ it != boost::end(m_turns);
+ ++it)
+ {
+ turn_type& turn = *it;
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type& op = turn.operations[i];
+ op.visited.finalize();
+ }
+ }
+ }
+
+ inline void set_visited(turn_type& turn, turn_operation_type& op)
+ {
+ // On "continue", set "visited" for ALL directions in this turn
+ if (op.operation == detail::overlay::operation_continue)
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type& op = turn.operations[i];
+ if (op.visited.none())
+ {
+ op.visited.set_visited();
+ }
+ }
+ }
+ else
+ {
+ op.visited.set_visited();
+ }
+ }
+
+ inline bool is_visited(turn_type const& turn, turn_operation_type const& op,
+ signed_size_type turn_index, int op_index) const
+ {
+ return op.visited.visited();
+ }
+
+ inline bool select_source(signed_size_type turn_index,
+ segment_identifier const& seg_id1,
+ segment_identifier const& seg_id2) const
+ {
+ if (target_operation == operation_intersection)
+ {
+ // For intersections always switch sources
+ return seg_id1.source_index != seg_id2.source_index;
+ }
+ else if (target_operation == operation_union)
+ {
+ // For uu, only switch sources if indicated
+ turn_type const& turn = m_turns[turn_index];
+
+ if (OverlayType == overlay_buffer)
+ {
+ // Buffer does not use source_index (always 0)
+ return turn.switch_source
+ ? seg_id1.multi_index != seg_id2.multi_index
+ : seg_id1.multi_index == seg_id2.multi_index;
+ }
+
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ if (turn.switch_source == 1)
+ {
+ std::cout << "Switch source at " << turn_index << std::endl;
+ }
+ else
+ {
+ std::cout << "DON'T SWITCH SOURCES at " << turn_index << std::endl;
+ }
+#endif
+ return turn.switch_source
+ ? seg_id1.source_index != seg_id2.source_index
+ : seg_id1.source_index == seg_id2.source_index;
+ }
+ return false;
+ }
+
+ inline
+ signed_size_type get_next_turn_index(turn_operation_type const& op) const
+ {
+ return op.enriched.next_ip_index == -1
+ ? op.enriched.travels_to_ip_index
+ : op.enriched.next_ip_index;
+ }
+
+ inline bool traverse_possible(signed_size_type turn_index) const
+ {
+ if (turn_index == -1)
+ {
+ return false;
+ }
+
+ turn_type const& turn = m_turns[turn_index];
+
+ // It is not a dead end if there is an operation to continue, or of
+ // there is a cluster (assuming for now we can get out of the cluster)
+ return turn.cluster_id >= 0
+ || turn.has(target_operation)
+ || turn.has(operation_continue);
+ }
+
+ inline
+ bool select_cc_operation(turn_type const& turn,
+ signed_size_type start_turn_index,
+ int& selected_op_index) const
+ {
+ // For "cc", take either one, but if there is a starting one,
+ // take that one. If next is dead end, skip that one.
+
+ bool result = false;
+
+ typename turn_operation_type::comparable_distance_type
+ max_remaining_distance = 0;
+
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type const& op = turn.operations[i];
+
+ signed_size_type const next_turn_index = get_next_turn_index(op);
+
+ if (! result && traverse_possible(next_turn_index))
+ {
+ max_remaining_distance = op.remaining_distance;
+ selected_op_index = i;
+ debug_traverse(turn, op, " Candidate");
+ result = true;
+ }
+
+ if (result)
+ {
+ if (next_turn_index == start_turn_index)
+ {
+ selected_op_index = i;
+ debug_traverse(turn, op, " Candidate cc override (start)");
+ }
+ else if (op.remaining_distance > max_remaining_distance)
+ {
+ max_remaining_distance = op.remaining_distance;
+ selected_op_index = i;
+ debug_traverse(turn, op, " Candidate cc override (remaining)");
+ }
+ }
+ }
+
+ return result;
+ }
+
+ inline
+ bool select_noncc_operation(turn_type const& turn,
+ signed_size_type turn_index,
+ segment_identifier const& seg_id,
+ int& selected_op_index) const
+ {
+ // For "ii", take the other one (alternate)
+ // UNLESS the other one is already visited
+ // For "uu", take the same one (see above);
+
+ bool result = false;
+
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type const& op = turn.operations[i];
+
+ if (op.operation == target_operation
+ && ! op.visited.finished()
+ && (! result || select_source(turn_index, op.seg_id, seg_id)))
+ {
+ selected_op_index = i;
+ debug_traverse(turn, op, " Candidate");
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ inline
+ bool select_operation(const turn_type& turn,
+ signed_size_type turn_index,
+ signed_size_type start_turn_index,
+ segment_identifier const& previous_seg_id,
+ int& selected_op_index) const
+ {
+ bool result = false;
+ selected_op_index = -1;
+ if (turn.both(operation_continue))
+ {
+ result = select_cc_operation(turn, start_turn_index,
+ selected_op_index);
+ }
+ else
+ {
+ result = select_noncc_operation(turn, turn_index,
+ previous_seg_id, selected_op_index);
+ }
+ if (result)
+ {
+ debug_traverse(turn, turn.operations[selected_op_index], " Accepted");
+ }
+
+ return result;
+ }
+
+ inline int starting_operation_index(const turn_type& turn) const
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ if (turn.operations[i].visited.started())
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ inline bool both_finished(const turn_type& turn) const
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ if (! turn.operations[i].visited.finished())
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ inline bool select_from_cluster(signed_size_type& turn_index,
+ int& op_index, signed_size_type start_turn_index,
+ sbs_type const& sbs, bool is_touching) const
+ {
+ bool const is_union = target_operation == operation_union;
+ bool const is_intersection = target_operation == operation_intersection;
+
+ std::size_t selected_rank = 0;
+ std::size_t min_rank = 0;
+ bool result = false;
+ for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
+ {
+ typename sbs_type::rp const& ranked_point = sbs.m_ranked_points[i];
+ if (result && ranked_point.rank > selected_rank)
+ {
+ return result;
+ }
+
+ turn_type const& ranked_turn = m_turns[ranked_point.turn_index];
+ turn_operation_type const& ranked_op = ranked_turn.operations[ranked_point.operation_index];
+
+ if (result && ranked_op.visited.finalized())
+ {
+ // One of the arcs in the same direction as the selected result
+ // is already traversed.
+ return false;
+ }
+
+ if (! is_touching && ranked_op.visited.finalized())
+ {
+ // Skip this one, go to next
+ min_rank = ranked_point.rank;
+ continue;
+ }
+
+ if (ranked_point.direction == sort_by_side::dir_to
+ && (ranked_point.rank > min_rank
+ || ranked_turn.both(operation_continue)))
+ {
+ if ((is_union
+ && ranked_op.enriched.count_left == 0
+ && ranked_op.enriched.count_right > 0)
+ || (is_intersection
+ && ranked_op.enriched.count_right == 2))
+ {
+ if (result && ranked_point.turn_index != start_turn_index)
+ {
+ // Don't override - only override if arrive at start
+ continue;
+ }
+
+ turn_index = ranked_point.turn_index;
+ op_index = ranked_point.operation_index;
+
+ if (is_intersection
+ && ranked_turn.both(operation_intersection)
+ && ranked_op.visited.finalized())
+ {
+ // Override:
+ // For a ii turn, even though one operation might be selected,
+ // it should take the other one if the first one is used in a completed ring
+ op_index = 1 - ranked_point.operation_index;
+ }
+
+ result = true;
+ selected_rank = ranked_point.rank;
+ }
+ else if (! is_touching)
+ {
+ return result;
+ }
+ }
+ }
+ return result;
+ }
+
+ inline bool select_turn_from_cluster(signed_size_type& turn_index,
+ int& op_index, bool& is_touching,
+ signed_size_type start_turn_index,
+ segment_identifier const& previous_seg_id) const
+ {
+ bool const is_union = target_operation == operation_union;
+
+ turn_type const& turn = m_turns[turn_index];
+ BOOST_ASSERT(turn.cluster_id >= 0);
+
+ typename Clusters::const_iterator mit = m_clusters.find(turn.cluster_id);
+ BOOST_ASSERT(mit != m_clusters.end());
+
+ cluster_info const& cinfo = mit->second;
+ std::set<signed_size_type> const& ids = cinfo.turn_indices;
+
+ sbs_type sbs;
+
+ bool has_origin = false;
+
+ for (typename std::set<signed_size_type>::const_iterator sit = ids.begin();
+ sit != ids.end(); ++sit)
+ {
+ signed_size_type cluster_turn_index = *sit;
+ turn_type const& cluster_turn = m_turns[cluster_turn_index];
+ if (cluster_turn.discarded)
+ {
+ // Defensive check, discarded turns should not be in cluster
+ continue;
+ }
+
+ for (int i = 0; i < 2; i++)
+ {
+ turn_operation_type const& op = cluster_turn.operations[i];
+ bool is_origin = false;
+ if (cluster_turn_index == turn_index)
+ {
+ // Check if this is the origin
+ if (OverlayType == overlay_buffer)
+ {
+ is_origin = op.seg_id.multi_index == previous_seg_id.multi_index;
+ }
+ else
+ {
+ is_origin = op.seg_id.source_index
+ == previous_seg_id.source_index;
+ }
+ if (is_origin)
+ {
+ has_origin = true;
+ }
+ }
+
+ sbs.add(op, cluster_turn_index, i, m_geometry1, m_geometry2,
+ is_origin);
+ }
+ }
+
+ if (! has_origin)
+ {
+ return false;
+ }
+
+ sbs.apply(turn.point);
+
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ is_touching = is_union && cinfo.open_count > 1;
+ if (is_touching)
+ {
+ if (cinfo.switch_source)
+ {
+ is_touching = false;
+ std::cout << "CLUSTER: SWITCH SOURCES at " << turn_index << std::endl;
+ }
+ else
+ {
+ std::cout << "CLUSTER: CONTINUE at " << turn_index << std::endl;
+ }
+ }
+#else
+ is_touching = is_union && cinfo.open_count > 1 && ! cinfo.switch_source;
+#endif
+ if (is_touching)
+ {
+ sbs.reverse();
+ }
+
+ return select_from_cluster(turn_index, op_index, start_turn_index, sbs,
+ is_touching);
+ }
+
+ inline void change_index_for_self_turn(signed_size_type& to_vertex_index,
+ turn_type const& start_turn,
+ turn_operation_type const& start_op,
+ int start_op_index) const
+ {
+ if (OverlayType != overlay_buffer)
+ {
+ return;
+ }
+
+ // It travels to itself, can happen. If this is a buffer, it can
+ // sometimes travel to itself in the following configuration:
+ //
+ // +---->--+
+ // | |
+ // | +---*----+ *: one turn, with segment index 2/7
+ // | | | |
+ // | +---C | C: closing point (start/end)
+ // | |
+ // +------------+
+ //
+ // If it starts on segment 2 and travels to itself on segment 2, that
+ // should be corrected to 7 because that is the shortest path
+ //
+ // Also a uu turn (touching with another buffered ring) might have this
+ // apparent configuration, but there it should
+ // always travel the whole ring
+
+ turn_operation_type const& other_op
+ = start_turn.operations[1 - start_op_index];
+
+ bool const correct
+ = ! start_turn.both(operation_union)
+ && start_op.seg_id.segment_index == to_vertex_index;
+
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
+ std::cout << " WARNING: self-buffer "
+ << " correct=" << correct
+ << " turn=" << operation_char(start_turn.operations[0].operation)
+ << operation_char(start_turn.operations[1].operation)
+ << " start=" << start_op.seg_id.segment_index
+ << " from=" << to_vertex_index
+ << " to=" << other_op.enriched.travels_to_vertex_index
+ << std::endl;
+#endif
+
+ if (correct)
+ {
+ to_vertex_index = other_op.enriched.travels_to_vertex_index;
+ }
+ }
+
+ bool select_turn_from_enriched(signed_size_type& turn_index,
+ segment_identifier& previous_seg_id,
+ signed_size_type& to_vertex_index,
+ signed_size_type start_turn_index,
+ int start_op_index,
+ turn_type const& previous_turn,
+ turn_operation_type const& previous_op,
+ bool is_start) const
+ {
+ to_vertex_index = -1;
+
+ if (previous_op.enriched.next_ip_index < 0)
+ {
+ // There is no next IP on this segment
+ if (previous_op.enriched.travels_to_vertex_index < 0
+ || previous_op.enriched.travels_to_ip_index < 0)
+ {
+ return false;
+ }
+
+ to_vertex_index = previous_op.enriched.travels_to_vertex_index;
+
+ if (is_start &&
+ previous_op.enriched.travels_to_ip_index == start_turn_index)
+ {
+ change_index_for_self_turn(to_vertex_index, previous_turn,
+ previous_op, start_op_index);
+ }
+
+ turn_index = previous_op.enriched.travels_to_ip_index;
+ previous_seg_id = previous_op.seg_id;
+ }
+ else
+ {
+ // Take the next IP on this segment
+ turn_index = previous_op.enriched.next_ip_index;
+ previous_seg_id = previous_op.seg_id;
+ }
+ return true;
+ }
+
+ bool select_turn(signed_size_type start_turn_index,
+ signed_size_type& turn_index,
+ int& op_index,
+ bool& is_touching,
+ int previous_op_index,
+ signed_size_type previous_turn_index,
+ segment_identifier const& previous_seg_id,
+ bool is_start)
+ {
+ if (m_turns[turn_index].cluster_id >= 0)
+ {
+ if (! select_turn_from_cluster(turn_index, op_index, is_touching,
+ start_turn_index, previous_seg_id))
+ {
+ return false;
+ }
+
+ if (is_start && turn_index == previous_turn_index)
+ {
+ op_index = previous_op_index;
+ }
+ }
+ else
+ {
+ turn_type const& current_turn = m_turns[turn_index];
+
+ op_index = starting_operation_index(current_turn);
+ if (op_index == -1)
+ {
+ if (both_finished(current_turn))
+ {
+ return false;
+ }
+
+ if (! select_operation(current_turn, turn_index,
+ start_turn_index,
+ previous_seg_id,
+ op_index))
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+private :
+ Geometry1 const& m_geometry1;
+ Geometry2 const& m_geometry2;
+ Turns& m_turns;
+ Clusters const& m_clusters;
+ RobustPolicy const& m_robust_policy;
+ Visitor& m_visitor;
+};
+
+
+
+}} // namespace detail::overlay
+#endif // DOXYGEN_NO_DETAIL
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_HPP
diff --git a/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp b/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp
new file mode 100644
index 0000000000..104bd6b8e7
--- /dev/null
+++ b/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp
@@ -0,0 +1,347 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_RING_CREATOR_HPP
+#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_RING_CREATOR_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal.hpp>
+#include <boost/geometry/algorithms/num_points.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/assert.hpp>
+#include <boost/geometry/core/closure.hpp>
+
+namespace boost { namespace geometry
+{
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace overlay
+{
+
+
+template
+<
+ bool Reverse1,
+ bool Reverse2,
+ overlay_type OverlayType,
+ typename Geometry1,
+ typename Geometry2,
+ typename Turns,
+ typename Clusters,
+ typename RobustPolicy,
+ typename Visitor,
+ typename Backtrack
+>
+struct traversal_ring_creator
+{
+ typedef traversal<Reverse1, Reverse2, OverlayType,
+ Geometry1, Geometry2, Turns, Clusters, RobustPolicy, Visitor>
+ traversal_type;
+
+ typedef typename boost::range_value<Turns>::type turn_type;
+ typedef typename turn_type::turn_operation_type turn_operation_type;
+
+ static const operation_type target_operation
+ = operation_from_overlay<OverlayType>::value;
+
+ inline traversal_ring_creator(Geometry1 const& geometry1, Geometry2 const& geometry2,
+ Turns& turns, Clusters const& clusters,
+ RobustPolicy const& robust_policy, Visitor& visitor)
+ : m_trav(geometry1, geometry2, turns, clusters, robust_policy,visitor)
+ , m_geometry1(geometry1)
+ , m_geometry2(geometry2)
+ , m_turns(turns)
+ , m_clusters(clusters)
+ , m_robust_policy(robust_policy)
+ , m_visitor(visitor)
+ , m_has_uu(false)
+ {
+
+ }
+
+ template <typename Ring>
+ inline traverse_error_type travel_to_next_turn(signed_size_type start_turn_index,
+ int start_op_index,
+ signed_size_type& turn_index,
+ int& op_index,
+ Ring& current_ring,
+ bool is_start)
+ {
+ int const previous_op_index = op_index;
+ signed_size_type const previous_turn_index = turn_index;
+ turn_type& previous_turn = m_turns[turn_index];
+ turn_operation_type& previous_op = previous_turn.operations[op_index];
+ segment_identifier previous_seg_id;
+
+ signed_size_type to_vertex_index = -1;
+ if (! m_trav.select_turn_from_enriched(turn_index, previous_seg_id,
+ to_vertex_index, start_turn_index, start_op_index,
+ previous_turn, previous_op, is_start))
+ {
+ return is_start
+ ? traverse_error_no_next_ip_at_start
+ : traverse_error_no_next_ip;
+ }
+ if (to_vertex_index >= 0)
+ {
+ if (previous_op.seg_id.source_index == 0)
+ {
+ geometry::copy_segments<Reverse1>(m_geometry1,
+ previous_op.seg_id, to_vertex_index,
+ m_robust_policy, current_ring);
+ }
+ else
+ {
+ geometry::copy_segments<Reverse2>(m_geometry2,
+ previous_op.seg_id, to_vertex_index,
+ m_robust_policy, current_ring);
+ }
+ }
+
+ if (m_turns[turn_index].discarded)
+ {
+ return is_start
+ ? traverse_error_dead_end_at_start
+ : traverse_error_dead_end;
+ }
+
+ if (is_start)
+ {
+ // Register the start
+ previous_op.visited.set_started();
+ m_visitor.visit_traverse(m_turns, previous_turn, previous_op, "Start");
+ }
+
+ bool is_touching = false;
+ if (! m_trav.select_turn(start_turn_index, turn_index, op_index,
+ is_touching,
+ previous_op_index, previous_turn_index, previous_seg_id,
+ is_start))
+ {
+ return is_start
+ ? traverse_error_no_next_ip_at_start
+ : traverse_error_no_next_ip;
+ }
+
+ {
+ // Check operation (TODO: this might be redundant or should be catched before)
+ const turn_type& current_turn = m_turns[turn_index];
+ const turn_operation_type& op = current_turn.operations[op_index];
+ if (op.visited.finalized()
+ || m_trav.is_visited(current_turn, op, turn_index, op_index))
+ {
+ return traverse_error_visit_again;
+ }
+ }
+
+ // Update registration and append point
+ turn_type& current_turn = m_turns[turn_index];
+ turn_operation_type& op = current_turn.operations[op_index];
+ detail::overlay::append_no_dups_or_spikes(current_ring, current_turn.point,
+ m_robust_policy);
+
+ // Register the visit
+ m_trav.set_visited(current_turn, op);
+ m_visitor.visit_traverse(m_turns, current_turn, op, "Visit");
+
+ return traverse_error_none;
+ }
+
+ template <typename Ring>
+ inline traverse_error_type traverse(Ring& ring,
+ signed_size_type start_turn_index, int start_op_index)
+ {
+ turn_type const& start_turn = m_turns[start_turn_index];
+ turn_operation_type& start_op = m_turns[start_turn_index].operations[start_op_index];
+
+ detail::overlay::append_no_dups_or_spikes(ring, start_turn.point,
+ m_robust_policy);
+
+ signed_size_type current_turn_index = start_turn_index;
+ int current_op_index = start_op_index;
+
+ traverse_error_type error = travel_to_next_turn(start_turn_index,
+ start_op_index,
+ current_turn_index, current_op_index,
+ ring, true);
+
+ if (error != traverse_error_none)
+ {
+ // This is not necessarily a problem, it happens for clustered turns
+ // which are "build in" or otherwise point inwards
+ return error;
+ }
+
+ if (current_turn_index == start_turn_index)
+ {
+ start_op.visited.set_finished();
+ m_visitor.visit_traverse(m_turns, m_turns[current_turn_index], start_op, "Early finish");
+ return traverse_error_none;
+ }
+
+ std::size_t const max_iterations = 2 + 2 * m_turns.size();
+ for (std::size_t i = 0; i <= max_iterations; i++)
+ {
+ // We assume clockwise polygons only, non self-intersecting, closed.
+ // However, the input might be different, and checking validity
+ // is up to the library user.
+
+ // Therefore we make here some sanity checks. If the input
+ // violates the assumptions, the output polygon will not be correct
+ // but the routine will stop and output the current polygon, and
+ // will continue with the next one.
+
+ // Below three reasons to stop.
+ error = travel_to_next_turn(start_turn_index, start_op_index,
+ current_turn_index, current_op_index,
+ ring, false);
+
+ if (error != traverse_error_none)
+ {
+ return error;
+ }
+
+ if (current_turn_index == start_turn_index
+ && current_op_index == start_op_index)
+ {
+ start_op.visited.set_finished();
+ m_visitor.visit_traverse(m_turns, start_turn, start_op, "Finish");
+ return traverse_error_none;
+ }
+ }
+
+ return traverse_error_endless_loop;
+ }
+
+ template <typename Rings>
+ void traverse_with_operation(turn_type const& start_turn,
+ std::size_t turn_index, int op_index,
+ Rings& rings, std::size_t& finalized_ring_size,
+ typename Backtrack::state_type& state)
+ {
+ typedef typename boost::range_value<Rings>::type ring_type;
+
+ turn_operation_type const& start_op = start_turn.operations[op_index];
+
+ if (! start_op.visited.none()
+ || ! start_op.enriched.startable
+ || start_op.visited.rejected()
+ || ! (start_op.operation == target_operation
+ || start_op.operation == detail::overlay::operation_continue))
+ {
+ return;
+ }
+
+ ring_type ring;
+ traverse_error_type traverse_error = traverse(ring, turn_index, op_index);
+
+ if (traverse_error == traverse_error_none)
+ {
+ std::size_t const min_num_points
+ = core_detail::closure::minimum_ring_size
+ <
+ geometry::closure<ring_type>::value
+ >::value;
+
+ if (geometry::num_points(ring) >= min_num_points)
+ {
+ clean_closing_dups_and_spikes(ring, m_robust_policy);
+ rings.push_back(ring);
+
+ m_trav.finalize_visit_info();
+ finalized_ring_size++;
+ }
+ }
+ else
+ {
+ Backtrack::apply(
+ finalized_ring_size,
+ rings, ring, m_turns, start_turn,
+ m_turns[turn_index].operations[op_index],
+ traverse_error,
+ m_geometry1, m_geometry2, m_robust_policy,
+ state, m_visitor);
+ }
+ }
+
+ template <typename Rings>
+ void iterate(Rings& rings, std::size_t& finalized_ring_size,
+ typename Backtrack::state_type& state,
+ int pass)
+ {
+ if (pass == 1)
+ {
+ if (target_operation == operation_intersection)
+ {
+ // Second pass currently only used for uu
+ return;
+ }
+ if (! m_has_uu)
+ {
+ // There is no uu found in first pass
+ return;
+ }
+ }
+
+ // Iterate through all unvisited points
+ for (std::size_t turn_index = 0; turn_index < m_turns.size(); ++turn_index)
+ {
+ turn_type const& start_turn = m_turns[turn_index];
+
+ if (start_turn.discarded || start_turn.blocked())
+ {
+ // Skip discarded and blocked turns
+ continue;
+ }
+ if (target_operation == operation_union)
+ {
+ if (start_turn.both(operation_union))
+ {
+ // Start with a uu-turn only in the second pass
+ m_has_uu = true;
+ if (pass == 0)
+ {
+ continue;
+ }
+ }
+ }
+
+ for (int op_index = 0; op_index < 2; op_index++)
+ {
+ traverse_with_operation(start_turn, turn_index, op_index,
+ rings, finalized_ring_size, state);
+ }
+ }
+ }
+
+private:
+ traversal_type m_trav;
+
+ Geometry1 const& m_geometry1;
+ Geometry2 const& m_geometry2;
+ Turns& m_turns;
+ Clusters const& m_clusters;
+ RobustPolicy const& m_robust_policy;
+ Visitor& m_visitor;
+
+ // Next member is only used for operation union
+ bool m_has_uu;
+
+};
+
+}} // namespace detail::overlay
+#endif // DOXYGEN_NO_DETAIL
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_RING_CREATOR_HPP
diff --git a/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp b/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp
new file mode 100644
index 0000000000..9381c66e0e
--- /dev/null
+++ b/boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp
@@ -0,0 +1,291 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2015-2016 Barend Gehrels, Amsterdam, the Netherlands.
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_SWITCH_DETECTOR_HPP
+#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_SWITCH_DETECTOR_HPP
+
+#include <cstddef>
+
+#include <boost/range.hpp>
+
+#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
+#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
+#include <boost/geometry/algorithms/detail/overlay/cluster_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/assert.hpp>
+
+namespace boost { namespace geometry
+{
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace overlay
+{
+
+// Generic function (is this used somewhere else too?)
+inline ring_identifier ring_id_by_seg_id(segment_identifier const& seg_id)
+{
+ return ring_identifier(seg_id.source_index, seg_id.multi_index, seg_id.ring_index);
+}
+
+template
+<
+ bool Reverse1,
+ bool Reverse2,
+ overlay_type OverlayType,
+ typename Geometry1,
+ typename Geometry2,
+ typename Turns,
+ typename Clusters,
+ typename RobustPolicy,
+ typename Visitor
+>
+struct traversal_switch_detector
+{
+ typedef typename boost::range_value<Turns>::type turn_type;
+ typedef typename turn_type::turn_operation_type turn_operation_type;
+
+ // For convenience
+ typedef std::set<signed_size_type>::const_iterator set_iterator;
+
+ inline traversal_switch_detector(Geometry1 const& geometry1, Geometry2 const& geometry2,
+ Turns& turns, Clusters& clusters,
+ RobustPolicy const& robust_policy, Visitor& visitor)
+ : m_geometry1(geometry1)
+ , m_geometry2(geometry2)
+ , m_turns(turns)
+ , m_clusters(clusters)
+ , m_robust_policy(robust_policy)
+ , m_visitor(visitor)
+ , m_region_id(0)
+ {
+
+ }
+
+ static inline bool connects_same_zone(turn_type const& turn)
+ {
+ if (turn.cluster_id == -1)
+ {
+ // If it is a uu-turn (non clustered), it is never same zone
+ return ! turn.both(operation_union);
+ }
+
+ // It is a cluster, check zones of both operations
+ return turn.operations[0].enriched.zone
+ == turn.operations[1].enriched.zone;
+ }
+
+ inline int get_region_id(turn_operation_type const& op) const
+ {
+ std::map<ring_identifier, int>::const_iterator it
+ = m_regions.find(ring_id_by_seg_id(op.seg_id));
+ return it == m_regions.end() ? -1 : it->second;
+ }
+
+ void create_region(ring_identifier const& ring_id, std::set<signed_size_type> const& ring_turn_indices, int region_id = -1)
+ {
+ std::map<ring_identifier, int>::const_iterator it = m_regions.find(ring_id);
+ if (it != m_regions.end())
+ {
+ // The ring is already gathered in a region, quit
+ return;
+ }
+ if (region_id == -1)
+ {
+ region_id = m_region_id++;
+ }
+
+ // Assign this ring to specified region
+ m_regions[ring_id] = region_id;
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ std::cout << " ADD " << ring_id << " TO REGION " << region_id << std::endl;
+#endif
+
+ // Find connecting rings, recursively
+ for (set_iterator sit = ring_turn_indices.begin();
+ sit != ring_turn_indices.end(); ++sit)
+ {
+ int const turn_index = *sit;
+ turn_type const& turn = m_turns[turn_index];
+ if (! connects_same_zone(turn))
+ {
+ // This is a non clustered uu-turn, or a cluster connecting different 'zones'
+ continue;
+ }
+
+ // This turn connects two rings (interior connected), create the
+ // same region
+ for (int op_index = 0; op_index < 2; op_index++)
+ {
+ turn_operation_type const& op = turn.operations[op_index];
+ ring_identifier connected_ring_id = ring_id_by_seg_id(op.seg_id);
+ if (connected_ring_id != ring_id)
+ {
+ propagate_region(connected_ring_id, region_id);
+ }
+ }
+ }
+ }
+
+ void propagate_region(ring_identifier const& ring_id, int region_id)
+ {
+ std::map<ring_identifier, std::set<signed_size_type> >::const_iterator it = m_turns_per_ring.find(ring_id);
+ if (it != m_turns_per_ring.end())
+ {
+ create_region(ring_id, it->second, region_id);
+ }
+ }
+
+ void iterate()
+ {
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ std::cout << "SWITCH BEGIN ITERATION" << std::endl;
+#endif
+
+ // Collect turns per ring
+ m_turns_per_ring.clear();
+ m_regions.clear();
+ m_region_id = 1;
+
+ for (std::size_t turn_index = 0; turn_index < m_turns.size(); ++turn_index)
+ {
+ turn_type const& turn = m_turns[turn_index];
+
+ for (int op_index = 0; op_index < 2; op_index++)
+ {
+ turn_operation_type const& op = turn.operations[op_index];
+ m_turns_per_ring[ring_id_by_seg_id(op.seg_id)].insert(turn_index);
+ }
+ }
+
+ // All rings having turns are in the map. Now iterate them
+ for (std::map<ring_identifier, std::set<signed_size_type> >::const_iterator it
+ = m_turns_per_ring.begin(); it != m_turns_per_ring.end(); ++it)
+ {
+ create_region(it->first, it->second);
+ }
+
+ // Now that all regions are filled, assign switch_source property
+ // Iterate through all clusters
+ for (typename Clusters::iterator it = m_clusters.begin(); it != m_clusters.end(); ++it)
+ {
+ cluster_info& cinfo = it->second;
+ if (cinfo.open_count <= 1)
+ {
+ // Not a touching cluster
+ continue;
+ }
+
+ // A touching cluster, gather regions
+ std::set<int> regions;
+
+ std::set<signed_size_type> const& ids = cinfo.turn_indices;
+
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ std::cout << "SWITCH EXAMINE CLUSTER " << it->first << std::endl;
+#endif
+
+ for (set_iterator sit = ids.begin(); sit != ids.end(); ++sit)
+ {
+ signed_size_type turn_index = *sit;
+ turn_type const& turn = m_turns[turn_index];
+ for (int oi = 0; oi < 2; oi++)
+ {
+ int const region = get_region_id(turn.operations[oi]);
+ regions.insert(region);
+ }
+ }
+ // Switch source if this cluster connects the same region
+ cinfo.switch_source = regions.size() == 1;
+ }
+
+ // Iterate through all uu turns (non-clustered)
+ for (std::size_t turn_index = 0; turn_index < m_turns.size(); ++turn_index)
+ {
+ turn_type& turn = m_turns[turn_index];
+
+ if (turn.discarded
+ || turn.blocked()
+ || turn.cluster_id >= 0
+ || ! turn.both(operation_union))
+ {
+ // Skip discarded, blocked, non-uu and clustered turns
+ continue;
+ }
+
+ if (OverlayType == overlay_buffer)
+ {
+ // For deflate, the region approach does not work because many
+ // pieces are outside the real polygons
+ // TODO: implement this in another way for buffer
+ // (because now buffer might output invalid geometries)
+ continue;
+ }
+
+ int const region0 = get_region_id(turn.operations[0]);
+ int const region1 = get_region_id(turn.operations[1]);
+
+ // Switch sources for same region
+ turn.switch_source = region0 == region1;
+ }
+
+
+#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
+ std::cout << "SWITCH END ITERATION" << std::endl;
+
+ for (std::size_t turn_index = 0; turn_index < m_turns.size(); ++turn_index)
+ {
+ turn_type const& turn = m_turns[turn_index];
+
+ if (turn.both(operation_union) && turn.cluster_id < 0)
+ {
+ std::cout << "UU SWITCH RESULT "
+ << turn_index << " -> "
+ << turn.switch_source << std::endl;
+ }
+ }
+
+ for (typename Clusters::const_iterator it = m_clusters.begin(); it != m_clusters.end(); ++it)
+ {
+ cluster_info const& cinfo = it->second;
+ if (cinfo.open_count > 1)
+ {
+ std::cout << "CL SWITCH RESULT " << it->first
+ << " -> " << cinfo.switch_source << std::endl;
+ }
+ else
+ {
+ std::cout << "CL SWITCH RESULT " << it->first
+ << " is not registered as open" << std::endl;
+ }
+ }
+#endif
+
+ }
+
+private:
+
+ Geometry1 const& m_geometry1;
+ Geometry2 const& m_geometry2;
+ Turns& m_turns;
+ Clusters& m_clusters;
+ RobustPolicy const& m_robust_policy;
+ Visitor& m_visitor;
+
+ std::map<ring_identifier, int> m_regions;
+ std::map<ring_identifier, std::set<signed_size_type> > m_turns_per_ring;
+ int m_region_id;
+
+};
+
+}} // namespace detail::overlay
+#endif // DOXYGEN_NO_DETAIL
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_OVERLAY_TRAVERSAL_SWITCH_DETECTOR_HPP
diff --git a/boost/geometry/algorithms/detail/overlay/traverse.hpp b/boost/geometry/algorithms/detail/overlay/traverse.hpp
index a8f4232124..2d2933ebdd 100644
--- a/boost/geometry/algorithms/detail/overlay/traverse.hpp
+++ b/boost/geometry/algorithms/detail/overlay/traverse.hpp
@@ -11,26 +11,10 @@
#include <cstddef>
-#include <boost/range.hpp>
-
#include <boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp>
-#include <boost/geometry/algorithms/detail/overlay/copy_segments.hpp>
-#include <boost/geometry/algorithms/detail/overlay/sort_by_side.hpp>
-#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
-#include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/core/access.hpp>
-#include <boost/geometry/core/assert.hpp>
-#include <boost/geometry/core/closure.hpp>
-#include <boost/geometry/core/coordinate_dimension.hpp>
-#include <boost/geometry/geometries/concepts/check.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp>
+#include <boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp>
-#if defined(BOOST_GEOMETRY_DEBUG_INTERSECTION) \
- || defined(BOOST_GEOMETRY_OVERLAY_REPORT_WKT) \
- || defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
-# include <string>
-# include <boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp>
-# include <boost/geometry/io/wkt/wkt.hpp>
-#endif
namespace boost { namespace geometry
{
@@ -39,783 +23,38 @@ namespace boost { namespace geometry
namespace detail { namespace overlay
{
-template <typename Turn, typename Operation>
-#ifdef BOOST_GEOMETRY_DEBUG_TRAVERSE
-inline void debug_traverse(Turn const& turn, Operation op,
- std::string const& header)
-{
- std::cout << header
- << " at " << op.seg_id
- << " meth: " << method_char(turn.method)
- << " op: " << operation_char(op.operation)
- << " vis: " << visited_char(op.visited)
- << " of: " << operation_char(turn.operations[0].operation)
- << operation_char(turn.operations[1].operation)
- << " " << geometry::wkt(turn.point)
- << std::endl;
-
- if (boost::contains(header, "Finished"))
- {
- std::cout << std::endl;
- }
-}
-#else
-inline void debug_traverse(Turn const& , Operation, const char*)
-{
-}
-#endif
-
-
-//! Metafunction to define side_order (clockwise, ccw) by operation_type
-template <operation_type OpType>
-struct side_compare {};
-
-template <>
-struct side_compare<operation_union>
-{
- typedef std::greater<int> type;
-};
-
-template <>
-struct side_compare<operation_intersection>
-{
- typedef std::less<int> type;
-};
-
+/*!
+ \brief Traverses through intersection points / geometries
+ \ingroup overlay
+ */
template
<
- bool Reverse1,
- bool Reverse2,
- operation_type OperationType,
+ bool Reverse1, bool Reverse2,
typename Geometry1,
typename Geometry2,
- typename Turns,
- typename Clusters,
- typename RobustPolicy,
- typename Visitor,
- typename Backtrack
+ overlay_type OverlayType,
+ typename Backtrack = backtrack_check_self_intersections<Geometry1, Geometry2>
>
-struct traversal
+class traverse
{
- typedef typename side_compare<OperationType>::type side_compare_type;
- typedef typename boost::range_value<Turns>::type turn_type;
- typedef typename turn_type::turn_operation_type turn_operation_type;
-
- typedef typename geometry::point_type<Geometry1>::type point_type;
- typedef sort_by_side::side_sorter
- <
- Reverse1, Reverse2,
- point_type, side_compare_type
- > sbs_type;
-
- inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2,
- Turns& turns, Clusters const& clusters,
- RobustPolicy const& robust_policy, Visitor& visitor)
- : m_geometry1(geometry1)
- , m_geometry2(geometry2)
- , m_turns(turns)
- , m_clusters(clusters)
- , m_robust_policy(robust_policy)
- , m_visitor(visitor)
- , m_has_uu(false)
- , m_has_only_uu(true)
- , m_switch_at_uu(true)
- {}
-
-
- inline bool select_source(signed_size_type turn_index,
- segment_identifier const& seg_id1,
- segment_identifier const& seg_id2)
- {
- if (OperationType == operation_intersection)
- {
- // For intersections always switch sources
- return seg_id1.source_index != seg_id2.source_index;
- }
- else if (OperationType == operation_union)
- {
- // For uu, only switch sources if indicated
- turn_type const& turn = m_turns[turn_index];
-
- // TODO: pass this information
- bool const is_buffer
- = turn.operations[0].seg_id.source_index
- == turn.operations[1].seg_id.source_index;
-
- if (is_buffer)
- {
- // Buffer does not use source_index (always 0)
- return turn.switch_source
- ? seg_id1.multi_index != seg_id2.multi_index
- : seg_id1.multi_index == seg_id2.multi_index;
- }
-
- // Temporarily use m_switch_at_uu, which does not solve all cases,
- // but the majority of the more simple cases, making the interior
- // rings valid
- return m_switch_at_uu // turn.switch_source
- ? seg_id1.source_index != seg_id2.source_index
- : seg_id1.source_index == seg_id2.source_index;
- }
- return false;
- }
-
- inline
- signed_size_type get_next_turn_index(turn_operation_type const& op) const
- {
- return op.enriched.next_ip_index == -1
- ? op.enriched.travels_to_ip_index
- : op.enriched.next_ip_index;
- }
-
- inline bool traverse_possible(signed_size_type turn_index) const
- {
- if (turn_index == -1)
- {
- return false;
- }
-
- turn_type const& turn = m_turns[turn_index];
-
- // It is not a dead end if there is an operation to continue, or of
- // there is a cluster (assuming for now we can get out of the cluster)
- return turn.cluster_id >= 0
- || turn.has(OperationType)
- || turn.has(operation_continue);
- }
-
- inline bool select_operation(turn_type& turn,
- signed_size_type start_turn_index,
- segment_identifier const& seg_id,
- int& selected_op_index)
- {
- if (turn.discarded)
- {
- return false;
- }
-
- bool result = false;
-
- typename turn_operation_type::comparable_distance_type
- max_remaining_distance = 0;
-
- selected_op_index = -1;
- for (int i = 0; i < 2; i++)
- {
- turn_operation_type const& op = turn.operations[i];
- if (op.visited.started())
- {
- selected_op_index = i;
- return true;
- }
-
- signed_size_type const next_turn_index = get_next_turn_index(op);
-
- // In some cases there are two alternatives.
- // For "ii", take the other one (alternate)
- // UNLESS the other one is already visited
- // For "uu", take the same one (see above);
- // For "cc", take either one, but if there is a starting one,
- // take that one. If next is dead end, skip that one.
- if ( (op.operation == operation_continue
- && traverse_possible(next_turn_index)
- && ! result)
- || (op.operation == OperationType
- && ! op.visited.finished()
- && (! result
- || select_source(next_turn_index, op.seg_id, seg_id)
- )
- )
- )
- {
- if (op.operation == operation_continue)
- {
- max_remaining_distance = op.remaining_distance;
- }
- selected_op_index = i;
- debug_traverse(turn, op, " Candidate");
- result = true;
- }
-
- if (op.operation == operation_continue && result)
- {
- if (next_turn_index == start_turn_index)
- {
- selected_op_index = i;
- debug_traverse(turn, op, " Candidate override (start)");
- }
- else if (op.remaining_distance > max_remaining_distance)
- {
- max_remaining_distance = op.remaining_distance;
- selected_op_index = i;
- debug_traverse(turn, op, " Candidate override (remaining)");
- }
- }
- }
-
- if (result)
- {
- debug_traverse(turn, turn.operations[selected_op_index], " Accepted");
- }
-
- return result;
- }
-
- inline bool select_from_cluster(signed_size_type& turn_index,
- int& op_index, signed_size_type start_turn_index,
- sbs_type const& sbs, bool allow_pass_rank)
- {
- bool const is_union = OperationType == operation_union;
- bool const is_intersection = OperationType == operation_intersection;
-
- std::size_t selected_rank = 0;
- std::size_t min_rank = 0;
- bool result = false;
- for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
- {
- typename sbs_type::rp const& ranked_point = sbs.m_ranked_points[i];
- if (result && ranked_point.main_rank > selected_rank)
- {
- return result;
- }
-
- turn_type const& ranked_turn = m_turns[ranked_point.turn_index];
- turn_operation_type const& ranked_op = ranked_turn.operations[ranked_point.op_index];
-
- if (result && ranked_op.visited.finalized())
- {
- // One of the arcs in the same direction as the selected result
- // is already traversed.
- return false;
- }
-
- if (! allow_pass_rank && ranked_op.visited.finalized())
- {
- // Skip this one, go to next
- min_rank = ranked_point.main_rank;
- continue;
- }
-
- if (ranked_point.index == sort_by_side::index_to
- && (ranked_point.main_rank > min_rank
- || ranked_turn.both(operation_continue)))
- {
- if ((is_union
- && ranked_op.enriched.count_left == 0
- && ranked_op.enriched.count_right > 0)
- || (is_intersection
- && ranked_op.enriched.count_right == 2))
- {
- if (result && ranked_point.turn_index != start_turn_index)
- {
- // Don't override - only override if arrive at start
- continue;
- }
-
- turn_index = ranked_point.turn_index;
- op_index = ranked_point.op_index;
-
- if (is_intersection
- && ranked_turn.both(operation_intersection)
- && ranked_op.visited.finalized())
- {
- // Override:
- // For a ii turn, even though one operation might be selected,
- // it should take the other one if the first one is used in a completed ring
- op_index = 1 - ranked_point.op_index;
- }
-
- result = true;
- selected_rank = ranked_point.main_rank;
- }
- else if (! allow_pass_rank)
- {
- return result;
- }
- }
- }
- return result;
- }
-
- inline bool select_turn_from_cluster(signed_size_type& turn_index,
- int& op_index, signed_size_type start_turn_index,
- point_type const& point)
- {
- bool const is_union = OperationType == operation_union;
-
- turn_type const& turn = m_turns[turn_index];
- BOOST_ASSERT(turn.cluster_id >= 0);
-
- typename Clusters::const_iterator mit = m_clusters.find(turn.cluster_id);
- BOOST_ASSERT(mit != m_clusters.end());
-
- std::set<signed_size_type> const& ids = mit->second;
-
- sbs_type sbs;
- sbs.set_origin(point);
-
- for (typename std::set<signed_size_type>::const_iterator sit = ids.begin();
- sit != ids.end(); ++sit)
- {
- signed_size_type cluster_turn_index = *sit;
- turn_type const& cluster_turn = m_turns[cluster_turn_index];
- if (cluster_turn.discarded)
- {
- // Defensive check, discarded turns should not be in cluster
- continue;
- }
-
- for (int i = 0; i < 2; i++)
- {
- sbs.add(cluster_turn.operations[i], cluster_turn_index, i,
- m_geometry1, m_geometry2, false);
- }
- }
-
- sbs.apply(turn.point);
-
- int open_count = 0;
- if (is_union)
- {
- // Check how many open spaces there are.
- // TODO: might be moved to sbs itself, though it also uses turns
-
- std::size_t last_rank = 0;
- for (std::size_t i = 0; i < sbs.m_ranked_points.size(); i++)
- {
- typename sbs_type::rp const& ranked_point = sbs.m_ranked_points[i];
-
- if (ranked_point.main_rank > last_rank
- && ranked_point.index == sort_by_side::index_to)
- {
- turn_type const& ranked_turn = m_turns[ranked_point.turn_index];
- turn_operation_type const& ranked_op = ranked_turn.operations[ranked_point.op_index];
- if (ranked_op.enriched.count_left == 0
- && ranked_op.enriched.count_right > 0)
- {
- open_count++;
- last_rank = ranked_point.main_rank;
- }
- }
- }
- }
-
- bool allow = false;
- if (open_count > 1)
- {
- sbs.reverse();
- allow = true;
- }
-
- return select_from_cluster(turn_index, op_index, start_turn_index, sbs, allow);
- }
-
- inline void change_index_for_self_turn(signed_size_type& to_vertex_index,
- turn_type const& start_turn,
- turn_operation_type const& start_op,
- int start_op_index)
- {
- turn_operation_type const& other_op
- = start_turn.operations[1 - start_op_index];
- if (start_op.seg_id.source_index != other_op.seg_id.source_index)
- {
- // Not a buffer/self-turn
- return;
- }
-
- // It travels to itself, can happen. If this is a buffer, it can
- // sometimes travel to itself in the following configuration:
- //
- // +---->--+
- // | |
- // | +---*----+ *: one turn, with segment index 2/7
- // | | | |
- // | +---C | C: closing point (start/end)
- // | |
- // +------------+
- //
- // If it starts on segment 2 and travels to itself on segment 2, that
- // should be corrected to 7 because that is the shortest path
- //
- // Also a uu turn (touching with another buffered ring) might have this
- // apparent configuration, but there it should
- // always travel the whole ring
-
- bool const correct
- = ! start_turn.both(operation_union)
- && start_op.seg_id.segment_index == to_vertex_index;
-
-#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSE)
- std::cout << " WARNING: self-buffer "
- << " correct=" << correct
- << " turn=" << operation_char(start_turn.operations[0].operation)
- << operation_char(start_turn.operations[1].operation)
- << " start=" << start_op.seg_id.segment_index
- << " from=" << to_vertex_index
- << " to=" << other_op.enriched.travels_to_vertex_index
- << std::endl;
-#endif
-
- if (correct)
- {
- to_vertex_index = other_op.enriched.travels_to_vertex_index;
- }
- }
-
- template <typename Ring>
- inline traverse_error_type travel_to_next_turn(signed_size_type start_turn_index,
- int start_op_index,
- signed_size_type& turn_index,
- int& op_index,
- segment_identifier& seg_id,
- Ring& current_ring,
- bool is_start)
- {
- int const previous_op_index = op_index;
- signed_size_type const previous_turn_index = turn_index;
- turn_type& previous_turn = m_turns[turn_index];
- turn_operation_type& previous_op = previous_turn.operations[op_index];
-
- // If there is no next IP on this segment
- if (previous_op.enriched.next_ip_index < 0)
- {
- if (previous_op.enriched.travels_to_vertex_index < 0
- || previous_op.enriched.travels_to_ip_index < 0)
- {
- return is_start
- ? traverse_error_no_next_ip_at_start
- : traverse_error_no_next_ip;
- }
-
- signed_size_type to_vertex_index = previous_op.enriched.travels_to_vertex_index;
-
- if (is_start &&
- previous_op.enriched.travels_to_ip_index == start_turn_index)
- {
- change_index_for_self_turn(to_vertex_index, previous_turn,
- previous_op, start_op_index);
- }
-
- if (previous_op.seg_id.source_index == 0)
- {
- geometry::copy_segments<Reverse1>(m_geometry1,
- previous_op.seg_id, to_vertex_index,
- m_robust_policy, current_ring);
- }
- else
- {
- geometry::copy_segments<Reverse2>(m_geometry2,
- previous_op.seg_id, to_vertex_index,
- m_robust_policy, current_ring);
- }
- seg_id = previous_op.seg_id;
- turn_index = previous_op.enriched.travels_to_ip_index;
- }
- else
- {
- turn_index = previous_op.enriched.next_ip_index;
- seg_id = previous_op.seg_id;
- }
-
- // turn_index is not yet finally selected, can change for clusters
- bool const has_cluster = m_turns[turn_index].cluster_id >= 0;
- if (has_cluster)
- {
-
- if (! select_turn_from_cluster(turn_index, op_index,
- start_turn_index, current_ring.back()))
- {
- return is_start
- ? traverse_error_no_next_ip_at_start
- : traverse_error_no_next_ip;
- }
- if (is_start && turn_index == previous_turn_index)
- {
- op_index = previous_op_index;
- }
- }
-
- turn_type& current_turn = m_turns[turn_index];
- detail::overlay::append_no_dups_or_spikes(current_ring, current_turn.point,
- m_robust_policy);
-
- if (is_start)
- {
- // Register the start
- previous_op.visited.set_started();
- m_visitor.visit_traverse(m_turns, previous_turn, previous_op, "Start");
- }
-
- if (! has_cluster)
- {
- if (! select_operation(current_turn,
- start_turn_index,
- seg_id,
- op_index))
- {
- return is_start
- ? traverse_error_dead_end_at_start
- : traverse_error_dead_end;
- }
- }
-
- turn_operation_type& op = current_turn.operations[op_index];
- if (op.visited.finalized() || op.visited.visited())
- {
- return traverse_error_visit_again;
- }
-
- // Register the visit
- set_visited(current_turn, op);
- m_visitor.visit_traverse(m_turns, current_turn, op, "Visit");
-
- return traverse_error_none;
- }
-
- inline void finalize_visit_info()
+ template <typename Turns>
+ static void reset_visits(Turns& turns)
{
for (typename boost::range_iterator<Turns>::type
- it = boost::begin(m_turns);
- it != boost::end(m_turns);
+ it = boost::begin(turns);
+ it != boost::end(turns);
++it)
{
- turn_type& turn = *it;
for (int i = 0; i < 2; i++)
{
- turn_operation_type& op = turn.operations[i];
- op.visited.finalize();
- }
- }
- }
-
- inline void set_visited(turn_type& turn, turn_operation_type& op)
- {
- // On "continue", set "visited" for ALL directions in this turn
- if (op.operation == detail::overlay::operation_continue)
- {
- for (int i = 0; i < 2; i++)
- {
- turn_operation_type& op = turn.operations[i];
- if (op.visited.none())
- {
- op.visited.set_visited();
- }
- }
- }
- else
- {
- op.visited.set_visited();
- }
- }
-
-
- template <typename Ring>
- inline traverse_error_type traverse(Ring& ring,
- signed_size_type start_turn_index, int start_op_index)
- {
- turn_type const& start_turn = m_turns[start_turn_index];
- turn_operation_type& start_op = m_turns[start_turn_index].operations[start_op_index];
-
- detail::overlay::append_no_dups_or_spikes(ring, start_turn.point,
- m_robust_policy);
-
- signed_size_type current_turn_index = start_turn_index;
- int current_op_index = start_op_index;
- segment_identifier current_seg_id;
-
- traverse_error_type error = travel_to_next_turn(start_turn_index,
- start_op_index,
- current_turn_index, current_op_index, current_seg_id,
- ring, true);
-
- if (error != traverse_error_none)
- {
- // This is not necessarily a problem, it happens for clustered turns
- // which are "build in" or otherwise point inwards
- return error;
- }
-
- if (current_turn_index == start_turn_index)
- {
- start_op.visited.set_finished();
- m_visitor.visit_traverse(m_turns, m_turns[current_turn_index], start_op, "Early finish");
- return traverse_error_none;
- }
-
- std::size_t const max_iterations = 2 + 2 * m_turns.size();
- for (std::size_t i = 0; i <= max_iterations; i++)
- {
- // We assume clockwise polygons only, non self-intersecting, closed.
- // However, the input might be different, and checking validity
- // is up to the library user.
-
- // Therefore we make here some sanity checks. If the input
- // violates the assumptions, the output polygon will not be correct
- // but the routine will stop and output the current polygon, and
- // will continue with the next one.
-
- // Below three reasons to stop.
- error = travel_to_next_turn(start_turn_index, start_op_index,
- current_turn_index, current_op_index, current_seg_id,
- ring, false);
-
- if (error != traverse_error_none)
- {
- return error;
- }
-
- if (current_turn_index == start_turn_index
- && current_op_index == start_op_index)
- {
- start_op.visited.set_finished();
- m_visitor.visit_traverse(m_turns, start_turn, start_op, "Finish");
- return traverse_error_none;
- }
- }
-
- return traverse_error_endless_loop;
- }
-
- template <typename Rings>
- void traverse_with_operation(turn_type const& start_turn,
- std::size_t turn_index, int op_index,
- Rings& rings, std::size_t& finalized_ring_size,
- typename Backtrack::state_type& state)
- {
- typedef typename boost::range_value<Rings>::type ring_type;
-
- turn_operation_type const& start_op = start_turn.operations[op_index];
-
- if (! start_op.visited.none()
- || ! start_op.enriched.startable
- || start_op.visited.rejected()
- || ! (start_op.operation == OperationType
- || start_op.operation == detail::overlay::operation_continue))
- {
- return;
- }
-
- ring_type ring;
- traverse_error_type traverse_error = traverse(ring, turn_index, op_index);
-
- if (traverse_error == traverse_error_none)
- {
- std::size_t const min_num_points
- = core_detail::closure::minimum_ring_size
- <
- geometry::closure<ring_type>::value
- >::value;
-
- if (geometry::num_points(ring) >= min_num_points)
- {
- clean_closing_dups_and_spikes(ring, m_robust_policy);
- rings.push_back(ring);
-
- finalize_visit_info();
- finalized_ring_size++;
+ it->operations[i].visited.reset();
}
}
- else
- {
- Backtrack::apply(
- finalized_ring_size,
- rings, ring, m_turns, start_turn,
- m_turns[turn_index].operations[op_index],
- traverse_error,
- m_geometry1, m_geometry2, m_robust_policy,
- state, m_visitor);
- }
}
- template <typename Rings>
- void iterate(Rings& rings, std::size_t& finalized_ring_size,
- typename Backtrack::state_type& state,
- int pass)
- {
- if (pass == 1)
- {
- if (OperationType == operation_intersection)
- {
- // Second pass currently only used for uu
- return;
- }
- if (! m_has_uu)
- {
- // There is no uu found in first pass
- return;
- }
- if (m_has_only_uu)
- {
- m_switch_at_uu = false;
- }
- }
-
- // Iterate through all unvisited points
- for (std::size_t turn_index = 0; turn_index < m_turns.size(); ++turn_index)
- {
- turn_type const& start_turn = m_turns[turn_index];
- if (start_turn.discarded || start_turn.blocked())
- {
- // Skip discarded and blocked turns
- continue;
- }
- if (OperationType == operation_union)
- {
- if (start_turn.both(operation_union))
- {
- // Start with a uu-turn only in the second pass
- m_has_uu = true;
- if (pass == 0)
- {
- continue;
- }
- }
- else
- {
- m_has_only_uu = false;
- }
- }
-
- for (int op_index = 0; op_index < 2; op_index++)
- {
- traverse_with_operation(start_turn, turn_index, op_index,
- rings, finalized_ring_size, state);
- }
- }
- }
-
-private :
- Geometry1 const& m_geometry1;
- Geometry2 const& m_geometry2;
- Turns& m_turns;
- Clusters const& m_clusters;
- RobustPolicy const& m_robust_policy;
- Visitor& m_visitor;
-
- // Next members are only used for operation union
- bool m_has_uu;
- bool m_has_only_uu;
- bool m_switch_at_uu;
-};
-
-
-/*!
- \brief Traverses through intersection points / geometries
- \ingroup overlay
- */
-template
-<
- bool Reverse1, bool Reverse2,
- typename Geometry1,
- typename Geometry2,
- operation_type OperationType,
- typename Backtrack = backtrack_check_self_intersections<Geometry1, Geometry2>
->
-class traverse
-{
public :
template
<
@@ -829,12 +68,24 @@ public :
Geometry2 const& geometry2,
RobustPolicy const& robust_policy,
Turns& turns, Rings& rings,
- Clusters const& clusters,
+ Clusters& clusters,
Visitor& visitor)
{
- traversal
+ traversal_switch_detector
+ <
+ Reverse1, Reverse2, OverlayType,
+ Geometry1, Geometry2,
+ Turns, Clusters,
+ RobustPolicy, Visitor
+ > switch_detector(geometry1, geometry2, turns, clusters,
+ robust_policy, visitor);
+
+ switch_detector.iterate();
+ reset_visits(turns);
+
+ traversal_ring_creator
<
- Reverse1, Reverse2, OperationType,
+ Reverse1, Reverse2, OverlayType,
Geometry1, Geometry2,
Turns, Clusters,
RobustPolicy, Visitor,
diff --git a/boost/geometry/algorithms/detail/overlay/turn_info.hpp b/boost/geometry/algorithms/detail/overlay/turn_info.hpp
index 699997fc38..73f266a04a 100644
--- a/boost/geometry/algorithms/detail/overlay/turn_info.hpp
+++ b/boost/geometry/algorithms/detail/overlay/turn_info.hpp
@@ -14,6 +14,7 @@
#include <boost/geometry/core/coordinate_type.hpp>
#include <boost/geometry/algorithms/detail/overlay/segment_identifier.hpp>
+#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
namespace boost { namespace geometry
{
@@ -22,18 +23,6 @@ namespace boost { namespace geometry
namespace detail { namespace overlay
{
-
-enum operation_type
-{
- operation_none,
- operation_union,
- operation_intersection,
- operation_blocked,
- operation_continue,
- operation_opposite
-};
-
-
enum method_type
{
method_none,
diff --git a/boost/geometry/algorithms/detail/overlay/visit_info.hpp b/boost/geometry/algorithms/detail/overlay/visit_info.hpp
index 9e1e6b9056..e401fbbb49 100644
--- a/boost/geometry/algorithms/detail/overlay/visit_info.hpp
+++ b/boost/geometry/algorithms/detail/overlay/visit_info.hpp
@@ -61,6 +61,11 @@ public:
}
}
+ inline void reset()
+ {
+ *this = visit_info();
+ }
+
inline void finalize()
{
if (visited() || started() || finished() )
diff --git a/boost/geometry/algorithms/detail/point_on_border.hpp b/boost/geometry/algorithms/detail/point_on_border.hpp
index 24b88a8d19..1c751c23e4 100644
--- a/boost/geometry/algorithms/detail/point_on_border.hpp
+++ b/boost/geometry/algorithms/detail/point_on_border.hpp
@@ -286,8 +286,8 @@ inline bool point_on_border(Point& point,
Geometry const& geometry,
bool midpoint = false)
{
- concept::check<Point>();
- concept::check<Geometry const>();
+ concepts::check<Point>();
+ concepts::check<Geometry const>();
return dispatch::point_on_border
<
diff --git a/boost/geometry/algorithms/detail/recalculate.hpp b/boost/geometry/algorithms/detail/recalculate.hpp
index fd3ed6b8da..b75dd135e0 100644
--- a/boost/geometry/algorithms/detail/recalculate.hpp
+++ b/boost/geometry/algorithms/detail/recalculate.hpp
@@ -219,8 +219,8 @@ struct recalculate<Polygon1, Polygon2, polygon_tag, polygon_tag>
template <typename Geometry1, typename Geometry2, typename Strategy>
inline void recalculate(Geometry1& geometry1, Geometry2 const& geometry2, Strategy const& strategy)
{
- concept::check<Geometry1>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1>();
+ concepts::check<Geometry2 const>();
// static assert dimensions (/types) are the same
diff --git a/boost/geometry/algorithms/detail/relate/interface.hpp b/boost/geometry/algorithms/detail/relate/interface.hpp
index e2c067b68d..95d452931c 100644
--- a/boost/geometry/algorithms/detail/relate/interface.hpp
+++ b/boost/geometry/algorithms/detail/relate/interface.hpp
@@ -199,8 +199,8 @@ struct relate
Geometry2 const& geometry2,
Mask const& mask)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
assert_dimension_equal<Geometry1, Geometry2>();
typename detail::relate::result_handler_type
diff --git a/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/boost/geometry/algorithms/detail/relate/linear_areal.hpp
index e7cbf6f6c2..58ba7bd1af 100644
--- a/boost/geometry/algorithms/detail/relate/linear_areal.hpp
+++ b/boost/geometry/algorithms/detail/relate/linear_areal.hpp
@@ -1149,6 +1149,8 @@ struct linear_areal
Geometry2 const& geometry2,
Turn const& turn)
{
+ typedef typename cs_tag<typename Turn::point_type>::type cs_tag;
+
if ( turn.operations[op_id].position == overlay::position_front )
return false;
@@ -1192,7 +1194,7 @@ struct linear_areal
boost::end(range2));
// Will this sequence of points be always correct?
- overlay::side_calculator<point1_type, point2_type> side_calc(qi_conv, new_pj, pi, qi, qj, *qk_it);
+ overlay::side_calculator<cs_tag, point1_type, point2_type> side_calc(qi_conv, new_pj, pi, qi, qj, *qk_it);
return calculate_from_inside_sides(side_calc);
}
@@ -1201,7 +1203,7 @@ struct linear_areal
point1_type new_qj;
geometry::convert(turn.point, new_qj);
- overlay::side_calculator<point1_type, point2_type> side_calc(qi_conv, new_pj, pi, qi, new_qj, qj);
+ overlay::side_calculator<cs_tag, point1_type, point2_type> side_calc(qi_conv, new_pj, pi, qi, new_qj, qj);
return calculate_from_inside_sides(side_calc);
}
@@ -1414,10 +1416,14 @@ struct linear_areal
template <typename Geometry1, typename Geometry2>
struct areal_linear
{
+ typedef linear_areal<Geometry2, Geometry1, true> linear_areal_type;
+
+ static const bool interruption_enabled = linear_areal_type::interruption_enabled;
+
template <typename Result>
static inline void apply(Geometry1 const& geometry1, Geometry2 const& geometry2, Result & result)
{
- linear_areal<Geometry2, Geometry1, true>::apply(geometry2, geometry1, result);
+ linear_areal_type::apply(geometry2, geometry1, result);
}
};
diff --git a/boost/geometry/algorithms/detail/relation/interface.hpp b/boost/geometry/algorithms/detail/relation/interface.hpp
index 73737cf2c2..e9a9474551 100644
--- a/boost/geometry/algorithms/detail/relation/interface.hpp
+++ b/boost/geometry/algorithms/detail/relation/interface.hpp
@@ -46,8 +46,8 @@ struct relation
static inline Matrix apply(Geometry1 const& geometry1,
Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
assert_dimension_equal<Geometry1, Geometry2>();
typename detail::relate::result_handler_type
diff --git a/boost/geometry/algorithms/detail/ring_identifier.hpp b/boost/geometry/algorithms/detail/ring_identifier.hpp
index 9ba39e4a8b..4a7e717cf7 100644
--- a/boost/geometry/algorithms/detail/ring_identifier.hpp
+++ b/boost/geometry/algorithms/detail/ring_identifier.hpp
@@ -56,6 +56,11 @@ struct ring_identifier
;
}
+ inline bool operator!=(ring_identifier const& other) const
+ {
+ return ! operator==(other);
+ }
+
#if defined(BOOST_GEOMETRY_DEBUG_IDENTIFIER)
friend std::ostream& operator<<(std::ostream &os, ring_identifier const& ring_id)
{
diff --git a/boost/geometry/algorithms/detail/sections/range_by_section.hpp b/boost/geometry/algorithms/detail/sections/range_by_section.hpp
index 02cec6cb48..611ad172d2 100644
--- a/boost/geometry/algorithms/detail/sections/range_by_section.hpp
+++ b/boost/geometry/algorithms/detail/sections/range_by_section.hpp
@@ -177,7 +177,7 @@ template <typename Geometry, typename Section>
inline typename ring_return_type<Geometry const>::type
range_by_section(Geometry const& geometry, Section const& section)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::range_by_section
<
diff --git a/boost/geometry/algorithms/detail/sections/sectionalize.hpp b/boost/geometry/algorithms/detail/sections/sectionalize.hpp
index 6443965e95..3ed5b8db07 100644
--- a/boost/geometry/algorithms/detail/sections/sectionalize.hpp
+++ b/boost/geometry/algorithms/detail/sections/sectionalize.hpp
@@ -31,6 +31,7 @@
#include <boost/static_assert.hpp>
#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/envelope.hpp>
#include <boost/geometry/algorithms/expand.hpp>
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
@@ -268,6 +269,49 @@ struct assign_loop<T, Count, Count>
}
};
+template <typename CSTag>
+struct box_first_in_section
+{
+ template <typename Box, typename Point>
+ static inline void apply(Box & box, Point const& prev, Point const& curr)
+ {
+ geometry::model::referring_segment<Point const> seg(prev, curr);
+ geometry::envelope(seg, box);
+ }
+};
+
+template <>
+struct box_first_in_section<cartesian_tag>
+{
+ template <typename Box, typename Point>
+ static inline void apply(Box & box, Point const& prev, Point const& curr)
+ {
+ geometry::envelope(prev, box);
+ geometry::expand(box, curr);
+ }
+};
+
+template <typename CSTag>
+struct box_next_in_section
+{
+ template <typename Box, typename Point>
+ static inline void apply(Box & box, Point const& prev, Point const& curr)
+ {
+ geometry::model::referring_segment<Point const> seg(prev, curr);
+ geometry::expand(box, seg);
+ }
+};
+
+template <>
+struct box_next_in_section<cartesian_tag>
+{
+ template <typename Box, typename Point>
+ static inline void apply(Box & box, Point const& , Point const& curr)
+ {
+ geometry::expand(box, curr);
+ }
+};
+
/// @brief Helper class to create sections of a part of a range, on the fly
template
<
@@ -402,10 +446,19 @@ struct sectionalize_part
int, 0, dimension_count
>::apply(direction_classes, section.directions);
- geometry::expand(section.bounding_box, previous_robust_point);
+ // In cartesian this is envelope of previous point expanded with current point
+ // in non-cartesian this is envelope of a segment
+ box_first_in_section<typename cs_tag<robust_point_type>::type>
+ ::apply(section.bounding_box, previous_robust_point, current_robust_point);
+ }
+ else
+ {
+ // In cartesian this is expand with current point
+ // in non-cartesian this is expand with a segment
+ box_next_in_section<typename cs_tag<robust_point_type>::type>
+ ::apply(section.bounding_box, previous_robust_point, current_robust_point);
}
- geometry::expand(section.bounding_box, current_robust_point);
section.end_index = index + 1;
section.count++;
if (! duplicate)
@@ -769,7 +822,7 @@ inline void sectionalize(Geometry const& geometry,
int source_index = 0,
std::size_t max_count = 10)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
typedef typename boost::range_value<Sections>::type section_type;
diff --git a/boost/geometry/algorithms/detail/within/point_in_geometry.hpp b/boost/geometry/algorithms/detail/within/point_in_geometry.hpp
index 68e74a8c5c..a73364c333 100644
--- a/boost/geometry/algorithms/detail/within/point_in_geometry.hpp
+++ b/boost/geometry/algorithms/detail/within/point_in_geometry.hpp
@@ -400,7 +400,7 @@ namespace detail { namespace within {
template <typename Point, typename Geometry, typename Strategy>
inline int point_in_geometry(Point const& point, Geometry const& geometry, Strategy const& strategy)
{
- concept::within::check
+ concepts::within::check
<
typename tag<Point>::type,
typename tag<Geometry>::type,
diff --git a/boost/geometry/algorithms/difference.hpp b/boost/geometry/algorithms/difference.hpp
index dc31c7db4d..f7ca48cbe6 100644
--- a/boost/geometry/algorithms/difference.hpp
+++ b/boost/geometry/algorithms/difference.hpp
@@ -54,9 +54,9 @@ inline OutputIterator difference_insert(Geometry1 const& geometry1,
OutputIterator out,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
- concept::check<GeometryOut>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
+ concepts::check<GeometryOut>();
return geometry::dispatch::intersection_insert
<
@@ -97,11 +97,11 @@ inline OutputIterator difference_insert(Geometry1 const& geometry1,
RobustPolicy const& robust_policy,
OutputIterator out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
- concept::check<GeometryOut>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
+ concepts::check<GeometryOut>();
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<GeometryOut>::type,
Geometry1,
@@ -142,11 +142,11 @@ template
inline void difference(Geometry1 const& geometry1,
Geometry2 const& geometry2, Collection& output_collection)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename boost::range_value<Collection>::type geometry_out;
- concept::check<geometry_out>();
+ concepts::check<geometry_out>();
typedef typename geometry::rescale_overlay_policy_type
<
diff --git a/boost/geometry/algorithms/equals.hpp b/boost/geometry/algorithms/equals.hpp
index 0f0bdde584..d04d5c7f3a 100644
--- a/boost/geometry/algorithms/equals.hpp
+++ b/boost/geometry/algorithms/equals.hpp
@@ -5,8 +5,8 @@
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2014, 2015.
-// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014, 2015, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
@@ -161,8 +161,13 @@ struct equals_by_collection
double
>::type calculation_type;
- typedef std::vector<collected_vector<calculation_type> > v;
- v c1, c2;
+ typedef geometry::collected_vector
+ <
+ calculation_type,
+ Geometry1
+ > collected_vector;
+
+ std::vector<collected_vector> c1, c2;
geometry::collect_vectors(c1, geometry1);
geometry::collect_vectors(c2, geometry2);
@@ -323,6 +328,17 @@ struct equals
: detail::equals::equals_by_collection<detail::equals::area_check>
{};
+template <typename MultiPolygon, typename Ring, bool Reverse>
+struct equals
+ <
+ MultiPolygon, Ring,
+ multi_polygon_tag, ring_tag,
+ 2,
+ Reverse
+ >
+ : detail::equals::equals_by_collection<detail::equals::area_check>
+{};
+
} // namespace dispatch
#endif // DOXYGEN_NO_DISPATCH
@@ -336,7 +352,7 @@ struct equals
static inline bool apply(Geometry1 const& geometry1,
Geometry2 const& geometry2)
{
- concept::check_concepts_and_equal_dimensions
+ concepts::check_concepts_and_equal_dimensions
<
Geometry1 const,
Geometry2 const
diff --git a/boost/geometry/algorithms/for_each.hpp b/boost/geometry/algorithms/for_each.hpp
index c5c099b1ad..741dc359fe 100644
--- a/boost/geometry/algorithms/for_each.hpp
+++ b/boost/geometry/algorithms/for_each.hpp
@@ -337,7 +337,7 @@ struct for_each_segment<MultiGeometry, multi_tag>
template<typename Geometry, typename Functor>
inline Functor for_each_point(Geometry& geometry, Functor f)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::for_each_point<Geometry>::apply(geometry, f);
return f;
@@ -360,7 +360,7 @@ inline Functor for_each_point(Geometry& geometry, Functor f)
template<typename Geometry, typename Functor>
inline Functor for_each_segment(Geometry& geometry, Functor f)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::for_each_segment<Geometry>::apply(geometry, f);
return f;
diff --git a/boost/geometry/algorithms/intersects.hpp b/boost/geometry/algorithms/intersects.hpp
index 1bb85aa3bb..5349db76bb 100644
--- a/boost/geometry/algorithms/intersects.hpp
+++ b/boost/geometry/algorithms/intersects.hpp
@@ -49,7 +49,7 @@ namespace boost { namespace geometry
template <typename Geometry>
inline bool intersects(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
typedef typename geometry::point_type<Geometry>::type point_type;
typedef detail::no_rescale_policy rescale_policy_type;
@@ -93,8 +93,8 @@ inline bool intersects(Geometry const& geometry)
template <typename Geometry1, typename Geometry2>
inline bool intersects(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return ! geometry::disjoint(geometry1, geometry2);
}
diff --git a/boost/geometry/algorithms/is_empty.hpp b/boost/geometry/algorithms/is_empty.hpp
index 02c295eaba..8dab69c879 100644
--- a/boost/geometry/algorithms/is_empty.hpp
+++ b/boost/geometry/algorithms/is_empty.hpp
@@ -157,7 +157,7 @@ struct is_empty
{
static inline bool apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::is_empty<Geometry>::apply(geometry);
}
diff --git a/boost/geometry/algorithms/length.hpp b/boost/geometry/algorithms/length.hpp
index cf5234da1a..39a567a26b 100644
--- a/boost/geometry/algorithms/length.hpp
+++ b/boost/geometry/algorithms/length.hpp
@@ -251,7 +251,7 @@ template<typename Geometry>
inline typename default_length_result<Geometry>::type
length(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
// detail::throw_on_empty_input(geometry);
@@ -283,7 +283,7 @@ template<typename Geometry, typename Strategy>
inline typename default_length_result<Geometry>::type
length(Geometry const& geometry, Strategy const& strategy)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
// detail::throw_on_empty_input(geometry);
diff --git a/boost/geometry/algorithms/make.hpp b/boost/geometry/algorithms/make.hpp
index d0e3092492..899d5489b7 100644
--- a/boost/geometry/algorithms/make.hpp
+++ b/boost/geometry/algorithms/make.hpp
@@ -45,7 +45,7 @@ namespace detail { namespace make
template <typename Geometry, typename Range>
inline Geometry make_points(Range const& range)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
geometry::append(geometry, range);
@@ -78,7 +78,7 @@ inline Geometry make_points(Range const& range)
template <typename Geometry, typename Type>
inline Geometry make(Type const& c1, Type const& c2)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
dispatch::assign
@@ -112,7 +112,7 @@ inline Geometry make(Type const& c1, Type const& c2)
template <typename Geometry, typename Type>
inline Geometry make(Type const& c1, Type const& c2, Type const& c3)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
dispatch::assign
@@ -127,7 +127,7 @@ inline Geometry make(Type const& c1, Type const& c2, Type const& c3)
template <typename Geometry, typename Type>
inline Geometry make(Type const& c1, Type const& c2, Type const& c3, Type const& c4)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
dispatch::assign
@@ -163,7 +163,7 @@ inline Geometry make(Type const& c1, Type const& c2, Type const& c3, Type const&
template <typename Geometry>
inline Geometry make_inverse()
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
dispatch::assign_inverse
@@ -184,7 +184,7 @@ inline Geometry make_inverse()
template <typename Geometry>
inline Geometry make_zero()
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
Geometry geometry;
dispatch::assign_zero
diff --git a/boost/geometry/algorithms/num_geometries.hpp b/boost/geometry/algorithms/num_geometries.hpp
index 8144c22ab0..e122241fea 100644
--- a/boost/geometry/algorithms/num_geometries.hpp
+++ b/boost/geometry/algorithms/num_geometries.hpp
@@ -90,7 +90,7 @@ struct num_geometries
{
static inline std::size_t apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::num_geometries<Geometry>::apply(geometry);
}
diff --git a/boost/geometry/algorithms/num_interior_rings.hpp b/boost/geometry/algorithms/num_interior_rings.hpp
index 04b4eb2a7c..b7531a3dd0 100644
--- a/boost/geometry/algorithms/num_interior_rings.hpp
+++ b/boost/geometry/algorithms/num_interior_rings.hpp
@@ -88,7 +88,7 @@ struct num_interior_rings
{
static inline std::size_t apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::num_interior_rings<Geometry>::apply(geometry);
}
diff --git a/boost/geometry/algorithms/num_points.hpp b/boost/geometry/algorithms/num_points.hpp
index 214fe9c8b0..9ef77f271d 100644
--- a/boost/geometry/algorithms/num_points.hpp
+++ b/boost/geometry/algorithms/num_points.hpp
@@ -149,7 +149,7 @@ struct num_points
static inline std::size_t apply(Geometry const& geometry,
bool add_for_open)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return add_for_open
? dispatch::num_points<Geometry, true>::apply(geometry)
diff --git a/boost/geometry/algorithms/num_segments.hpp b/boost/geometry/algorithms/num_segments.hpp
index 08af226caf..86eb63fad5 100644
--- a/boost/geometry/algorithms/num_segments.hpp
+++ b/boost/geometry/algorithms/num_segments.hpp
@@ -150,7 +150,7 @@ struct num_segments
{
static inline std::size_t apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return dispatch::num_segments<Geometry>::apply(geometry);
}
diff --git a/boost/geometry/algorithms/overlaps.hpp b/boost/geometry/algorithms/overlaps.hpp
index 9b5abdb2a0..32738c294c 100644
--- a/boost/geometry/algorithms/overlaps.hpp
+++ b/boost/geometry/algorithms/overlaps.hpp
@@ -184,8 +184,8 @@ struct overlaps<Box1, Box2, box_tag, box_tag>
template <typename Geometry1, typename Geometry2>
inline bool overlaps(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return dispatch::overlaps
<
diff --git a/boost/geometry/algorithms/perimeter.hpp b/boost/geometry/algorithms/perimeter.hpp
index 1b5ccacf9c..47b0649727 100644
--- a/boost/geometry/algorithms/perimeter.hpp
+++ b/boost/geometry/algorithms/perimeter.hpp
@@ -142,7 +142,7 @@ struct perimeter
static inline typename default_length_result<Geometry>::type
apply(Geometry const& geometry, Strategy const& strategy)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return resolve_strategy::perimeter::apply(geometry, strategy);
}
};
diff --git a/boost/geometry/algorithms/point_on_surface.hpp b/boost/geometry/algorithms/point_on_surface.hpp
index 3fa83bfe6f..e9041f937b 100644
--- a/boost/geometry/algorithms/point_on_surface.hpp
+++ b/boost/geometry/algorithms/point_on_surface.hpp
@@ -295,8 +295,8 @@ inline bool calculate_point_on_surface(Geometry const& geometry, Point& point)
template <typename Geometry, typename Point>
inline void point_on_surface(Geometry const& geometry, Point & point)
{
- concept::check<Point>();
- concept::check<Geometry const>();
+ concepts::check<Point>();
+ concepts::check<Geometry const>();
// First try in Y-direction (which should always succeed for valid polygons)
if (! detail::point_on_surface::calculate_point_on_surface<1>(geometry, point))
diff --git a/boost/geometry/algorithms/remove_spikes.hpp b/boost/geometry/algorithms/remove_spikes.hpp
index 080db92f6d..caa7fed9be 100644
--- a/boost/geometry/algorithms/remove_spikes.hpp
+++ b/boost/geometry/algorithms/remove_spikes.hpp
@@ -241,7 +241,7 @@ struct remove_spikes
{
static void apply(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::remove_spikes<Geometry>::apply(geometry);
}
};
diff --git a/boost/geometry/algorithms/reverse.hpp b/boost/geometry/algorithms/reverse.hpp
index 578771bfe3..dc7d2de42c 100644
--- a/boost/geometry/algorithms/reverse.hpp
+++ b/boost/geometry/algorithms/reverse.hpp
@@ -137,7 +137,7 @@ struct reverse
{
static void apply(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
dispatch::reverse<Geometry>::apply(geometry);
}
};
diff --git a/boost/geometry/algorithms/simplify.hpp b/boost/geometry/algorithms/simplify.hpp
index 0b28eb7d15..cfeb542220 100644
--- a/boost/geometry/algorithms/simplify.hpp
+++ b/boost/geometry/algorithms/simplify.hpp
@@ -333,7 +333,7 @@ struct simplify
> strategy_type;
BOOST_CONCEPT_ASSERT(
- (concept::SimplifyStrategy<strategy_type, point_type>)
+ (concepts::SimplifyStrategy<strategy_type, point_type>)
);
apply(geometry, out, max_distance, strategy_type());
@@ -376,7 +376,7 @@ struct simplify_insert
> strategy_type;
BOOST_CONCEPT_ASSERT(
- (concept::SimplifyStrategy<strategy_type, point_type>)
+ (concepts::SimplifyStrategy<strategy_type, point_type>)
);
apply(geometry, out, max_distance, strategy_type());
@@ -461,7 +461,7 @@ template<typename Geometry, typename Distance, typename Strategy>
inline void simplify(Geometry const& geometry, Geometry& out,
Distance const& max_distance, Strategy const& strategy)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
geometry::clear(out);
@@ -489,7 +489,7 @@ template<typename Geometry, typename Distance>
inline void simplify(Geometry const& geometry, Geometry& out,
Distance const& max_distance)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
geometry::simplify(geometry, out, max_distance, default_strategy());
}
@@ -519,7 +519,7 @@ template<typename Geometry, typename OutputIterator, typename Distance, typename
inline void simplify_insert(Geometry const& geometry, OutputIterator out,
Distance const& max_distance, Strategy const& strategy)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
resolve_strategy::simplify_insert::apply(geometry, out, max_distance, strategy);
}
@@ -540,8 +540,8 @@ inline void simplify_insert(Geometry const& geometry, OutputIterator out,
Distance const& max_distance)
{
// Concept: output point type = point type of input geometry
- concept::check<Geometry const>();
- concept::check<typename point_type<Geometry>::type>();
+ concepts::check<Geometry const>();
+ concepts::check<typename point_type<Geometry>::type>();
simplify_insert(geometry, out, max_distance, default_strategy());
}
diff --git a/boost/geometry/algorithms/sym_difference.hpp b/boost/geometry/algorithms/sym_difference.hpp
index 77a20c0885..33f94c9321 100644
--- a/boost/geometry/algorithms/sym_difference.hpp
+++ b/boost/geometry/algorithms/sym_difference.hpp
@@ -235,9 +235,9 @@ inline OutputIterator sym_difference_insert(Geometry1 const& geometry1,
OutputIterator out,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
- concept::check<GeometryOut>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
+ concepts::check<GeometryOut>();
return dispatch::sym_difference_insert
<
@@ -272,11 +272,11 @@ inline OutputIterator sym_difference_insert(Geometry1 const& geometry1,
Geometry2 const& geometry2,
RobustPolicy const& robust_policy, OutputIterator out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
- concept::check<GeometryOut>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
+ concepts::check<GeometryOut>();
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<GeometryOut>::type,
Geometry1,
@@ -315,11 +315,11 @@ template
inline void sym_difference(Geometry1 const& geometry1,
Geometry2 const& geometry2, Collection& output_collection)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename boost::range_value<Collection>::type geometry_out;
- concept::check<geometry_out>();
+ concepts::check<geometry_out>();
typedef typename geometry::rescale_overlay_policy_type
<
diff --git a/boost/geometry/algorithms/touches.hpp b/boost/geometry/algorithms/touches.hpp
index 570c54797f..6384cc2a88 100644
--- a/boost/geometry/algorithms/touches.hpp
+++ b/boost/geometry/algorithms/touches.hpp
@@ -373,7 +373,7 @@ struct touches<Linear, Areal, Tag1, Tag2, linear_tag, areal_tag, false>
// A/L
template <typename Linear, typename Areal, typename Tag1, typename Tag2>
-struct touches<Linear, Areal, Tag1, Tag2, linear_tag, areal_tag, true>
+struct touches<Areal, Linear, Tag1, Tag2, areal_tag, linear_tag, false>
: detail::relate::relate_impl
<
detail::de9im::static_mask_touches_type,
@@ -410,8 +410,8 @@ struct touches
{
static bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
return dispatch::touches<Geometry1, Geometry2>
::apply(geometry1, geometry2);
@@ -494,7 +494,7 @@ struct self_touches
{
static bool apply(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
typedef detail::no_rescale_policy rescale_policy_type;
typedef typename geometry::point_type<Geometry>::type point_type;
diff --git a/boost/geometry/algorithms/transform.hpp b/boost/geometry/algorithms/transform.hpp
index f6748b11e3..b514c1dacf 100644
--- a/boost/geometry/algorithms/transform.hpp
+++ b/boost/geometry/algorithms/transform.hpp
@@ -349,8 +349,8 @@ struct transform
Geometry2& geometry2,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2>();
return dispatch::transform<Geometry1, Geometry2>::apply(
geometry1,
diff --git a/boost/geometry/algorithms/union.hpp b/boost/geometry/algorithms/union.hpp
index d15ee7655f..f0e55ec981 100644
--- a/boost/geometry/algorithms/union.hpp
+++ b/boost/geometry/algorithms/union.hpp
@@ -204,9 +204,9 @@ inline OutputIterator union_insert(Geometry1 const& geometry1,
Geometry2 const& geometry2,
OutputIterator out)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
- concept::check<GeometryOut>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
+ concepts::check<GeometryOut>();
typedef typename geometry::rescale_overlay_policy_type
<
@@ -214,7 +214,7 @@ inline OutputIterator union_insert(Geometry1 const& geometry1,
Geometry2
>::type rescale_policy_type;
- typedef strategy_intersection
+ typedef intersection_strategies
<
typename cs_tag<GeometryOut>::type,
Geometry1,
@@ -264,11 +264,11 @@ inline void union_(Geometry1 const& geometry1,
Geometry2 const& geometry2,
Collection& output_collection)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
typedef typename boost::range_value<Collection>::type geometry_out;
- concept::check<geometry_out>();
+ concepts::check<geometry_out>();
detail::union_::union_insert<geometry_out>(geometry1, geometry2,
range::back_inserter(output_collection));
diff --git a/boost/geometry/algorithms/unique.hpp b/boost/geometry/algorithms/unique.hpp
index fed9f8af4b..f57f4505ba 100644
--- a/boost/geometry/algorithms/unique.hpp
+++ b/boost/geometry/algorithms/unique.hpp
@@ -166,7 +166,7 @@ struct unique<MultiPolygon, multi_polygon_tag>
template <typename Geometry>
inline void unique(Geometry& geometry)
{
- concept::check<Geometry>();
+ concepts::check<Geometry>();
// Default strategy is the default point-comparison policy
typedef geometry::equal_to
diff --git a/boost/geometry/algorithms/within.hpp b/boost/geometry/algorithms/within.hpp
index 35f9396ba6..a1e6a58f8d 100644
--- a/boost/geometry/algorithms/within.hpp
+++ b/boost/geometry/algorithms/within.hpp
@@ -284,7 +284,7 @@ struct within
Geometry2 const& geometry2,
Strategy const& strategy)
{
- concept::within::check
+ concepts::within::check
<
typename tag<Geometry1>::type,
typename tag<Geometry2>::type,
@@ -339,8 +339,8 @@ struct within
Geometry2 const& geometry2,
Strategy const& strategy)
{
- concept::check<Geometry1 const>();
- concept::check<Geometry2 const>();
+ concepts::check<Geometry1 const>();
+ concepts::check<Geometry2 const>();
assert_dimension_equal<Geometry1, Geometry2>();
return resolve_strategy::within::apply(geometry1,
diff --git a/boost/geometry/arithmetic/arithmetic.hpp b/boost/geometry/arithmetic/arithmetic.hpp
index fbc3ca443e..3ab66b27f5 100644
--- a/boost/geometry/arithmetic/arithmetic.hpp
+++ b/boost/geometry/arithmetic/arithmetic.hpp
@@ -139,7 +139,7 @@ struct point_assignment
template <typename Point>
inline void add_value(Point& p, typename detail::param<Point>::type value)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
for_each_coordinate(p,
detail::value_operation
@@ -162,8 +162,8 @@ inline void add_value(Point& p, typename detail::param<Point>::type value)
template <typename Point1, typename Point2>
inline void add_point(Point1& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
for_each_coordinate(p1, detail::point_operation<Point2, std::plus>(p2));
}
@@ -179,7 +179,7 @@ inline void add_point(Point1& p1, Point2 const& p2)
template <typename Point>
inline void subtract_value(Point& p, typename detail::param<Point>::type value)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
for_each_coordinate(p,
detail::value_operation
@@ -202,8 +202,8 @@ inline void subtract_value(Point& p, typename detail::param<Point>::type value)
template <typename Point1, typename Point2>
inline void subtract_point(Point1& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
for_each_coordinate(p1, detail::point_operation<Point2, std::minus>(p2));
}
@@ -219,7 +219,7 @@ inline void subtract_point(Point1& p1, Point2 const& p2)
template <typename Point>
inline void multiply_value(Point& p, typename detail::param<Point>::type value)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
for_each_coordinate(p,
detail::value_operation
@@ -243,8 +243,8 @@ inline void multiply_value(Point& p, typename detail::param<Point>::type value)
template <typename Point1, typename Point2>
inline void multiply_point(Point1& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
for_each_coordinate(p1, detail::point_operation<Point2, std::multiplies>(p2));
}
@@ -260,7 +260,7 @@ inline void multiply_point(Point1& p1, Point2 const& p2)
template <typename Point>
inline void divide_value(Point& p, typename detail::param<Point>::type value)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
for_each_coordinate(p,
detail::value_operation
@@ -283,8 +283,8 @@ inline void divide_value(Point& p, typename detail::param<Point>::type value)
template <typename Point1, typename Point2>
inline void divide_point(Point1& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
for_each_coordinate(p1, detail::point_operation<Point2, std::divides>(p2));
}
@@ -300,7 +300,7 @@ inline void divide_point(Point1& p1, Point2 const& p2)
template <typename Point>
inline void assign_value(Point& p, typename detail::param<Point>::type value)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
for_each_coordinate(p,
detail::value_assignment
@@ -322,8 +322,8 @@ inline void assign_value(Point& p, typename detail::param<Point>::type value)
template <typename Point1, typename Point2>
inline void assign_point(Point1& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
for_each_coordinate(p1, detail::point_assignment<Point2>(p2));
}
diff --git a/boost/geometry/arithmetic/cross_product.hpp b/boost/geometry/arithmetic/cross_product.hpp
new file mode 100644
index 0000000000..485c2123b6
--- /dev/null
+++ b/boost/geometry/arithmetic/cross_product.hpp
@@ -0,0 +1,128 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP
+#define BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP
+
+
+#include <cstddef>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/size_t.hpp>
+
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/coordinate_dimension.hpp>
+
+#include <boost/geometry/geometries/concepts/point_concept.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail
+{
+
+template <std::size_t Dimension>
+struct cross_product
+{
+ // We define cross product only for 2d (see Wolfram) and 3d.
+ // In Math, it is also well-defined for 7-dimension.
+ // Generalisation of cross product to n-dimension is defined as
+ // wedge product but it is not direct analogue to binary cross product.
+ BOOST_MPL_ASSERT_MSG((false),
+ NOT_IMPLEMENTED_FOR_THIS_DIMENSION,
+ (mpl::size_t<Dimension>));
+};
+
+template <>
+struct cross_product<2>
+{
+ template <typename P1, typename P2, typename ResultP>
+ static inline void apply(P1 const& p1, P2 const& p2, ResultP& result)
+ {
+ assert_dimension<P1, 2>();
+ assert_dimension<P2, 2>();
+ assert_dimension<ResultP, 2>();
+
+ // For 2-dimensions, analog of the cross product U(x,y) and V(x,y) is
+ // Ux * Vy - Uy * Vx
+ // which is returned as 0-component (or X) of 2d vector, 1-component is undefined.
+ set<0>(result, get<0>(p1) * get<1>(p2) - get<1>(p1) * get<0>(p2));
+ }
+};
+
+template <>
+struct cross_product<3>
+{
+ template <typename P1, typename P2, typename ResultP>
+ static inline void apply(P1 const& p1, P2 const& p2, ResultP& result)
+ {
+ assert_dimension<P1, 3>();
+ assert_dimension<P2, 3>();
+ assert_dimension<ResultP, 3>();
+
+ set<0>(result, get<1>(p1) * get<2>(p2) - get<2>(p1) * get<1>(p2));
+ set<1>(result, get<2>(p1) * get<0>(p2) - get<0>(p1) * get<2>(p2));
+ set<2>(result, get<0>(p1) * get<1>(p2) - get<1>(p1) * get<0>(p2));
+ }
+};
+
+} // namespace detail
+#endif // DOXYGEN_NO_DETAIL
+
+
+/*!
+\brief Computes the cross product of two vectors.
+\details All vectors should have the same dimension, 3 or 2.
+\ingroup arithmetic
+\param p1 first vector
+\param p2 second vector
+\return the cross product vector
+ */
+template <typename ResultP, typename P1, typename P2>
+inline ResultP cross_product(P1 const& p1, P2 const& p2)
+{
+ BOOST_CONCEPT_ASSERT( (concepts::Point<ResultP>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<P1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<P2>) );
+
+ ResultP result;
+ detail::cross_product<dimension<ResultP>::value>::apply(p1, p2, result);
+ return result;
+}
+
+/*!
+\brief Computes the cross product of two vectors.
+\details All vectors should have the same dimension, 3 or 2.
+\ingroup arithmetic
+\param p1 first vector
+\param p2 second vector
+\return the cross product vector
+*/
+template <typename P>
+inline P cross_product(P const& p1, P const& p2)
+{
+ BOOST_CONCEPT_ASSERT((concepts::Point<P>));
+ BOOST_CONCEPT_ASSERT((concepts::ConstPoint<P>));
+
+ P result;
+ detail::cross_product<dimension<P>::value>::apply(p1, p2, result);
+ return result;
+}
+
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP
diff --git a/boost/geometry/arithmetic/determinant.hpp b/boost/geometry/arithmetic/determinant.hpp
index a8e46ca9a0..59c596b124 100644
--- a/boost/geometry/arithmetic/determinant.hpp
+++ b/boost/geometry/arithmetic/determinant.hpp
@@ -59,8 +59,8 @@ inline ReturnType determinant(U const& ux, U const& uy
template <typename ReturnType, typename U, typename V>
inline ReturnType determinant(U const& u, V const& v)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<U>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<V>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<U>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<V>) );
return calculate_determinant
<
diff --git a/boost/geometry/arithmetic/dot_product.hpp b/boost/geometry/arithmetic/dot_product.hpp
index fc2b3844e6..747bd01ab0 100644
--- a/boost/geometry/arithmetic/dot_product.hpp
+++ b/boost/geometry/arithmetic/dot_product.hpp
@@ -69,8 +69,8 @@ template <typename Point1, typename Point2>
inline typename select_coordinate_type<Point1, Point2>::type dot_product(
Point1 const& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
return detail::dot_product_maker
<
diff --git a/boost/geometry/formulas/spherical.hpp b/boost/geometry/formulas/spherical.hpp
new file mode 100644
index 0000000000..2195bbbe10
--- /dev/null
+++ b/boost/geometry/formulas/spherical.hpp
@@ -0,0 +1,96 @@
+// Boost.Geometry
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_FORMULAS_SPHERICAL_HPP
+#define BOOST_GEOMETRY_FORMULAS_SPHERICAL_HPP
+
+#include <boost/geometry/core/coordinate_system.hpp>
+#include <boost/geometry/core/coordinate_type.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/radian_access.hpp>
+
+//#include <boost/geometry/arithmetic/arithmetic.hpp>
+#include <boost/geometry/arithmetic/cross_product.hpp>
+#include <boost/geometry/arithmetic/dot_product.hpp>
+
+#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
+#include <boost/geometry/util/select_coordinate_type.hpp>
+
+namespace boost { namespace geometry {
+
+namespace formula {
+
+template <typename Point3d, typename PointSph>
+static inline Point3d sph_to_cart3d(PointSph const& point_sph)
+{
+ typedef typename coordinate_type<Point3d>::type calc_t;
+
+ Point3d res;
+
+ calc_t lon = get_as_radian<0>(point_sph);
+ calc_t lat = get_as_radian<1>(point_sph);
+
+ calc_t const cos_lat = cos(lat);
+ set<0>(res, cos_lat * cos(lon));
+ set<1>(res, cos_lat * sin(lon));
+ set<2>(res, sin(lat));
+
+ return res;
+}
+
+template <typename PointSph, typename Point3d>
+static inline PointSph cart3d_to_sph(Point3d const& point_3d)
+{
+ typedef typename coordinate_type<PointSph>::type coord_t;
+ typedef typename coordinate_type<Point3d>::type calc_t;
+
+ PointSph res;
+
+ calc_t const x = get<0>(point_3d);
+ calc_t const y = get<1>(point_3d);
+ calc_t const z = get<2>(point_3d);
+
+ set_from_radian<0>(res, atan2(y, x));
+ set_from_radian<1>(res, asin(z));
+
+ coord_t lon = get<0>(res);
+ coord_t lat = get<1>(res);
+
+ math::normalize_spheroidal_coordinates
+ <
+ typename coordinate_system<PointSph>::type::units,
+ coord_t
+ >(lon, lat);
+
+ set<0>(res, lon);
+ set<1>(res, lat);
+
+ return res;
+}
+
+// -1 right
+// 1 left
+// 0 on
+template <typename Point3d1, typename Point3d2>
+static inline int sph_side_value(Point3d1 const& norm, Point3d2 const& pt)
+{
+ typedef typename select_coordinate_type<Point3d1, Point3d2>::type calc_t;
+ calc_t c0 = 0;
+ calc_t d = dot_product(norm, pt);
+ return math::equals(d, c0) ? 0
+ : d > c0 ? 1
+ : -1; // d < 0
+}
+
+} // namespace formula
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_FORMULAS_SPHERICAL_HPP
diff --git a/boost/geometry/geometries/box.hpp b/boost/geometry/geometries/box.hpp
index 97a4ba06da..23fd098f65 100644
--- a/boost/geometry/geometries/box.hpp
+++ b/boost/geometry/geometries/box.hpp
@@ -53,7 +53,7 @@ The box can also take a latlong point type as template parameter.
template<typename Point>
class box
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
public:
diff --git a/boost/geometry/geometries/concepts/box_concept.hpp b/boost/geometry/geometries/concepts/box_concept.hpp
index ea0d84cf31..816a90f63e 100644
--- a/boost/geometry/geometries/concepts/box_concept.hpp
+++ b/boost/geometry/geometries/concepts/box_concept.hpp
@@ -26,7 +26,7 @@
#include <boost/geometry/core/point_type.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -130,7 +130,7 @@ public :
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_BOX_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/check.hpp b/boost/geometry/geometries/concepts/check.hpp
index 07ef84f4a4..f609d5f131 100644
--- a/boost/geometry/geometries/concepts/check.hpp
+++ b/boost/geometry/geometries/concepts/check.hpp
@@ -71,108 +71,108 @@ struct check : not_implemented<GeometryTag>
template <typename Geometry>
struct check<Geometry, point_tag, true>
- : detail::concept_check::check<concept::ConstPoint<Geometry> >
+ : detail::concept_check::check<concepts::ConstPoint<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, point_tag, false>
- : detail::concept_check::check<concept::Point<Geometry> >
+ : detail::concept_check::check<concepts::Point<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, linestring_tag, true>
- : detail::concept_check::check<concept::ConstLinestring<Geometry> >
+ : detail::concept_check::check<concepts::ConstLinestring<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, linestring_tag, false>
- : detail::concept_check::check<concept::Linestring<Geometry> >
+ : detail::concept_check::check<concepts::Linestring<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, ring_tag, true>
- : detail::concept_check::check<concept::ConstRing<Geometry> >
+ : detail::concept_check::check<concepts::ConstRing<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, ring_tag, false>
- : detail::concept_check::check<concept::Ring<Geometry> >
+ : detail::concept_check::check<concepts::Ring<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, polygon_tag, true>
- : detail::concept_check::check<concept::ConstPolygon<Geometry> >
+ : detail::concept_check::check<concepts::ConstPolygon<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, polygon_tag, false>
- : detail::concept_check::check<concept::Polygon<Geometry> >
+ : detail::concept_check::check<concepts::Polygon<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, box_tag, true>
- : detail::concept_check::check<concept::ConstBox<Geometry> >
+ : detail::concept_check::check<concepts::ConstBox<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, box_tag, false>
- : detail::concept_check::check<concept::Box<Geometry> >
+ : detail::concept_check::check<concepts::Box<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, segment_tag, true>
- : detail::concept_check::check<concept::ConstSegment<Geometry> >
+ : detail::concept_check::check<concepts::ConstSegment<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, segment_tag, false>
- : detail::concept_check::check<concept::Segment<Geometry> >
+ : detail::concept_check::check<concepts::Segment<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_point_tag, true>
- : detail::concept_check::check<concept::ConstMultiPoint<Geometry> >
+ : detail::concept_check::check<concepts::ConstMultiPoint<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_point_tag, false>
- : detail::concept_check::check<concept::MultiPoint<Geometry> >
+ : detail::concept_check::check<concepts::MultiPoint<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_linestring_tag, true>
- : detail::concept_check::check<concept::ConstMultiLinestring<Geometry> >
+ : detail::concept_check::check<concepts::ConstMultiLinestring<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_linestring_tag, false>
- : detail::concept_check::check<concept::MultiLinestring<Geometry> >
+ : detail::concept_check::check<concepts::MultiLinestring<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_polygon_tag, true>
- : detail::concept_check::check<concept::ConstMultiPolygon<Geometry> >
+ : detail::concept_check::check<concepts::ConstMultiPolygon<Geometry> >
{};
template <typename Geometry>
struct check<Geometry, multi_polygon_tag, false>
- : detail::concept_check::check<concept::MultiPolygon<Geometry> >
+ : detail::concept_check::check<concepts::MultiPolygon<Geometry> >
{};
@@ -182,7 +182,7 @@ struct check<Geometry, multi_polygon_tag, false>
-namespace concept
+namespace concepts
{
@@ -234,7 +234,7 @@ inline void check_concepts_and_equal_dimensions()
}
-} // namespace concept
+} // namespace concepts
}} // namespace boost::geometry
diff --git a/boost/geometry/geometries/concepts/linestring_concept.hpp b/boost/geometry/geometries/concepts/linestring_concept.hpp
index 091336fe30..6775239d05 100644
--- a/boost/geometry/geometries/concepts/linestring_concept.hpp
+++ b/boost/geometry/geometries/concepts/linestring_concept.hpp
@@ -28,7 +28,7 @@
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -76,7 +76,7 @@ class Linestring
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename point_type<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
public :
@@ -105,7 +105,7 @@ class ConstLinestring
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename point_type<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
//BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
// Relaxed the concept.
BOOST_CONCEPT_ASSERT( (boost::ForwardRangeConcept<Geometry>) );
@@ -119,7 +119,7 @@ public :
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_LINESTRING_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/multi_linestring_concept.hpp b/boost/geometry/geometries/concepts/multi_linestring_concept.hpp
index f13f7ac7e8..7931670903 100644
--- a/boost/geometry/geometries/concepts/multi_linestring_concept.hpp
+++ b/boost/geometry/geometries/concepts/multi_linestring_concept.hpp
@@ -24,7 +24,7 @@
#include <boost/geometry/geometries/concepts/linestring_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -45,7 +45,7 @@ class MultiLinestring
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type linestring_type;
- BOOST_CONCEPT_ASSERT( (concept::Linestring<linestring_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Linestring<linestring_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -73,7 +73,7 @@ class ConstMultiLinestring
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type linestring_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstLinestring<linestring_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstLinestring<linestring_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -85,7 +85,7 @@ public :
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_LINESTRING_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/multi_point_concept.hpp b/boost/geometry/geometries/concepts/multi_point_concept.hpp
index 81c087166f..9e205f1635 100644
--- a/boost/geometry/geometries/concepts/multi_point_concept.hpp
+++ b/boost/geometry/geometries/concepts/multi_point_concept.hpp
@@ -24,7 +24,7 @@
#include <boost/geometry/geometries/concepts/point_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -44,7 +44,7 @@ class MultiPoint
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -72,7 +72,7 @@ class ConstMultiPoint
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -84,7 +84,7 @@ public :
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POINT_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/multi_polygon_concept.hpp b/boost/geometry/geometries/concepts/multi_polygon_concept.hpp
index b13d330f3c..63de6e5bfc 100644
--- a/boost/geometry/geometries/concepts/multi_polygon_concept.hpp
+++ b/boost/geometry/geometries/concepts/multi_polygon_concept.hpp
@@ -23,7 +23,7 @@
#include <boost/geometry/geometries/concepts/polygon_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -44,7 +44,7 @@ class MultiPolygon
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type polygon_type;
- BOOST_CONCEPT_ASSERT( (concept::Polygon<polygon_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Polygon<polygon_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -72,7 +72,7 @@ class ConstMultiPolygon
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename boost::range_value<Geometry>::type polygon_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPolygon<polygon_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPolygon<polygon_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -85,7 +85,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_MULTI_POLYGON_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/point_concept.hpp b/boost/geometry/geometries/concepts/point_concept.hpp
index 52f8d038ea..4001f4e06b 100644
--- a/boost/geometry/geometries/concepts/point_concept.hpp
+++ b/boost/geometry/geometries/concepts/point_concept.hpp
@@ -30,7 +30,7 @@
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
/*!
@@ -187,6 +187,6 @@ public:
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_POINT_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/polygon_concept.hpp b/boost/geometry/geometries/concepts/polygon_concept.hpp
index b478a2274e..58b780009b 100644
--- a/boost/geometry/geometries/concepts/polygon_concept.hpp
+++ b/boost/geometry/geometries/concepts/polygon_concept.hpp
@@ -27,7 +27,7 @@
#include <boost/geometry/geometries/concepts/ring_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
/*!
@@ -48,8 +48,8 @@ class Polygon
typedef typename point_type<PolygonType>::type point_type;
typedef typename ring_type<PolygonType>::type ring_type;
- BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
- BOOST_CONCEPT_ASSERT( (concept::Ring<ring_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Ring<ring_type>) );
//BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<interior_type>) );
@@ -101,8 +101,8 @@ class ConstPolygon
typedef typename point_type<const_polygon_type>::type point_type;
typedef typename ring_type<const_polygon_type>::type ring_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstRing<ring_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstRing<ring_type>) );
////BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<interior_type>) );
@@ -130,6 +130,6 @@ public:
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_POLYGON_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/ring_concept.hpp b/boost/geometry/geometries/concepts/ring_concept.hpp
index 02a36c96f1..d75d428438 100644
--- a/boost/geometry/geometries/concepts/ring_concept.hpp
+++ b/boost/geometry/geometries/concepts/ring_concept.hpp
@@ -27,7 +27,7 @@
#include <boost/geometry/geometries/concepts/point_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -52,7 +52,7 @@ class Ring
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename point_type<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
public :
@@ -81,7 +81,7 @@ class ConstRing
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename point_type<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
BOOST_CONCEPT_ASSERT( (boost::RandomAccessRangeConcept<Geometry>) );
@@ -93,7 +93,7 @@ public :
#endif
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_RING_CONCEPT_HPP
diff --git a/boost/geometry/geometries/concepts/segment_concept.hpp b/boost/geometry/geometries/concepts/segment_concept.hpp
index 8d2d300153..6a1c80486f 100644
--- a/boost/geometry/geometries/concepts/segment_concept.hpp
+++ b/boost/geometry/geometries/concepts/segment_concept.hpp
@@ -23,7 +23,7 @@
#include <boost/geometry/core/point_type.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -51,7 +51,7 @@ class Segment
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS
typedef typename point_type<Geometry>::type point_type;
- BOOST_CONCEPT_ASSERT( (concept::Point<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<point_type>) );
template <size_t Index, size_t Dimension, size_t DimensionCount>
@@ -96,7 +96,7 @@ class ConstSegment
typedef typename point_type<Geometry>::type point_type;
typedef typename coordinate_type<Geometry>::type coordinate_type;
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<point_type>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<point_type>) );
template <size_t Index, size_t Dimension, size_t DimensionCount>
@@ -129,7 +129,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_GEOMETRIES_CONCEPTS_SEGMENT_CONCEPT_HPP
diff --git a/boost/geometry/geometries/linestring.hpp b/boost/geometry/geometries/linestring.hpp
index 22c9c99de9..280c4be7a6 100644
--- a/boost/geometry/geometries/linestring.hpp
+++ b/boost/geometry/geometries/linestring.hpp
@@ -59,7 +59,7 @@ template
>
class linestring : public Container<Point, Allocator<Point> >
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
typedef Container<Point, Allocator<Point> > base_type;
diff --git a/boost/geometry/geometries/multi_linestring.hpp b/boost/geometry/geometries/multi_linestring.hpp
index cd08fdbe14..67003522b0 100644
--- a/boost/geometry/geometries/multi_linestring.hpp
+++ b/boost/geometry/geometries/multi_linestring.hpp
@@ -55,7 +55,7 @@ template
>
class multi_linestring : public Container<LineString, Allocator<LineString> >
{
- BOOST_CONCEPT_ASSERT( (concept::Linestring<LineString>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Linestring<LineString>) );
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
diff --git a/boost/geometry/geometries/multi_point.hpp b/boost/geometry/geometries/multi_point.hpp
index ab4cd88177..9579f4f602 100644
--- a/boost/geometry/geometries/multi_point.hpp
+++ b/boost/geometry/geometries/multi_point.hpp
@@ -58,7 +58,7 @@ template
>
class multi_point : public Container<Point, Allocator<Point> >
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
typedef Container<Point, Allocator<Point> > base_type;
diff --git a/boost/geometry/geometries/multi_polygon.hpp b/boost/geometry/geometries/multi_polygon.hpp
index 9db74b4ec4..94cd922719 100644
--- a/boost/geometry/geometries/multi_polygon.hpp
+++ b/boost/geometry/geometries/multi_polygon.hpp
@@ -54,7 +54,7 @@ template
>
class multi_polygon : public Container<Polygon, Allocator<Polygon> >
{
- BOOST_CONCEPT_ASSERT( (concept::Polygon<Polygon>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Polygon<Polygon>) );
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
diff --git a/boost/geometry/geometries/pointing_segment.hpp b/boost/geometry/geometries/pointing_segment.hpp
index 2c4284d10a..f865a8a8c1 100644
--- a/boost/geometry/geometries/pointing_segment.hpp
+++ b/boost/geometry/geometries/pointing_segment.hpp
@@ -44,8 +44,8 @@ class pointing_segment
typename boost::mpl::if_
<
boost::is_const<ConstOrNonConstPoint>,
- concept::Point<ConstOrNonConstPoint>,
- concept::ConstPoint<ConstOrNonConstPoint>
+ concepts::Point<ConstOrNonConstPoint>,
+ concepts::ConstPoint<ConstOrNonConstPoint>
>
) );
diff --git a/boost/geometry/geometries/polygon.hpp b/boost/geometry/geometries/polygon.hpp
index 5e6064e893..5d8a0f21f7 100644
--- a/boost/geometry/geometries/polygon.hpp
+++ b/boost/geometry/geometries/polygon.hpp
@@ -75,7 +75,7 @@ template
>
class polygon
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
public:
diff --git a/boost/geometry/geometries/ring.hpp b/boost/geometry/geometries/ring.hpp
index 01bcf58cf5..fda0be40b4 100644
--- a/boost/geometry/geometries/ring.hpp
+++ b/boost/geometry/geometries/ring.hpp
@@ -63,7 +63,7 @@ template
>
class ring : public Container<Point, Allocator<Point> >
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
typedef Container<Point, Allocator<Point> > base_type;
diff --git a/boost/geometry/geometries/segment.hpp b/boost/geometry/geometries/segment.hpp
index af406aa09f..aeb275b858 100644
--- a/boost/geometry/geometries/segment.hpp
+++ b/boost/geometry/geometries/segment.hpp
@@ -45,7 +45,7 @@ namespace model
template<typename Point>
class segment : public std::pair<Point, Point>
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
public :
@@ -89,8 +89,8 @@ class referring_segment
typename boost::mpl::if_
<
boost::is_const<ConstOrNonConstPoint>,
- concept::Point<ConstOrNonConstPoint>,
- concept::ConstPoint<ConstOrNonConstPoint>
+ concepts::Point<ConstOrNonConstPoint>,
+ concepts::ConstPoint<ConstOrNonConstPoint>
>
) );
diff --git a/boost/geometry/geometry.hpp b/boost/geometry/geometry.hpp
index d96facb340..aa80701104 100644
--- a/boost/geometry/geometry.hpp
+++ b/boost/geometry/geometry.hpp
@@ -4,8 +4,8 @@
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
-// This file was modified by Oracle on 2014, 2015.
-// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014, 2015, 2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
@@ -110,7 +110,7 @@
#include <boost/geometry/io/io.hpp>
#include <boost/geometry/io/dsv/write.hpp>
#include <boost/geometry/io/svg/svg_mapper.hpp>
-#include <boost/geometry/io/svg/write_svg.hpp>
+#include <boost/geometry/io/svg/write.hpp>
#include <boost/geometry/io/wkt/read.hpp>
#include <boost/geometry/io/wkt/write.hpp>
diff --git a/boost/geometry/index/detail/algorithms/bounds.hpp b/boost/geometry/index/detail/algorithms/bounds.hpp
index 4d2416e98d..a62fda070c 100644
--- a/boost/geometry/index/detail/algorithms/bounds.hpp
+++ b/boost/geometry/index/detail/algorithms/bounds.hpp
@@ -44,7 +44,7 @@ struct bounds<Geometry, Bounds, segment_tag, box_tag>
template <typename Geometry, typename Bounds>
inline void bounds(Geometry const& g, Bounds & b)
{
- concept::check_concepts_and_equal_dimensions<Geometry const, Bounds>();
+ concepts::check_concepts_and_equal_dimensions<Geometry const, Bounds>();
dispatch::bounds<Geometry, Bounds>::apply(g, b);
}
diff --git a/boost/geometry/index/detail/algorithms/intersection_content.hpp b/boost/geometry/index/detail/algorithms/intersection_content.hpp
index 4afb40479c..04dd4728be 100644
--- a/boost/geometry/index/detail/algorithms/intersection_content.hpp
+++ b/boost/geometry/index/detail/algorithms/intersection_content.hpp
@@ -2,7 +2,7 @@
//
// boxes union/intersection area/volume
//
-// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2016 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -12,7 +12,7 @@
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
#include <boost/geometry/algorithms/intersection.hpp>
-#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_strategies.hpp>
#include <boost/geometry/index/detail/algorithms/content.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
diff --git a/boost/geometry/index/detail/predicates.hpp b/boost/geometry/index/detail/predicates.hpp
index 01afd16ba6..227939c96d 100644
--- a/boost/geometry/index/detail/predicates.hpp
+++ b/boost/geometry/index/detail/predicates.hpp
@@ -298,7 +298,7 @@ struct predicate_check<predicates::satisfies<Fun, Negated>, bounds_tag>
// NOT NEGATED
// value_tag bounds_tag
// ---------------------------
-// contains(I,G) contains(I,G)
+// contains(I,G) covers(I,G)
// covered_by(I,G) intersects(I,G)
// covers(I,G) covers(I,G)
// disjoint(I,G) !covered_by(I,G)
@@ -329,7 +329,7 @@ struct predicate_check<predicates::spatial_predicate<Geometry, predicates::conta
template <typename Value, typename Indexable>
static inline bool apply(Pred const& p, Value const&, Indexable const& i)
{
- return spatial_predicate_call<predicates::contains_tag>::apply(i, p.geometry);
+ return spatial_predicate_call<predicates::covers_tag>::apply(i, p.geometry);
}
};
diff --git a/boost/geometry/io/dsv/write.hpp b/boost/geometry/io/dsv/write.hpp
index f39a2489ad..f74ae7f95d 100644
--- a/boost/geometry/io/dsv/write.hpp
+++ b/boost/geometry/io/dsv/write.hpp
@@ -418,7 +418,7 @@ inline detail::dsv::dsv_manipulator<Geometry> dsv(Geometry const& geometry
, std::string const& list_separator = ", "
)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return detail::dsv::dsv_manipulator<Geometry>(geometry,
detail::dsv::dsv_settings(coordinate_separator,
diff --git a/boost/geometry/io/io.hpp b/boost/geometry/io/io.hpp
index 9340060776..caafccf2bf 100644
--- a/boost/geometry/io/io.hpp
+++ b/boost/geometry/io/io.hpp
@@ -47,7 +47,7 @@ struct read<format_wkt, Geometry>
template <typename Format, typename Geometry>
inline void read(Geometry& geometry, std::string const& wkt)
{
- geometry::concept::check<Geometry>();
+ geometry::concepts::check<Geometry>();
dispatch::read<Format, Geometry>::apply(geometry, wkt);
}
diff --git a/boost/geometry/io/svg/svg_mapper.hpp b/boost/geometry/io/svg/svg_mapper.hpp
index e06f2acc24..6302fd43ba 100644
--- a/boost/geometry/io/svg/svg_mapper.hpp
+++ b/boost/geometry/io/svg/svg_mapper.hpp
@@ -43,30 +43,22 @@
#include <boost/geometry/strategies/transform/map_transformer.hpp>
#include <boost/geometry/views/segment_view.hpp>
-#include <boost/geometry/io/svg/write_svg.hpp>
+#include <boost/geometry/io/svg/write.hpp>
-// Helper geometries (all points are transformed to integer-points)
+// Helper geometries (all points are transformed to svg-points)
#include <boost/geometry/geometries/geometries.hpp>
namespace boost { namespace geometry
{
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace svg
-{
- typedef model::point<int, 2, cs::cartesian> svg_point_type;
-}}
-#endif
-
#ifndef DOXYGEN_NO_DISPATCH
namespace dispatch
{
-
-template <typename GeometryTag, typename Geometry>
+template <typename GeometryTag, typename Geometry, typename SvgPoint>
struct svg_map
{
BOOST_MPL_ASSERT_MSG
@@ -77,26 +69,26 @@ struct svg_map
};
-template <typename Point>
-struct svg_map<point_tag, Point>
+template <typename Point, typename SvgPoint>
+struct svg_map<point_tag, Point, SvgPoint>
{
template <typename TransformStrategy>
static inline void apply(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
Point const& point, TransformStrategy const& strategy)
{
- detail::svg::svg_point_type ipoint;
+ SvgPoint ipoint;
geometry::transform(point, ipoint, strategy);
stream << geometry::svg(ipoint, style, size) << std::endl;
}
};
-template <typename BoxSeg1, typename BoxSeg2>
+template <typename BoxSeg1, typename BoxSeg2, typename SvgPoint>
struct svg_map_box_seg
{
template <typename TransformStrategy>
static inline void apply(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
BoxSeg1 const& box_seg, TransformStrategy const& strategy)
{
BoxSeg2 ibox_seg;
@@ -111,23 +103,23 @@ struct svg_map_box_seg
}
};
-template <typename Box>
-struct svg_map<box_tag, Box>
- : svg_map_box_seg<Box, model::box<detail::svg::svg_point_type> >
+template <typename Box, typename SvgPoint>
+struct svg_map<box_tag, Box, SvgPoint>
+ : svg_map_box_seg<Box, model::box<SvgPoint>, SvgPoint>
{};
-template <typename Segment>
-struct svg_map<segment_tag, Segment>
- : svg_map_box_seg<Segment, model::segment<detail::svg::svg_point_type> >
+template <typename Segment, typename SvgPoint>
+struct svg_map<segment_tag, Segment, SvgPoint>
+ : svg_map_box_seg<Segment, model::segment<SvgPoint>, SvgPoint>
{};
-template <typename Range1, typename Range2>
+template <typename Range1, typename Range2, typename SvgPoint>
struct svg_map_range
{
template <typename TransformStrategy>
static inline void apply(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
Range1 const& range, TransformStrategy const& strategy)
{
Range2 irange;
@@ -136,35 +128,35 @@ struct svg_map_range
}
};
-template <typename Ring>
-struct svg_map<ring_tag, Ring>
- : svg_map_range<Ring, model::ring<detail::svg::svg_point_type> >
+template <typename Ring, typename SvgPoint>
+struct svg_map<ring_tag, Ring, SvgPoint>
+ : svg_map_range<Ring, model::ring<SvgPoint>, SvgPoint>
{};
-template <typename Linestring>
-struct svg_map<linestring_tag, Linestring>
- : svg_map_range<Linestring, model::linestring<detail::svg::svg_point_type> >
+template <typename Linestring, typename SvgPoint>
+struct svg_map<linestring_tag, Linestring, SvgPoint>
+ : svg_map_range<Linestring, model::linestring<SvgPoint>, SvgPoint>
{};
-template <typename Polygon>
-struct svg_map<polygon_tag, Polygon>
+template <typename Polygon, typename SvgPoint>
+struct svg_map<polygon_tag, Polygon, SvgPoint>
{
template <typename TransformStrategy>
static inline void apply(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
Polygon const& polygon, TransformStrategy const& strategy)
{
- model::polygon<detail::svg::svg_point_type> ipoly;
+ model::polygon<SvgPoint> ipoly;
geometry::transform(polygon, ipoly, strategy);
stream << geometry::svg(ipoly, style, size) << std::endl;
}
};
-template <typename Multi>
-struct svg_map<multi_tag, Multi>
+template <typename Multi, typename SvgPoint>
+struct svg_map<multi_tag, Multi, SvgPoint>
{
typedef typename single_tag_of
<
@@ -173,7 +165,7 @@ struct svg_map<multi_tag, Multi>
template <typename TransformStrategy>
static inline void apply(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
Multi const& multi, TransformStrategy const& strategy)
{
for (typename boost::range_iterator<Multi const>::type it
@@ -184,31 +176,88 @@ struct svg_map<multi_tag, Multi>
svg_map
<
stag,
- typename boost::range_value<Multi>::type
+ typename boost::range_value<Multi>::type,
+ SvgPoint
>::apply(stream, style, size, *it, strategy);
}
}
};
+template <typename SvgPoint, typename Geometry>
+struct devarianted_svg_map
+{
+ template <typename TransformStrategy>
+ static inline void apply(std::ostream& stream,
+ std::string const& style,
+ double size,
+ Geometry const& geometry,
+ TransformStrategy const& strategy)
+ {
+ svg_map
+ <
+ typename tag_cast
+ <
+ typename tag<Geometry>::type,
+ multi_tag
+ >::type,
+ typename boost::remove_const<Geometry>::type,
+ SvgPoint
+ >::apply(stream, style, size, geometry, strategy);
+ }
+};
+
+template <typename SvgPoint, BOOST_VARIANT_ENUM_PARAMS(typename T)>
+struct devarianted_svg_map<SvgPoint, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
+{
+ template <typename TransformStrategy>
+ struct visitor: static_visitor<void>
+ {
+ std::ostream& m_os;
+ std::string const& m_style;
+ double m_size;
+ TransformStrategy const& m_strategy;
+
+ visitor(std::ostream& os,
+ std::string const& style,
+ double size,
+ TransformStrategy const& strategy)
+ : m_os(os)
+ , m_style(style)
+ , m_size(size)
+ , m_strategy(strategy)
+ {}
+
+ template <typename Geometry>
+ inline void operator()(Geometry const& geometry) const
+ {
+ devarianted_svg_map<SvgPoint, Geometry>::apply(m_os, m_style, m_size, geometry, m_strategy);
+ }
+ };
+
+ template <typename TransformStrategy>
+ static inline void apply(std::ostream& stream,
+ std::string const& style,
+ double size,
+ variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry,
+ TransformStrategy const& strategy)
+ {
+ boost::apply_visitor(visitor<TransformStrategy>(stream, style, size, strategy), geometry);
+ }
+};
+
+
} // namespace dispatch
#endif
-template <typename Geometry, typename TransformStrategy>
+template <typename SvgPoint, typename Geometry, typename TransformStrategy>
inline void svg_map(std::ostream& stream,
- std::string const& style, int size,
+ std::string const& style, double size,
Geometry const& geometry, TransformStrategy const& strategy)
{
- dispatch::svg_map
- <
- typename tag_cast
- <
- typename tag<Geometry>::type,
- multi_tag
- >::type,
- typename boost::remove_const<Geometry>::type
- >::apply(stream, style, size, geometry, strategy);
+ dispatch::devarianted_svg_map<SvgPoint, Geometry>::apply(stream,
+ style, size, geometry, strategy);
}
@@ -217,13 +266,22 @@ inline void svg_map(std::ostream& stream,
\tparam Point Point type, for input geometries.
\tparam SameScale Boolean flag indicating if horizontal and vertical scale should
be the same. The default value is true
+\tparam SvgCoordinateType Coordinate type of SVG points. SVG is capable to
+ use floating point coordinates. Therefore the default value is double
\ingroup svg
\qbk{[include reference/io/svg.qbk]}
*/
-template <typename Point, bool SameScale = true>
+template
+<
+ typename Point,
+ bool SameScale = true,
+ typename SvgCoordinateType = double
+>
class svg_mapper : boost::noncopyable
{
+ typedef model::point<SvgCoordinateType, 2, cs::cartesian> svg_point_type;
+
typedef typename geometry::select_most_precise
<
typename coordinate_type<Point>::type,
@@ -242,7 +300,7 @@ class svg_mapper : boost::noncopyable
model::box<Point> m_bounding_box;
boost::scoped_ptr<transformer_type> m_matrix;
std::ostream& m_stream;
- int m_width, m_height;
+ SvgCoordinateType m_width, m_height;
std::string m_width_height; // for <svg> tag only, defaults to 2x 100%
void init_matrix()
@@ -279,7 +337,9 @@ public :
\param height Height of the SVG map (in SVG pixels)
\param width_height Optional information to increase width and/or height
*/
- explicit svg_mapper(std::ostream& stream, int width, int height
+ svg_mapper(std::ostream& stream
+ , SvgCoordinateType width
+ , SvgCoordinateType height
, std::string const& width_height = "width=\"100%\" height=\"100%\"")
: m_stream(stream)
, m_width(width)
@@ -326,10 +386,10 @@ public :
*/
template <typename Geometry>
void map(Geometry const& geometry, std::string const& style,
- int size = -1)
+ double size = -1.0)
{
init_matrix();
- svg_map(m_stream, style, size, geometry, *m_matrix);
+ svg_map<svg_point_type>(m_stream, style, size, geometry, *m_matrix);
}
/*!
@@ -345,10 +405,11 @@ public :
template <typename TextPoint>
void text(TextPoint const& point, std::string const& s,
std::string const& style,
- int offset_x = 0, int offset_y = 0, int lineheight = 10)
+ double offset_x = 0.0, double offset_y = 0.0,
+ double lineheight = 10.0)
{
init_matrix();
- detail::svg::svg_point_type map_point;
+ svg_point_type map_point;
transform(point, map_point, *m_matrix);
m_stream
<< "<text style=\"" << style << "\""
diff --git a/boost/geometry/io/svg/write.hpp b/boost/geometry/io/svg/write.hpp
new file mode 100644
index 0000000000..70858021fc
--- /dev/null
+++ b/boost/geometry/io/svg/write.hpp
@@ -0,0 +1,418 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2009-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_IO_SVG_WRITE_HPP
+#define BOOST_GEOMETRY_IO_SVG_WRITE_HPP
+
+#include <ostream>
+#include <string>
+
+#include <boost/config.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/range.hpp>
+
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/variant/static_visitor.hpp>
+#include <boost/variant/variant_fwd.hpp>
+
+#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
+
+#include <boost/geometry/core/exterior_ring.hpp>
+#include <boost/geometry/core/interior_rings.hpp>
+#include <boost/geometry/core/ring_type.hpp>
+
+#include <boost/geometry/geometries/concepts/check.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+
+#ifndef DOXYGEN_NO_DETAIL
+namespace detail { namespace svg
+{
+
+
+template <typename Point>
+struct svg_point
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ Point const& p, std::string const& style, double size)
+ {
+ os << "<circle cx=\"" << geometry::get<0>(p)
+ << "\" cy=\"" << geometry::get<1>(p)
+ << "\" r=\"" << (size < 0 ? 5 : size)
+ << "\" style=\"" << style << "\"/>";
+ }
+};
+
+
+template <typename Box>
+struct svg_box
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ Box const& box, std::string const& style, double)
+ {
+ // Prevent invisible boxes, making them >=1, using "max"
+ BOOST_USING_STD_MAX();
+
+ typedef typename coordinate_type<Box>::type ct;
+ ct x = geometry::get<geometry::min_corner, 0>(box);
+ ct y = geometry::get<geometry::min_corner, 1>(box);
+ ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
+ geometry::get<geometry::max_corner, 0>(box) - x);
+ ct height = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
+ geometry::get<geometry::max_corner, 1>(box) - y);
+
+ os << "<rect x=\"" << x << "\" y=\"" << y
+ << "\" width=\"" << width << "\" height=\"" << height
+ << "\" style=\"" << style << "\"/>";
+ }
+};
+
+template <typename Segment>
+struct svg_segment
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ Segment const& segment, std::string const& style, double)
+ {
+ typedef typename coordinate_type<Segment>::type ct;
+ ct x1 = geometry::get<0, 0>(segment);
+ ct y1 = geometry::get<0, 1>(segment);
+ ct x2 = geometry::get<1, 0>(segment);
+ ct y2 = geometry::get<1, 1>(segment);
+
+ os << "<line x1=\"" << x1 << "\" y1=\"" << y1
+ << "\" x2=\"" << x2 << "\" y2=\"" << y2
+ << "\" style=\"" << style << "\"/>";
+ }
+};
+
+/*!
+\brief Stream ranges as SVG
+\note policy is used to select type (polyline/polygon)
+*/
+template <typename Range, typename Policy>
+struct svg_range
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ Range const& range, std::string const& style, double)
+ {
+ typedef typename boost::range_iterator<Range const>::type iterator;
+
+ bool first = true;
+
+ os << "<" << Policy::prefix() << " points=\"";
+
+ for (iterator it = boost::begin(range);
+ it != boost::end(range);
+ ++it, first = false)
+ {
+ os << (first ? "" : " " )
+ << geometry::get<0>(*it)
+ << ","
+ << geometry::get<1>(*it);
+ }
+ os << "\" style=\"" << style << Policy::style() << "\"/>";
+ }
+};
+
+
+
+template <typename Polygon>
+struct svg_poly
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ Polygon const& polygon, std::string const& style, double)
+ {
+ typedef typename geometry::ring_type<Polygon>::type ring_type;
+ typedef typename boost::range_iterator<ring_type const>::type iterator_type;
+
+ bool first = true;
+ os << "<g fill-rule=\"evenodd\"><path d=\"";
+
+ ring_type const& ring = geometry::exterior_ring(polygon);
+ for (iterator_type it = boost::begin(ring);
+ it != boost::end(ring);
+ ++it, first = false)
+ {
+ os << (first ? "M" : " L") << " "
+ << geometry::get<0>(*it)
+ << ","
+ << geometry::get<1>(*it);
+ }
+
+ // Inner rings:
+ {
+ typename interior_return_type<Polygon const>::type
+ rings = interior_rings(polygon);
+ for (typename detail::interior_iterator<Polygon const>::type
+ rit = boost::begin(rings); rit != boost::end(rings); ++rit)
+ {
+ first = true;
+ for (typename detail::interior_ring_iterator<Polygon const>::type
+ it = boost::begin(*rit); it != boost::end(*rit);
+ ++it, first = false)
+ {
+ os << (first ? "M" : " L") << " "
+ << geometry::get<0>(*it)
+ << ","
+ << geometry::get<1>(*it);
+ }
+ }
+ }
+ os << " z \" style=\"" << style << "\"/></g>";
+
+ }
+};
+
+
+
+struct prefix_linestring
+{
+ static inline const char* prefix() { return "polyline"; }
+ static inline const char* style() { return ";fill:none"; }
+};
+
+
+struct prefix_ring
+{
+ static inline const char* prefix() { return "polygon"; }
+ static inline const char* style() { return ""; }
+};
+
+
+template <typename MultiGeometry, typename Policy>
+struct svg_multi
+{
+ template <typename Char, typename Traits>
+ static inline void apply(std::basic_ostream<Char, Traits>& os,
+ MultiGeometry const& multi, std::string const& style, double size)
+ {
+ for (typename boost::range_iterator<MultiGeometry const>::type
+ it = boost::begin(multi);
+ it != boost::end(multi);
+ ++it)
+ {
+ Policy::apply(os, *it, style, size);
+ }
+
+ }
+
+};
+
+
+}} // namespace detail::svg
+#endif // DOXYGEN_NO_DETAIL
+
+
+#ifndef DOXYGEN_NO_DISPATCH
+namespace dispatch
+{
+
+/*!
+\brief Dispatching base struct for SVG streaming, specialized below per geometry type
+\details Specializations should implement a static method "stream" to stream a geometry
+The static method should have the signature:
+
+template <typename Char, typename Traits>
+static inline void apply(std::basic_ostream<Char, Traits>& os, G const& geometry)
+*/
+template <typename Geometry, typename Tag = typename tag<Geometry>::type>
+struct svg
+{
+ BOOST_MPL_ASSERT_MSG
+ (
+ false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
+ , (Geometry)
+ );
+};
+
+template <typename Point>
+struct svg<Point, point_tag> : detail::svg::svg_point<Point> {};
+
+template <typename Segment>
+struct svg<Segment, segment_tag> : detail::svg::svg_segment<Segment> {};
+
+template <typename Box>
+struct svg<Box, box_tag> : detail::svg::svg_box<Box> {};
+
+template <typename Linestring>
+struct svg<Linestring, linestring_tag>
+ : detail::svg::svg_range<Linestring, detail::svg::prefix_linestring> {};
+
+template <typename Ring>
+struct svg<Ring, ring_tag>
+ : detail::svg::svg_range<Ring, detail::svg::prefix_ring> {};
+
+template <typename Polygon>
+struct svg<Polygon, polygon_tag>
+ : detail::svg::svg_poly<Polygon> {};
+
+template <typename MultiPoint>
+struct svg<MultiPoint, multi_point_tag>
+ : detail::svg::svg_multi
+ <
+ MultiPoint,
+ detail::svg::svg_point
+ <
+ typename boost::range_value<MultiPoint>::type
+ >
+
+ >
+{};
+
+template <typename MultiLinestring>
+struct svg<MultiLinestring, multi_linestring_tag>
+ : detail::svg::svg_multi
+ <
+ MultiLinestring,
+ detail::svg::svg_range
+ <
+ typename boost::range_value<MultiLinestring>::type,
+ detail::svg::prefix_linestring
+ >
+
+ >
+{};
+
+template <typename MultiPolygon>
+struct svg<MultiPolygon, multi_polygon_tag>
+ : detail::svg::svg_multi
+ <
+ MultiPolygon,
+ detail::svg::svg_poly
+ <
+ typename boost::range_value<MultiPolygon>::type
+ >
+
+ >
+{};
+
+
+template <typename Geometry>
+struct devarianted_svg
+{
+ template <typename OutputStream>
+ static inline void apply(OutputStream& os,
+ Geometry const& geometry,
+ std::string const& style,
+ double size)
+ {
+ svg<Geometry>::apply(os, geometry, style, size);
+ }
+};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
+struct devarianted_svg<variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
+{
+ template <typename OutputStream>
+ struct visitor: static_visitor<void>
+ {
+ OutputStream& m_os;
+ std::string const& m_style;
+ double m_size;
+
+ visitor(OutputStream& os, std::string const& style, double size)
+ : m_os(os)
+ , m_style(style)
+ , m_size(size)
+ {}
+
+ template <typename Geometry>
+ inline void operator()(Geometry const& geometry) const
+ {
+ devarianted_svg<Geometry>::apply(m_os, geometry, m_style, m_size);
+ }
+ };
+
+ template <typename OutputStream>
+ static inline void apply(
+ OutputStream& os,
+ variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry,
+ std::string const& style,
+ double size
+ )
+ {
+ boost::apply_visitor(visitor<OutputStream>(os, style, size), geometry);
+ }
+};
+
+} // namespace dispatch
+#endif // DOXYGEN_NO_DISPATCH
+
+
+/*!
+\brief Generic geometry template manipulator class, takes corresponding output class from traits class
+\ingroup svg
+\details Stream manipulator, streams geometry classes as SVG (Scalable Vector Graphics)
+*/
+template <typename Geometry>
+class svg_manipulator
+{
+public:
+
+ inline svg_manipulator(Geometry const& g, std::string const& style, double size)
+ : m_geometry(g)
+ , m_style(style)
+ , m_size(size)
+ {}
+
+ template <typename Char, typename Traits>
+ inline friend std::basic_ostream<Char, Traits>& operator<<(
+ std::basic_ostream<Char, Traits>& os, svg_manipulator const& m)
+ {
+ dispatch::devarianted_svg<Geometry>::apply(os,
+ m.m_geometry,
+ m.m_style,
+ m.m_size);
+ os.flush();
+ return os;
+ }
+
+private:
+ Geometry const& m_geometry;
+ std::string const& m_style;
+ double m_size;
+};
+
+/*!
+\brief Manipulator to stream geometries as SVG
+\tparam Geometry \tparam_geometry
+\param geometry \param_geometry
+\param style String containing verbatim SVG style information
+\param size Optional size (used for SVG points) in SVG pixels. For linestrings,
+ specify linewidth in the SVG style information
+\ingroup svg
+*/
+template <typename Geometry>
+inline svg_manipulator<Geometry> svg(Geometry const& geometry,
+ std::string const& style, double size = -1.0)
+{
+ concepts::check<Geometry const>();
+
+ return svg_manipulator<Geometry>(geometry, style, size);
+}
+
+}} // namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_IO_SVG_WRITE_HPP
diff --git a/boost/geometry/io/svg/write_svg.hpp b/boost/geometry/io/svg/write_svg.hpp
index 4a518a0815..371a80bc69 100644
--- a/boost/geometry/io/svg/write_svg.hpp
+++ b/boost/geometry/io/svg/write_svg.hpp
@@ -18,288 +18,11 @@
#ifndef BOOST_GEOMETRY_IO_SVG_WRITE_SVG_HPP
#define BOOST_GEOMETRY_IO_SVG_WRITE_SVG_HPP
-#include <ostream>
-#include <string>
-#include <boost/config.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/range.hpp>
+// THIS FILE WAS LEFT HERE FOR BACKWARD COMPATIBILITY
-#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
-#include <boost/geometry/core/exterior_ring.hpp>
-#include <boost/geometry/core/interior_rings.hpp>
-#include <boost/geometry/core/ring_type.hpp>
+#include <boost/geometry/io/svg/write.hpp>
-#include <boost/geometry/geometries/concepts/check.hpp>
-
-
-namespace boost { namespace geometry
-{
-
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace svg
-{
-
-
-template <typename Point>
-struct svg_point
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- Point const& p, std::string const& style, int size)
- {
- os << "<circle cx=\"" << geometry::get<0>(p)
- << "\" cy=\"" << geometry::get<1>(p)
- << "\" r=\"" << (size < 0 ? 5 : size)
- << "\" style=\"" << style << "\"/>";
- }
-};
-
-
-template <typename Box>
-struct svg_box
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- Box const& box, std::string const& style, int )
- {
- // Prevent invisible boxes, making them >=1, using "max"
- BOOST_USING_STD_MAX();
-
- typedef typename coordinate_type<Box>::type ct;
- ct x = geometry::get<geometry::min_corner, 0>(box);
- ct y = geometry::get<geometry::min_corner, 1>(box);
- ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
- geometry::get<geometry::max_corner, 0>(box) - x);
- ct height = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1),
- geometry::get<geometry::max_corner, 1>(box) - y);
-
- os << "<rect x=\"" << x << "\" y=\"" << y
- << "\" width=\"" << width << "\" height=\"" << height
- << "\" style=\"" << style << "\"/>";
- }
-};
-
-template <typename Segment>
-struct svg_segment
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- Segment const& segment, std::string const& style, int)
- {
- typedef typename coordinate_type<Segment>::type ct;
- ct x1 = geometry::get<0, 0>(segment);
- ct y1 = geometry::get<0, 1>(segment);
- ct x2 = geometry::get<1, 0>(segment);
- ct y2 = geometry::get<1, 1>(segment);
-
- os << "<line x1=\"" << x1 << "\" y1=\"" << y1
- << "\" x2=\"" << x2 << "\" y2=\"" << y2
- << "\" style=\"" << style << "\"/>";
- }
-};
-
-/*!
-\brief Stream ranges as SVG
-\note policy is used to select type (polyline/polygon)
-*/
-template <typename Range, typename Policy>
-struct svg_range
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- Range const& range, std::string const& style, int )
- {
- typedef typename boost::range_iterator<Range const>::type iterator;
-
- bool first = true;
-
- os << "<" << Policy::prefix() << " points=\"";
-
- for (iterator it = boost::begin(range);
- it != boost::end(range);
- ++it, first = false)
- {
- os << (first ? "" : " " )
- << geometry::get<0>(*it)
- << ","
- << geometry::get<1>(*it);
- }
- os << "\" style=\"" << style << Policy::style() << "\"/>";
- }
-};
-
-
-
-template <typename Polygon>
-struct svg_poly
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- Polygon const& polygon, std::string const& style, int )
- {
- typedef typename geometry::ring_type<Polygon>::type ring_type;
- typedef typename boost::range_iterator<ring_type const>::type iterator_type;
-
- bool first = true;
- os << "<g fill-rule=\"evenodd\"><path d=\"";
-
- ring_type const& ring = geometry::exterior_ring(polygon);
- for (iterator_type it = boost::begin(ring);
- it != boost::end(ring);
- ++it, first = false)
- {
- os << (first ? "M" : " L") << " "
- << geometry::get<0>(*it)
- << ","
- << geometry::get<1>(*it);
- }
-
- // Inner rings:
- {
- typename interior_return_type<Polygon const>::type
- rings = interior_rings(polygon);
- for (typename detail::interior_iterator<Polygon const>::type
- rit = boost::begin(rings); rit != boost::end(rings); ++rit)
- {
- first = true;
- for (typename detail::interior_ring_iterator<Polygon const>::type
- it = boost::begin(*rit); it != boost::end(*rit);
- ++it, first = false)
- {
- os << (first ? "M" : " L") << " "
- << geometry::get<0>(*it)
- << ","
- << geometry::get<1>(*it);
- }
- }
- }
- os << " z \" style=\"" << style << "\"/></g>";
-
- }
-};
-
-
-
-struct prefix_linestring
-{
- static inline const char* prefix() { return "polyline"; }
- static inline const char* style() { return ";fill:none"; }
-};
-
-
-struct prefix_ring
-{
- static inline const char* prefix() { return "polygon"; }
- static inline const char* style() { return ""; }
-};
-
-
-
-}} // namespace detail::svg
-#endif // DOXYGEN_NO_DETAIL
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-/*!
-\brief Dispatching base struct for SVG streaming, specialized below per geometry type
-\details Specializations should implement a static method "stream" to stream a geometry
-The static method should have the signature:
-
-template <typename Char, typename Traits>
-static inline void apply(std::basic_ostream<Char, Traits>& os, G const& geometry)
-*/
-template <typename GeometryTag, typename Geometry>
-struct svg
-{
- BOOST_MPL_ASSERT_MSG
- (
- false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (Geometry)
- );
-};
-
-template <typename Point>
-struct svg<point_tag, Point> : detail::svg::svg_point<Point> {};
-
-template <typename Segment>
-struct svg<segment_tag, Segment> : detail::svg::svg_segment<Segment> {};
-
-template <typename Box>
-struct svg<box_tag, Box> : detail::svg::svg_box<Box> {};
-
-template <typename Linestring>
-struct svg<linestring_tag, Linestring>
- : detail::svg::svg_range<Linestring, detail::svg::prefix_linestring> {};
-
-template <typename Ring>
-struct svg<ring_tag, Ring>
- : detail::svg::svg_range<Ring, detail::svg::prefix_ring> {};
-
-template <typename Polygon>
-struct svg<polygon_tag, Polygon>
- : detail::svg::svg_poly<Polygon> {};
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-/*!
-\brief Generic geometry template manipulator class, takes corresponding output class from traits class
-\ingroup svg
-\details Stream manipulator, streams geometry classes as SVG (Scalable Vector Graphics)
-*/
-template <typename G>
-class svg_manipulator
-{
-public:
-
- inline svg_manipulator(G const& g, std::string const& style, int size)
- : m_geometry(g)
- , m_style(style)
- , m_size(size)
- {}
-
- template <typename Char, typename Traits>
- inline friend std::basic_ostream<Char, Traits>& operator<<(
- std::basic_ostream<Char, Traits>& os, svg_manipulator const& m)
- {
- dispatch::svg
- <
- typename tag<G>::type, G
- >::apply(os, m.m_geometry, m.m_style, m.m_size);
- os.flush();
- return os;
- }
-
-private:
- G const& m_geometry;
- std::string const& m_style;
- int m_size;
-};
-
-/*!
-\brief Manipulator to stream geometries as SVG
-\tparam Geometry \tparam_geometry
-\param geometry \param_geometry
-\param style String containing verbatim SVG style information
-\param size Optional size (used for SVG points) in SVG pixels. For linestrings,
- specify linewidth in the SVG style information
-\ingroup svg
-*/
-template <typename Geometry>
-inline svg_manipulator<Geometry> svg(Geometry const& geometry, std::string const& style, int size = -1)
-{
- concept::check<Geometry const>();
-
- return svg_manipulator<Geometry>(geometry, style, size);
-}
-
-}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_IO_SVG_WRITE_SVG_HPP
diff --git a/boost/geometry/io/svg/write_svg_multi.hpp b/boost/geometry/io/svg/write_svg_multi.hpp
index ff349ebd75..d07a2c204e 100644
--- a/boost/geometry/io/svg/write_svg_multi.hpp
+++ b/boost/geometry/io/svg/write_svg_multi.hpp
@@ -18,92 +18,10 @@
#define BOOST_GEOMETRY_IO_SVG_WRITE_SVG_MULTI_HPP
-#include <boost/geometry/io/svg/write_svg.hpp>
+// THIS FILE WAS LEFT HERE FOR BACKWARD COMPATIBILITY
-namespace boost { namespace geometry
-{
-
-#ifndef DOXYGEN_NO_DETAIL
-namespace detail { namespace svg
-{
-
-
-template <typename MultiGeometry, typename Policy>
-struct svg_multi
-{
- template <typename Char, typename Traits>
- static inline void apply(std::basic_ostream<Char, Traits>& os,
- MultiGeometry const& multi, std::string const& style, int size)
- {
- for (typename boost::range_iterator<MultiGeometry const>::type
- it = boost::begin(multi);
- it != boost::end(multi);
- ++it)
- {
- Policy::apply(os, *it, style, size);
- }
-
- }
-
-};
-
-
-
-}} // namespace detail::svg
-#endif // DOXYGEN_NO_DETAIL
-
-
-#ifndef DOXYGEN_NO_DISPATCH
-namespace dispatch
-{
-
-template <typename MultiPoint>
-struct svg<multi_point_tag, MultiPoint>
- : detail::svg::svg_multi
- <
- MultiPoint,
- detail::svg::svg_point
- <
- typename boost::range_value<MultiPoint>::type
- >
-
- >
-{};
-
-template <typename MultiLinestring>
-struct svg<multi_linestring_tag, MultiLinestring>
- : detail::svg::svg_multi
- <
- MultiLinestring,
- detail::svg::svg_range
- <
- typename boost::range_value<MultiLinestring>::type,
- detail::svg::prefix_linestring
- >
-
- >
-{};
-
-template <typename MultiPolygon>
-struct svg<multi_polygon_tag, MultiPolygon>
- : detail::svg::svg_multi
- <
- MultiPolygon,
- detail::svg::svg_poly
- <
- typename boost::range_value<MultiPolygon>::type
- >
-
- >
-{};
-
-
-} // namespace dispatch
-#endif // DOXYGEN_NO_DISPATCH
-
-
-}} // namespace boost::geometry
+#include <boost/geometry/io/svg/write.hpp>
#endif // BOOST_GEOMETRY_IO_SVG_WRITE_SVG_MULTI_HPP
diff --git a/boost/geometry/io/wkt/read.hpp b/boost/geometry/io/wkt/read.hpp
index 7924b70283..148a5769dd 100644
--- a/boost/geometry/io/wkt/read.hpp
+++ b/boost/geometry/io/wkt/read.hpp
@@ -894,7 +894,7 @@ struct read_wkt<segment_tag, Segment>
template <typename Geometry>
inline void read_wkt(std::string const& wkt, Geometry& geometry)
{
- geometry::concept::check<Geometry>();
+ geometry::concepts::check<Geometry>();
dispatch::read_wkt<typename tag<Geometry>::type, Geometry>::apply(wkt, geometry);
}
diff --git a/boost/geometry/io/wkt/write.hpp b/boost/geometry/io/wkt/write.hpp
index a556aa440f..b98c894b38 100644
--- a/boost/geometry/io/wkt/write.hpp
+++ b/boost/geometry/io/wkt/write.hpp
@@ -501,7 +501,7 @@ private:
template <typename Geometry>
inline wkt_manipulator<Geometry> wkt(Geometry const& geometry)
{
- concept::check<Geometry const>();
+ concepts::check<Geometry const>();
return wkt_manipulator<Geometry>(geometry);
}
diff --git a/boost/geometry/policies/relate/intersection_points.hpp b/boost/geometry/policies/relate/intersection_points.hpp
index 50f9b43122..2ca84ac028 100644
--- a/boost/geometry/policies/relate/intersection_points.hpp
+++ b/boost/geometry/policies/relate/intersection_points.hpp
@@ -2,6 +2,10 @@
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// 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)
@@ -13,17 +17,10 @@
#include <algorithm>
#include <string>
-#include <boost/concept_check.hpp>
-#include <boost/numeric/conversion/cast.hpp>
-
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/assert.hpp>
#include <boost/geometry/strategies/side_info.hpp>
-#include <boost/geometry/util/promote_integral.hpp>
-#include <boost/geometry/util/select_calculation_type.hpp>
-#include <boost/geometry/util/select_most_precise.hpp>
-#include <boost/geometry/util/math.hpp>
namespace boost { namespace geometry
{
@@ -45,45 +42,6 @@ struct segments_intersection_points
template
<
- typename Point,
- typename Segment,
- typename SegmentRatio,
- typename T
- >
- static inline void assign(Point& point,
- Segment const& segment,
- SegmentRatio const& ratio,
- T const& dx, T const& dy)
- {
- typedef typename geometry::coordinate_type<Point>::type coordinate_type;
-
- // Calculate the intersection point based on segment_ratio
- // Up to now, division was postponed. Here we divide using numerator/
- // denominator. In case of integer this results in an integer
- // division.
- BOOST_GEOMETRY_ASSERT(ratio.denominator() != 0);
-
- typedef typename promote_integral<coordinate_type>::type promoted_type;
-
- promoted_type const numerator
- = boost::numeric_cast<promoted_type>(ratio.numerator());
- promoted_type const denominator
- = boost::numeric_cast<promoted_type>(ratio.denominator());
- promoted_type const dx_promoted = boost::numeric_cast<promoted_type>(dx);
- promoted_type const dy_promoted = boost::numeric_cast<promoted_type>(dy);
-
- set<0>(point, get<0, 0>(segment) + boost::numeric_cast
- <
- coordinate_type
- >(numerator * dx_promoted / denominator));
- set<1>(point, get<0, 1>(segment) + boost::numeric_cast
- <
- coordinate_type
- >(numerator * dy_promoted / denominator));
- }
-
- template
- <
typename Segment1,
typename Segment2,
typename SegmentIntersectionInfo
@@ -112,8 +70,8 @@ struct segments_intersection_points
{
// Prefer shorter segment
typedef typename SegmentIntersectionInfo::promoted_type ptype;
- ptype const len_a = sinfo.dx_a * sinfo.dx_a + sinfo.dy_a * sinfo.dy_a;
- ptype const len_b = sinfo.dx_b * sinfo.dx_b + sinfo.dy_b * sinfo.dy_b;
+ ptype const len_a = sinfo.comparable_length_a();
+ ptype const len_b = sinfo.comparable_length_b();
if (len_b < len_a)
{
use_a = false;
@@ -123,13 +81,11 @@ struct segments_intersection_points
if (use_a)
{
- assign(result.intersections[0], s1, sinfo.robust_ra,
- sinfo.dx_a, sinfo.dy_a);
+ sinfo.assign_a(result.intersections[0], s1, s2);
}
else
{
- assign(result.intersections[0], s2, sinfo.robust_rb,
- sinfo.dx_b, sinfo.dy_b);
+ sinfo.assign_b(result.intersections[0], s1, s2);
}
result.fractions[0].assign(sinfo);
diff --git a/boost/geometry/policies/robustness/segment_ratio.hpp b/boost/geometry/policies/robustness/segment_ratio.hpp
index ec659257a2..f3dbabe70a 100644
--- a/boost/geometry/policies/robustness/segment_ratio.hpp
+++ b/boost/geometry/policies/robustness/segment_ratio.hpp
@@ -2,6 +2,10 @@
// Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands.
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016 Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// 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)
@@ -190,7 +194,7 @@ public :
inline bool close_to(thistype const& other) const
{
- return geometry::math::abs(m_approximation - other.m_approximation) < 2;
+ return geometry::math::abs(m_approximation - other.m_approximation) < 50;
}
inline bool operator< (thistype const& other) const
diff --git a/boost/geometry/strategies/cartesian/cart_intersect.hpp b/boost/geometry/strategies/cartesian/cart_intersect.hpp
index 8a9857376a..0cb5d75457 100644
--- a/boost/geometry/strategies/cartesian/cart_intersect.hpp
+++ b/boost/geometry/strategies/cartesian/cart_intersect.hpp
@@ -3,8 +3,8 @@
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2014.
-// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014, 2016.
+// Modifications copyright (c) 2014-2016, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -30,6 +30,7 @@
#include <boost/geometry/algorithms/detail/recalculate.hpp>
#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/util/promote_integral.hpp>
#include <boost/geometry/util/select_calculation_type.hpp>
// Temporary / will be Strategy as template parameter
@@ -37,6 +38,7 @@
#include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
#include <boost/geometry/strategies/side_info.hpp>
+#include <boost/geometry/strategies/intersection.hpp>
#include <boost/geometry/strategies/intersection_result.hpp>
#include <boost/geometry/policies/robustness/robust_point_type.hpp>
@@ -64,6 +66,69 @@ struct relate_cartesian_segments
{
typedef typename Policy::return_type return_type;
+ template <typename CoordinateType, typename SegmentRatio>
+ struct segment_intersection_info
+ {
+ typedef typename select_most_precise
+ <
+ CoordinateType, double
+ >::type promoted_type;
+
+ promoted_type comparable_length_a() const
+ {
+ return dx_a * dx_a + dy_a * dy_a;
+ }
+
+ promoted_type comparable_length_b() const
+ {
+ return dx_b * dx_b + dy_b * dy_b;
+ }
+
+ template <typename Point, typename Segment1, typename Segment2>
+ void assign_a(Point& point, Segment1 const& a, Segment2 const& ) const
+ {
+ assign(point, a, dx_a, dy_a, robust_ra);
+ }
+ template <typename Point, typename Segment1, typename Segment2>
+ void assign_b(Point& point, Segment1 const& , Segment2 const& b) const
+ {
+ assign(point, b, dx_b, dy_b, robust_rb);
+ }
+
+ template <typename Point, typename Segment>
+ void assign(Point& point, Segment const& segment, CoordinateType const& dx, CoordinateType const& dy, SegmentRatio const& ratio) const
+ {
+ // Calculate the intersection point based on segment_ratio
+ // Up to now, division was postponed. Here we divide using numerator/
+ // denominator. In case of integer this results in an integer
+ // division.
+ BOOST_GEOMETRY_ASSERT(ratio.denominator() != 0);
+
+ typedef typename promote_integral<CoordinateType>::type promoted_type;
+
+ promoted_type const numerator
+ = boost::numeric_cast<promoted_type>(ratio.numerator());
+ promoted_type const denominator
+ = boost::numeric_cast<promoted_type>(ratio.denominator());
+ promoted_type const dx_promoted = boost::numeric_cast<promoted_type>(dx);
+ promoted_type const dy_promoted = boost::numeric_cast<promoted_type>(dy);
+
+ set<0>(point, get<0, 0>(segment) + boost::numeric_cast
+ <
+ CoordinateType
+ >(numerator * dx_promoted / denominator));
+ set<1>(point, get<0, 1>(segment) + boost::numeric_cast
+ <
+ CoordinateType
+ >(numerator * dy_promoted / denominator));
+ }
+
+ CoordinateType dx_a, dy_a;
+ CoordinateType dx_b, dy_b;
+ SegmentRatio robust_ra;
+ SegmentRatio robust_rb;
+ };
+
template <typename D, typename W, typename ResultType>
static inline void cramers_rule(D const& dx_a, D const& dy_a,
D const& dx_b, D const& dy_b, W const& wx, W const& wy,
@@ -108,16 +173,17 @@ struct relate_cartesian_segments
}
// The main entry-routine, calculating intersections of segments a / b
- template <typename Segment1, typename Segment2, typename RobustPolicy, typename RobustPoint>
+ // NOTE: Robust* types may be the same as Segments' point types
+ template <typename Segment1, typename Segment2,
+ typename RobustPolicy,
+ typename RobustPoint1, typename RobustPoint2>
static inline return_type apply(Segment1 const& a, Segment2 const& b,
- RobustPolicy const& robust_policy,
- RobustPoint const& robust_a1, RobustPoint const& robust_a2,
- RobustPoint const& robust_b1, RobustPoint const& robust_b2)
+ RobustPolicy const& /*robust_policy*/,
+ RobustPoint1 const& robust_a1, RobustPoint1 const& robust_a2,
+ RobustPoint2 const& robust_b1, RobustPoint2 const& robust_b2)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstSegment<Segment1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstSegment<Segment2>) );
-
- boost::ignore_unused_variable_warning(robust_policy);
+ BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<Segment1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<Segment2>) );
using geometry::detail::equals::equals_point_point;
bool const a_is_point = equals_point_point(robust_a1, robust_a2);
@@ -159,12 +225,8 @@ struct relate_cartesian_segments
typedef typename select_most_precise
<
- coordinate_type, double
- >::type promoted_type;
-
- typedef typename geometry::coordinate_type
- <
- RobustPoint
+ typename geometry::coordinate_type<RobustPoint1>::type,
+ typename geometry::coordinate_type<RobustPoint2>::type
>::type robust_coordinate_type;
typedef typename segment_ratio_type
@@ -176,7 +238,6 @@ struct relate_cartesian_segments
segment_intersection_info
<
coordinate_type,
- promoted_type,
ratio_type
> sinfo;
@@ -300,12 +361,13 @@ private:
typename RatioType,
typename Segment1,
typename Segment2,
- typename RobustPoint
+ typename RobustPoint1,
+ typename RobustPoint2
>
static inline return_type relate_collinear(Segment1 const& a,
Segment2 const& b,
- RobustPoint const& robust_a1, RobustPoint const& robust_a2,
- RobustPoint const& robust_b1, RobustPoint const& robust_b2,
+ RobustPoint1 const& robust_a1, RobustPoint1 const& robust_a2,
+ RobustPoint2 const& robust_b1, RobustPoint2 const& robust_b2,
bool a_is_point, bool b_is_point)
{
if (a_is_point)
@@ -335,12 +397,13 @@ private:
typename RatioType,
typename Segment1,
typename Segment2,
- typename RobustType
+ typename RobustType1,
+ typename RobustType2
>
static inline return_type relate_collinear(Segment1 const& a
, Segment2 const& b
- , RobustType oa_1, RobustType oa_2
- , RobustType ob_1, RobustType ob_2
+ , RobustType1 oa_1, RobustType1 oa_2
+ , RobustType2 ob_1, RobustType2 ob_2
)
{
// Calculate the ratios where a starts in b, b starts in a
@@ -373,8 +436,8 @@ private:
// b2 is located w.r.t. a at ratio: (5-2)/5=3/5 (on a)
// a1 is located w.r.t. b at ratio: (2-8)/-3=6/3 (after b ends)
// a2 is located w.r.t. b at ratio: (7-8)/-3=1/3 (on b)
- RobustType const length_a = oa_2 - oa_1; // no abs, see above
- RobustType const length_b = ob_2 - ob_1;
+ RobustType1 const length_a = oa_2 - oa_1; // no abs, see above
+ RobustType2 const length_b = ob_2 - ob_1;
RatioType ra_from(oa_1 - ob_1, length_b);
RatioType ra_to(oa_2 - ob_1, length_b);
@@ -435,12 +498,13 @@ private:
<
typename RatioType,
typename DegenerateSegment,
- typename RobustType
+ typename RobustType1,
+ typename RobustType2
>
static inline return_type relate_one_degenerate(
DegenerateSegment const& degenerate_segment
- , RobustType d
- , RobustType s1, RobustType s2
+ , RobustType1 d
+ , RobustType2 s1, RobustType2 s2
, bool a_degenerate
)
{
@@ -478,6 +542,20 @@ private:
};
+#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+namespace services
+{
+
+template <typename Policy, typename CalculationType>
+struct default_strategy<cartesian_tag, Policy, CalculationType>
+{
+ typedef relate_cartesian_segments<Policy, CalculationType> type;
+};
+
+} // namespace services
+#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+
+
}} // namespace strategy::intersection
}} // namespace boost::geometry
diff --git a/boost/geometry/strategies/cartesian/distance_pythagoras.hpp b/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
index 665426ecb0..8a8889dc99 100644
--- a/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
+++ b/boost/geometry/strategies/cartesian/distance_pythagoras.hpp
@@ -91,8 +91,8 @@ public :
static inline typename calculation_type<Point1, Point2>::type
apply(Point1 const& p1, Point2 const& p2)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point1>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point2>) );
// Calculate distance using Pythagoras
// (Leave comment above for Doxygen)
diff --git a/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp b/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp
index 8a4234282e..4c1b6539be 100644
--- a/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp
+++ b/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp
@@ -115,9 +115,9 @@ public :
apply(Box1 const& box1, Box2 const& box2)
{
BOOST_CONCEPT_ASSERT
- ( (concept::ConstPoint<typename point_type<Box1>::type>) );
+ ( (concepts::ConstPoint<typename point_type<Box1>::type>) );
BOOST_CONCEPT_ASSERT
- ( (concept::ConstPoint<typename point_type<Box2>::type>) );
+ ( (concepts::ConstPoint<typename point_type<Box2>::type>) );
// Calculate distance using Pythagoras
// (Leave comment above for Doxygen)
diff --git a/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp b/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp
index 0ce1d422ee..8423d16a63 100644
--- a/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp
+++ b/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp
@@ -109,9 +109,9 @@ public :
static inline typename calculation_type<Point, Box>::type
apply(Point const& point, Box const& box)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point>) );
BOOST_CONCEPT_ASSERT
- ( (concept::ConstPoint<typename point_type<Box>::type>) );
+ ( (concepts::ConstPoint<typename point_type<Box>::type>) );
// Calculate distance using Pythagoras
// (Leave comment above for Doxygen)
diff --git a/boost/geometry/strategies/concepts/area_concept.hpp b/boost/geometry/strategies/concepts/area_concept.hpp
index 75821b52a1..4eec6d1fc3 100644
--- a/boost/geometry/strategies/concepts/area_concept.hpp
+++ b/boost/geometry/strategies/concepts/area_concept.hpp
@@ -18,7 +18,7 @@
#include <boost/concept_check.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -69,7 +69,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_AREA_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/centroid_concept.hpp b/boost/geometry/strategies/concepts/centroid_concept.hpp
index f493ef6810..0bbe94ba77 100644
--- a/boost/geometry/strategies/concepts/centroid_concept.hpp
+++ b/boost/geometry/strategies/concepts/centroid_concept.hpp
@@ -19,7 +19,7 @@
#include <boost/concept_check.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -72,7 +72,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CENTROID_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/convex_hull_concept.hpp b/boost/geometry/strategies/concepts/convex_hull_concept.hpp
index d6e42e95a3..d4295ce47b 100644
--- a/boost/geometry/strategies/concepts/convex_hull_concept.hpp
+++ b/boost/geometry/strategies/concepts/convex_hull_concept.hpp
@@ -25,7 +25,7 @@
#include <boost/concept_check.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -74,7 +74,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_CONVEX_HULL_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/distance_concept.hpp b/boost/geometry/strategies/concepts/distance_concept.hpp
index 6e75fa95a6..0064d438d5 100644
--- a/boost/geometry/strategies/concepts/distance_concept.hpp
+++ b/boost/geometry/strategies/concepts/distance_concept.hpp
@@ -36,7 +36,7 @@
#include <boost/geometry/strategies/tags.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -206,7 +206,7 @@ public :
};
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_DISTANCE_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/segment_intersect_concept.hpp b/boost/geometry/strategies/concepts/segment_intersect_concept.hpp
index 43bcccf374..87d901eb93 100644
--- a/boost/geometry/strategies/concepts/segment_intersect_concept.hpp
+++ b/boost/geometry/strategies/concepts/segment_intersect_concept.hpp
@@ -20,7 +20,7 @@
#include <boost/concept_check.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -73,6 +73,6 @@ public :
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SEGMENT_INTERSECT_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/simplify_concept.hpp b/boost/geometry/strategies/concepts/simplify_concept.hpp
index d7f596cfe7..06600bafcb 100644
--- a/boost/geometry/strategies/concepts/simplify_concept.hpp
+++ b/boost/geometry/strategies/concepts/simplify_concept.hpp
@@ -24,7 +24,7 @@
#include <boost/geometry/strategies/concepts/distance_concept.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -63,7 +63,7 @@ private :
BOOST_CONCEPT_ASSERT
(
- (concept::PointSegmentDistanceStrategy<ds_type, Point, Point>)
+ (concepts::PointSegmentDistanceStrategy<ds_type, Point, Point>)
);
Strategy *str = 0;
@@ -91,6 +91,6 @@ public :
-}}} // namespace boost::geometry::concept
+}}} // namespace boost::geometry::concepts
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_SIMPLIFY_CONCEPT_HPP
diff --git a/boost/geometry/strategies/concepts/within_concept.hpp b/boost/geometry/strategies/concepts/within_concept.hpp
index 8786403712..ab712ccd5e 100644
--- a/boost/geometry/strategies/concepts/within_concept.hpp
+++ b/boost/geometry/strategies/concepts/within_concept.hpp
@@ -22,7 +22,7 @@
#include <boost/geometry/util/parameter_type_of.hpp>
-namespace boost { namespace geometry { namespace concept
+namespace boost { namespace geometry { namespace concepts
{
@@ -55,12 +55,12 @@ class WithinStrategyPolygonal
// CHECK: apply-arguments should both fulfill point concept
BOOST_CONCEPT_ASSERT
(
- (concept::ConstPoint<point_type>)
+ (concepts::ConstPoint<point_type>)
);
BOOST_CONCEPT_ASSERT
(
- (concept::ConstPoint<segment_point_type>)
+ (concepts::ConstPoint<segment_point_type>)
);
// CHECK: return types (result: int, apply: bool)
@@ -130,12 +130,12 @@ class WithinStrategyPointBox
// CHECK: apply-arguments should fulfill point/box concept
BOOST_CONCEPT_ASSERT
(
- (concept::ConstPoint<point_type>)
+ (concepts::ConstPoint<point_type>)
);
BOOST_CONCEPT_ASSERT
(
- (concept::ConstBox<box_type>)
+ (concepts::ConstBox<box_type>)
);
// CHECK: return types (apply: bool)
@@ -194,12 +194,12 @@ class WithinStrategyBoxBox
// CHECK: apply-arguments should both fulfill box concept
BOOST_CONCEPT_ASSERT
(
- (concept::ConstBox<box_type1>)
+ (concepts::ConstBox<box_type1>)
);
BOOST_CONCEPT_ASSERT
(
- (concept::ConstBox<box_type2>)
+ (concepts::ConstBox<box_type2>)
);
// CHECK: return types (apply: bool)
@@ -236,7 +236,7 @@ public :
#endif
};
-// So now: boost::geometry::concept::within
+// So now: boost::geometry::concepts::within
namespace within
{
@@ -285,7 +285,7 @@ inline void check()
}
-}}}} // namespace boost::geometry::concept::within
+}}}} // namespace boost::geometry::concepts::within
#endif // BOOST_GEOMETRY_STRATEGIES_CONCEPTS_WITHIN_CONCEPT_HPP
diff --git a/boost/geometry/strategies/intersection.hpp b/boost/geometry/strategies/intersection.hpp
index ef1b676fda..f51c5cb206 100644
--- a/boost/geometry/strategies/intersection.hpp
+++ b/boost/geometry/strategies/intersection.hpp
@@ -1,92 +1,52 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Boost.Geometry
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// 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)
-#ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
-#define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
+#ifndef BOOST_GEOMETRY_STRATEGIES_SEGMENT_INTERSECTION_HPP
+#define BOOST_GEOMETRY_STRATEGIES_SEGMENT_INTERSECTION_HPP
-#include <boost/geometry/core/point_type.hpp>
-#include <boost/geometry/geometries/segment.hpp>
-#include <boost/geometry/policies/relate/intersection_points.hpp>
-#include <boost/geometry/policies/relate/direction.hpp>
-#include <boost/geometry/policies/relate/tupled.hpp>
+#include <boost/geometry/strategies/tags.hpp>
-#include <boost/geometry/strategies/side.hpp>
-#include <boost/geometry/strategies/intersection_result.hpp>
-#include <boost/geometry/strategies/cartesian/cart_intersect.hpp>
-#include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
+#include <boost/mpl/assert.hpp>
namespace boost { namespace geometry
{
+namespace strategy { namespace intersection
+{
+
+namespace services
+{
/*!
-\brief "compound strategy", containing a segment-intersection-strategy
- and a side-strategy
- */
-template
-<
- typename Tag,
- typename Geometry1,
- typename Geometry2,
- typename IntersectionPoint,
- typename RobustPolicy,
- typename CalculationType = void
->
-struct strategy_intersection
+\brief Traits class binding a segments intersection strategy to a coordinate system
+\ingroup util
+\tparam CSTag tag of coordinate system of point-type
+\tparam Policy intersection policy
+\tparam CalculationType \tparam_calculation
+*/
+template <typename CSTag, typename Policy, typename CalculationType = void>
+struct default_strategy
{
-private :
- // for development BOOST_STATIC_ASSERT((! boost::is_same<RobustPolicy, void>::type::value));
-
- typedef typename geometry::point_type<Geometry1>::type point1_type;
- typedef typename geometry::point_type<Geometry2>::type point2_type;
- typedef typename model::referring_segment<point1_type const> segment1_type;
- typedef typename model::referring_segment<point2_type const> segment2_type;
-
- typedef segment_intersection_points
- <
- IntersectionPoint,
- typename geometry::segment_ratio_type
- <
- IntersectionPoint, RobustPolicy
- >::type
- > ip_type;
-
-public:
- typedef strategy::intersection::relate_cartesian_segments
- <
- policies::relate::segments_tupled
- <
- policies::relate::segments_intersection_points
- <
- ip_type
- > ,
- policies::relate::segments_direction
- >,
- CalculationType
- > segment_intersection_strategy_type;
-
- typedef typename strategy::side::services::default_strategy
- <
- Tag,
- CalculationType
- >::type side_strategy_type;
-
- typedef RobustPolicy rescale_policy_type;
+ BOOST_MPL_ASSERT_MSG
+ (
+ false, NOT_IMPLEMENTED_FOR_THIS_TYPE
+ , (types<CSTag>)
+ );
};
-// Version for box_box intersection or other detail calls not needing a strategy
-struct strategy_intersection_empty {};
+} // namespace services
+}} // namespace strategy::intersection
}} // namespace boost::geometry
-
-#endif // BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
+#endif // BOOST_GEOMETRY_STRATEGIES_SEGMENT_INTERSECTION_HPP
diff --git a/boost/geometry/strategies/intersection_result.hpp b/boost/geometry/strategies/intersection_result.hpp
index 9c6d17ec5e..db2a46e6a3 100644
--- a/boost/geometry/strategies/intersection_result.hpp
+++ b/boost/geometry/strategies/intersection_result.hpp
@@ -2,9 +2,8 @@
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2015.
-// Modifications copyright (c) 2015 Oracle and/or its affiliates.
-
+// This file was modified by Oracle on 2015, 2016.
+// Modifications copyright (c) 2015-2016 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -73,19 +72,6 @@ struct segment_intersection_points
{}
};
-// All assigned in cart_intersect, passed to intersection_points
-template <typename CoordinateType, typename PromotedType, typename SegmentRatio>
-struct segment_intersection_info
-{
- typedef PromotedType promoted_type;
-
- CoordinateType dx_a, dy_a;
- CoordinateType dx_b, dy_b;
- SegmentRatio robust_ra;
- SegmentRatio robust_rb;
-};
-
-
}} // namespace boost::geometry
diff --git a/boost/geometry/strategies/intersection_strategies.hpp b/boost/geometry/strategies/intersection_strategies.hpp
new file mode 100644
index 0000000000..0452c4692c
--- /dev/null
+++ b/boost/geometry/strategies/intersection_strategies.hpp
@@ -0,0 +1,100 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2016.
+// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
+#define BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
+
+
+#include <boost/geometry/core/point_type.hpp>
+#include <boost/geometry/geometries/segment.hpp>
+
+#include <boost/geometry/policies/relate/intersection_points.hpp>
+#include <boost/geometry/policies/relate/direction.hpp>
+#include <boost/geometry/policies/relate/tupled.hpp>
+
+#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/side.hpp>
+#include <boost/geometry/strategies/intersection_result.hpp>
+
+#include <boost/geometry/strategies/cartesian/cart_intersect.hpp>
+#include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
+#include <boost/geometry/strategies/spherical/intersection.hpp>
+#include <boost/geometry/strategies/spherical/ssf.hpp>
+
+#include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+
+/*!
+\brief "compound strategy", containing a segment-intersection-strategy
+ and a side-strategy
+ */
+template
+<
+ typename Tag,
+ typename Geometry1,
+ typename Geometry2,
+ typename IntersectionPoint,
+ typename RobustPolicy,
+ typename CalculationType = void
+>
+struct intersection_strategies
+{
+private :
+ // for development BOOST_STATIC_ASSERT((! boost::is_same<RobustPolicy, void>::type::value));
+
+ typedef typename geometry::point_type<Geometry1>::type point1_type;
+ typedef typename geometry::point_type<Geometry2>::type point2_type;
+ typedef typename model::referring_segment<point1_type const> segment1_type;
+ typedef typename model::referring_segment<point2_type const> segment2_type;
+
+ typedef segment_intersection_points
+ <
+ IntersectionPoint,
+ typename geometry::segment_ratio_type
+ <
+ IntersectionPoint, RobustPolicy
+ >::type
+ > ip_type;
+
+public:
+ typedef typename strategy::intersection::services::default_strategy
+ <
+ Tag,
+ policies::relate::segments_tupled
+ <
+ policies::relate::segments_intersection_points
+ <
+ ip_type
+ > ,
+ policies::relate::segments_direction
+ >,
+ CalculationType
+ >::type segment_intersection_strategy_type;
+
+ typedef typename strategy::side::services::default_strategy
+ <
+ Tag,
+ CalculationType
+ >::type side_strategy_type;
+
+ typedef RobustPolicy rescale_policy_type;
+};
+
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_STRATEGIES_INTERSECTION_HPP
diff --git a/boost/geometry/strategies/spherical/distance_cross_track.hpp b/boost/geometry/strategies/spherical/distance_cross_track.hpp
index 31b59e77ff..7daafa4a16 100644
--- a/boost/geometry/strategies/spherical/distance_cross_track.hpp
+++ b/boost/geometry/strategies/spherical/distance_cross_track.hpp
@@ -367,7 +367,7 @@ public :
#if !defined(BOOST_MSVC)
BOOST_CONCEPT_ASSERT
(
- (concept::PointDistanceStrategy<Strategy, Point, PointOfSegment>)
+ (concepts::PointDistanceStrategy<Strategy, Point, PointOfSegment>)
);
#endif
@@ -521,7 +521,7 @@ public :
#if !defined(BOOST_MSVC)
BOOST_CONCEPT_ASSERT
(
- (concept::PointDistanceStrategy<Strategy, Point, PointOfSegment>)
+ (concepts::PointDistanceStrategy<Strategy, Point, PointOfSegment>)
);
#endif
typedef typename return_type<Point, PointOfSegment>::type return_type;
diff --git a/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp b/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp
index 59be3645f5..ee805c36d1 100644
--- a/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp
+++ b/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp
@@ -96,7 +96,7 @@ public:
#if !defined(BOOST_MSVC)
BOOST_CONCEPT_ASSERT
(
- (concept::PointSegmentDistanceStrategy
+ (concepts::PointSegmentDistanceStrategy
<
Strategy, Point, typename point_type<Box>::type
>)
diff --git a/boost/geometry/strategies/spherical/intersection.hpp b/boost/geometry/strategies/spherical/intersection.hpp
new file mode 100644
index 0000000000..4ffc853aad
--- /dev/null
+++ b/boost/geometry/strategies/spherical/intersection.hpp
@@ -0,0 +1,701 @@
+// Boost.Geometry
+
+// Copyright (c) 2016, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
+// 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)
+
+#ifndef BOOST_GEOMETRY_STRATEGIES_SPHERICAL_INTERSECTION_HPP
+#define BOOST_GEOMETRY_STRATEGIES_SPHERICAL_INTERSECTION_HPP
+
+#include <algorithm>
+
+#include <boost/geometry/core/cs.hpp>
+#include <boost/geometry/core/access.hpp>
+#include <boost/geometry/core/radian_access.hpp>
+#include <boost/geometry/core/tags.hpp>
+
+#include <boost/geometry/algorithms/detail/assign_values.hpp>
+#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
+#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
+#include <boost/geometry/algorithms/detail/recalculate.hpp>
+
+#include <boost/geometry/arithmetic/arithmetic.hpp>
+#include <boost/geometry/arithmetic/cross_product.hpp>
+#include <boost/geometry/arithmetic/dot_product.hpp>
+#include <boost/geometry/formulas/spherical.hpp>
+
+#include <boost/geometry/geometries/concepts/point_concept.hpp>
+#include <boost/geometry/geometries/concepts/segment_concept.hpp>
+
+#include <boost/geometry/policies/robustness/segment_ratio.hpp>
+
+#include <boost/geometry/strategies/side_info.hpp>
+#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_result.hpp>
+
+#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/util/select_calculation_type.hpp>
+
+
+namespace boost { namespace geometry
+{
+
+namespace strategy { namespace intersection
+{
+
+// NOTE:
+// The coordinates of crossing IP may be calculated with small precision in some cases.
+// For double, near the equator noticed error ~1e-9 so far greater than
+// machine epsilon which is ~1e-16. This error is ~0.04m.
+// E.g. consider two cases, one near the origin and the second one rotated by 90 deg around Z or SN axis.
+// After the conversion from spherical degrees to cartesian 3d the following coordinates
+// are calculated:
+// for sph (-1 -1, 1 1) deg cart3d ys are -0.017449748351250485 and 0.017449748351250485
+// for sph (89 -1, 91 1) deg cart3d xs are 0.017449748351250571 and -0.017449748351250450
+// During the conversion degrees must first be converted to radians and then radians
+// are passed into trigonometric functions. The error may have several causes:
+// 1. Radians cannot represent exactly the same angles as degrees.
+// 2. Different longitudes are passed into sin() for x, corresponding to cos() for y,
+// and for different angle the error of the result may be different.
+// 3. These non-corresponding cartesian coordinates are used in calculation,
+// e.g. multiplied several times in cross and dot products.
+// If it was a problem this strategy could e.g. "normalize" longitudes before the conversion using the source units
+// by rotating the globe around Z axis, so moving longitudes always the same way towards the origin,
+// assuming this could help which is not clear.
+// For now, intersection points near the endpoints are checked explicitly if needed (if the IP is near the endpoint)
+// to generate precise result for them. Only the crossing (i) case may suffer from lower precision.
+
+template <typename Policy, typename CalculationType = void>
+struct relate_spherical_segments
+{
+ typedef typename Policy::return_type return_type;
+
+ enum intersection_point_flag { ipi_inters = 0, ipi_at_a1, ipi_at_a2, ipi_at_b1, ipi_at_b2 };
+
+ template <typename CoordinateType, typename SegmentRatio, typename Vector3d>
+ struct segment_intersection_info
+ {
+ typedef typename select_most_precise
+ <
+ CoordinateType, double
+ >::type promoted_type;
+
+ promoted_type comparable_length_a() const
+ {
+ return robust_ra.denominator();
+ }
+
+ promoted_type comparable_length_b() const
+ {
+ return robust_rb.denominator();
+ }
+
+ template <typename Point, typename Segment1, typename Segment2>
+ void assign_a(Point& point, Segment1 const& a, Segment2 const& b) const
+ {
+ assign(point, a, b);
+ }
+ template <typename Point, typename Segment1, typename Segment2>
+ void assign_b(Point& point, Segment1 const& a, Segment2 const& b) const
+ {
+ assign(point, a, b);
+ }
+
+ template <typename Point, typename Segment1, typename Segment2>
+ void assign(Point& point, Segment1 const& a, Segment2 const& b) const
+ {
+ if (ip_flag == ipi_inters)
+ {
+ // TODO: assign the rest of coordinates
+ point = formula::cart3d_to_sph<Point>(intersection_point);
+ }
+ else if (ip_flag == ipi_at_a1)
+ {
+ detail::assign_point_from_index<0>(a, point);
+ }
+ else if (ip_flag == ipi_at_a2)
+ {
+ detail::assign_point_from_index<1>(a, point);
+ }
+ else if (ip_flag == ipi_at_b1)
+ {
+ detail::assign_point_from_index<0>(b, point);
+ }
+ else // ip_flag == ipi_at_b2
+ {
+ detail::assign_point_from_index<1>(b, point);
+ }
+ }
+
+ Vector3d intersection_point;
+ SegmentRatio robust_ra;
+ SegmentRatio robust_rb;
+ intersection_point_flag ip_flag;
+ };
+
+ // Relate segments a and b
+ template <typename Segment1, typename Segment2, typename RobustPolicy>
+ static inline return_type apply(Segment1 const& a, Segment2 const& b,
+ RobustPolicy const& robust_policy)
+ {
+ typedef typename point_type<Segment1>::type point1_t;
+ typedef typename point_type<Segment2>::type point2_t;
+ point1_t a1, a2;
+ point2_t b1, b2;
+
+ // TODO: use indexed_point_view if possible?
+ detail::assign_point_from_index<0>(a, a1);
+ detail::assign_point_from_index<1>(a, a2);
+ detail::assign_point_from_index<0>(b, b1);
+ detail::assign_point_from_index<1>(b, b2);
+
+ return apply(a, b, robust_policy, a1, a2, b1, b2);
+ }
+
+ // Relate segments a and b
+ template <typename Segment1, typename Segment2, typename RobustPolicy, typename Point1, typename Point2>
+ static inline return_type apply(Segment1 const& a, Segment2 const& b,
+ RobustPolicy const&,
+ Point1 const& a1, Point1 const& a2, Point2 const& b1, Point2 const& b2)
+ {
+ BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<Segment1>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<Segment2>) );
+
+ // TODO: check only 2 first coordinates here?
+ using geometry::detail::equals::equals_point_point;
+ bool a_is_point = equals_point_point(a1, a2);
+ bool b_is_point = equals_point_point(b1, b2);
+
+ if(a_is_point && b_is_point)
+ {
+ return equals_point_point(a1, b2)
+ ? Policy::degenerate(a, true)
+ : Policy::disjoint()
+ ;
+ }
+
+ typedef typename select_calculation_type
+ <Segment1, Segment2, CalculationType>::type calc_t;
+
+ calc_t const c0 = 0;
+ calc_t const c1 = 1;
+
+ typedef model::point<calc_t, 3, cs::cartesian> vec3d_t;
+
+ using namespace formula;
+ vec3d_t const a1v = sph_to_cart3d<vec3d_t>(a1);
+ vec3d_t const a2v = sph_to_cart3d<vec3d_t>(a2);
+ vec3d_t const b1v = sph_to_cart3d<vec3d_t>(b1);
+ vec3d_t const b2v = sph_to_cart3d<vec3d_t>(b2);
+
+ vec3d_t norm1 = cross_product(a1v, a2v);
+ vec3d_t norm2 = cross_product(b1v, b2v);
+
+ side_info sides;
+ // not normalized normals, the same as in SSF
+ sides.set<0>(sph_side_value(norm2, a1v), sph_side_value(norm2, a2v));
+ if (sides.same<0>())
+ {
+ // Both points are at same side of other segment, we can leave
+ return Policy::disjoint();
+ }
+ // not normalized normals, the same as in SSF
+ sides.set<1>(sph_side_value(norm1, b1v), sph_side_value(norm1, b2v));
+ if (sides.same<1>())
+ {
+ // Both points are at same side of other segment, we can leave
+ return Policy::disjoint();
+ }
+
+ // NOTE: at this point the segments may still be disjoint
+
+ bool collinear = sides.collinear();
+
+ calc_t const len1 = math::sqrt(dot_product(norm1, norm1));
+ calc_t const len2 = math::sqrt(dot_product(norm2, norm2));
+
+ // point or opposite sides of a sphere, assume point
+ if (math::equals(len1, c0))
+ {
+ a_is_point = true;
+ if (sides.get<0, 0>() == 0 || sides.get<0, 1>() == 0)
+ {
+ sides.set<0>(0, 0);
+ }
+ }
+ else
+ {
+ // normalize
+ divide_value(norm1, len1);
+ }
+
+ if (math::equals(len2, c0))
+ {
+ b_is_point = true;
+ if (sides.get<1, 0>() == 0 || sides.get<1, 1>() == 0)
+ {
+ sides.set<1>(0, 0);
+ }
+ }
+ else
+ {
+ // normalize
+ divide_value(norm2, len2);
+ }
+
+ // check both degenerated once more
+ if (a_is_point && b_is_point)
+ {
+ return equals_point_point(a1, b2)
+ ? Policy::degenerate(a, true)
+ : Policy::disjoint()
+ ;
+ }
+
+ // NOTE: at this point one of the segments may be degenerated
+ // and the segments may still be disjoint
+
+ calc_t dot_n1n2 = dot_product(norm1, norm2);
+
+ // NOTE: this is technically not needed since theoretically above sides
+ // are calculated, but just in case check the normals.
+ // Have in mind that SSF side strategy doesn't check this.
+ // collinear if normals are equal or opposite: cos(a) in {-1, 1}
+ if (!collinear && math::equals(math::abs(dot_n1n2), c1))
+ {
+ collinear = true;
+ sides.set<0>(0, 0);
+ sides.set<1>(0, 0);
+ }
+
+ if (collinear)
+ {
+ if (a_is_point)
+ {
+ return collinear_one_degenerted<calc_t>(a, true, b1, b2, a1, a2, b1v, b2v, norm2, a1v);
+ }
+ else if (b_is_point)
+ {
+ // b2 used to be consistent with (degenerated) checks above (is it needed?)
+ return collinear_one_degenerted<calc_t>(b, false, a1, a2, b1, b2, a1v, a2v, norm1, b1v);
+ }
+ else
+ {
+ calc_t dist_a1_a2, dist_a1_b1, dist_a1_b2;
+ calc_t dist_b1_b2, dist_b1_a1, dist_b1_a2;
+ // use shorter segment
+ if (len1 <= len2)
+ {
+ calculate_collinear_data(a1, a2, b1, b2, a1v, a2v, norm1, b1v, dist_a1_a2, dist_a1_b1);
+ calculate_collinear_data(a1, a2, b1, b2, a1v, a2v, norm1, b2v, dist_a1_a2, dist_a1_b2);
+ dist_b1_b2 = dist_a1_b2 - dist_a1_b1;
+ dist_b1_a1 = -dist_a1_b1;
+ dist_b1_a2 = dist_a1_a2 - dist_a1_b1;
+ }
+ else
+ {
+ calculate_collinear_data(b1, b2, a1, a2, b1v, b2v, norm2, a1v, dist_b1_b2, dist_b1_a1);
+ calculate_collinear_data(b1, b2, a1, a2, b1v, b2v, norm2, a2v, dist_b1_b2, dist_b1_a2);
+ dist_a1_a2 = dist_b1_a2 - dist_b1_a1;
+ dist_a1_b1 = -dist_b1_a1;
+ dist_a1_b2 = dist_b1_b2 - dist_b1_a1;
+ }
+
+ segment_ratio<calc_t> ra_from(dist_b1_a1, dist_b1_b2);
+ segment_ratio<calc_t> ra_to(dist_b1_a2, dist_b1_b2);
+ segment_ratio<calc_t> rb_from(dist_a1_b1, dist_a1_a2);
+ segment_ratio<calc_t> rb_to(dist_a1_b2, dist_a1_a2);
+
+ // NOTE: this is probably not needed
+ int const a1_wrt_b = position_value(c0, dist_a1_b1, dist_a1_b2);
+ int const a2_wrt_b = position_value(dist_a1_a2, dist_a1_b1, dist_a1_b2);
+ int const b1_wrt_a = position_value(c0, dist_b1_a1, dist_b1_a2);
+ int const b2_wrt_a = position_value(dist_b1_b2, dist_b1_a1, dist_b1_a2);
+
+ if (a1_wrt_b == 1)
+ {
+ ra_from.assign(0, dist_b1_b2);
+ rb_from.assign(0, dist_a1_a2);
+ }
+ else if (a1_wrt_b == 3)
+ {
+ ra_from.assign(dist_b1_b2, dist_b1_b2);
+ rb_to.assign(0, dist_a1_a2);
+ }
+
+ if (a2_wrt_b == 1)
+ {
+ ra_to.assign(0, dist_b1_b2);
+ rb_from.assign(dist_a1_a2, dist_a1_a2);
+ }
+ else if (a2_wrt_b == 3)
+ {
+ ra_to.assign(dist_b1_b2, dist_b1_b2);
+ rb_to.assign(dist_a1_a2, dist_a1_a2);
+ }
+
+ if ((a1_wrt_b < 1 && a2_wrt_b < 1) || (a1_wrt_b > 3 && a2_wrt_b > 3))
+ {
+ return Policy::disjoint();
+ }
+
+ bool const opposite = dot_n1n2 < c0;
+
+ return Policy::segments_collinear(a, b, opposite,
+ a1_wrt_b, a2_wrt_b, b1_wrt_a, b2_wrt_a,
+ ra_from, ra_to, rb_from, rb_to);
+ }
+ }
+ else // crossing
+ {
+ if (a_is_point || b_is_point)
+ {
+ return Policy::disjoint();
+ }
+
+ vec3d_t i1;
+ intersection_point_flag ip_flag;
+ calc_t dist_a1_a2, dist_a1_i1, dist_b1_b2, dist_b1_i1;
+ if (calculate_ip_data(a1, a2, b1, b2, a1v, a2v, b1v, b2v, norm1, norm2, sides,
+ i1, dist_a1_a2, dist_a1_i1, dist_b1_b2, dist_b1_i1, ip_flag))
+ {
+ // intersects
+ segment_intersection_info
+ <
+ calc_t,
+ segment_ratio<calc_t>,
+ vec3d_t
+ > sinfo;
+
+ sinfo.robust_ra.assign(dist_a1_i1, dist_a1_a2);
+ sinfo.robust_rb.assign(dist_b1_i1, dist_b1_b2);
+ sinfo.intersection_point = i1;
+ sinfo.ip_flag = ip_flag;
+
+ return Policy::segments_crosses(sides, sinfo, a, b);
+ }
+ else
+ {
+ return Policy::disjoint();
+ }
+ }
+ }
+
+private:
+ template <typename CalcT, typename Segment, typename Point1, typename Point2, typename Vec3d>
+ static inline return_type collinear_one_degenerted(Segment const& segment, bool degenerated_a,
+ Point1 const& a1, Point1 const& a2,
+ Point2 const& b1, Point2 const& b2,
+ Vec3d const& v1, Vec3d const& v2, Vec3d const& norm,
+ Vec3d const& vother)
+ {
+ CalcT dist_1_2, dist_1_o;
+ return ! calculate_collinear_data(a1, a2, b1, b2, v1, v2, norm, vother, dist_1_2, dist_1_o)
+ ? Policy::disjoint()
+ : Policy::one_degenerate(segment, segment_ratio<CalcT>(dist_1_o, dist_1_2), degenerated_a);
+ }
+
+ template <typename Point1, typename Point2, typename Vec3d, typename CalcT>
+ static inline bool calculate_collinear_data(Point1 const& a1, Point1 const& a2,
+ Point2 const& b1, Point2 const& b2,
+ Vec3d const& a1v, // in
+ Vec3d const& a2v, // in
+ Vec3d const& norm1, // in
+ Vec3d const& b1v_or_b2v, // in
+ CalcT& dist_a1_a2, CalcT& dist_a1_i1) // out
+ {
+ // calculate dist_a1_a2 and dist_a1_i1
+ calculate_dists(a1v, a2v, norm1, b1v_or_b2v, dist_a1_a2, dist_a1_i1);
+
+ // if i1 is close to a1 and b1 or b2 is equal to a1
+ if (is_endpoint_equal(dist_a1_i1, a1, b1, b2))
+ {
+ dist_a1_i1 = 0;
+ return true;
+ }
+ // or i1 is close to a2 and b1 or b2 is equal to a2
+ else if (is_endpoint_equal(dist_a1_a2 - dist_a1_i1, a2, b1, b2))
+ {
+ dist_a1_i1 = dist_a1_a2;
+ return true;
+ }
+
+ // or i1 is on b
+ return segment_ratio<CalcT>(dist_a1_i1, dist_a1_a2).on_segment();
+ }
+
+ template <typename Point1, typename Point2, typename Vec3d, typename CalcT>
+ static inline bool calculate_ip_data(Point1 const& a1, Point1 const& a2, // in
+ Point2 const& b1, Point2 const& b2, // in
+ Vec3d const& a1v, Vec3d const& a2v, // in
+ Vec3d const& b1v, Vec3d const& b2v, // in
+ Vec3d const& norm1, Vec3d const& norm2, // in
+ side_info const& sides, // in
+ Vec3d & i1, // in-out
+ CalcT& dist_a1_a2, CalcT& dist_a1_i1, // out
+ CalcT& dist_b1_b2, CalcT& dist_b1_i1, // out
+ intersection_point_flag& ip_flag) // out
+ {
+ // great circles intersections
+ i1 = cross_product(norm1, norm2);
+ // NOTE: the length should be greater than 0 at this point
+ // if the normals were not normalized and their dot product
+ // not checked before this function is called the length
+ // should be checked here (math::equals(len, c0))
+ CalcT const len = math::sqrt(dot_product(i1, i1));
+ divide_value(i1, len); // normalize i1
+
+ calculate_dists(a1v, a2v, norm1, i1, dist_a1_a2, dist_a1_i1);
+
+ // choose the opposite side of the globe if the distance is shorter
+ {
+ CalcT const d = abs_distance(dist_a1_a2, dist_a1_i1);
+ if (d > CalcT(0))
+ {
+ CalcT const dist_a1_i2 = dist_of_i2(dist_a1_i1);
+ CalcT const d2 = abs_distance(dist_a1_a2, dist_a1_i2);
+ if (d2 < d)
+ {
+ dist_a1_i1 = dist_a1_i2;
+ multiply_value(i1, CalcT(-1)); // the opposite intersection
+ }
+ }
+ }
+
+ bool is_on_a = false, is_near_a1 = false, is_near_a2 = false;
+ if (! is_potentially_crossing(dist_a1_a2, dist_a1_i1, is_on_a, is_near_a1, is_near_a2))
+ {
+ return false;
+ }
+
+ calculate_dists(b1v, b2v, norm2, i1, dist_b1_b2, dist_b1_i1);
+
+ bool is_on_b = false, is_near_b1 = false, is_near_b2 = false;
+ if (! is_potentially_crossing(dist_b1_b2, dist_b1_i1, is_on_b, is_near_b1, is_near_b2))
+ {
+ return false;
+ }
+
+ // reassign the IP if some endpoints overlap
+ using geometry::detail::equals::equals_point_point;
+ if (is_near_a1)
+ {
+ if (is_near_b1 && equals_point_point(a1, b1))
+ {
+ dist_a1_i1 = 0;
+ dist_b1_i1 = 0;
+ //i1 = a1v;
+ ip_flag = ipi_at_a1;
+ return true;
+ }
+
+ if (is_near_b2 && equals_point_point(a1, b2))
+ {
+ dist_a1_i1 = 0;
+ dist_b1_i1 = dist_b1_b2;
+ //i1 = a1v;
+ ip_flag = ipi_at_a1;
+ return true;
+ }
+ }
+
+ if (is_near_a2)
+ {
+ if (is_near_b1 && equals_point_point(a2, b1))
+ {
+ dist_a1_i1 = dist_a1_a2;
+ dist_b1_i1 = 0;
+ //i1 = a2v;
+ ip_flag = ipi_at_a2;
+ return true;
+ }
+
+ if (is_near_b2 && equals_point_point(a2, b2))
+ {
+ dist_a1_i1 = dist_a1_a2;
+ dist_b1_i1 = dist_b1_b2;
+ //i1 = a2v;
+ ip_flag = ipi_at_a2;
+ return true;
+ }
+ }
+
+ // at this point we know that the endpoints doesn't overlap
+ // reassign IP and distance if the IP is on a segment and one of
+ // the endpoints of the other segment lies on the former segment
+ if (is_on_a)
+ {
+ if (is_near_b1 && sides.template get<1, 0>() == 0) // b1 wrt a
+ {
+ dist_b1_i1 = 0;
+ //i1 = b1v;
+ ip_flag = ipi_at_b1;
+ return true;
+ }
+
+ if (is_near_b2 && sides.template get<1, 1>() == 0) // b2 wrt a
+ {
+ dist_b1_i1 = dist_b1_b2;
+ //i1 = b2v;
+ ip_flag = ipi_at_b2;
+ return true;
+ }
+ }
+
+ if (is_on_b)
+ {
+ if (is_near_a1 && sides.template get<0, 0>() == 0) // a1 wrt b
+ {
+ dist_a1_i1 = 0;
+ //i1 = a1v;
+ ip_flag = ipi_at_a1;
+ return true;
+ }
+
+ if (is_near_a2 && sides.template get<0, 1>() == 0) // a2 wrt b
+ {
+ dist_a1_i1 = dist_a1_a2;
+ //i1 = a2v;
+ ip_flag = ipi_at_a2;
+ return true;
+ }
+ }
+
+ ip_flag = ipi_inters;
+
+ return is_on_a && is_on_b;
+ }
+
+ template <typename Vec3d, typename CalcT>
+ static inline void calculate_dists(Vec3d const& a1v, // in
+ Vec3d const& a2v, // in
+ Vec3d const& norm1, // in
+ Vec3d const& i1, // in
+ CalcT& dist_a1_a2, CalcT& dist_a1_i1) // out
+ {
+ CalcT const c0 = 0;
+ CalcT const c1 = 1;
+ CalcT const c2 = 2;
+ CalcT const c4 = 4;
+
+ CalcT cos_a1_a2 = dot_product(a1v, a2v);
+ dist_a1_a2 = -cos_a1_a2 + c1; // [1, -1] -> [0, 2] representing [0, pi]
+
+ CalcT cos_a1_i1 = dot_product(a1v, i1);
+ dist_a1_i1 = -cos_a1_i1 + c1; // [0, 2] representing [0, pi]
+ if (dot_product(norm1, cross_product(a1v, i1)) < c0) // left or right of a1 on a
+ {
+ dist_a1_i1 = -dist_a1_i1; // [0, 2] -> [0, -2] representing [0, -pi]
+ }
+ if (dist_a1_i1 <= -c2) // <= -pi
+ {
+ dist_a1_i1 += c4; // += 2pi
+ }
+ }
+
+ // the dist of the ip on the other side of the sphere
+ template <typename CalcT>
+ static inline CalcT dist_of_i2(CalcT const& dist_a1_i1)
+ {
+ CalcT const c2 = 2;
+ CalcT const c4 = 4;
+
+ CalcT dist_a1_i2 = dist_a1_i1 - c2; // dist_a1_i2 = dist_a1_i1 - pi;
+ if (dist_a1_i2 <= -c2) // <= -pi
+ {
+ dist_a1_i2 += c4; // += 2pi;
+ }
+ return dist_a1_i2;
+ }
+
+ template <typename CalcT>
+ static inline CalcT abs_distance(CalcT const& dist_a1_a2, CalcT const& dist_a1_i1)
+ {
+ if (dist_a1_i1 < CalcT(0))
+ return -dist_a1_i1;
+ else if (dist_a1_i1 > dist_a1_a2)
+ return dist_a1_i1 - dist_a1_a2;
+ else
+ return CalcT(0);
+ }
+
+ template <typename CalcT>
+ static inline bool is_potentially_crossing(CalcT const& dist_a1_a2, CalcT const& dist_a1_i1, // in
+ bool& is_on_a, bool& is_near_a1, bool& is_near_a2) // out
+ {
+ is_on_a = segment_ratio<CalcT>(dist_a1_i1, dist_a1_a2).on_segment();
+ is_near_a1 = is_near(dist_a1_i1);
+ is_near_a2 = is_near(dist_a1_a2 - dist_a1_i1);
+ return is_on_a || is_near_a1 || is_near_a2;
+ }
+
+ template <typename CalcT, typename P1, typename P2>
+ static inline bool is_endpoint_equal(CalcT const& dist,
+ P1 const& ai, P2 const& b1, P2 const& b2)
+ {
+ using geometry::detail::equals::equals_point_point;
+ return is_near(dist) && (equals_point_point(ai, b1) || equals_point_point(ai, b2));
+ }
+
+ template <typename CalcT>
+ static inline bool is_near(CalcT const& dist)
+ {
+ CalcT const small_number = CalcT(boost::is_same<CalcT, float>::value ? 0.0001 : 0.00000001);
+ return math::abs(dist) <= small_number;
+ }
+
+ template <typename ProjCoord1, typename ProjCoord2>
+ static inline int position_value(ProjCoord1 const& ca1,
+ ProjCoord2 const& cb1,
+ ProjCoord2 const& cb2)
+ {
+ // S1x 0 1 2 3 4
+ // S2 |---------->
+ return math::equals(ca1, cb1) ? 1
+ : math::equals(ca1, cb2) ? 3
+ : cb1 < cb2 ?
+ ( ca1 < cb1 ? 0
+ : ca1 > cb2 ? 4
+ : 2 )
+ : ( ca1 > cb1 ? 0
+ : ca1 < cb2 ? 4
+ : 2 );
+ }
+};
+
+
+#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+namespace services
+{
+
+/*template <typename Policy, typename CalculationType>
+struct default_strategy<spherical_polar_tag, Policy, CalculationType>
+{
+ typedef relate_spherical_segments<Policy, CalculationType> type;
+};*/
+
+template <typename Policy, typename CalculationType>
+struct default_strategy<spherical_equatorial_tag, Policy, CalculationType>
+{
+ typedef relate_spherical_segments<Policy, CalculationType> type;
+};
+
+template <typename Policy, typename CalculationType>
+struct default_strategy<geographic_tag, Policy, CalculationType>
+{
+ typedef relate_spherical_segments<Policy, CalculationType> type;
+};
+
+} // namespace services
+#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
+
+
+}} // namespace strategy::intersection
+
+}} // namespace boost::geometry
+
+
+#endif // BOOST_GEOMETRY_STRATEGIES_SPHERICAL_INTERSECTION_HPP
diff --git a/boost/geometry/strategies/strategies.hpp b/boost/geometry/strategies/strategies.hpp
index 28850020af..342485cc4c 100644
--- a/boost/geometry/strategies/strategies.hpp
+++ b/boost/geometry/strategies/strategies.hpp
@@ -4,8 +4,8 @@
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// This file was modified by Oracle on 2014, 2015.
-// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014-2016.
+// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -29,6 +29,7 @@
#include <boost/geometry/strategies/convex_hull.hpp>
#include <boost/geometry/strategies/distance.hpp>
#include <boost/geometry/strategies/intersection.hpp>
+#include <boost/geometry/strategies/intersection_strategies.hpp> // for backward compatibility
#include <boost/geometry/strategies/side.hpp>
#include <boost/geometry/strategies/transform.hpp>
#include <boost/geometry/strategies/within.hpp>
@@ -61,6 +62,7 @@
#include <boost/geometry/strategies/spherical/distance_cross_track.hpp>
#include <boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp>
#include <boost/geometry/strategies/spherical/compare_circular.hpp>
+#include <boost/geometry/strategies/spherical/intersection.hpp>
#include <boost/geometry/strategies/spherical/ssf.hpp>
#include <boost/geometry/strategies/geographic/distance_andoyer.hpp>
diff --git a/boost/geometry/util/for_each_coordinate.hpp b/boost/geometry/util/for_each_coordinate.hpp
index 7a1f55b00b..fb1e31856a 100644
--- a/boost/geometry/util/for_each_coordinate.hpp
+++ b/boost/geometry/util/for_each_coordinate.hpp
@@ -66,7 +66,7 @@ struct coordinates_scanner<Point, DimensionCount, DimensionCount, IsConst>
template <typename Point, typename Op>
inline void for_each_coordinate(Point& point, Op operation)
{
- BOOST_CONCEPT_ASSERT( (concept::Point<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::Point<Point>) );
typedef typename detail::coordinates_scanner
<
@@ -79,7 +79,7 @@ inline void for_each_coordinate(Point& point, Op operation)
template <typename Point, typename Op>
inline Op for_each_coordinate(Point const& point, Op operation)
{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point>) );
+ BOOST_CONCEPT_ASSERT( (concepts::ConstPoint<Point>) );
typedef typename detail::coordinates_scanner
<
diff --git a/boost/graph/bc_clustering.hpp b/boost/graph/bc_clustering.hpp
index 6f4bbf40b8..beba4d8e1e 100644
--- a/boost/graph/bc_clustering.hpp
+++ b/boost/graph/bc_clustering.hpp
@@ -114,8 +114,6 @@ betweenness_centrality_clustering(MutableGraph& g, Done done,
centrality_type;
typedef typename graph_traits<MutableGraph>::edge_iterator edge_iterator;
typedef typename graph_traits<MutableGraph>::edge_descriptor edge_descriptor;
- typedef typename graph_traits<MutableGraph>::vertices_size_type
- vertices_size_type;
if (has_no_edges(g)) return;
diff --git a/boost/graph/buffer_concepts.hpp b/boost/graph/buffer_concepts.hpp
index 2bad8af35d..233a7206b9 100644
--- a/boost/graph/buffer_concepts.hpp
+++ b/boost/graph/buffer_concepts.hpp
@@ -6,13 +6,13 @@
#ifndef BOOST_GRAPH_BUFFER_CONCEPTS_HPP
#define BOOST_GRAPH_BUFFER_CONCEPTS_HPP 1
#include <boost/concept_check.hpp>
-#include <boost/concept/detail/concept_def.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
+#include <boost/concept/detail/concept_def.hpp>
namespace boost {
BOOST_concept(Buffer, (B))
@@ -87,5 +87,6 @@ namespace boost {
};
} // end `namespace boost`
+#include <boost/concept/detail/concept_undef.hpp>
#endif // !BOOST_GRAPH_BUFFER_CONCEPTS_HPP
diff --git a/boost/graph/copy.hpp b/boost/graph/copy.hpp
index 21bb0fb01e..6246ebceb1 100644
--- a/boost/graph/copy.hpp
+++ b/boost/graph/copy.hpp
@@ -248,8 +248,8 @@ namespace boost {
template <class Graph>
struct choose_graph_copy {
- typedef typename Graph::traversal_category Trv;
- typedef typename Graph::directed_category Dr;
+ typedef typename graph_traits<Graph>::traversal_category Trv;
+ typedef typename graph_traits<Graph>::directed_category Dr;
enum { algo =
(is_convertible<Trv, vertex_list_graph_tag>::value
&& is_convertible<Trv, edge_list_graph_tag>::value)
diff --git a/boost/graph/depth_first_search.hpp b/boost/graph/depth_first_search.hpp
index b002d3674a..cf60e1ac84 100644
--- a/boost/graph/depth_first_search.hpp
+++ b/boost/graph/depth_first_search.hpp
@@ -64,19 +64,27 @@ namespace boost {
template <bool IsCallable> struct do_call_finish_edge {
template <typename E, typename G, typename Vis>
- static void call_finish_edge(Vis& vis, const E& e, const G& g) {
+ static void call_finish_edge(Vis& vis, E e, const G& g) {
vis.finish_edge(e, g);
}
};
template <> struct do_call_finish_edge<false> {
template <typename E, typename G, typename Vis>
- static void call_finish_edge(Vis&, const E&, const G&) {}
+ static void call_finish_edge(Vis&, E, const G&) {}
};
template <typename E, typename G, typename Vis>
- void call_finish_edge(Vis& vis, const E& e, const G& g) { // Only call if method exists
+ void call_finish_edge(Vis& vis, E e, const G& g) { // Only call if method exists
+#if ((defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))) || \
+ defined(__clang__) || \
+ (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200)))
+ do_call_finish_edge<
+ has_member_function_finish_edge<Vis, void,
+ boost::mpl::vector<E, const G&> >::value>::call_finish_edge(vis, e, g);
+#else
do_call_finish_edge<has_member_function_finish_edge<Vis, void>::value>::call_finish_edge(vis, e, g);
+#endif
}
@@ -137,6 +145,11 @@ namespace boost {
src_e = back.second.first;
boost::tie(ei, ei_end) = back.second.second;
stack.pop_back();
+ // finish_edge has to be called here, not after the
+ // loop. Think of the pop as the return from a recursive call.
+ if (src_e) {
+ call_finish_edge(vis, src_e.get(), g);
+ }
while (ei != ei_end) {
Vertex v = target(*ei, g);
vis.examine_edge(*ei, g);
@@ -164,7 +177,6 @@ namespace boost {
}
put(color, u, Color::black());
vis.finish_vertex(u, g);
- if (src_e) call_finish_edge(vis, src_e.get(), g);
}
}
diff --git a/boost/graph/detail/adjacency_list.hpp b/boost/graph/detail/adjacency_list.hpp
index 1145d88d29..3c3ab0ec38 100644
--- a/boost/graph/detail/adjacency_list.hpp
+++ b/boost/graph/detail/adjacency_list.hpp
@@ -237,12 +237,6 @@ namespace boost {
inline stored_edge() { }
inline stored_edge(Vertex target, const no_property& = no_property())
: m_target(target) { }
- // Need to write this explicitly so stored_edge_property can
- // invoke Base::operator= (at least, for SGI MIPSPro compiler)
- inline stored_edge& operator=(const stored_edge& x) {
- m_target = x.m_target;
- return *this;
- }
inline Vertex& get_target() const { return m_target; }
inline const no_property& get_property() const { return s_prop; }
inline bool operator==(const stored_edge& x) const
@@ -258,7 +252,7 @@ namespace boost {
template <class Vertex>
no_property stored_edge<Vertex>::s_prop;
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_SMART_PTR)
template <class Vertex, class Property>
class stored_edge_property : public stored_edge<Vertex> {
typedef stored_edge_property self;
@@ -270,12 +264,24 @@ namespace boost {
const Property& p = Property())
: stored_edge<Vertex>(target), m_property(new Property(p)) { }
stored_edge_property(const self& x)
- : Base(x), m_property(const_cast<self&>(x).m_property) { }
+ : Base(static_cast< Base const& >(x)), m_property(const_cast<self&>(x).m_property) { }
self& operator=(const self& x) {
- Base::operator=(x);
+ // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
+ static_cast<Base&>(*this) = static_cast< Base const& >(x);
m_property = const_cast<self&>(x).m_property;
return *this;
}
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ // NOTE Don't rely on default operators, their behavior is broken on several compilers (GCC 4.6).
+ stored_edge_property(self&& x)
+ : Base(static_cast< Base&& >(x)), m_property(std::move(x.m_property)) { }
+ self& operator=(self&& x) {
+ // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
+ static_cast<Base&>(*this) = static_cast< Base&& >(x);
+ m_property = std::move(x.m_property);
+ return *this;
+ }
+#endif
inline Property& get_property() { return *m_property; }
inline const Property& get_property() const { return *m_property; }
protected:
@@ -296,27 +302,22 @@ namespace boost {
inline stored_edge_property(Vertex target,
const Property& p = Property())
: stored_edge<Vertex>(target), m_property(new Property(p)) { }
-#if defined(BOOST_MSVC) || (defined(BOOST_GCC) && (BOOST_GCC / 100) < 406)
- stored_edge_property(self&& x) : Base(static_cast< Base const& >(x)) {
- m_property.swap(x.m_property);
- }
- stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)) {
- m_property.swap(const_cast<self&>(x).m_property);
- }
+ stored_edge_property(self&& x) : Base(static_cast< Base&& >(x)),
+ m_property(std::move(x.m_property)) { }
+ stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)),
+ m_property(std::move(const_cast<self&>(x).m_property)) { }
self& operator=(self&& x) {
- Base::operator=(static_cast< Base const& >(x));
+ // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
+ static_cast<Base&>(*this) = static_cast< Base&& >(x);
m_property = std::move(x.m_property);
return *this;
}
self& operator=(self const& x) {
- Base::operator=(static_cast< Base const& >(x));
+ // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
+ static_cast<Base&>(*this) = static_cast< Base const& >(x);
m_property = std::move(const_cast<self&>(x).m_property);
return *this;
}
-#else
- stored_edge_property(self&& x) = default;
- self& operator=(self&& x) = default;
-#endif
inline Property& get_property() { return *m_property; }
inline const Property& get_property() const { return *m_property; }
protected:
diff --git a/boost/graph/detail/array_binary_tree.hpp b/boost/graph/detail/array_binary_tree.hpp
index 78755556c8..e59da9e179 100644
--- a/boost/graph/detail/array_binary_tree.hpp
+++ b/boost/graph/detail/array_binary_tree.hpp
@@ -63,6 +63,9 @@ public:
inline iterator& operator++() { ++i; return *this; }
inline iterator operator++(int)
{ iterator t = *this; ++(*this); return t; }
+ inline iterator& operator--() { --i; return *this; }
+ inline iterator operator--(int)
+ { iterator t = *this; --(*this); return t; }
inline bool operator==(const iterator& x) const { return i == x.i; }
inline bool operator!=(const iterator& x) const
{ return !(*this == x); }
diff --git a/boost/graph/detail/edge.hpp b/boost/graph/detail/edge.hpp
index badf28d4f2..3aba9f8d96 100644
--- a/boost/graph/detail/edge.hpp
+++ b/boost/graph/detail/edge.hpp
@@ -13,6 +13,8 @@
#include <iosfwd>
+#include <boost/functional/hash.hpp>
+
namespace boost {
namespace detail {
diff --git a/boost/graph/detail/list_base.hpp b/boost/graph/detail/list_base.hpp
index 88d831650b..60332406f7 100644
--- a/boost/graph/detail/list_base.hpp
+++ b/boost/graph/detail/list_base.hpp
@@ -58,10 +58,10 @@ namespace boost {
template <class Node, class Next>
inline Node
- slist_previous(Node head, Node x, Node nil,
+ slist_previous(Node head, Node x, Node empty,
Next next)
{
- while (head != nil && next(head) != x)
+ while (head != empty && next(head) != x)
head = next(head);
return head;
}
@@ -82,12 +82,12 @@ namespace boost {
template <class Node, class Next>
inline Node
- slist_reverse(Node node, Node nil,
+ slist_reverse(Node node, Node empty,
Next next)
{
Node result = node;
node = next(node);
- next(result) = nil;
+ next(result) = empty;
while(node) {
Node next = next(node);
next(node) = result;
@@ -99,11 +99,11 @@ namespace boost {
template <class Node, class Next>
inline std::size_t
- slist_size(Node head, Node nil,
+ slist_size(Node head, Node empty,
Next next)
{
std::size_t s = 0;
- for ( ; head != nil; head = next(head))
+ for ( ; head != empty; head = next(head))
++s;
return s;
}
diff --git a/boost/graph/directed_graph.hpp b/boost/graph/directed_graph.hpp
index 2c56a4e0f8..fdbd300868 100644
--- a/boost/graph/directed_graph.hpp
+++ b/boost/graph/directed_graph.hpp
@@ -92,7 +92,7 @@ public:
{ }
directed_graph(directed_graph const& x)
- : m_graph(x), m_num_vertices(x.m_num_vertices), m_num_edges(x.m_num_edges)
+ : m_graph(x.m_graph), m_num_vertices(x.m_num_vertices), m_num_edges(x.m_num_edges)
, m_max_vertex_index(x.m_max_vertex_index), m_max_edge_index(x.m_max_edge_index)
{ }
@@ -172,7 +172,7 @@ public:
{ return m_num_edges; }
private:
- // A helper fucntion for managing edge index attributes.
+ // A helper function for managing edge index attributes.
std::pair<edge_descriptor, bool> const&
make_index(std::pair<edge_descriptor, bool> const& x)
{
diff --git a/boost/graph/distributed/adjlist/serialization.hpp b/boost/graph/distributed/adjlist/serialization.hpp
index ab75ef91ef..d6b14e5d5e 100644
--- a/boost/graph/distributed/adjlist/serialization.hpp
+++ b/boost/graph/distributed/adjlist/serialization.hpp
@@ -78,7 +78,7 @@ namespace detail { namespace parallel
inline bool is_digit(char c)
{
- return (bool)std::isdigit(c);
+ return std::isdigit(c) != 0;
}
inline std::vector<int>
diff --git a/boost/graph/distributed/detail/mpi_process_group.ipp b/boost/graph/distributed/detail/mpi_process_group.ipp
index a4d3546239..c157387be9 100644
--- a/boost/graph/distributed/detail/mpi_process_group.ipp
+++ b/boost/graph/distributed/detail/mpi_process_group.ipp
@@ -27,6 +27,7 @@
#include <vector>
#include <queue>
#include <stack>
+#include <list>
#include <boost/graph/distributed/detail/tag_allocator.hpp>
#include <stdio.h>
diff --git a/boost/graph/distributed/hohberg_biconnected_components.hpp b/boost/graph/distributed/hohberg_biconnected_components.hpp
index 9422aa04f0..c2533ca8e0 100644
--- a/boost/graph/distributed/hohberg_biconnected_components.hpp
+++ b/boost/graph/distributed/hohberg_biconnected_components.hpp
@@ -163,7 +163,7 @@ namespace hohberg_detail {
typedef typename std::vector<T>::const_iterator iterator;
iterator first = parent_path.begin(), last = parent_path.end();
-#if defined(PBGL_HOHBERG_DEBUG) and PBGL_HOHBERG_DEBUG > 2
+#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2
std::cerr << "infimum(";
for (iterator i = first; i != last; ++i) {
if (i != first) std::cerr << ' ';
@@ -198,7 +198,7 @@ namespace hohberg_detail {
// Try to find b (which may originally have been a)
while (*last != b) {
if (last == first) {
-#if defined(PBGL_HOHBERG_DEBUG) and PBGL_HOHBERG_DEBUG > 2
+#if defined(PBGL_HOHBERG_DEBUG) && PBGL_HOHBERG_DEBUG > 2
std::cerr << local(*first) << '@' << owner(*first) << std::endl;
#endif
return *first;
diff --git a/boost/graph/dominator_tree.hpp b/boost/graph/dominator_tree.hpp
index 9371eee0d1..e4a7eef5fa 100644
--- a/boost/graph/dominator_tree.hpp
+++ b/boost/graph/dominator_tree.hpp
@@ -70,29 +70,31 @@ namespace boost {
/**
* @param g [in] the target graph of the dominator tree
* @param entry [in] the entry node of g
+ * @param indexMap [in] the vertex index map for g
* @param domTreePredMap [out] the immediate dominator map
* (parent map in dominator tree)
*/
dominator_visitor(const Graph& g, const Vertex& entry,
+ const IndexMap& indexMap,
DomTreePredMap domTreePredMap)
: semi_(num_vertices(g)),
ancestor_(num_vertices(g), graph_traits<Graph>::null_vertex()),
samedom_(ancestor_),
best_(semi_),
semiMap_(make_iterator_property_map(semi_.begin(),
- get(vertex_index, g))),
+ indexMap)),
ancestorMap_(make_iterator_property_map(ancestor_.begin(),
- get(vertex_index, g))),
+ indexMap)),
bestMap_(make_iterator_property_map(best_.begin(),
- get(vertex_index, g))),
+ indexMap)),
buckets_(num_vertices(g)),
bucketMap_(make_iterator_property_map(buckets_.begin(),
- get(vertex_index, g))),
+ indexMap)),
entry_(entry),
domTreePredMap_(domTreePredMap),
numOfVertices_(num_vertices(g)),
samedomMap(make_iterator_property_map(samedom_.begin(),
- get(vertex_index, g)))
+ indexMap))
{
}
@@ -237,7 +239,7 @@ namespace boost {
lengauer_tarjan_dominator_tree_without_dfs
(const Graph& g,
const typename graph_traits<Graph>::vertex_descriptor& entry,
- const IndexMap& /*indexMap*/,
+ const IndexMap& indexMap,
TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum,
DomTreePredMap domTreePredMap)
{
@@ -252,7 +254,7 @@ namespace boost {
// 1. Visit each vertex in reverse post order and calculate sdom.
detail::dominator_visitor<Graph, IndexMap, TimeMap, PredMap, DomTreePredMap>
- visitor(g, entry, domTreePredMap);
+ visitor(g, entry, indexMap, domTreePredMap);
VerticesSizeType i;
for (i = 0; i < numOfVertices; ++i)
diff --git a/boost/graph/filtered_graph.hpp b/boost/graph/filtered_graph.hpp
index 74fea46117..5426eac6f6 100644
--- a/boost/graph/filtered_graph.hpp
+++ b/boost/graph/filtered_graph.hpp
@@ -410,6 +410,26 @@ namespace boost {
}
template <typename G, typename EP, typename VP>
+ typename enable_if<typename is_directed_graph<G>::type,
+ typename filtered_graph<G, EP, VP>::degree_size_type
+ >::type
+ degree(typename filtered_graph<G, EP, VP>::vertex_descriptor u,
+ const filtered_graph<G, EP, VP>& g)
+ {
+ return out_degree(u, g) + in_degree(u, g);
+ }
+
+ template <typename G, typename EP, typename VP>
+ typename disable_if<typename is_directed_graph<G>::type,
+ typename filtered_graph<G, EP, VP>::degree_size_type
+ >::type
+ degree(typename filtered_graph<G, EP, VP>::vertex_descriptor u,
+ const filtered_graph<G, EP, VP>& g)
+ {
+ return out_degree(u, g);
+ }
+
+ template <typename G, typename EP, typename VP>
std::pair<typename filtered_graph<G, EP, VP>::edge_descriptor, bool>
edge(typename filtered_graph<G, EP, VP>::vertex_descriptor u,
typename filtered_graph<G, EP, VP>::vertex_descriptor v,
diff --git a/boost/graph/find_flow_cost.hpp b/boost/graph/find_flow_cost.hpp
index e4d6f404e9..1d49cddd50 100644
--- a/boost/graph/find_flow_cost.hpp
+++ b/boost/graph/find_flow_cost.hpp
@@ -14,9 +14,9 @@
namespace boost {
template<class Graph, class Capacity, class ResidualCapacity, class Weight>
-typename property_traits<typename property_map < Graph, edge_capacity_t >::type>::value_type
+typename property_traits<Weight>::value_type
find_flow_cost(const Graph & g, Capacity capacity, ResidualCapacity residual_capacity, Weight weight) {
- typedef typename property_traits<typename property_map<Graph, edge_weight_t>::const_type>::value_type Cost;
+ typedef typename property_traits<Weight>::value_type Cost;
Cost cost = 0;
BGL_FORALL_EDGES_T(e, g, Graph) {
@@ -28,7 +28,7 @@ find_flow_cost(const Graph & g, Capacity capacity, ResidualCapacity residual_cap
}
template <class Graph, class P, class T, class R>
-typename property_traits<typename property_map < Graph, edge_capacity_t >::type>::value_type
+typename detail::edge_weight_value<Graph, P, T, R>::type
find_flow_cost(const Graph & g,
const bgl_named_params<P, T, R>& params) {
return find_flow_cost(g,
diff --git a/boost/graph/graph_concepts.hpp b/boost/graph/graph_concepts.hpp
index 875f81848b..3b873a8233 100644
--- a/boost/graph/graph_concepts.hpp
+++ b/boost/graph/graph_concepts.hpp
@@ -128,12 +128,14 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&);
p = in_edges(v, g);
n = in_degree(v, g);
+ n = degree(v, g);
e = *p.first;
const_constraints(g);
}
void const_constraints(const G& cg) {
p = in_edges(v, cg);
n = in_degree(v, cg);
+ n = degree(v, cg);
e = *p.first;
}
std::pair<in_edge_iterator, in_edge_iterator> p;
diff --git a/boost/graph/graphml.hpp b/boost/graph/graphml.hpp
index be73def306..a7faa647bb 100644
--- a/boost/graph/graphml.hpp
+++ b/boost/graph/graphml.hpp
@@ -97,8 +97,8 @@ class mutate_graph_impl : public mutate_graph
bool type_found = false;
try
{
- mpl::for_each<value_types>(put_property<MutableGraph,value_types>
- (name, m_dp, m_g, value, value_type, m_type_names, type_found));
+ mpl::for_each<value_types>(put_property<MutableGraph *,value_types>
+ (name, m_dp, &m_g, value, value_type, m_type_names, type_found));
}
catch (bad_lexical_cast)
{
diff --git a/boost/graph/kamada_kawai_spring_layout.hpp b/boost/graph/kamada_kawai_spring_layout.hpp
index 63355c946f..b10ebe3dc8 100644
--- a/boost/graph/kamada_kawai_spring_layout.hpp
+++ b/boost/graph/kamada_kawai_spring_layout.hpp
@@ -106,7 +106,7 @@ namespace boost {
template <>
struct linear_solver<3> {
template <typename Vec>
- static Vec solve(double mat[2][2], Vec rhs) {
+ static Vec solve(double mat[3][3], Vec rhs) {
double denom = mat[0][0] * (mat[1][1] * mat[2][2] - mat[2][1] * mat[1][2])
- mat[1][0] * (mat[0][1] * mat[2][2] - mat[2][1] * mat[0][2])
+ mat[2][0] * (mat[0][1] * mat[1][2] - mat[1][1] * mat[0][2]);
diff --git a/boost/graph/labeled_graph.hpp b/boost/graph/labeled_graph.hpp
index 5b688b02e9..59df0feb8f 100644
--- a/boost/graph/labeled_graph.hpp
+++ b/boost/graph/labeled_graph.hpp
@@ -132,7 +132,7 @@ namespace graph_detail {
// Note that insertion always succeeds so we can add the vertex first
// and then the mapping to the label.
typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
- Vertex v = add_vertex(g);
+ Vertex v = add_vertex(p, g);
c.insert(std::make_pair(l, v));
return std::make_pair(v, true);
}
@@ -319,14 +319,15 @@ public:
labeled_graph(vertices_size_type n, LabelIter l,
graph_property_type const& gp = graph_property_type())
: _graph(gp)
- { while(n-- >= 0) add_vertex(*l++); }
+ { while(n-- > 0) add_vertex(*l++); }
// Construct the graph over n vertices each of which has a label in the
// range [l, l + n) and a property in the range [p, p + n).
template <typename LabelIter, typename PropIter>
labeled_graph(vertices_size_type n, LabelIter l, PropIter p,
graph_property_type const& gp = graph_property_type())
- { while(n-- >= 0) add_vertex(*l++, *p++); }
+ : _graph(gp)
+ { while(n-- > 0) add_vertex(*l++, *p++); }
labeled_graph& operator=(labeled_graph const& x) {
_graph = x._graph;
diff --git a/boost/graph/metis.hpp b/boost/graph/metis.hpp
index f16cac2640..2ec2fc3e76 100644
--- a/boost/graph/metis.hpp
+++ b/boost/graph/metis.hpp
@@ -161,7 +161,6 @@ class metis_distribution
iterator end() { return vertices.end(); }
private:
- std::istream& in;
process_id_type my_id;
std::vector<process_id_type> vertices;
};
@@ -300,7 +299,7 @@ void metis_reader::start()
}
metis_distribution::metis_distribution(std::istream& in, process_id_type my_id)
- : in(in), my_id(my_id),
+ : my_id(my_id),
vertices(std::istream_iterator<process_id_type>(in),
std::istream_iterator<process_id_type>())
{
diff --git a/boost/graph/metric_tsp_approx.hpp b/boost/graph/metric_tsp_approx.hpp
index c8e7dba595..3102625887 100644
--- a/boost/graph/metric_tsp_approx.hpp
+++ b/boost/graph/metric_tsp_approx.hpp
@@ -53,13 +53,13 @@ namespace boost
Visitor vis(vis_); // require copy construction
Graph g(1);
Vertex v(*vertices(g).first);
- vis_.visit_vertex(v, g); // require visit_vertex
+ vis.visit_vertex(v, g); // require visit_vertex
}
};
// Tree visitor that keeps track of a preorder traversal of a tree
// TODO: Consider migrating this to the graph_as_tree header.
- // TODO: Parameterize the underlying stores o it doesn't have to be a vector.
+ // TODO: Parameterize the underlying stores so it doesn't have to be a vector.
template<typename Node, typename Tree> class PreorderTraverser
{
private:
@@ -266,7 +266,7 @@ namespace boost
{ return graph_traits<Graph>::null_vertex(); }
public:
- tsp_tour_len_visitor(Graph const&, OutIter iter, Length& l, WeightMap map)
+ tsp_tour_len_visitor(Graph const&, OutIter iter, Length& l, WeightMap& map)
: iter_(iter), tourlen_(l), wmap_(map), previous_(null())
{ }
diff --git a/boost/graph/named_function_params.hpp b/boost/graph/named_function_params.hpp
index 26d3d5e40e..a9a9add6c8 100644
--- a/boost/graph/named_function_params.hpp
+++ b/boost/graph/named_function_params.hpp
@@ -323,9 +323,17 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
struct edge_capacity_value
{
typedef bgl_named_params<P, T, R> Params;
- typedef typename detail::choose_impl_result<boost::mpl::true_, Graph, typename get_param_type<Params, edge_capacity_t>::type, edge_capacity_t>::type CapacityEdgeMap;
+ typedef typename detail::choose_impl_result<boost::mpl::true_, Graph, typename get_param_type<edge_capacity_t, Params>::type, edge_capacity_t>::type CapacityEdgeMap;
typedef typename property_traits<CapacityEdgeMap>::value_type type;
};
+ // used in the max-flow algorithms
+ template <class Graph, class P, class T, class R>
+ struct edge_weight_value
+ {
+ typedef bgl_named_params<P, T, R> Params;
+ typedef typename detail::choose_impl_result<boost::mpl::true_, Graph, typename get_param_type<edge_weight_t, Params>::type, edge_weight_t>::type WeightMap;
+ typedef typename property_traits<WeightMap>::value_type type;
+ };
}
diff --git a/boost/graph/parallel/properties.hpp b/boost/graph/parallel/properties.hpp
index c6bb0bb05c..852a726203 100644
--- a/boost/graph/parallel/properties.hpp
+++ b/boost/graph/parallel/properties.hpp
@@ -92,8 +92,10 @@ namespace boost {
public:
BOOST_STATIC_CONSTANT(bool, non_default_resolver = true);
- T operator()(T key) const { return key; }
- T operator()(T key, T, T y) const { return y; }
+ template<typename Key>
+ T operator()(Key key) const { return key; }
+ template<typename Key>
+ T operator()(Key key, T, T y) const { return y; }
};
};
diff --git a/boost/graph/planar_canonical_ordering.hpp b/boost/graph/planar_canonical_ordering.hpp
index d470ee591e..465b32df66 100644
--- a/boost/graph/planar_canonical_ordering.hpp
+++ b/boost/graph/planar_canonical_ordering.hpp
@@ -63,7 +63,7 @@ namespace boost
std::list<vertex_t> ready_to_be_processed;
vertex_t first_vertex = *vertices(g).first;
- vertex_t second_vertex;
+ vertex_t second_vertex = first_vertex;
adjacency_iterator_t ai, ai_end;
for(boost::tie(ai,ai_end) = adjacent_vertices(first_vertex,g); ai != ai_end; ++ai)
{
diff --git a/boost/graph/planar_detail/boyer_myrvold_impl.hpp b/boost/graph/planar_detail/boyer_myrvold_impl.hpp
index 41ba2bc575..45a552aa5d 100644
--- a/boost/graph/planar_detail/boyer_myrvold_impl.hpp
+++ b/boost/graph/planar_detail/boyer_myrvold_impl.hpp
@@ -34,26 +34,26 @@ namespace boost
typename DFSParentEdgeMap, typename SizeType>
struct planar_dfs_visitor : public dfs_visitor<>
{
- planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p,
+ planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p,
DFSNumberMap dfs_n, LeastAncestorMap lam,
- DFSParentEdgeMap dfs_edge)
+ DFSParentEdgeMap dfs_edge)
: low(lpm),
parent(dfs_p),
df_number(dfs_n),
least_ancestor(lam),
df_edge(dfs_edge),
- count(0)
+ count(0)
{}
-
-
+
+
template <typename Vertex, typename Graph>
void start_vertex(const Vertex& u, Graph&)
{
put(parent, u, u);
put(least_ancestor, u, count);
}
-
-
+
+
template <typename Vertex, typename Graph>
void discover_vertex(const Vertex& u, Graph&)
{
@@ -61,7 +61,7 @@ namespace boost
put(df_number, u, count);
++count;
}
-
+
template <typename Edge, typename Graph>
void tree_edge(const Edge& e, Graph& g)
{
@@ -73,13 +73,13 @@ namespace boost
put(df_edge, t, e);
put(least_ancestor, t, get(df_number, s));
}
-
+
template <typename Edge, typename Graph>
void back_edge(const Edge& e, Graph& g)
{
typedef typename graph_traits<Graph>::vertex_descriptor vertex_t;
typedef typename graph_traits<Graph>::vertices_size_type v_size_t;
-
+
vertex_t s(source(e,g));
vertex_t t(target(e,g));
BOOST_USING_STD_MIN();
@@ -89,20 +89,20 @@ namespace boost
v_size_t t_df_number = get(df_number, t);
v_size_t s_least_ancestor_df_number = get(least_ancestor, s);
- put(low, s,
+ put(low, s,
min BOOST_PREVENT_MACRO_SUBSTITUTION(s_low_df_number,
t_df_number)
);
-
- put(least_ancestor, s,
- min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number,
+
+ put(least_ancestor, s,
+ min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number,
t_df_number
)
);
}
}
-
+
template <typename Vertex, typename Graph>
void finish_vertex(const Vertex& u, Graph&)
{
@@ -115,21 +115,21 @@ namespace boost
if (u_parent != u)
{
- put(low, u_parent,
- min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint,
+ put(low, u_parent,
+ min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint,
u_parent_lowpoint
)
);
}
}
-
+
LowPointMap low;
DFSParentMap parent;
DFSNumberMap df_number;
LeastAncestorMap least_ancestor;
DFSParentEdgeMap df_edge;
SizeType count;
-
+
};
@@ -150,7 +150,7 @@ namespace boost
typedef typename graph_traits<Graph>::edge_descriptor edge_t;
typedef typename graph_traits<Graph>::vertex_iterator vertex_iterator_t;
typedef typename graph_traits<Graph>::edge_iterator edge_iterator_t;
- typedef typename graph_traits<Graph>::out_edge_iterator
+ typedef typename graph_traits<Graph>::out_edge_iterator
out_edge_iterator_t;
typedef graph::detail::face_handle
<Graph, StoreOldHandlesPolicy, StoreEmbeddingPolicy> face_handle_t;
@@ -173,16 +173,16 @@ namespace boost
typedef typename map_vertex_to_<v_size_t>::type vertex_to_v_size_map_t;
typedef typename map_vertex_to_<vertex_t>::type vertex_to_vertex_map_t;
typedef typename map_vertex_to_<edge_t>::type vertex_to_edge_map_t;
- typedef typename map_vertex_to_<vertex_list_ptr_t>::type
+ typedef typename map_vertex_to_<vertex_list_ptr_t>::type
vertex_to_vertex_list_ptr_map_t;
- typedef typename map_vertex_to_< edge_vector_t >::type
+ typedef typename map_vertex_to_< edge_vector_t >::type
vertex_to_edge_vector_map_t;
typedef typename map_vertex_to_<bool>::type vertex_to_bool_map_t;
- typedef typename map_vertex_to_<face_handle_t>::type
+ typedef typename map_vertex_to_<face_handle_t>::type
vertex_to_face_handle_map_t;
- typedef typename map_vertex_to_<face_handle_list_ptr_t>::type
+ typedef typename map_vertex_to_<face_handle_list_ptr_t>::type
vertex_to_face_handle_list_ptr_map_t;
- typedef typename map_vertex_to_<typename vertex_list_t::iterator>::type
+ typedef typename map_vertex_to_<typename vertex_list_t::iterator>::type
vertex_to_separated_node_map_t;
template <typename BicompSideToTraverse = single_side,
@@ -190,10 +190,10 @@ namespace boost
typename Time = current_iteration>
struct face_vertex_iterator
{
- typedef face_iterator<Graph,
- vertex_to_face_handle_map_t,
- vertex_t,
- BicompSideToTraverse,
+ typedef face_iterator<Graph,
+ vertex_to_face_handle_map_t,
+ vertex_t,
+ BicompSideToTraverse,
VisitorType,
Time>
type;
@@ -216,7 +216,7 @@ namespace boost
public:
-
+
boyer_myrvold_impl(const Graph& arg_g, VertexIndexMap arg_vm):
g(arg_g),
@@ -237,7 +237,7 @@ namespace boost
flipped_vector(num_vertices(g), false),
backedges_vector(num_vertices(g)),
dfs_parent_edge_vector(num_vertices(g)),
-
+
vertices_by_dfs_num(num_vertices(g)),
low_point(low_point_vector.begin(), vm),
@@ -271,72 +271,72 @@ namespace boost
// Sort vertices by their lowpoint - need this later in the constructor
vertex_vector_t vertices_by_lowpoint(num_vertices(g));
- std::copy( vertices(g).first, vertices(g).second,
+ std::copy( vertices(g).first, vertices(g).second,
vertices_by_lowpoint.begin()
);
- bucket_sort(vertices_by_lowpoint.begin(),
- vertices_by_lowpoint.end(),
+ bucket_sort(vertices_by_lowpoint.begin(),
+ vertices_by_lowpoint.end(),
low_point,
num_vertices(g)
);
- // Sort vertices by their dfs number - need this to iterate by reverse
+ // Sort vertices by their dfs number - need this to iterate by reverse
// DFS number in the main loop.
- std::copy( vertices(g).first, vertices(g).second,
+ std::copy( vertices(g).first, vertices(g).second,
vertices_by_dfs_num.begin()
);
- bucket_sort(vertices_by_dfs_num.begin(),
- vertices_by_dfs_num.end(),
+ bucket_sort(vertices_by_dfs_num.begin(),
+ vertices_by_dfs_num.end(),
dfs_number,
num_vertices(g)
);
- // Initialize face handles. A face handle is an abstraction that serves
- // two uses in our implementation - it allows us to efficiently move
- // along the outer face of embedded bicomps in a partially embedded
- // graph, and it provides storage for the planar embedding. Face
- // handles are implemented by a sequence of edges and are associated
- // with a particular vertex - the sequence of edges represents the
- // current embedding of edges around that vertex, and the first and
- // last edges in the sequence represent the pair of edges on the outer
- // face that are adjacent to the associated vertex. This lets us embed
- // edges in the graph by just pushing them on the front or back of the
+ // Initialize face handles. A face handle is an abstraction that serves
+ // two uses in our implementation - it allows us to efficiently move
+ // along the outer face of embedded bicomps in a partially embedded
+ // graph, and it provides storage for the planar embedding. Face
+ // handles are implemented by a sequence of edges and are associated
+ // with a particular vertex - the sequence of edges represents the
+ // current embedding of edges around that vertex, and the first and
+ // last edges in the sequence represent the pair of edges on the outer
+ // face that are adjacent to the associated vertex. This lets us embed
+ // edges in the graph by just pushing them on the front or back of the
// sequence of edges held by the face handles.
- //
+ //
// Our algorithm starts with a DFS tree of edges (where every vertex is
- // an articulation point and every edge is a singleton bicomp) and
- // repeatedly merges bicomps by embedding additional edges. Note that
- // any bicomp at any point in the algorithm can be associated with a
+ // an articulation point and every edge is a singleton bicomp) and
+ // repeatedly merges bicomps by embedding additional edges. Note that
+ // any bicomp at any point in the algorithm can be associated with a
// unique edge connecting the vertex of that bicomp with the lowest DFS
- // number (which we refer to as the "root" of the bicomp) with its DFS
+ // number (which we refer to as the "root" of the bicomp) with its DFS
// child in the bicomp: the existence of two such edges would contradict
- // the properties of a DFS tree. We refer to the DFS child of the root
- // of a bicomp as the "canonical DFS child" of the bicomp. Note that a
+ // the properties of a DFS tree. We refer to the DFS child of the root
+ // of a bicomp as the "canonical DFS child" of the bicomp. Note that a
// vertex can be the root of more than one bicomp.
//
- // We move around the external faces of a bicomp using a few property
+ // We move around the external faces of a bicomp using a few property
// maps, which we'll initialize presently:
//
- // - face_handles: maps a vertex to a face handle that can be used to
- // move "up" a bicomp. For a vertex that isn't an articulation point,
- // this holds the face handles that can be used to move around that
+ // - face_handles: maps a vertex to a face handle that can be used to
+ // move "up" a bicomp. For a vertex that isn't an articulation point,
+ // this holds the face handles that can be used to move around that
// vertex's unique bicomp. For a vertex that is an articulation point,
- // this holds the face handles associated with the unique bicomp that
- // the vertex is NOT the root of. These handles can therefore be used
- // to move from any point on the outer face of the tree of bicomps
+ // this holds the face handles associated with the unique bicomp that
+ // the vertex is NOT the root of. These handles can therefore be used
+ // to move from any point on the outer face of the tree of bicomps
// around the current outer face towards the root of the DFS tree.
//
- // - dfs_child_handles: these are used to hold face handles for
+ // - dfs_child_handles: these are used to hold face handles for
// vertices that are articulation points - dfs_child_handles[v] holds
// the face handles corresponding to vertex u in the bicomp with root
// u and canonical DFS child v.
//
// - canonical_dfs_child: this property map allows one to determine the
// canonical DFS child of a bicomp while traversing the outer face.
- // This property map is only valid when applied to one of the two
+ // This property map is only valid when applied to one of the two
// vertices adjacent to the root of the bicomp on the outer face. To
// be more precise, if v is the canonical DFS child of a bicomp,
- // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and
+ // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and
// canonical_dfs_child[dfs_child_handles[v].second_vertex()] == v.
//
// - pertinent_roots: given a vertex v, pertinent_roots[v] contains a
@@ -365,19 +365,19 @@ namespace boost
}
canonical_dfs_child[v] = v;
- pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t);
+ pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t);
separated_dfs_child_list[v] = vertex_list_ptr_t(new vertex_list_t);
}
// We need to create a list of not-yet-merged depth-first children for
- // each vertex that will be updated as bicomps get merged. We sort each
- // list by ascending lowpoint, which allows the externally_active
- // function to run in constant time, and we keep a pointer to each
- // vertex's representation in its parent's list, which allows merging
+ // each vertex that will be updated as bicomps get merged. We sort each
+ // list by ascending lowpoint, which allows the externally_active
+ // function to run in constant time, and we keep a pointer to each
+ // vertex's representation in its parent's list, which allows merging
//in constant time.
- for(typename vertex_vector_t::iterator itr =
+ for(typename vertex_vector_t::iterator itr =
vertices_by_lowpoint.begin();
itr != vertices_by_lowpoint.end(); ++itr)
{
@@ -389,7 +389,7 @@ namespace boost
separated_dfs_child_list[parent]->insert
(separated_dfs_child_list[parent]->end(), v);
}
- }
+ }
// The merge stack holds path information during a walkdown iteration
merge_stack.reserve(num_vertices(g));
@@ -404,11 +404,11 @@ namespace boost
bool is_planar()
{
- // This is the main algorithm: starting with a DFS tree of embedded
- // edges (which, since it's a tree, is planar), iterate through all
+ // This is the main algorithm: starting with a DFS tree of embedded
+ // edges (which, since it's a tree, is planar), iterate through all
// vertices by reverse DFS number, attempting to embed all backedges
// connecting the current vertex to vertices with higher DFS numbers.
- //
+ //
// The walkup is a procedure that examines all such backedges and sets
// up the required data structures so that they can be searched by the
// walkdown in linear time. The walkdown does the actual work of
@@ -434,7 +434,7 @@ namespace boost
store_old_face_handles(StoreOldHandlesPolicy());
vertex_t v(*vi);
-
+
walkup(v);
if (!walkdown(v))
@@ -445,7 +445,7 @@ namespace boost
clean_up_embedding(StoreEmbeddingPolicy());
return true;
-
+
}
@@ -462,14 +462,14 @@ namespace boost
void walkup(vertex_t v)
{
- // The point of the walkup is to follow all backedges from v to
+ // The point of the walkup is to follow all backedges from v to
// vertices with higher DFS numbers, and update pertinent_roots
// for the bicomp roots on the path from backedge endpoints up
// to v. This will set the stage for the walkdown to efficiently
// traverse the graph of bicomps down from v.
typedef typename face_vertex_iterator<both_sides>::type walkup_iterator_t;
-
+
out_edge_iterator_t oi, oi_end;
for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi)
{
@@ -491,7 +491,7 @@ namespace boost
backedges[w].push_back(e);
- v_size_t timestamp = dfs_number[v];
+ v_size_t timestamp = dfs_number[v];
backedge_flag[w] = timestamp;
walkup_iterator_t walkup_itr(w, face_handles);
@@ -500,11 +500,11 @@ namespace boost
while (true)
{
-
+
// Move to the root of the current bicomp or the first visited
// vertex on the bicomp by going up each side in parallel
-
- while(walkup_itr != walkup_end &&
+
+ while(walkup_itr != walkup_end &&
visited[*walkup_itr] != timestamp
)
{
@@ -515,20 +515,20 @@ namespace boost
// If we've found the root of a bicomp through a path we haven't
// seen before, update pertinent_roots with a handle to the
- // current bicomp. Otherwise, we've just seen a path we've been
+ // current bicomp. Otherwise, we've just seen a path we've been
// up before, so break out of the main while loop.
-
+
if (walkup_itr == walkup_end)
{
vertex_t dfs_child = canonical_dfs_child[lead_vertex];
vertex_t parent = dfs_parent[dfs_child];
- visited[dfs_child_handles[dfs_child].first_vertex()]
+ visited[dfs_child_handles[dfs_child].first_vertex()]
= timestamp;
- visited[dfs_child_handles[dfs_child].second_vertex()]
+ visited[dfs_child_handles[dfs_child].second_vertex()]
= timestamp;
- if (low_point[dfs_child] < dfs_number[v] ||
+ if (low_point[dfs_child] < dfs_number[v] ||
least_ancestor[dfs_child] < dfs_number[v]
)
{
@@ -553,10 +553,10 @@ namespace boost
break;
}
- }
-
+ }
+
}
-
+
@@ -577,19 +577,19 @@ namespace boost
while (!pertinent_roots[v]->empty())
{
-
+
face_handle_t root_face_handle = pertinent_roots[v]->front();
face_handle_t curr_face_handle = root_face_handle;
- pertinent_roots[v]->pop_front();
+ pertinent_roots[v]->pop_front();
merge_stack.clear();
while(true)
{
- typename face_vertex_iterator<>::type
+ typename face_vertex_iterator<>::type
first_face_itr, second_face_itr, face_end;
- vertex_t first_side_vertex
+ vertex_t first_side_vertex
= graph_traits<Graph>::null_vertex();
vertex_t second_side_vertex;
vertex_t first_tail, second_tail;
@@ -603,7 +603,7 @@ namespace boost
for(; first_face_itr != face_end; ++first_face_itr)
{
vertex_t face_vertex(*first_face_itr);
- if (pertinent(face_vertex, v) ||
+ if (pertinent(face_vertex, v) ||
externally_active(face_vertex, v)
)
{
@@ -614,7 +614,7 @@ namespace boost
first_tail = face_vertex;
}
- if (first_side_vertex == graph_traits<Graph>::null_vertex() ||
+ if (first_side_vertex == graph_traits<Graph>::null_vertex() ||
first_side_vertex == curr_face_handle.get_anchor()
)
break;
@@ -622,7 +622,7 @@ namespace boost
for(;second_face_itr != face_end; ++second_face_itr)
{
vertex_t face_vertex(*second_face_itr);
- if (pertinent(face_vertex, v) ||
+ if (pertinent(face_vertex, v) ||
externally_active(face_vertex, v)
)
{
@@ -654,14 +654,14 @@ namespace boost
chosen = second_side_vertex;
chose_first_upper_path = false;
}
- else
+ else
{
- // If there's a pertinent vertex on the lower face
- // between the first_face_itr and the second_face_itr,
+ // If there's a pertinent vertex on the lower face
+ // between the first_face_itr and the second_face_itr,
// this graph isn't planar.
- for(;
- *first_face_itr != second_side_vertex;
+ for(;
+ *first_face_itr != second_side_vertex;
++first_face_itr
)
{
@@ -675,85 +675,85 @@ namespace boost
return false;
}
}
-
- // Otherwise, the fact that we didn't find a pertinent
- // vertex on this face is fine - we should set the
- // short-circuit edges and break out of this loop to
+
+ // Otherwise, the fact that we didn't find a pertinent
+ // vertex on this face is fine - we should set the
+ // short-circuit edges and break out of this loop to
// start looking at a different pertinent root.
-
+
if (first_side_vertex == second_side_vertex)
{
if (first_tail != v)
{
- vertex_t first
+ vertex_t first
= face_handles[first_tail].first_vertex();
- vertex_t second
+ vertex_t second
= face_handles[first_tail].second_vertex();
- boost::tie(first_side_vertex, first_tail)
- = make_tuple(first_tail,
- first == first_side_vertex ?
+ boost::tie(first_side_vertex, first_tail)
+ = make_tuple(first_tail,
+ first == first_side_vertex ?
second : first
);
}
else if (second_tail != v)
{
- vertex_t first
+ vertex_t first
= face_handles[second_tail].first_vertex();
- vertex_t second
+ vertex_t second
= face_handles[second_tail].second_vertex();
- boost::tie(second_side_vertex, second_tail)
+ boost::tie(second_side_vertex, second_tail)
= make_tuple(second_tail,
- first == second_side_vertex ?
+ first == second_side_vertex ?
second : first);
}
else
break;
}
-
- canonical_dfs_child[first_side_vertex]
+
+ canonical_dfs_child[first_side_vertex]
= canonical_dfs_child[root_face_handle.first_vertex()];
- canonical_dfs_child[second_side_vertex]
+ canonical_dfs_child[second_side_vertex]
= canonical_dfs_child[root_face_handle.second_vertex()];
root_face_handle.set_first_vertex(first_side_vertex);
root_face_handle.set_second_vertex(second_side_vertex);
- if (face_handles[first_side_vertex].first_vertex() ==
+ if (face_handles[first_side_vertex].first_vertex() ==
first_tail
)
face_handles[first_side_vertex].set_first_vertex(v);
else
face_handles[first_side_vertex].set_second_vertex(v);
- if (face_handles[second_side_vertex].first_vertex() ==
+ if (face_handles[second_side_vertex].first_vertex() ==
second_tail
)
face_handles[second_side_vertex].set_first_vertex(v);
else
face_handles[second_side_vertex].set_second_vertex(v);
-
+
break;
-
+
}
- // When we unwind the stack, we need to know which direction
+ // When we unwind the stack, we need to know which direction
// we came down from on the top face handle
-
- bool chose_first_lower_path =
- (chose_first_upper_path &&
- face_handles[chosen].first_vertex() == first_tail)
+
+ bool chose_first_lower_path =
+ (chose_first_upper_path &&
+ face_handles[chosen].first_vertex() == first_tail)
||
- (!chose_first_upper_path &&
+ (!chose_first_upper_path &&
face_handles[chosen].first_vertex() == second_tail);
//If there's a backedge at the chosen vertex, embed it now
if (backedge_flag[chosen] == dfs_number[v])
{
w = chosen;
-
+
backedge_flag[chosen] = num_vertices(g) + 1;
add_to_merge_points(chosen, StoreOldHandlesPolicy());
-
+
typename edge_vector_t::iterator ei, ei_end;
ei_end = backedges[chosen].end();
for(ei = backedges[chosen].begin(); ei != ei_end; ++ei)
@@ -778,11 +778,10 @@ namespace boost
}
//Unwind the merge stack to the root, merging all bicomps
-
+
bool bottom_path_follows_first;
bool top_path_follows_first;
bool next_bottom_follows_first = chose_first_upper_path;
- face_handle_t top_handle, bottom_handle;
vertex_t merge_point = chosen;
@@ -790,8 +789,8 @@ namespace boost
{
bottom_path_follows_first = next_bottom_follows_first;
- boost::tie(merge_point,
- next_bottom_follows_first,
+ boost::tie(merge_point,
+ next_bottom_follows_first,
top_path_follows_first
) = merge_stack.back();
merge_stack.pop_back();
@@ -799,7 +798,7 @@ namespace boost
face_handle_t top_handle(face_handles[merge_point]);
face_handle_t bottom_handle
(*pertinent_roots[merge_point]->begin());
-
+
vertex_t bottom_dfs_child = canonical_dfs_child
[pertinent_roots[merge_point]->begin()->first_vertex()];
@@ -810,23 +809,23 @@ namespace boost
pertinent_roots[merge_point]->pop_front();
- add_to_merge_points(top_handle.get_anchor(),
+ add_to_merge_points(top_handle.get_anchor(),
StoreOldHandlesPolicy()
);
-
+
if (top_path_follows_first && bottom_path_follows_first)
{
bottom_handle.flip();
top_handle.glue_first_to_second(bottom_handle);
- }
- else if (!top_path_follows_first &&
+ }
+ else if (!top_path_follows_first &&
bottom_path_follows_first
)
{
flipped[bottom_dfs_child] = true;
top_handle.glue_second_to_first(bottom_handle);
}
- else if (top_path_follows_first &&
+ else if (top_path_follows_first &&
!bottom_path_follows_first
)
{
@@ -842,17 +841,17 @@ namespace boost
}
//Finally, embed all edges (v,w) at their upper end points
- canonical_dfs_child[w]
+ canonical_dfs_child[w]
= canonical_dfs_child[root_face_handle.first_vertex()];
-
- add_to_merge_points(root_face_handle.get_anchor(),
+
+ add_to_merge_points(root_face_handle.get_anchor(),
StoreOldHandlesPolicy()
);
-
+
typename edge_vector_t::iterator ei, ei_end;
ei_end = backedges[chosen].end();
for(ei = backedges[chosen].begin(); ei != ei_end; ++ei)
- {
+ {
if (next_bottom_follows_first)
root_face_handle.push_first(*ei, g);
else
@@ -863,7 +862,7 @@ namespace boost
curr_face_handle = root_face_handle;
}//while(true)
-
+
}//while(!pertinent_roots[v]->empty())
return true;
@@ -879,14 +878,14 @@ namespace boost
void store_old_face_handles(graph::detail::store_old_handles)
{
- for(typename std::vector<vertex_t>::iterator mp_itr
+ for(typename std::vector<vertex_t>::iterator mp_itr
= current_merge_points.begin();
mp_itr != current_merge_points.end(); ++mp_itr)
{
face_handles[*mp_itr].store_old_face_handles();
}
current_merge_points.clear();
- }
+ }
void add_to_merge_points(vertex_t, graph::detail::no_old_handles) {}
@@ -896,7 +895,7 @@ namespace boost
current_merge_points.push_back(v);
}
-
+
void add_to_embedded_edges(edge_t, graph::detail::no_old_handles) {}
void add_to_embedded_edges(edge_t e, graph::detail::store_old_handles)
@@ -924,7 +923,7 @@ namespace boost
{
typename vertex_list_t::iterator yi, yi_end;
yi_end = separated_dfs_child_list[*xi]->end();
- for(yi = separated_dfs_child_list[*xi]->begin();
+ for(yi = separated_dfs_child_list[*xi]->begin();
yi != yi_end; ++yi
)
{
@@ -933,7 +932,7 @@ namespace boost
(dfs_child_handles[*yi]);
}
}
- }
+ }
// Up until this point, we've flipped bicomps lazily by setting
// flipped[v] to true if the bicomp rooted at v was flipped (the
@@ -944,7 +943,7 @@ namespace boost
typedef typename vertex_vector_t::iterator vertex_vector_itr_t;
vertex_vector_itr_t vi_end = vertices_by_dfs_num.end();
- for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin();
+ for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin();
vi != vi_end; ++vi
)
{
@@ -968,7 +967,7 @@ namespace boost
// If there are any self-loops in the graph, they were flagged
// during the walkup, and we should add them to the embedding now.
- // Adding a self loop anywhere in the embedding could never
+ // Adding a self loop anywhere in the embedding could never
// invalidate the embedding, but they would complicate the traversal
// if they were added during the walkup/walkdown.
@@ -979,13 +978,13 @@ namespace boost
edge_t e(*ei);
face_handles[source(e,g)].push_second(e,g);
}
-
+
}
-
+
bool pertinent(vertex_t w, vertex_t v)
{
// w is pertinent with respect to v if there is a backedge (v,w) or if
@@ -993,38 +992,38 @@ namespace boost
return backedge_flag[w] == dfs_number[v] || !pertinent_roots[w]->empty();
}
-
+
bool externally_active(vertex_t w, vertex_t v)
{
// Let a be any proper depth-first search ancestor of v. w is externally
- // active with respect to v if there exists a backedge (a,w) or a
+ // active with respect to v if there exists a backedge (a,w) or a
// backedge (a,w_0) for some w_0 in a descendent bicomp of w.
v_size_t dfs_number_of_v = dfs_number[v];
return (least_ancestor[w] < dfs_number_of_v) ||
(!separated_dfs_child_list[w]->empty() &&
- low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v);
+ low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v);
}
-
-
+
+
bool internally_active(vertex_t w, vertex_t v)
{
return pertinent(w,v) && !externally_active(w,v);
- }
-
+ }
+
void remove_vertex_from_separated_dfs_child_list(vertex_t v)
{
- typename vertex_list_t::iterator to_delete
+ typename vertex_list_t::iterator to_delete
= separated_node_in_parent_list[v];
- garbage.splice(garbage.end(),
- *separated_dfs_child_list[dfs_parent[v]],
- to_delete,
+ garbage.splice(garbage.end(),
+ *separated_dfs_child_list[dfs_parent[v]],
+ to_delete,
boost::next(to_delete)
);
}
@@ -1032,9 +1031,9 @@ namespace boost
-
+
// End of the implementation of the basic Boyer-Myrvold Algorithm. The rest
- // of the code below implements the isolation of a Kuratowski subgraph in
+ // of the code below implements the isolation of a Kuratowski subgraph in
// the case that the input graph is not planar. This is by far the most
// complicated part of the implementation.
@@ -1047,7 +1046,7 @@ namespace boost
template <typename EdgeToBoolPropertyMap, typename EdgeContainer>
- vertex_t kuratowski_walkup(vertex_t v,
+ vertex_t kuratowski_walkup(vertex_t v,
EdgeToBoolPropertyMap forbidden_edge,
EdgeToBoolPropertyMap goal_edge,
EdgeToBoolPropertyMap is_embedded,
@@ -1057,19 +1056,19 @@ namespace boost
vertex_t current_endpoint;
bool seen_goal_edge = false;
out_edge_iterator_t oi, oi_end;
-
+
for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi)
forbidden_edge[*oi] = true;
-
+
for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi)
{
path_edges.clear();
-
+
edge_t e(*oi);
- current_endpoint = target(*oi,g) == v ?
+ current_endpoint = target(*oi,g) == v ?
source(*oi,g) : target(*oi,g);
-
- if (dfs_number[current_endpoint] < dfs_number[v] ||
+
+ if (dfs_number[current_endpoint] < dfs_number[v] ||
is_embedded[e] ||
v == current_endpoint //self-loop
)
@@ -1077,7 +1076,7 @@ namespace boost
//Not a backedge
continue;
}
-
+
path_edges.push_back(e);
if (goal_edge[e])
{
@@ -1085,30 +1084,30 @@ namespace boost
}
typedef typename face_edge_iterator<>::type walkup_itr_t;
-
- walkup_itr_t
+
+ walkup_itr_t
walkup_itr(current_endpoint, face_handles, first_side());
walkup_itr_t walkup_end;
-
+
seen_goal_edge = false;
-
+
while (true)
- {
-
+ {
+
if (walkup_itr != walkup_end && forbidden_edge[*walkup_itr])
break;
-
- while(walkup_itr != walkup_end &&
- !goal_edge[*walkup_itr] &&
+
+ while(walkup_itr != walkup_end &&
+ !goal_edge[*walkup_itr] &&
!forbidden_edge[*walkup_itr]
)
{
edge_t f(*walkup_itr);
forbidden_edge[f] = true;
path_edges.push_back(f);
- current_endpoint =
- source(f, g) == current_endpoint ?
- target(f, g) :
+ current_endpoint =
+ source(f, g) == current_endpoint ?
+ target(f, g) :
source(f,g);
++walkup_itr;
}
@@ -1120,14 +1119,14 @@ namespace boost
break;
}
- walkup_itr
+ walkup_itr
= walkup_itr_t(current_endpoint, face_handles, first_side());
-
+
}
-
+
if (seen_goal_edge)
break;
-
+
}
if (seen_goal_edge)
@@ -1157,9 +1156,9 @@ namespace boost
// | there exists some bicomp containing three vertices
// ----- x,y, and z as shown such that x and y are externally
// | | active with respect to v (which means that there are
- // x y two vertices x_0 and y_0 such that (1) both x_0 and
- // | | y_0 are proper depth-first search ancestors of v and
- // --z-- (2) there are two disjoint paths, one connecting x
+ // x y two vertices x_0 and y_0 such that (1) both x_0 and
+ // | | y_0 are proper depth-first search ancestors of v and
+ // --z-- (2) there are two disjoint paths, one connecting x
// and x_0 and one connecting y and y_0, both consisting
// fig. 1 entirely of unembedded edges). Furthermore, there
// exists a vertex z_0 such that z is a depth-first
@@ -1175,10 +1174,10 @@ namespace boost
// properties of the Boyer-Myrvold algorithm to show the existence of an
// "x-y path" connecting some vertex on the "left side" of the x,y,z
// bicomp with some vertex on the "right side" of the bicomp (where the
- // left and right are split by a line drawn through v and z.If either of
- // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3
- // can be isolated - this is a case C. Otherwise, both endpoints are at
- // or below x and y on the bicomp. If there is a vertex alpha on the x-y
+ // left and right are split by a line drawn through v and z.If either of
+ // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3
+ // can be isolated - this is a case C. Otherwise, both endpoints are at
+ // or below x and y on the bicomp. If there is a vertex alpha on the x-y
// path such that alpha is not x or y and there's a path from alpha to v
// that's disjoint from any of the edges on the bicomp and the x-y path,
// a K_3_3 can be isolated - this is a case D. Otherwise, properties of
@@ -1192,8 +1191,8 @@ namespace boost
out_edge_iterator_t oei, oei_end;
typename std::vector<edge_t>::iterator xi, xi_end;
- // Clear the short-circuit edges - these are needed for the planar
- // testing/embedding algorithm to run in linear time, but they'll
+ // Clear the short-circuit edges - these are needed for the planar
+ // testing/embedding algorithm to run in linear time, but they'll
// complicate the kuratowski subgraph isolation
for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
{
@@ -1217,12 +1216,12 @@ namespace boost
typename std::vector<edge_t>::iterator embedded_itr, embedded_end;
embedded_end = embedded_edges.end();
- for(embedded_itr = embedded_edges.begin();
+ for(embedded_itr = embedded_edges.begin();
embedded_itr != embedded_end; ++embedded_itr
)
is_embedded[*embedded_itr] = true;
- // upper_face_vertex is true for x,y, and all vertices above x and y in
+ // upper_face_vertex is true for x,y, and all vertices above x and y in
// the bicomp
std::vector<bool> upper_face_vertex_vector(num_vertices(g), false);
vertex_to_bool_map_t upper_face_vertex
@@ -1234,7 +1233,7 @@ namespace boost
// These next few variable declarations are all things that we need
// to find.
- vertex_t z;
+ vertex_t z = graph_traits<Graph>::null_vertex();
vertex_t bicomp_root;
vertex_t w = graph_traits<Graph>::null_vertex();
face_handle_t w_handle;
@@ -1256,13 +1255,13 @@ namespace boost
//backedge from V, then goes up until it hits either X or Y
//(but doesn't find X or Y as the root of a bicomp)
- typename face_vertex_iterator<>::type
+ typename face_vertex_iterator<>::type
x_upper_itr(x, face_handles, first_side());
- typename face_vertex_iterator<>::type
+ typename face_vertex_iterator<>::type
x_lower_itr(x, face_handles, second_side());
typename face_vertex_iterator<>::type face_itr, face_end;
- // Don't know which path from x is the upper or lower path -
+ // Don't know which path from x is the upper or lower path -
// we'll find out here
for(face_itr = x_upper_itr; face_itr != face_end; ++face_itr)
{
@@ -1284,9 +1283,9 @@ namespace boost
upper_face_vertex[current_vertex] = true;
}
- v_dfchild_handle
+ v_dfchild_handle
= dfs_child_handles[canonical_dfs_child[previous_vertex]];
-
+
for(face_itr = x_lower_itr; *face_itr != y; ++face_itr)
{
vertex_t current_vertex(*face_itr);
@@ -1297,7 +1296,7 @@ namespace boost
if (w == graph_traits<Graph>::null_vertex()) //haven't found a w yet
{
roots_end = pertinent_roots[current_vertex]->end();
- for(roots_itr = pertinent_roots[current_vertex]->begin();
+ for(roots_itr = pertinent_roots[current_vertex]->begin();
roots_itr != roots_end; ++roots_itr
)
{
@@ -1327,7 +1326,7 @@ namespace boost
edge_to_bool_map_t outer_face_edge(outer_face_edge_vector.begin(), em);
walkup_itr_t walkup_end;
- for(walkup_itr_t walkup_itr(x, face_handles, first_side());
+ for(walkup_itr_t walkup_itr(x, face_handles, first_side());
walkup_itr != walkup_end; ++walkup_itr
)
{
@@ -1335,7 +1334,7 @@ namespace boost
is_in_subgraph[*walkup_itr] = true;
}
- for(walkup_itr_t walkup_itr(x, face_handles, second_side());
+ for(walkup_itr_t walkup_itr(x, face_handles, second_side());
walkup_itr != walkup_end; ++walkup_itr
)
{
@@ -1355,53 +1354,53 @@ namespace boost
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
edge_t e(*ei);
- goal_edge[e]
+ goal_edge[e]
= !outer_face_edge[e] && (source(e,g) == x || target(e,g) == x);
forbidden_edge[*ei] = outer_face_edge[*ei];
}
vertex_t x_ancestor = v;
vertex_t x_endpoint = graph_traits<Graph>::null_vertex();
-
+
while(x_endpoint == graph_traits<Graph>::null_vertex())
- {
+ {
x_ancestor = dfs_parent[x_ancestor];
- x_endpoint = kuratowski_walkup(x_ancestor,
- forbidden_edge,
+ x_endpoint = kuratowski_walkup(x_ancestor,
+ forbidden_edge,
goal_edge,
is_embedded,
x_external_path
);
-
- }
+
+ }
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
edge_t e(*ei);
- goal_edge[e]
+ goal_edge[e]
= !outer_face_edge[e] && (source(e,g) == y || target(e,g) == y);
forbidden_edge[*ei] = outer_face_edge[*ei];
}
vertex_t y_ancestor = v;
vertex_t y_endpoint = graph_traits<Graph>::null_vertex();
-
+
while(y_endpoint == graph_traits<Graph>::null_vertex())
- {
+ {
y_ancestor = dfs_parent[y_ancestor];
- y_endpoint = kuratowski_walkup(y_ancestor,
- forbidden_edge,
+ y_endpoint = kuratowski_walkup(y_ancestor,
+ forbidden_edge,
goal_edge,
is_embedded,
y_external_path
);
-
- }
-
+
+ }
+
vertex_t parent, child;
-
+
//If v isn't on the same bicomp as x and y, it's a case A
if (bicomp_root != v)
{
@@ -1412,13 +1411,13 @@ namespace boost
for(boost::tie(oei,oei_end) = out_edges(*vi,g); oei != oei_end; ++oei)
if(!outer_face_edge[*oei])
goal_edge[*oei] = true;
-
+
for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei)
forbidden_edge[*ei] = outer_face_edge[*ei];
-
+
z = kuratowski_walkup
(v, forbidden_edge, goal_edge, is_embedded, z_v_path);
-
+
}
else if (w != graph_traits<Graph>::null_vertex())
{
@@ -1430,17 +1429,17 @@ namespace boost
goal_edge[e] = false;
forbidden_edge[e] = outer_face_edge[e];
}
-
+
goal_edge[w_handle.first_edge()] = true;
goal_edge[w_handle.second_edge()] = true;
z = kuratowski_walkup(v,
- forbidden_edge,
+ forbidden_edge,
goal_edge,
is_embedded,
z_v_path
);
-
+
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
@@ -1453,41 +1452,41 @@ namespace boost
{
goal_edge[*pi] = true;
}
-
+
w_ancestor = v;
vertex_t w_endpoint = graph_traits<Graph>::null_vertex();
-
+
while(w_endpoint == graph_traits<Graph>::null_vertex())
- {
+ {
w_ancestor = dfs_parent[w_ancestor];
- w_endpoint = kuratowski_walkup(w_ancestor,
- forbidden_edge,
+ w_endpoint = kuratowski_walkup(w_ancestor,
+ forbidden_edge,
goal_edge,
is_embedded,
w_path
);
-
- }
-
- // We really want both the w walkup and the z walkup to finish on
- // exactly the same edge, but for convenience (since we don't have
- // control over which side of a bicomp a walkup moves up) we've
- // defined the walkup to either end at w_handle.first_edge() or
- // w_handle.second_edge(). If both walkups ended at different edges,
- // we'll do a little surgery on the w walkup path to make it follow
+
+ }
+
+ // We really want both the w walkup and the z walkup to finish on
+ // exactly the same edge, but for convenience (since we don't have
+ // control over which side of a bicomp a walkup moves up) we've
+ // defined the walkup to either end at w_handle.first_edge() or
+ // w_handle.second_edge(). If both walkups ended at different edges,
+ // we'll do a little surgery on the w walkup path to make it follow
// the other side of the final bicomp.
- if ((w_path.back() == w_handle.first_edge() &&
- z_v_path.back() == w_handle.second_edge())
+ if ((w_path.back() == w_handle.first_edge() &&
+ z_v_path.back() == w_handle.second_edge())
||
- (w_path.back() == w_handle.second_edge() &&
+ (w_path.back() == w_handle.second_edge() &&
z_v_path.back() == w_handle.first_edge())
)
{
walkup_itr_t wi, wi_end;
edge_t final_edge = w_path.back();
- vertex_t anchor
- = source(final_edge, g) == w_handle.get_anchor() ?
+ vertex_t anchor
+ = source(final_edge, g) == w_handle.get_anchor() ?
target(final_edge, g) : source(final_edge, g);
if (face_handles[anchor].first_edge() == final_edge)
wi = walkup_itr_t(anchor, face_handles, second_side());
@@ -1506,9 +1505,9 @@ namespace boost
}
}
-
+
}
- else
+ else
{
//We need to find a valid z, since the x-y path re-defines the lower
@@ -1519,7 +1518,7 @@ namespace boost
// The z we've used so far is just an externally active vertex on the
// lower face path, but may not be the z we need for a case C, D, or
- // E subgraph. the z we need now is any externally active vertex on
+ // E subgraph. the z we need now is any externally active vertex on
// the lower face path with both old_face_handles edges on the outer
// face. Since we know an x-y path exists, such a z must also exist.
@@ -1530,7 +1529,7 @@ namespace boost
for(face_itr = x_lower_itr; *face_itr != y; ++face_itr)
{
vertex_t possible_z(*face_itr);
- if (pertinent(possible_z,v) &&
+ if (pertinent(possible_z,v) &&
outer_face_edge[face_handles[possible_z].old_first_edge()] &&
outer_face_edge[face_handles[possible_z].old_second_edge()]
)
@@ -1544,14 +1543,14 @@ namespace boost
if (externally_active(z,v))
w = z;
-
+
typedef typename face_edge_iterator
- <single_side, previous_iteration>::type old_face_iterator_t;
+ <single_side, previous_iteration>::type old_face_iterator_t;
- old_face_iterator_t
+ old_face_iterator_t
first_old_face_itr(z, face_handles, first_side());
- old_face_iterator_t
+ old_face_iterator_t
second_old_face_itr(z, face_handles, second_side());
old_face_iterator_t old_face_itr, old_face_end;
@@ -1563,10 +1562,10 @@ namespace boost
vertex_to_bool_map_t x_y_path_vertex
(x_y_path_vertex_vector.begin(), vm);
- typename std::vector<old_face_iterator_t>::iterator
+ typename std::vector<old_face_iterator_t>::iterator
of_itr, of_itr_end;
- of_itr_end = old_face_iterators.end();
- for(of_itr = old_face_iterators.begin();
+ of_itr_end = old_face_iterators.end();
+ for(of_itr = old_face_iterators.begin();
of_itr != of_itr_end; ++of_itr
)
{
@@ -1580,13 +1579,13 @@ namespace boost
{
edge_t e(*old_face_itr);
previous_vertex = current_vertex;
- current_vertex = source(e,g) == current_vertex ?
+ current_vertex = source(e,g) == current_vertex ?
target(e,g) : source(e,g);
-
+
if (current_vertex == x || current_vertex == y)
seen_x_or_y = true;
- if (w == graph_traits<Graph>::null_vertex() &&
+ if (w == graph_traits<Graph>::null_vertex() &&
externally_active(current_vertex,v) &&
outer_face_edge[e] &&
outer_face_edge[*boost::next(old_face_itr)] &&
@@ -1595,10 +1594,10 @@ namespace boost
{
w = current_vertex;
}
-
+
if (!outer_face_edge[e])
{
- if (!upper_face_vertex[current_vertex] &&
+ if (!upper_face_vertex[current_vertex] &&
!lower_face_vertex[current_vertex]
)
{
@@ -1606,22 +1605,22 @@ namespace boost
}
is_in_subgraph[e] = true;
- if (upper_face_vertex[source(e,g)] ||
+ if (upper_face_vertex[source(e,g)] ||
lower_face_vertex[source(e,g)]
)
{
- if (first_x_y_path_endpoint ==
+ if (first_x_y_path_endpoint ==
graph_traits<Graph>::null_vertex()
)
first_x_y_path_endpoint = source(e,g);
else
second_x_y_path_endpoint = source(e,g);
}
- if (upper_face_vertex[target(e,g)] ||
+ if (upper_face_vertex[target(e,g)] ||
lower_face_vertex[target(e,g)]
)
{
- if (first_x_y_path_endpoint ==
+ if (first_x_y_path_endpoint ==
graph_traits<Graph>::null_vertex()
)
first_x_y_path_endpoint = target(e,g);
@@ -1635,35 +1634,35 @@ namespace boost
{
chosen_case = detail::BM_CASE_C;
}
-
+
}
}
- // Look for a case D - one of v's embedded edges will connect to the
+ // Look for a case D - one of v's embedded edges will connect to the
// x-y path along an inner face path.
//First, get a list of all of v's embedded child edges
out_edge_iterator_t v_edge_itr, v_edge_end;
- for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g);
+ for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g);
v_edge_itr != v_edge_end; ++v_edge_itr
)
{
edge_t embedded_edge(*v_edge_itr);
-
- if (!is_embedded[embedded_edge] ||
+
+ if (!is_embedded[embedded_edge] ||
embedded_edge == dfs_parent_edge[v]
)
continue;
case_d_edges.push_back(embedded_edge);
- vertex_t current_vertex
- = source(embedded_edge,g) == v ?
+ vertex_t current_vertex
+ = source(embedded_edge,g) == v ?
target(embedded_edge,g) : source(embedded_edge,g);
- typename face_edge_iterator<>::type
+ typename face_edge_iterator<>::type
internal_face_itr, internal_face_end;
if (face_handles[current_vertex].first_vertex() == v)
{
@@ -1677,13 +1676,13 @@ namespace boost
}
while(internal_face_itr != internal_face_end &&
- !outer_face_edge[*internal_face_itr] &&
+ !outer_face_edge[*internal_face_itr] &&
!x_y_path_vertex[current_vertex]
)
{
edge_t e(*internal_face_itr);
case_d_edges.push_back(e);
- current_vertex =
+ current_vertex =
source(e,g) == current_vertex ? target(e,g) : source(e,g);
++internal_face_itr;
}
@@ -1699,7 +1698,7 @@ namespace boost
}
}
-
+
}
@@ -1714,25 +1713,25 @@ namespace boost
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
edge_t e(*ei);
- goal_edge[e] = !outer_face_edge[e] &&
+ goal_edge[e] = !outer_face_edge[e] &&
(source(e,g) == z || target(e,g) == z);
forbidden_edge[e] = outer_face_edge[e];
}
kuratowski_walkup(v,
- forbidden_edge,
+ forbidden_edge,
goal_edge,
is_embedded,
z_v_path
);
-
+
if (chosen_case == detail::BM_CASE_E)
{
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
{
forbidden_edge[*ei] = outer_face_edge[*ei];
- goal_edge[*ei] = !outer_face_edge[*ei] &&
+ goal_edge[*ei] = !outer_face_edge[*ei] &&
(source(*ei,g) == w || target(*ei,g) == w);
}
@@ -1748,22 +1747,22 @@ namespace boost
{
goal_edge[*pi] = true;
}
-
+
w_ancestor = v;
vertex_t w_endpoint = graph_traits<Graph>::null_vertex();
-
+
while(w_endpoint == graph_traits<Graph>::null_vertex())
- {
+ {
w_ancestor = dfs_parent[w_ancestor];
- w_endpoint = kuratowski_walkup(w_ancestor,
- forbidden_edge,
+ w_endpoint = kuratowski_walkup(w_ancestor,
+ forbidden_edge,
goal_edge,
is_embedded,
w_path
);
-
- }
-
+
+ }
+
}
@@ -1794,7 +1793,7 @@ namespace boost
xi_end = w_path.end();
for(xi = w_path.begin(); xi != xi_end; ++xi)
is_in_subgraph[*xi] = true;
-
+
child = bicomp_root;
parent = dfs_parent[child];
while(child != parent)
@@ -1806,10 +1805,10 @@ namespace boost
- // At this point, we've already isolated the Kuratowski subgraph and
- // collected all of the edges that compose it in the is_in_subgraph
- // property map. But we want the verification of such a subgraph to be
- // a deterministic process, and we can simplify the function
+ // At this point, we've already isolated the Kuratowski subgraph and
+ // collected all of the edges that compose it in the is_in_subgraph
+ // property map. But we want the verification of such a subgraph to be
+ // a deterministic process, and we can simplify the function
// is_kuratowski_subgraph by cleaning up some edges here.
if (chosen_case == detail::BM_CASE_B)
@@ -1821,13 +1820,13 @@ namespace boost
// In a case C subgraph, at least one of the x-y path endpoints
// (call it alpha) is above either x or y on the outer face. The
// other endpoint may be attached at x or y OR above OR below. In
- // any of these three cases, we can form a K_3_3 by removing the
- // edge attached to v on the outer face that is NOT on the path to
+ // any of these three cases, we can form a K_3_3 by removing the
+ // edge attached to v on the outer face that is NOT on the path to
// alpha.
- typename face_vertex_iterator<single_side, follow_visitor>::type
+ typename face_vertex_iterator<single_side, follow_visitor>::type
face_itr, face_end;
- if (face_handles[v_dfchild_handle.first_vertex()].first_edge() ==
+ if (face_handles[v_dfchild_handle.first_vertex()].first_edge() ==
v_dfchild_handle.first_edge()
)
{
@@ -1857,13 +1856,13 @@ namespace boost
break;
}
}
-
+
}
else if (chosen_case == detail::BM_CASE_D)
{
// Need to remove both of the edges adjacent to v on the outer face.
// remove the connecting edges from v to bicomp, then
- // is_kuratowski_subgraph will shrink vertices of degree 1
+ // is_kuratowski_subgraph will shrink vertices of degree 1
// automatically...
is_in_subgraph[v_dfchild_handle.first_edge()] = false;
@@ -1872,8 +1871,8 @@ namespace boost
}
else if (chosen_case == detail::BM_CASE_E)
{
- // Similarly to case C, if the endpoints of the x-y path are both
- // below x and y, we should remove an edge to allow the subgraph to
+ // Similarly to case C, if the endpoints of the x-y path are both
+ // below x and y, we should remove an edge to allow the subgraph to
// contract to a K_3_3.
@@ -1881,7 +1880,7 @@ namespace boost
(second_x_y_path_endpoint != x && second_x_y_path_endpoint != y)
)
{
- is_in_subgraph[dfs_parent_edge[v]] = false;
+ is_in_subgraph[dfs_parent_edge[v]] = false;
vertex_t deletion_endpoint, other_endpoint;
if (lower_face_vertex[first_x_y_path_endpoint])
@@ -1890,13 +1889,13 @@ namespace boost
other_endpoint = first_x_y_path_endpoint;
}
else
- {
+ {
deletion_endpoint = first_x_y_path_endpoint;
other_endpoint = second_x_y_path_endpoint;
}
typename face_edge_iterator<>::type face_itr, face_end;
-
+
bool found_other_endpoint = false;
for(face_itr = typename face_edge_iterator<>::type
(deletion_endpoint, face_handles, first_side());
@@ -1904,7 +1903,7 @@ namespace boost
)
{
edge_t e(*face_itr);
- if (source(e,g) == other_endpoint ||
+ if (source(e,g) == other_endpoint ||
target(e,g) == other_endpoint
)
{
@@ -1915,7 +1914,7 @@ namespace boost
if (found_other_endpoint)
{
- is_in_subgraph[face_handles[deletion_endpoint].first_edge()]
+ is_in_subgraph[face_handles[deletion_endpoint].first_edge()]
= false;
}
else
@@ -1924,14 +1923,14 @@ namespace boost
= false;
}
}
-
+
}
for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
if (is_in_subgraph[*ei])
*o_itr = *ei;
-
+
}
@@ -1957,14 +1956,14 @@ namespace boost
vertex_t kuratowski_v;
vertex_t kuratowski_x;
vertex_t kuratowski_y;
-
- vertex_list_t garbage; // we delete items from linked lists by
+
+ vertex_list_t garbage; // we delete items from linked lists by
// splicing them into garbage
//only need these two for kuratowski subgraph isolation
std::vector<vertex_t> current_merge_points;
std::vector<edge_t> embedded_edges;
-
+
//property map storage
std::vector<v_size_t> low_point_vector;
std::vector<vertex_t> dfs_parent_vector;
@@ -1976,7 +1975,7 @@ namespace boost
std::vector< face_handle_t > face_handles_vector;
std::vector< face_handle_t > dfs_child_handles_vector;
std::vector< vertex_list_ptr_t > separated_dfs_child_list_vector;
- std::vector< typename vertex_list_t::iterator >
+ std::vector< typename vertex_list_t::iterator >
separated_node_in_parent_list_vector;
std::vector<vertex_t> canonical_dfs_child_vector;
std::vector<bool> flipped_vector;
@@ -1993,20 +1992,20 @@ namespace boost
vertex_to_face_handle_list_ptr_map_t pertinent_roots;
vertex_to_v_size_map_t backedge_flag;
vertex_to_v_size_map_t visited;
- vertex_to_face_handle_map_t face_handles;
+ vertex_to_face_handle_map_t face_handles;
vertex_to_face_handle_map_t dfs_child_handles;
vertex_to_vertex_list_ptr_map_t separated_dfs_child_list;
vertex_to_separated_node_map_t separated_node_in_parent_list;
- vertex_to_vertex_map_t canonical_dfs_child;
+ vertex_to_vertex_map_t canonical_dfs_child;
vertex_to_bool_map_t flipped;
vertex_to_edge_vector_map_t backedges;
vertex_to_edge_map_t dfs_parent_edge; //only need for kuratowski
merge_stack_t merge_stack;
-
+
};
-
-
+
+
} //namespace boost
#endif //__BOYER_MYRVOLD_IMPL_HPP__
diff --git a/boost/graph/r_c_shortest_paths.hpp b/boost/graph/r_c_shortest_paths.hpp
index afa50cf084..7e490fc7d2 100644
--- a/boost/graph/r_c_shortest_paths.hpp
+++ b/boost/graph/r_c_shortest_paths.hpp
@@ -11,6 +11,7 @@
#include <map>
#include <queue>
#include <vector>
+#include <list>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/iteration_macros.hpp>
diff --git a/boost/graph/strong_components.hpp b/boost/graph/strong_components.hpp
index 61345bdcb8..f1bd56d6f7 100644
--- a/boost/graph/strong_components.hpp
+++ b/boost/graph/strong_components.hpp
@@ -64,6 +64,7 @@ namespace boost {
do {
w = s.top(); s.pop();
put(comp, w, c);
+ put(root, w, v);
} while (w != v);
++c;
}
diff --git a/boost/graph/tree_traits.hpp b/boost/graph/tree_traits.hpp
index 0843628c1b..a04c750f7f 100644
--- a/boost/graph/tree_traits.hpp
+++ b/boost/graph/tree_traits.hpp
@@ -6,6 +6,8 @@
#ifndef BOOST_TREE_STRUCTURE_HPP
#define BOOST_TREE_STRUCTURE_HPP
+#include <boost/tuple/tuple.hpp> //For boost::tie()
+
namespace boost {
template <class T>
diff --git a/boost/hana/basic_tuple.hpp b/boost/hana/basic_tuple.hpp
index 685011e10c..50af4e33f5 100644
--- a/boost/hana/basic_tuple.hpp
+++ b/boost/hana/basic_tuple.hpp
@@ -150,7 +150,7 @@ BOOST_HANA_NAMESPACE_BEGIN
// copy constructor
template <typename Other, typename = typename std::enable_if<
- std::is_same<typename std::decay<Other>::type, basic_tuple>::value
+ std::is_same<typename detail::decay<Other>::type, basic_tuple>::value
>::type>
constexpr basic_tuple(Other&& other)
: Base(detail::from_other{}, static_cast<Other&&>(other))
diff --git a/boost/hana/comparing.hpp b/boost/hana/comparing.hpp
index 7b8bf28407..beae9cbda0 100644
--- a/boost/hana/comparing.hpp
+++ b/boost/hana/comparing.hpp
@@ -13,10 +13,9 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/fwd/comparing.hpp>
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/equal.hpp>
-#include <type_traits>
-
BOOST_HANA_NAMESPACE_BEGIN
namespace detail {
@@ -37,7 +36,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @cond
template <typename F>
constexpr auto comparing_t::operator()(F&& f) const {
- return detail::equal_by<typename std::decay<F>::type>{static_cast<F&&>(f)};
+ return detail::equal_by<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
//! @endcond
BOOST_HANA_NAMESPACE_END
diff --git a/boost/hana/detail/algorithm.hpp b/boost/hana/detail/algorithm.hpp
index d398659e2c..cf4ead5751 100644
--- a/boost/hana/detail/algorithm.hpp
+++ b/boost/hana/detail/algorithm.hpp
@@ -19,8 +19,10 @@ Distributed under the Boost Software License, Version 1.0.
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
+ // Do not call this swap, otherwise it can get picked up by ADL and conflict
+ // with std::swap (see https://github.com/boostorg/hana/issues/297).
template <typename T>
- constexpr void swap(T& x, T& y) {
+ constexpr void constexpr_swap(T& x, T& y) {
auto tmp = x;
x = y;
y = std::move(tmp);
@@ -31,7 +33,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
while (first != last) {
if (first == --last)
break;
- detail::swap(*first, *last);
+ detail::constexpr_swap(*first, *last);
++first;
}
}
@@ -49,7 +51,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
BidirIter j = last;
while (!pred(*i, *--j))
;
- detail::swap(*i, *j);
+ detail::constexpr_swap(*i, *j);
detail::reverse(ip1, last);
return true;
}
diff --git a/boost/hana/detail/concepts.hpp b/boost/hana/detail/concepts.hpp
index a3095f5377..4031f356df 100644
--- a/boost/hana/detail/concepts.hpp
+++ b/boost/hana/detail/concepts.hpp
@@ -18,6 +18,7 @@ Distributed under the Boost Software License, Version 1.0.
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
+ //! @cond
//////////////////////////////////////////////////////////////////////////
// EqualityComparable
//////////////////////////////////////////////////////////////////////////
@@ -71,6 +72,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
LessThanComparable<typename detail::std_common_type<T, U>::type>::value
>
{ };
+ //! @endcond
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_CONCEPTS_HPP
diff --git a/boost/hana/detail/index_if.hpp b/boost/hana/detail/index_if.hpp
index 116f278c87..81f6ea5630 100644
--- a/boost/hana/detail/index_if.hpp
+++ b/boost/hana/detail/index_if.hpp
@@ -46,6 +46,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Pred, typename Ts, typename = when<true>>
struct index_if;
+ //! @cond
template <typename Pred, typename T, typename ...Ts>
struct index_if<Pred, pack<T, Ts...>, when<static_cast<bool>(decltype(
std::declval<Pred>()(std::declval<T>())
@@ -64,6 +65,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
struct index_if<Pred, pack<>> {
static constexpr std::size_t value = 0;
};
+ //! @endcond
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_INDEX_IF_HPP
diff --git a/boost/hana/detail/std_common_type.hpp b/boost/hana/detail/std_common_type.hpp
index 209c8fcb04..2eb0d6847e 100644
--- a/boost/hana/detail/std_common_type.hpp
+++ b/boost/hana/detail/std_common_type.hpp
@@ -11,8 +11,8 @@ Distributed under the Boost Software License, Version 1.0.
#define BOOST_HANA_DETAIL_STD_COMMON_TYPE_HPP
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
-#include <type_traits>
#include <utility>
@@ -27,7 +27,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
struct std_common_type<T, U, decltype((void)(
true ? std::declval<T>() : std::declval<U>()
))> {
- using type = typename std::decay<
+ using type = typename detail::decay<
decltype(true ? std::declval<T>() : std::declval<U>())
>::type;
};
diff --git a/boost/hana/experimental/printable.hpp b/boost/hana/experimental/printable.hpp
index d904b53c25..20993740dd 100644
--- a/boost/hana/experimental/printable.hpp
+++ b/boost/hana/experimental/printable.hpp
@@ -107,6 +107,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace experimental {
};
// model for OutputStreamable types
+ //! @cond
template <typename S>
struct print_impl<S, hana::when_valid<decltype(
std::declval<std::ostringstream&>() << std::declval<S const&>()
@@ -118,6 +119,7 @@ BOOST_HANA_NAMESPACE_BEGIN namespace experimental {
return os.str();
}
};
+ //! @endcond
// model for hana::optional
template <>
diff --git a/boost/hana/experimental/types.hpp b/boost/hana/experimental/types.hpp
index 4a3c107994..86d9ddc957 100644
--- a/boost/hana/experimental/types.hpp
+++ b/boost/hana/experimental/types.hpp
@@ -78,7 +78,7 @@ BOOST_HANA_NAMESPACE_BEGIN
!hana::Metafunction<F>::value
>::type>
static constexpr auto apply(hana::experimental::types<T...> const&, F&& f)
- -> hana::experimental::types<typename decltype(f(hana::type<T>{}))::type...>
+ -> hana::experimental::types<typename decltype(+f(hana::type<T>{}))::type...>
{ return {}; }
template <typename ...T, typename F, typename = typename std::enable_if<
diff --git a/boost/hana/experimental/view.hpp b/boost/hana/experimental/view.hpp
index e47674c25d..d037a9d271 100644
--- a/boost/hana/experimental/view.hpp
+++ b/boost/hana/experimental/view.hpp
@@ -106,7 +106,7 @@ namespace experimental {
};
template <typename Sequence, typename F>
- constexpr transformed_view_t<Sequence, typename std::decay<F>::type>
+ constexpr transformed_view_t<Sequence, typename hana::detail::decay<F>::type>
transformed(Sequence& sequence, F&& f) {
return {sequence, static_cast<F&&>(f)};
}
@@ -205,6 +205,7 @@ struct unpack_impl<experimental::view_tag> {
template <typename Sequence, std::size_t ...i, typename F>
static constexpr decltype(auto)
apply(experimental::sliced_view_t<Sequence, i...> view, F&& f) {
+ (void)view; // Remove spurious unused variable warning with GCC
return static_cast<F&&>(f)(hana::at_c<i>(view.sequence_)...);
}
@@ -221,6 +222,7 @@ struct unpack_impl<experimental::view_tag> {
unpack_joined(View view, F&& f, std::index_sequence<i1...>,
std::index_sequence<i2...>)
{
+ (void)view; // Remove spurious unused variable warning with GCC
return static_cast<F&&>(f)(hana::at_c<i1>(view.sequence1_)...,
hana::at_c<i2>(view.sequence2_)...);
}
diff --git a/boost/hana/ext/std/tuple.hpp b/boost/hana/ext/std/tuple.hpp
index b2e95d7f30..d53b9dd0f1 100644
--- a/boost/hana/ext/std/tuple.hpp
+++ b/boost/hana/ext/std/tuple.hpp
@@ -12,6 +12,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/bool.hpp>
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/fwd/at.hpp>
#include <boost/hana/fwd/core/make.hpp>
#include <boost/hana/fwd/core/tag_of.hpp>
@@ -83,7 +84,7 @@ BOOST_HANA_NAMESPACE_BEGIN
struct lift_impl<ext::std::tuple_tag> {
template <typename X>
static constexpr auto apply(X&& x) {
- return std::tuple<typename std::decay<X>::type>{
+ return std::tuple<typename detail::decay<X>::type>{
static_cast<X&&>(x)};
}
};
diff --git a/boost/hana/functional/curry.hpp b/boost/hana/functional/curry.hpp
index 23b3694b8c..94662757e5 100644
--- a/boost/hana/functional/curry.hpp
+++ b/boost/hana/functional/curry.hpp
@@ -11,6 +11,7 @@ Distributed under the Boost Software License, Version 1.0.
#define BOOST_HANA_FUNCTIONAL_CURRY_HPP
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/functional/apply.hpp>
#include <boost/hana/functional/partial.hpp>
@@ -103,7 +104,7 @@ BOOST_HANA_NAMESPACE_BEGIN
template <std::size_t n>
struct make_curry_t {
template <typename F>
- constexpr curry_t<n, typename std::decay<F>::type>
+ constexpr curry_t<n, typename detail::decay<F>::type>
operator()(F&& f) const { return {static_cast<F&&>(f)}; }
};
diff --git a/boost/hana/functional/infix.hpp b/boost/hana/functional/infix.hpp
index 471e4f3ac9..0706f3e62d 100644
--- a/boost/hana/functional/infix.hpp
+++ b/boost/hana/functional/infix.hpp
@@ -11,6 +11,7 @@ Distributed under the Boost Software License, Version 1.0.
#define BOOST_HANA_FUNCTIONAL_INFIX_HPP
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/functional/partial.hpp>
#include <boost/hana/functional/reverse_partial.hpp>
@@ -102,7 +103,7 @@ BOOST_HANA_NAMESPACE_BEGIN
template <bool left, bool right>
struct make_infix {
template <typename F>
- constexpr infix_t<left, right, typename std::decay<F>::type>
+ constexpr infix_t<left, right, typename detail::decay<F>::type>
operator()(F&& f) const { return {static_cast<F&&>(f)}; }
};
diff --git a/boost/hana/functional/lockstep.hpp b/boost/hana/functional/lockstep.hpp
index fe4a12c7bd..11f8d6226f 100644
--- a/boost/hana/functional/lockstep.hpp
+++ b/boost/hana/functional/lockstep.hpp
@@ -12,9 +12,9 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/basic_tuple.hpp>
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <cstddef>
-#include <type_traits>
#include <utility>
@@ -51,7 +51,7 @@ BOOST_HANA_NAMESPACE_BEGIN
struct make_pre_lockstep_t {
struct secret { };
template <typename F>
- constexpr pre_lockstep_t<typename std::decay<F>::type> operator()(F&& f) const {
+ constexpr pre_lockstep_t<typename detail::decay<F>::type> operator()(F&& f) const {
return {static_cast<F&&>(f)};
}
};
@@ -93,14 +93,14 @@ BOOST_HANA_NAMESPACE_BEGIN
template <typename ...G>
constexpr lockstep_t<std::make_index_sequence<sizeof...(G)>, F,
- typename std::decay<G>::type...>
+ typename detail::decay<G>::type...>
operator()(G&& ...g) const& {
return {make_pre_lockstep_t::secret{}, this->f, static_cast<G&&>(g)...};
}
template <typename ...G>
constexpr lockstep_t<std::make_index_sequence<sizeof...(G)>, F,
- typename std::decay<G>::type...>
+ typename detail::decay<G>::type...>
operator()(G&& ...g) && {
return {make_pre_lockstep_t::secret{}, static_cast<F&&>(this->f),
static_cast<G&&>(g)...};
diff --git a/boost/hana/functional/overload_linearly.hpp b/boost/hana/functional/overload_linearly.hpp
index 3695bf2be2..3c91a9249f 100644
--- a/boost/hana/functional/overload_linearly.hpp
+++ b/boost/hana/functional/overload_linearly.hpp
@@ -11,8 +11,8 @@ Distributed under the Boost Software License, Version 1.0.
#define BOOST_HANA_FUNCTIONAL_OVERLOAD_LINEARLY_HPP
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
-#include <type_traits>
#include <utility>
@@ -85,8 +85,8 @@ BOOST_HANA_NAMESPACE_BEGIN
struct make_overload_linearly_t {
template <typename F, typename G>
constexpr overload_linearly_t<
- typename std::decay<F>::type,
- typename std::decay<G>::type
+ typename detail::decay<F>::type,
+ typename detail::decay<G>::type
> operator()(F&& f, G&& g) const {
return {static_cast<F&&>(f), static_cast<G&&>(g)};
}
@@ -96,6 +96,11 @@ BOOST_HANA_NAMESPACE_BEGIN
return (*this)(static_cast<F&&>(f),
(*this)(static_cast<G&&>(g), static_cast<H&&>(h)...));
}
+
+ template <typename F>
+ constexpr typename detail::decay<F>::type operator()(F&& f) const {
+ return static_cast<F&&>(f);
+ }
};
constexpr make_overload_linearly_t overload_linearly{};
diff --git a/boost/hana/functional/partial.hpp b/boost/hana/functional/partial.hpp
index c84c365bf9..064d0058ac 100644
--- a/boost/hana/functional/partial.hpp
+++ b/boost/hana/functional/partial.hpp
@@ -64,8 +64,6 @@ BOOST_HANA_NAMESPACE_BEGIN
template <std::size_t ...n, typename F, typename ...X>
struct partial_t<std::index_sequence<n...>, F, X...> {
- // Not needed in theory; workaround for a bug in libstdc++'s tuple,
- // which instantiates the default constructor of elements too eagerly.
partial_t() = default;
template <typename ...T>
diff --git a/boost/hana/functional/reverse_partial.hpp b/boost/hana/functional/reverse_partial.hpp
index 9a2f63ff23..fe2a06f143 100644
--- a/boost/hana/functional/reverse_partial.hpp
+++ b/boost/hana/functional/reverse_partial.hpp
@@ -62,6 +62,8 @@ BOOST_HANA_NAMESPACE_BEGIN
template <std::size_t ...n, typename F, typename ...X>
struct reverse_partial_t<std::index_sequence<n...>, F, X...> {
+ reverse_partial_t() = default;
+
template <typename ...T>
constexpr reverse_partial_t(make_reverse_partial_t::secret, T&& ...t)
: storage_{static_cast<T&&>(t)...}
diff --git a/boost/hana/fuse.hpp b/boost/hana/fuse.hpp
index 0b8829cb30..38b93a151d 100644
--- a/boost/hana/fuse.hpp
+++ b/boost/hana/fuse.hpp
@@ -13,10 +13,9 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/fwd/fuse.hpp>
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/unpack.hpp>
-#include <type_traits>
-
BOOST_HANA_NAMESPACE_BEGIN
namespace detail {
@@ -40,7 +39,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @cond
template <typename F>
constexpr auto fuse_t::operator()(F&& f) const {
- return detail::fused<typename std::decay<F>::type>{static_cast<F&&>(f)};
+ return detail::fused<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
//! @endcond
BOOST_HANA_NAMESPACE_END
diff --git a/boost/hana/fwd/at.hpp b/boost/hana/fwd/at.hpp
index d069143c4a..9b1195d3d6 100644
--- a/boost/hana/fwd/at.hpp
+++ b/boost/hana/fwd/at.hpp
@@ -46,14 +46,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/at.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.at.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto at = [](auto&& xs, auto const& n) -> decltype(auto) {
return tag-dispatched;
diff --git a/boost/hana/fwd/at_key.hpp b/boost/hana/fwd/at_key.hpp
index a3045bba0e..08a29feff1 100644
--- a/boost/hana/fwd/at_key.hpp
+++ b/boost/hana/fwd/at_key.hpp
@@ -47,14 +47,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/at_key.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.at_key.number_of_lookups.chart.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto at_key = [](auto&& xs, auto const& key) -> decltype(auto) {
return tag-dispatched;
diff --git a/boost/hana/fwd/cartesian_product.hpp b/boost/hana/fwd/cartesian_product.hpp
index 4df7917415..4ea70626a6 100644
--- a/boost/hana/fwd/cartesian_product.hpp
+++ b/boost/hana/fwd/cartesian_product.hpp
@@ -42,14 +42,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/cartesian_product.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.cartesian_product.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto cartesian_product = [](auto&& xs) {
return tag-dispatched;
diff --git a/boost/hana/fwd/count_if.hpp b/boost/hana/fwd/count_if.hpp
index a618f24e5f..8d4b9283a9 100644
--- a/boost/hana/fwd/count_if.hpp
+++ b/boost/hana/fwd/count_if.hpp
@@ -36,13 +36,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/count_if.cpp
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.count_if.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto count_if = [](auto&& xs, auto&& predicate) {
return tag-dispatched;
diff --git a/boost/hana/fwd/difference.hpp b/boost/hana/fwd/difference.hpp
index 74c8e9ccee..44916198e5 100644
--- a/boost/hana/fwd/difference.hpp
+++ b/boost/hana/fwd/difference.hpp
@@ -44,14 +44,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/difference.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.difference.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto difference = [](auto&& xs, auto&& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/filter.hpp b/boost/hana/fwd/filter.hpp
index 7152361ef7..b0db0b6006 100644
--- a/boost/hana/fwd/filter.hpp
+++ b/boost/hana/fwd/filter.hpp
@@ -61,13 +61,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/filter.cpp
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.filter.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto filter = [](auto&& xs, auto&& pred) {
return tag-dispatched;
diff --git a/boost/hana/fwd/find_if.hpp b/boost/hana/fwd/find_if.hpp
index 6308086944..7c8b8664f1 100644
--- a/boost/hana/fwd/find_if.hpp
+++ b/boost/hana/fwd/find_if.hpp
@@ -37,13 +37,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/find_if.cpp
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.find_if.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto find_if = [](auto&& xs, auto&& predicate) {
return tag-dispatched;
diff --git a/boost/hana/fwd/fold_left.hpp b/boost/hana/fwd/fold_left.hpp
index 061956ce9c..039cb746d8 100644
--- a/boost/hana/fwd/fold_left.hpp
+++ b/boost/hana/fwd/fold_left.hpp
@@ -65,14 +65,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/fold_left.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.fold_left.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto fold_left = [](auto&& xs[, auto&& state], auto&& f) -> decltype(auto) {
return tag-dispatched;
diff --git a/boost/hana/fwd/fold_right.hpp b/boost/hana/fwd/fold_right.hpp
index 319bbade1a..4b5bf8f1ba 100644
--- a/boost/hana/fwd/fold_right.hpp
+++ b/boost/hana/fwd/fold_right.hpp
@@ -69,14 +69,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/fold_right.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.fold_right.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto fold_right = [](auto&& xs[, auto&& state], auto&& f) -> decltype(auto) {
return tag-dispatched;
diff --git a/boost/hana/fwd/intersection.hpp b/boost/hana/fwd/intersection.hpp
index 59a1c298c7..787137e208 100644
--- a/boost/hana/fwd/intersection.hpp
+++ b/boost/hana/fwd/intersection.hpp
@@ -33,14 +33,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/intersection.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.intersection.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto intersection = [](auto&& xs, auto&& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/is_disjoint.hpp b/boost/hana/fwd/is_disjoint.hpp
index 9f960ba07e..97ed7471bb 100644
--- a/boost/hana/fwd/is_disjoint.hpp
+++ b/boost/hana/fwd/is_disjoint.hpp
@@ -30,14 +30,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/is_disjoint.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.is_disjoint.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto is_disjoint = [](auto const& xs, auto const& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/is_subset.hpp b/boost/hana/fwd/is_subset.hpp
index 9d5ed28cd4..158d28b751 100644
--- a/boost/hana/fwd/is_subset.hpp
+++ b/boost/hana/fwd/is_subset.hpp
@@ -59,14 +59,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/is_subset.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.is_subset.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto is_subset = [](auto&& xs, auto&& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/lexicographical_compare.hpp b/boost/hana/fwd/lexicographical_compare.hpp
index 3c9f3f0e76..0098b1cb2d 100644
--- a/boost/hana/fwd/lexicographical_compare.hpp
+++ b/boost/hana/fwd/lexicographical_compare.hpp
@@ -70,14 +70,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/lexicographical_compare.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.lexicographical_compare.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto lexicographical_compare = [](auto const& xs, auto const& ys, auto const& pred = hana::less) {
return tag-dispatched;
diff --git a/boost/hana/fwd/map.hpp b/boost/hana/fwd/map.hpp
index 4d7f005740..707cc0c6e9 100644
--- a/boost/hana/fwd/map.hpp
+++ b/boost/hana/fwd/map.hpp
@@ -190,14 +190,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/map/insert.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.insert.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto insert = [](auto&& map, auto&& pair) {
return tag-dispatched;
diff --git a/boost/hana/fwd/partition.hpp b/boost/hana/fwd/partition.hpp
index d1fa9e7b1c..4b8cf00f18 100644
--- a/boost/hana/fwd/partition.hpp
+++ b/boost/hana/fwd/partition.hpp
@@ -61,14 +61,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/partition.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.partition.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto partition = [](auto&& xs, auto&& predicate) {
return tag-dispatched;
diff --git a/boost/hana/fwd/product.hpp b/boost/hana/fwd/product.hpp
index 3549e5b2a2..f8a1c67f7d 100644
--- a/boost/hana/fwd/product.hpp
+++ b/boost/hana/fwd/product.hpp
@@ -53,14 +53,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/product.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.product.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto product = see documentation;
#else
diff --git a/boost/hana/fwd/set.hpp b/boost/hana/fwd/set.hpp
index 5b96e9da06..2b0fdc5284 100644
--- a/boost/hana/fwd/set.hpp
+++ b/boost/hana/fwd/set.hpp
@@ -147,14 +147,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/set/insert.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.insert.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto insert = [](auto&& set, auto&& element) {
return tag-dispatched;
diff --git a/boost/hana/fwd/sort.hpp b/boost/hana/fwd/sort.hpp
index 785b28a568..3cb1fdabc7 100644
--- a/boost/hana/fwd/sort.hpp
+++ b/boost/hana/fwd/sort.hpp
@@ -79,13 +79,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! -------
//! @include example/sort.cpp
//!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.sort.compile.json">
- //! </div>
- //!
//! [1]: http://en.wikipedia.org/wiki/Strict_weak_ordering
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto sort = [](auto&& xs[, auto&& predicate]) {
diff --git a/boost/hana/fwd/symmetric_difference.hpp b/boost/hana/fwd/symmetric_difference.hpp
index e0ba2c7c91..d23d637c30 100644
--- a/boost/hana/fwd/symmetric_difference.hpp
+++ b/boost/hana/fwd/symmetric_difference.hpp
@@ -34,14 +34,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/symmetric_difference.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.symmetric_difference.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto symmetric_difference = [](auto&& xs, auto&& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/transform.hpp b/boost/hana/fwd/transform.hpp
index 5606ddf82c..5f2518db78 100644
--- a/boost/hana/fwd/transform.hpp
+++ b/boost/hana/fwd/transform.hpp
@@ -37,13 +37,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/transform.cpp
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.transform.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto transform = [](auto&& xs, auto&& f) {
return tag-dispatched;
diff --git a/boost/hana/fwd/type.hpp b/boost/hana/fwd/type.hpp
index 1c9536aae9..b0a6aec20c 100644
--- a/boost/hana/fwd/type.hpp
+++ b/boost/hana/fwd/type.hpp
@@ -121,6 +121,11 @@ BOOST_HANA_NAMESPACE_BEGIN
//! `decltype` keyword, lifted to Hana.
//! @relates hana::type
//!
+ //! @deprecated
+ //! The semantics of `decltype_` are can be confusing, and `hana::typeid_`
+ //! should be preferred instead. `decltype_` may be removed in the next
+ //! major version of the library.
+ //!
//! `decltype_` is somewhat equivalent to `decltype` in that it returns
//! the type of an object, except it returns it as a `hana::type` which
//! is a first-class citizen of Hana instead of a raw C++ type.
@@ -183,6 +188,49 @@ BOOST_HANA_NAMESPACE_BEGIN
constexpr decltype_t decltype_{};
#endif
+ //! Returns a `hana::type` representing the type of a given object.
+ //! @relates hana::type
+ //!
+ //! `hana::typeid_` is somewhat similar to `typeid` in that it returns
+ //! something that represents the type of an object. However, what
+ //! `typeid` returns represent the _runtime_ type of the object, while
+ //! `hana::typeid_` returns the _static_ type of the object. Specifically,
+ //! given an object `x`, `typeid_` satisfies
+ //! @code
+ //! typeid_(x) == type_c<decltype(x) with ref and cv-qualifiers stripped>
+ //! @endcode
+ //!
+ //! As you can see, `typeid_` strips any reference and cv-qualifier from
+ //! the object's actual type. The reason for doing so is that it faithfully
+ //! models how the language's `typeid` behaves with respect to reference
+ //! and cv-qualifiers, and it also turns out to be the desirable behavior
+ //! most of the time. Also, when given a `hana::type`, `typeid_` is just
+ //! the identity function. Hence, for any C++ type `T`,
+ //! @code
+ //! typeid_(type_c<T>) == type_c<T>
+ //! @endcode
+ //!
+ //! In conjunction with the way `metafunction` & al. are specified, this
+ //! behavior makes it easier to interact with both types and values at
+ //! the same time. However, it does make it impossible to create a `type`
+ //! containing another `type` using `typeid_`. This use case is assumed
+ //! to be rare and a hand-coded function can be used if this is needed.
+ //!
+ //!
+ //! Example
+ //! -------
+ //! @include example/type/typeid.cpp
+#ifdef BOOST_HANA_DOXYGEN_INVOKED
+ constexpr auto typeid_ = see documentation;
+#else
+ struct typeid_t {
+ template <typename T>
+ constexpr auto operator()(T&&) const;
+ };
+
+ constexpr typeid_t typeid_{};
+#endif
+
#ifdef BOOST_HANA_DOXYGEN_INVOKED
//! Equivalent to `decltype_`, provided for convenience.
//! @relates hana::type
diff --git a/boost/hana/fwd/union.hpp b/boost/hana/fwd/union.hpp
index b6d63023a1..38df48e941 100644
--- a/boost/hana/fwd/union.hpp
+++ b/boost/hana/fwd/union.hpp
@@ -33,14 +33,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! Example
//! -------
//! @include example/union.cpp
- //!
- //!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.union.compile.json">
- //! </div>
#ifdef BOOST_HANA_DOXYGEN_INVOKED
constexpr auto union_ = [](auto&& xs, auto&& ys) {
return tag-dispatched;
diff --git a/boost/hana/fwd/unpack.hpp b/boost/hana/fwd/unpack.hpp
index 43a4941f3e..457cacea97 100644
--- a/boost/hana/fwd/unpack.hpp
+++ b/boost/hana/fwd/unpack.hpp
@@ -43,14 +43,6 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @include example/unpack.cpp
//!
//!
- //! Benchmarks
- //! ----------
- //! <div class="benchmark-chart"
- //! style="min-width: 310px; height: 400px; margin: 0 auto"
- //! data-dataset="benchmark.unpack.compile.json">
- //! </div>
- //!
- //!
//! Rationale: `unpack`'s name and parameter order
//! ----------------------------------------------
//! It has been suggested a couple of times that `unpack` be called
diff --git a/boost/hana/map.hpp b/boost/hana/map.hpp
index 341f1d0517..4aecb68482 100644
--- a/boost/hana/map.hpp
+++ b/boost/hana/map.hpp
@@ -355,6 +355,8 @@ BOOST_HANA_NAMESPACE_BEGIN
using MaybeIndex = typename detail::find_index<
HashTable, Key, detail::KeyAtIndex<Storage>::template apply
>::type;
+ static_assert(!decltype(hana::is_nothing(MaybeIndex{}))::value,
+ "hana::at_key(map, key) requires the 'key' to be present in the 'map'");
constexpr std::size_t index = decltype(*MaybeIndex{}){}();
return hana::second(hana::at_c<index>(static_cast<Map&&>(map).storage));
}
diff --git a/boost/hana/monadic_fold_left.hpp b/boost/hana/monadic_fold_left.hpp
index 999ddfff55..7f28f9e508 100644
--- a/boost/hana/monadic_fold_left.hpp
+++ b/boost/hana/monadic_fold_left.hpp
@@ -17,6 +17,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/concept/monad.hpp>
#include <boost/hana/config.hpp>
#include <boost/hana/core/dispatch.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/fold_right.hpp>
#include <boost/hana/functional/curry.hpp>
#include <boost/hana/functional/partial.hpp>
@@ -111,7 +112,7 @@ BOOST_HANA_NAMESPACE_BEGIN
template <typename M, typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
struct end { };
- using G = detail::monadic_foldl1_helper<end, M, typename std::decay<F>::type>;
+ using G = detail::monadic_foldl1_helper<end, M, typename detail::decay<F>::type>;
decltype(auto) result = hana::monadic_fold_left<M>(
static_cast<Xs&&>(xs),
end{},
diff --git a/boost/hana/monadic_fold_right.hpp b/boost/hana/monadic_fold_right.hpp
index 814343a336..46fb450439 100644
--- a/boost/hana/monadic_fold_right.hpp
+++ b/boost/hana/monadic_fold_right.hpp
@@ -17,6 +17,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/concept/monad.hpp>
#include <boost/hana/config.hpp>
#include <boost/hana/core/dispatch.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/fold_left.hpp>
#include <boost/hana/functional/curry.hpp>
#include <boost/hana/functional/partial.hpp>
@@ -110,7 +111,7 @@ BOOST_HANA_NAMESPACE_BEGIN
template <typename M, typename Xs, typename F>
static constexpr decltype(auto) apply(Xs&& xs, F&& f) {
struct end { };
- using G = detail::monadic_foldr1_helper<end, M, typename std::decay<F>::type>;
+ using G = detail::monadic_foldr1_helper<end, M, typename detail::decay<F>::type>;
decltype(auto) result = hana::monadic_fold_right<M>(
static_cast<Xs&&>(xs),
end{},
diff --git a/boost/hana/optional.hpp b/boost/hana/optional.hpp
index 772f90fbe0..f99a489d3d 100644
--- a/boost/hana/optional.hpp
+++ b/boost/hana/optional.hpp
@@ -15,6 +15,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/bool.hpp>
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/detail/operators/adl.hpp>
#include <boost/hana/detail/operators/comparable.hpp>
#include <boost/hana/detail/operators/monad.hpp>
@@ -115,7 +116,7 @@ BOOST_HANA_NAMESPACE_BEGIN
template <typename T>
constexpr auto make_just_t::operator()(T&& t) const {
- return hana::optional<typename std::decay<T>::type>(static_cast<T&&>(t));
+ return hana::optional<typename detail::decay<T>::type>(static_cast<T&&>(t));
}
//! @endcond
diff --git a/boost/hana/ordering.hpp b/boost/hana/ordering.hpp
index dfd94239f6..0be8bcaf6a 100644
--- a/boost/hana/ordering.hpp
+++ b/boost/hana/ordering.hpp
@@ -13,10 +13,9 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/fwd/ordering.hpp>
#include <boost/hana/config.hpp>
+#include <boost/hana/detail/decay.hpp>
#include <boost/hana/less.hpp>
-#include <type_traits>
-
BOOST_HANA_NAMESPACE_BEGIN
namespace detail {
@@ -37,7 +36,7 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @cond
template <typename F>
constexpr auto ordering_t::operator()(F&& f) const {
- return detail::less_by<typename std::decay<F>::type>{static_cast<F&&>(f)};
+ return detail::less_by<typename detail::decay<F>::type>{static_cast<F&&>(f)};
}
//! @endcond
BOOST_HANA_NAMESPACE_END
diff --git a/boost/hana/type.hpp b/boost/hana/type.hpp
index 71d3c89086..853c843fb1 100644
--- a/boost/hana/type.hpp
+++ b/boost/hana/type.hpp
@@ -70,13 +70,35 @@ BOOST_HANA_NAMESPACE_BEGIN
//! @endcond
//////////////////////////////////////////////////////////////////////////
+ // typeid_
+ //////////////////////////////////////////////////////////////////////////
+ namespace detail {
+ template <typename T, typename = type_tag>
+ struct typeid_t {
+ using type = typename std::remove_cv<
+ typename std::remove_reference<T>::type
+ >::type;
+ };
+
+ template <typename T>
+ struct typeid_t<T, typename hana::tag_of<T>::type> {
+ using type = typename std::remove_reference<T>::type::type;
+ };
+ }
+ //! @cond
+ template <typename T>
+ constexpr auto typeid_t::operator()(T&&) const
+ { return hana::type_c<typename detail::typeid_t<T>::type>; }
+ //! @endcond
+
+ //////////////////////////////////////////////////////////////////////////
// make<type_tag>
//////////////////////////////////////////////////////////////////////////
template <>
struct make_impl<type_tag> {
template <typename T>
static constexpr auto apply(T&& t)
- { return hana::decltype_(static_cast<T&&>(t)); }
+ { return hana::typeid_(static_cast<T&&>(t)); }
};
//////////////////////////////////////////////////////////////////////////
diff --git a/boost/hana/version.hpp b/boost/hana/version.hpp
index 232825bc65..b8481658bd 100644
--- a/boost/hana/version.hpp
+++ b/boost/hana/version.hpp
@@ -28,7 +28,7 @@ Distributed under the Boost Software License, Version 1.0.
//! @ingroup group-config
//! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`.
-#define BOOST_HANA_PATCH_VERSION 0
+#define BOOST_HANA_PATCH_VERSION 1
//! @ingroup group-config
//! Macro expanding to the full version of the library, in hexadecimal
diff --git a/boost/interprocess/detail/managed_memory_impl.hpp b/boost/interprocess/detail/managed_memory_impl.hpp
index 0a82230cbd..939dc6a971 100644..100755
--- a/boost/interprocess/detail/managed_memory_impl.hpp
+++ b/boost/interprocess/detail/managed_memory_impl.hpp
@@ -747,9 +747,9 @@ class create_open_func
}
}
- std::size_t get_min_size() const
+ static std::size_t get_min_size()
{
- const size_type sz = m_frontend->get_segment_manager()->get_min_size();
+ const size_type sz = BasicManagedMemoryImpl::segment_manager::get_min_size();
if(sz > std::size_t(-1)){
//The minimum size is not representable by std::size_t
BOOST_ASSERT(false);
diff --git a/boost/interprocess/detail/managed_multi_shared_memory.hpp b/boost/interprocess/detail/managed_multi_shared_memory.hpp
index 3d0ba669de..68799b02e6 100644..100755
--- a/boost/interprocess/detail/managed_multi_shared_memory.hpp
+++ b/boost/interprocess/detail/managed_multi_shared_memory.hpp
@@ -219,9 +219,9 @@ class basic_managed_multi_shared_memory
return false;
}
- std::size_t get_min_size() const
+ static std::size_t get_min_size()
{
- const size_type sz = mp_frontend->get_segment_manager()->get_min_size();
+ const size_type sz = self_t::segment_manager::get_min_size();
if(sz > std::size_t(-1)){
//The minimum size is not representable by std::size_t
BOOST_ASSERT(false);
diff --git a/boost/interprocess/detail/managed_open_or_create_impl.hpp b/boost/interprocess/detail/managed_open_or_create_impl.hpp
index 9351f391f9..9351f391f9 100644..100755
--- a/boost/interprocess/detail/managed_open_or_create_impl.hpp
+++ b/boost/interprocess/detail/managed_open_or_create_impl.hpp
diff --git a/boost/interprocess/detail/mpl.hpp b/boost/interprocess/detail/mpl.hpp
index 08167db7fb..3dd8d63e17 100644
--- a/boost/interprocess/detail/mpl.hpp
+++ b/boost/interprocess/detail/mpl.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2012.
+// (C) Copyright Ion Gaztanaga 2005-2016.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -66,18 +66,6 @@ struct enable_if : public enable_if_c<Cond::value, T> {};
template <class Cond, class T = void>
struct disable_if : public enable_if_c<!Cond::value, T> {};
-template <class T, class U>
-class is_convertible
-{
- typedef char true_t;
- class false_t { char dummy[2]; };
- static true_t dispatch(U);
- static false_t dispatch(...);
- static T trigger();
- public:
- static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
-};
-
template<
bool C
, typename T1
@@ -108,28 +96,6 @@ struct if_
};
-template <class Pair>
-struct select1st
-// : public std::unary_function<Pair, typename Pair::first_type>
-{
- template<class OtherPair>
- const typename Pair::first_type& operator()(const OtherPair& x) const
- { return x.first; }
-
- const typename Pair::first_type& operator()(const typename Pair::first_type& x) const
- { return x; }
-};
-
-// identity is an extension: it is not part of the standard.
-template <class T>
-struct identity
-// : public std::unary_function<T,T>
-{
- typedef T type;
- const T& operator()(const T& x) const
- { return x; }
-};
-
template<std::size_t S>
struct ls_zeros
{
diff --git a/boost/interprocess/detail/named_proxy.hpp b/boost/interprocess/detail/named_proxy.hpp
index 04030f2d4f..4bec375b67 100644
--- a/boost/interprocess/detail/named_proxy.hpp
+++ b/boost/interprocess/detail/named_proxy.hpp
@@ -34,6 +34,8 @@
#endif //#ifdef BOOST_INTERPROCESS_PERFECT_FORWARDING
#include <boost/container/detail/placement_new.hpp>
+#include <cstddef>
+
//!\file
//!Describes a proxy class that implements named allocation syntax.
@@ -74,15 +76,15 @@ struct CtorArgN : public placement_destroy<T>
}
private:
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void construct(void *mem, true_, const index_tuple<IdxPack...>&)
{ ::new((void*)mem, boost_container_new_t())T(*boost::forward<Args>(get<IdxPack>(args_))...); }
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void construct(void *mem, false_, const index_tuple<IdxPack...>&)
{ ::new((void*)mem, boost_container_new_t())T(boost::forward<Args>(get<IdxPack>(args_))...); }
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void do_increment(true_, const index_tuple<IdxPack...>&)
{
this->expansion_helper(++get<IdxPack>(args_)...);
@@ -92,7 +94,7 @@ struct CtorArgN : public placement_destroy<T>
void expansion_helper(ExpansionArgs &&...)
{}
- template<int ...IdxPack>
+ template<std::size_t ...IdxPack>
void do_increment(false_, const index_tuple<IdxPack...>&)
{}
diff --git a/boost/interprocess/detail/win32_api.hpp b/boost/interprocess/detail/win32_api.hpp
index f1bfee66d5..02c7b42706 100644
--- a/boost/interprocess/detail/win32_api.hpp
+++ b/boost/interprocess/detail/win32_api.hpp
@@ -64,9 +64,17 @@
//////////////////////////////////////////////////////////////////////////////
//Ignore -pedantic errors here (anonymous structs, etc.)
-#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-pedantic"
+#if defined(BOOST_GCC)
+# if (BOOST_GCC >= 40600)
+# pragma GCC diagnostic push
+# if (BOOST_GCC >= 60000)
+# pragma GCC diagnostic ignored "-Wpedantic"
+# else
+# pragma GCC diagnostic ignored "-pedantic"
+# endif
+# else
+# pragma GCC system_header
+# endif
#endif
namespace boost {
diff --git a/boost/interprocess/mapped_region.hpp b/boost/interprocess/mapped_region.hpp
index e5eee0bf79..4037a919db 100644
--- a/boost/interprocess/mapped_region.hpp
+++ b/boost/interprocess/mapped_region.hpp
@@ -876,7 +876,7 @@ struct null_mapped_region_function
bool operator()(void *, std::size_t , bool) const
{ return true; }
- std::size_t get_min_size() const
+ static std::size_t get_min_size()
{ return 0; }
};
diff --git a/boost/interprocess/offset_ptr.hpp b/boost/interprocess/offset_ptr.hpp
index d668fca6ba..fca444eaa4 100644
--- a/boost/interprocess/offset_ptr.hpp
+++ b/boost/interprocess/offset_ptr.hpp
@@ -22,6 +22,8 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/cast_tags.hpp>
@@ -180,14 +182,14 @@ namespace ipcdetail {
template<class From, class To, class Ret = void>
struct enable_if_convertible_equal_address
- : enable_if_c< is_convertible<From*, To*>::value
+ : enable_if_c< ::boost::is_convertible<From*, To*>::value
&& offset_ptr_maintains_address<From, To>::value
, Ret>
{};
template<class From, class To, class Ret = void>
struct enable_if_convertible_unequal_address
- : enable_if_c< is_convertible<From*, To*>::value
+ : enable_if_c< ::boost::is_convertible<From*, To*>::value
&& !offset_ptr_maintains_address<From, To>::value
, Ret>
{};
@@ -256,7 +258,7 @@ class offset_ptr
//!Never throws.
template <class T>
BOOST_INTERPROCESS_FORCEINLINE offset_ptr( T *ptr
- , typename ipcdetail::enable_if< ipcdetail::is_convertible<T*, PointedType*> >::type * = 0) BOOST_NOEXCEPT
+ , typename ipcdetail::enable_if< ::boost::is_convertible<T*, PointedType*> >::type * = 0) BOOST_NOEXCEPT
: internal(static_cast<OffsetType>
(ipcdetail::offset_ptr_to_offset(static_cast<PointedType*>(ptr), this)))
{}
@@ -375,7 +377,7 @@ class offset_ptr
template<class T2> BOOST_INTERPROCESS_FORCEINLINE
#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
typename ipcdetail::enable_if_c
- < ipcdetail::is_convertible<T2*, PointedType*>::value, offset_ptr&>::type
+ < ::boost::is_convertible<T2*, PointedType*>::value, offset_ptr&>::type
#else
offset_ptr&
#endif
diff --git a/boost/interprocess/sync/shm/named_creation_functor.hpp b/boost/interprocess/sync/shm/named_creation_functor.hpp
index b4cc7786cb..137a1a8ea7 100644
--- a/boost/interprocess/sync/shm/named_creation_functor.hpp
+++ b/boost/interprocess/sync/shm/named_creation_functor.hpp
@@ -66,7 +66,7 @@ class named_creation_functor
}
}
- std::size_t get_min_size() const
+ static std::size_t get_min_size()
{ return sizeof(T); }
private:
diff --git a/boost/intrusive/any_hook.hpp b/boost/intrusive/any_hook.hpp
index 809507c3bf..6d187812a6 100644
--- a/boost/intrusive/any_hook.hpp
+++ b/boost/intrusive/any_hook.hpp
@@ -48,7 +48,8 @@ struct make_any_base_hook
>::type packed_options;
typedef generic_hook
- < any_algorithms<typename packed_options::void_pointer>
+ < AnyAlgorithm
+ , any_node_traits<typename packed_options::void_pointer>
, typename packed_options::tag
, packed_options::link_mode
, AnyBaseHookId
@@ -153,7 +154,8 @@ struct make_any_member_hook
>::type packed_options;
typedef generic_hook
- < any_algorithms<typename packed_options::void_pointer>
+ < AnyAlgorithm
+ , any_node_traits<typename packed_options::void_pointer>
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/intrusive/avl_set.hpp b/boost/intrusive/avl_set.hpp
index 2c962046e5..d150140abd 100644
--- a/boost/intrusive/avl_set.hpp
+++ b/boost/intrusive/avl_set.hpp
@@ -26,6 +26,11 @@
namespace boost {
namespace intrusive {
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class avl_multiset_impl;
+#endif
+
//! The class template avl_set is an intrusive container, that mimics most of
//! the interface of std::set as described in the C++ standard.
//!
@@ -150,6 +155,15 @@ class avl_set_impl
//! @copydoc ::boost::intrusive::avltree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::avltree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::avltree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::avltree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
static avl_set_impl &container_from_end_iterator(iterator end_iterator);
@@ -399,6 +413,26 @@ class avl_set_impl
//! @copydoc ::boost::intrusive::avltree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_unique
+ template<class ...Options2>
+ void merge(avl_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_unique
+ template<class ...Options2>
+ void merge(avl_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -658,6 +692,15 @@ class avl_multiset_impl
//! @copydoc ::boost::intrusive::avltree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::avltree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::avltree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::avltree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
static avl_multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -865,6 +908,25 @@ class avl_multiset_impl
//! @copydoc ::boost::intrusive::avltree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_equal
+ template<class ...Options2>
+ void merge(avl_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::avltree::merge_equal
+ template<class ...Options2>
+ void merge(avl_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/avl_set_hook.hpp b/boost/intrusive/avl_set_hook.hpp
index b61f95f2f0..187130365b 100644
--- a/boost/intrusive/avl_set_hook.hpp
+++ b/boost/intrusive/avl_set_hook.hpp
@@ -47,7 +47,8 @@ struct make_avl_set_base_hook
::type packed_options;
typedef generic_hook
- < avltree_algorithms<avltree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> >
+ < AvlTreeAlgorithms
+ , avltree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, typename packed_options::tag
, packed_options::link_mode
, AvlTreeBaseHookId
@@ -177,7 +178,8 @@ struct make_avl_set_member_hook
::type packed_options;
typedef generic_hook
- < avltree_algorithms<avltree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> >
+ < AvlTreeAlgorithms
+ , avltree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/intrusive/avltree.hpp b/boost/intrusive/avltree.hpp
index 741d482827..cdc9b75d60 100644
--- a/boost/intrusive/avltree.hpp
+++ b/boost/intrusive/avltree.hpp
@@ -189,6 +189,15 @@ class avltree_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static avltree_impl &container_from_end_iterator(iterator end_iterator);
@@ -427,6 +436,14 @@ class avltree_impl
//! @copydoc ::boost::intrusive::bstree::remove_node
void remove_node(reference value);
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(avltree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(avltree<T, Options2...> &);
+
friend bool operator< (const avltree_impl &x, const avltree_impl &y);
friend bool operator==(const avltree_impl &x, const avltree_impl &y);
diff --git a/boost/intrusive/avltree_algorithms.hpp b/boost/intrusive/avltree_algorithms.hpp
index 60a981c381..1459851fb4 100644
--- a/boost/intrusive/avltree_algorithms.hpp
+++ b/boost/intrusive/avltree_algorithms.hpp
@@ -269,14 +269,35 @@ class avltree_algorithms
{
typename bstree_algo::data_for_rebalance info;
bstree_algo::erase(header, z, info);
- if(info.y != z){
- NodeTraits::set_balance(info.y, NodeTraits::get_balance(z));
- }
- //Rebalance avltree
- rebalance_after_erasure(header, info.x, info.x_parent);
+ rebalance_after_erasure(header, z, info);
return z;
}
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
+ if(transferred){
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+ return transferred;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::transfer_equal(header1, comp, header2, z, info);
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
template <class Cloner, class Disposer>
static void clone
@@ -461,7 +482,17 @@ class avltree_algorithms
return true;
}
- static void rebalance_after_erasure(const node_ptr & header, node_ptr x, node_ptr x_parent)
+ static void rebalance_after_erasure
+ ( const node_ptr & header, const node_ptr &z, const typename bstree_algo::data_for_rebalance &info)
+ {
+ if(info.y != z){
+ NodeTraits::set_balance(info.y, NodeTraits::get_balance(z));
+ }
+ //Rebalance avltree
+ rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
+ }
+
+ static void rebalance_after_erasure_restore_invariants(const node_ptr & header, node_ptr x, node_ptr x_parent)
{
for ( node_ptr root = NodeTraits::get_parent(header)
; x != root
diff --git a/boost/intrusive/bs_set.hpp b/boost/intrusive/bs_set.hpp
index 60f18a16a9..693b6d855c 100644
--- a/boost/intrusive/bs_set.hpp
+++ b/boost/intrusive/bs_set.hpp
@@ -23,6 +23,11 @@
# pragma once
#endif
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class bs_multiset_impl;
+#endif
+
namespace boost {
namespace intrusive {
@@ -147,6 +152,15 @@ class bs_set_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static bs_set_impl &container_from_end_iterator(iterator end_iterator);
@@ -396,6 +410,26 @@ class bs_set_impl
//! @copydoc ::boost::intrusive::bstree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class ...Options2>
+ void merge(bs_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class ...Options2>
+ void merge(bs_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -654,6 +688,15 @@ class bs_multiset_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static bs_multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -861,6 +904,25 @@ class bs_multiset_impl
//! @copydoc ::boost::intrusive::bstree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class ...Options2>
+ void merge(bs_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class ...Options2>
+ void merge(bs_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/bs_set_hook.hpp b/boost/intrusive/bs_set_hook.hpp
index e96248b4ec..a64c15ace5 100644
--- a/boost/intrusive/bs_set_hook.hpp
+++ b/boost/intrusive/bs_set_hook.hpp
@@ -47,7 +47,8 @@ struct make_bs_set_base_hook
::type packed_options;
typedef generic_hook
- < bstree_algorithms<tree_node_traits<typename packed_options::void_pointer> >
+ < BsTreeAlgorithms
+ , tree_node_traits<typename packed_options::void_pointer>
, typename packed_options::tag
, packed_options::link_mode
, BsTreeBaseHookId
@@ -176,7 +177,8 @@ struct make_bs_set_member_hook
::type packed_options;
typedef generic_hook
- < bstree_algorithms<tree_node_traits<typename packed_options::void_pointer> >
+ < BsTreeAlgorithms
+ , tree_node_traits<typename packed_options::void_pointer>
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/intrusive/bstree.hpp b/boost/intrusive/bstree.hpp
index 0fb921887d..f2cdb428b4 100644
--- a/boost/intrusive/bstree.hpp
+++ b/boost/intrusive/bstree.hpp
@@ -105,7 +105,7 @@ struct bstbase3
struct holder_t : public ValueTraits
{
- explicit holder_t(const ValueTraits &vtraits)
+ BOOST_INTRUSIVE_FORCEINLINE explicit holder_t(const ValueTraits &vtraits)
: ValueTraits(vtraits)
{}
header_holder_type root;
@@ -121,34 +121,34 @@ struct bstbase3
return *base;
}
- bstbase3(const ValueTraits &vtraits)
+ BOOST_INTRUSIVE_FORCEINLINE bstbase3(const ValueTraits &vtraits)
: holder(vtraits)
{
node_algorithms::init_header(this->header_ptr());
}
- node_ptr header_ptr()
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr header_ptr()
{ return holder.root.get_node(); }
- const_node_ptr header_ptr() const
+ BOOST_INTRUSIVE_FORCEINLINE const_node_ptr header_ptr() const
{ return holder.root.get_node(); }
- const value_traits &get_value_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE const value_traits &get_value_traits() const
{ return this->holder; }
- value_traits &get_value_traits()
+ BOOST_INTRUSIVE_FORCEINLINE value_traits &get_value_traits()
{ return this->holder; }
typedef typename boost::intrusive::value_traits_pointers
<ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
- const_value_traits_ptr priv_value_traits_ptr() const
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
{ return pointer_traits<const_value_traits_ptr>::pointer_to(this->get_value_traits()); }
iterator begin()
{ return iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
- const_iterator begin() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
{ return cbegin(); }
const_iterator cbegin() const
@@ -157,37 +157,37 @@ struct bstbase3
iterator end()
{ return iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
- const_iterator end() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
{ return cend(); }
- const_iterator cend() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
{ return const_iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
- iterator root()
+ BOOST_INTRUSIVE_FORCEINLINE iterator root()
{ return iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
- const_iterator root() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator root() const
{ return croot(); }
- const_iterator croot() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator croot() const
{ return const_iterator(node_algorithms::root_node(this->header_ptr()), this->priv_value_traits_ptr()); }
- reverse_iterator rbegin()
+ BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rbegin()
{ return reverse_iterator(end()); }
- const_reverse_iterator rbegin() const
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rbegin() const
{ return const_reverse_iterator(end()); }
- const_reverse_iterator crbegin() const
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crbegin() const
{ return const_reverse_iterator(end()); }
- reverse_iterator rend()
+ BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rend()
{ return reverse_iterator(begin()); }
- const_reverse_iterator rend() const
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rend() const
{ return const_reverse_iterator(begin()); }
- const_reverse_iterator crend() const
+ BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crend() const
{ return const_reverse_iterator(begin()); }
void replace_node(iterator replace_this, reference with_this)
@@ -199,7 +199,7 @@ struct bstbase3
node_algorithms::init(replace_this.pointed_node());
}
- void rebalance()
+ BOOST_INTRUSIVE_FORCEINLINE void rebalance()
{ node_algorithms::rebalance(this->header_ptr()); }
iterator rebalance_subtree(iterator root)
@@ -223,7 +223,7 @@ struct bstbase3
const_iterator iterator_to(const_reference value) const
{ return const_iterator (this->get_value_traits().to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), this->priv_value_traits_ptr()); }
- static void init_node(reference value)
+ BOOST_INTRUSIVE_FORCEINLINE static void init_node(reference value)
{ node_algorithms::init(value_traits::to_node_ptr(value)); }
};
@@ -252,17 +252,18 @@ struct get_key_of_value<void, T>
typedef ::boost::intrusive::detail::identity<T> type;
};
-template<class T, class VoidOrKeyOfValue, class VoidOrKeyComp>
+template<class ValuePtr, class VoidOrKeyOfValue, class VoidOrKeyComp>
struct bst_key_types
{
+ typedef typename pointer_element<ValuePtr>::type value_type;
typedef typename get_key_of_value
- < VoidOrKeyOfValue, T>::type key_of_value;
- typedef typename key_of_value::type key_type;
+ < VoidOrKeyOfValue, value_type>::type key_of_value;
+ typedef typename key_of_value::type key_type;
typedef typename get_compare< VoidOrKeyComp
, key_type
- >::type key_compare;
+ >::type key_compare;
typedef tree_value_compare
- <key_type, T, key_compare, key_of_value> value_compare;
+ <ValuePtr, key_compare, key_of_value> value_compare;
};
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, algo_types AlgoType, typename HeaderHolder>
@@ -271,15 +272,16 @@ struct bstbase2
//Use public inheritance to avoid MSVC bugs with closures
: public detail::ebo_functor_holder
< typename bst_key_types
- < typename ValueTraits::value_type
+ < typename ValueTraits::pointer
, VoidOrKeyOfValue
, VoidOrKeyComp
+
>::value_compare
>
, public bstbase3<ValueTraits, AlgoType, HeaderHolder>
{
typedef bstbase3<ValueTraits, AlgoType, HeaderHolder> treeheader_t;
- typedef bst_key_types< typename ValueTraits::value_type
+ typedef bst_key_types< typename ValueTraits::pointer
, VoidOrKeyOfValue
, VoidOrKeyComp> key_types;
typedef typename treeheader_t::value_traits value_traits;
@@ -311,17 +313,17 @@ struct bstbase2
typedef BOOST_INTRUSIVE_IMPDEF(typename pointer_traits<const_pointer>::difference_type) difference_type;
typedef typename node_algorithms::insert_commit_data insert_commit_data;
- value_compare value_comp() const
+ BOOST_INTRUSIVE_FORCEINLINE value_compare value_comp() const
{ return this->comp(); }
- key_compare key_comp() const
+ BOOST_INTRUSIVE_FORCEINLINE key_compare key_comp() const
{ return this->comp().key_comp(); }
//lower_bound
- iterator lower_bound(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE iterator lower_bound(const key_type &key)
{ return this->lower_bound(key, this->key_comp()); }
- const_iterator lower_bound(const key_type &key) const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator lower_bound(const key_type &key) const
{ return this->lower_bound(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -339,7 +341,7 @@ struct bstbase2
}
//upper_bound
- iterator upper_bound(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE iterator upper_bound(const key_type &key)
{ return this->upper_bound(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -349,7 +351,7 @@ struct bstbase2
(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
}
- const_iterator upper_bound(const key_type &key) const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator upper_bound(const key_type &key) const
{ return this->upper_bound(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -364,13 +366,13 @@ struct bstbase2
{ typedef detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value> type; };
template<class KeyTypeKeyCompare>
- typename key_node_comp_ret<KeyTypeKeyCompare>::type key_node_comp(KeyTypeKeyCompare comp) const
+ BOOST_INTRUSIVE_FORCEINLINE typename key_node_comp_ret<KeyTypeKeyCompare>::type key_node_comp(KeyTypeKeyCompare comp) const
{
return detail::key_nodeptr_comp<KeyTypeKeyCompare, value_traits, key_of_value>(comp, &this->get_value_traits());
}
//find
- iterator find(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
{ return this->find(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -380,7 +382,7 @@ struct bstbase2
(node_algorithms::find(this->header_ptr(), key, this->key_node_comp(comp)), this->priv_value_traits_ptr());
}
- const_iterator find(const key_type &key) const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
{ return this->find(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -391,7 +393,7 @@ struct bstbase2
}
//equal_range
- std::pair<iterator,iterator> equal_range(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
{ return this->equal_range(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -403,7 +405,7 @@ struct bstbase2
, iterator(ret.second, this->priv_value_traits_ptr()));
}
- std::pair<const_iterator, const_iterator>
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
equal_range(const key_type &key) const
{ return this->equal_range(key, this->key_comp()); }
@@ -418,7 +420,7 @@ struct bstbase2
}
//lower_bound_range
- std::pair<iterator,iterator> lower_bound_range(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> lower_bound_range(const key_type &key)
{ return this->lower_bound_range(key, this->key_comp()); }
template<class KeyType, class KeyTypeKeyCompare>
@@ -430,7 +432,7 @@ struct bstbase2
, iterator(ret.second, this->priv_value_traits_ptr()));
}
- std::pair<const_iterator, const_iterator>
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
lower_bound_range(const key_type &key) const
{ return this->lower_bound_range(key, this->key_comp()); }
@@ -445,7 +447,7 @@ struct bstbase2
}
//bounded_range
- std::pair<iterator,iterator> bounded_range
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> bounded_range
(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed)
{ return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
@@ -460,7 +462,7 @@ struct bstbase2
, iterator(ret.second, this->priv_value_traits_ptr()));
}
- std::pair<const_iterator,const_iterator> bounded_range
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator,const_iterator> bounded_range
(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const
{ return this->bounded_range(lower_key, upper_key, this->key_comp(), left_closed, right_closed); }
@@ -476,11 +478,11 @@ struct bstbase2
}
//insert_unique_check
- std::pair<iterator, bool> insert_unique_check
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
(const key_type &key, insert_commit_data &commit_data)
{ return this->insert_unique_check(key, this->key_comp(), commit_data); }
- std::pair<iterator, bool> insert_unique_check
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
(const_iterator hint, const key_type &key, insert_commit_data &commit_data)
{ return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
@@ -525,7 +527,7 @@ struct bstbase_hack
typedef typename get_algo
<AlgoType, node_traits>::type algo_type;
- bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
+ BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
: base_type(comp, vtraits)
{
this->sz_traits().set_size(size_type(0));
@@ -533,10 +535,10 @@ struct bstbase_hack
typedef detail::size_holder<ConstantTimeSize, SizeType> size_traits;
- size_traits &sz_traits()
+ BOOST_INTRUSIVE_FORCEINLINE size_traits &sz_traits()
{ return static_cast<size_traits &>(*this); }
- const size_traits &sz_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE const size_traits &sz_traits() const
{ return static_cast<const size_traits &>(*this); }
};
@@ -548,24 +550,16 @@ struct bstbase_hack<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, false, SizeTyp
typedef bstbase2< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, AlgoType, HeaderHolder> base_type;
typedef typename base_type::value_compare value_compare;
typedef typename base_type::key_compare key_compare;
- bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
+ BOOST_INTRUSIVE_FORCEINLINE bstbase_hack(const key_compare & comp, const ValueTraits &vtraits)
: base_type(comp, vtraits)
{}
typedef detail::size_holder<false, SizeType> size_traits;
- size_traits &sz_traits()
- { return s_size_traits; }
-
- const size_traits &sz_traits() const
- { return s_size_traits; }
-
- static size_traits s_size_traits;
+ BOOST_INTRUSIVE_FORCEINLINE size_traits sz_traits() const
+ { return size_traits(); }
};
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class SizeType, algo_types AlgoType, typename HeaderHolder>
-detail::size_holder<false, SizeType> bstbase_hack<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, false, SizeType, AlgoType, HeaderHolder>::s_size_traits;
-
//This class will
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, bool ConstantTimeSize, class SizeType, algo_types AlgoType, typename HeaderHolder>
struct bstbase
@@ -584,7 +578,7 @@ struct bstbase
<AlgoType, node_traits>::type node_algorithms;
typedef SizeType size_type;
- bstbase(const key_compare & comp, const ValueTraits &vtraits)
+ BOOST_INTRUSIVE_FORCEINLINE bstbase(const key_compare & comp, const ValueTraits &vtraits)
: base_type(comp, vtraits)
{}
@@ -740,7 +734,7 @@ class bstree_impl
//! <b>Effects</b>: to-do
//!
- bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
+ BOOST_INTRUSIVE_FORCEINLINE bstree_impl& operator=(BOOST_RV_REF(bstree_impl) x)
{ this->swap(x); return *this; }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
@@ -844,6 +838,27 @@ class bstree_impl
//! <b>Throws</b>: Nothing.
const_reverse_iterator crend() const;
+ //! <b>Effects</b>: Returns a iterator pointing to the root node of the container or end() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator root();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator root() const;
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator croot() const;
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Precondition</b>: end_iterator must be a valid end iterator
@@ -955,11 +970,7 @@ class bstree_impl
::boost::adl_move_swap(this->comp(), this->comp());
//These can't throw
node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
- if(constant_time_size){
- size_type backup = this->sz_traits().get_size();
- this->sz_traits().set_size(other.sz_traits().get_size());
- other.sz_traits().set_size(backup);
- }
+ this->sz_traits().swap(other.sz_traits());
}
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -1175,6 +1186,36 @@ class bstree_impl
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing an iterator to the already present value
+ //! and false. If the value can be inserted returns true in the returned
+ //! pair boolean and fills "commit_data" that is meant to be used with
+ //! the "insert_commit" function.
+ //!
+ //! <b>Complexity</b>: Average complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
+ std::pair<iterator, bool> insert_unique_check(const key_type &key, insert_commit_data &commit_data);
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the container, using
+ //! a user provided key instead of the value itself, using "hint"
+ //! as a hint to where it will be inserted.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing an iterator to the already present value
+ //! and false. If the value can be inserted returns true in the returned
+ //! pair boolean and fills "commit_data" that is meant to be used with
+ //! the "insert_commit" function.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but it's amortized
+ //! constant time if t is inserted immediately before hint.
+ //!
+ //! <b>Throws</b>: If the comp ordering function throws. Strong guarantee.
+ std::pair<iterator, bool> insert_unique_check(const_iterator hint, const key_type &key, insert_commit_data &commit_data);
+
//! <b>Requires</b>: comp must be a comparison function that induces
//! the same strict weak ordering as key_compare. The difference is that
//! comp compares an arbitrary key with the contained values.
@@ -1926,6 +1967,78 @@ class bstree_impl
node_algorithms::init(to_remove);
}
+ //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
+ //! function from *this.
+ //!
+ //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
+ //! the comparison object of *this. If there is an element in a with key equivalent to the
+ //! key of an element from source, then that element is not extracted from source.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ template<class T, class ...Options2> void merge_unique(bstree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(bstree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ if( node_algorithms::transfer_unique(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p) ){
+ source.sz_traits().decrement();
+ this->sz_traits().increment();
+ }
+ }
+ }
+
+ //! <b>Requires</b>: "source" container's Options can only can differ in the comparison
+ //! function from *this.
+ //!
+ //! <b>Effects</b>: Extracts each element in source and insert it into a using
+ //! the comparison object of *this.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ template<class T, class ...Options2> void merge_equal(bstree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(bstree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, AlgoType, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ node_algorithms::transfer_equal(this->header_ptr(), this->key_node_comp(this->key_comp()), source.header_ptr(), p);
+ source.sz_traits().decrement();
+ this->sz_traits().increment();
+ }
+ }
+
//! <b>Effects</b>: Asserts the integrity of the container with additional checks provided by the user.
//!
//! <b>Complexity</b>: Linear time.
diff --git a/boost/intrusive/bstree_algorithms.hpp b/boost/intrusive/bstree_algorithms.hpp
index dcb7e5c4ff..e8caee0c94 100644
--- a/boost/intrusive/bstree_algorithms.hpp
+++ b/boost/intrusive/bstree_algorithms.hpp
@@ -63,14 +63,16 @@ struct bstree_node_checker
struct return_type
: public base_checker_t::return_type
{
- return_type() : min_key_node_ptr(const_node_ptr()), max_key_node_ptr(const_node_ptr()), node_count(0) {}
+ BOOST_INTRUSIVE_FORCEINLINE return_type()
+ : min_key_node_ptr(const_node_ptr()), max_key_node_ptr(const_node_ptr()), node_count(0)
+ {}
const_node_ptr min_key_node_ptr;
const_node_ptr max_key_node_ptr;
size_t node_count;
};
- bstree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
+ BOOST_INTRUSIVE_FORCEINLINE bstree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
: base_checker_t(extra_checker), comp_(comp)
{}
@@ -182,14 +184,14 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
template<class Disposer>
struct dispose_subtree_disposer
{
- dispose_subtree_disposer(Disposer &disp, const node_ptr & subtree)
+ BOOST_INTRUSIVE_FORCEINLINE dispose_subtree_disposer(Disposer &disp, const node_ptr & subtree)
: disposer_(&disp), subtree_(subtree)
{}
- void release()
+ BOOST_INTRUSIVE_FORCEINLINE void release()
{ disposer_ = 0; }
- ~dispose_subtree_disposer()
+ BOOST_INTRUSIVE_FORCEINLINE ~dispose_subtree_disposer()
{
if(disposer_){
dispose_subtree(subtree_, *disposer_);
@@ -209,7 +211,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant time.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr begin_node(const const_node_ptr & header)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr begin_node(const const_node_ptr & header)
{ return node_traits::get_left(header); }
//! <b>Requires</b>: 'header' is the header node of a tree.
@@ -219,7 +221,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant time.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr end_node(const const_node_ptr & header)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const const_node_ptr & header)
{ return detail::uncast(header); }
//! <b>Requires</b>: 'header' is the header node of a tree.
@@ -229,7 +231,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant time.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr root_node(const const_node_ptr & header)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr root_node(const const_node_ptr & header)
{
node_ptr p = node_traits::get_parent(header);
return p ? p : detail::uncast(header);
@@ -243,7 +245,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant time.
//!
//! <b>Throws</b>: Nothing.
- static bool unique(const const_node_ptr & node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
{ return !NodeTraits::get_parent(node); }
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
@@ -443,7 +445,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! new_node is not equivalent to node_to_be_replaced according to the
//! ordering rules. This function is faster than erasing and inserting
//! the node, since no rebalancing and comparison is needed. Experimental function
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node)
{
if(node_to_be_replaced == new_node)
return;
@@ -554,7 +556,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Throws</b>: Nothing.
//!
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- static void init(const node_ptr & node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
{
NodeTraits::set_parent(node, node_ptr());
NodeTraits::set_left(node, node_ptr());
@@ -566,7 +568,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant.
//!
//! <b>Throws</b>: Nothing.
- static bool inited(const const_node_ptr & node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
{
return !NodeTraits::get_parent(node) &&
!NodeTraits::get_left(node) &&
@@ -583,7 +585,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Throws</b>: Nothing.
//!
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- static void init_header(const node_ptr & header)
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & header)
{
NodeTraits::set_parent(header, node_ptr());
NodeTraits::set_left(header, header);
@@ -865,7 +867,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//!
//! <b>Throws</b>: If "comp" throws.
template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
+ BOOST_INTRUSIVE_FORCEINLINE static std::pair<node_ptr, node_ptr> equal_range
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
{
return bounded_range(header, key, key, comp, true, true);
@@ -909,7 +911,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//!
//! <b>Throws</b>: If "comp" throws.
template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr lower_bound
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
{
return lower_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
@@ -927,7 +929,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//!
//! <b>Throws</b>: If "comp" throws.
template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr upper_bound
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
{
return upper_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
@@ -950,7 +952,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
//! previously executed to fill "commit_data". No value should be inserted or
//! erased between the "insert_check" and "insert_commit" calls.
- static void insert_unique_commit
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
(const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data)
{ return insert_commit(header, new_value, commit_data); }
@@ -1311,12 +1313,49 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Amortized constant time.
//!
//! <b>Throws</b>: Nothing.
- static void erase(const node_ptr & header, const node_ptr & z)
+ BOOST_INTRUSIVE_FORCEINLINE static void erase(const node_ptr & header, const node_ptr & z)
{
data_for_rebalance ignored;
erase(header, z, ignored);
}
+ //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
+ //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
+ //! function of tree1..
+ //!
+ //! <b>Effects</b>: Transfers node "z" from tree1 to tree2 if tree1 does not contain
+ //! a node that is equivalent to z.
+ //!
+ //! <b>Returns</b>: True if the node was trasferred, false otherwise.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If the comparison throws.
+ template<class NodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ data_for_rebalance ignored;
+ return transfer_unique(header1, comp, header2, z, ignored);
+ }
+
+ //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
+ //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
+ //! function of tree1..
+ //!
+ //! <b>Effects</b>: Transfers node "z" from tree1 to tree2.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If the comparison throws.
+ template<class NodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ data_for_rebalance ignored;
+ transfer_equal(header1, comp, header2, z, ignored);
+ }
+
//! <b>Requires</b>: node is a tree node but not the header.
//!
//! <b>Effects</b>: Unlinks the node and rebalances the tree.
@@ -1431,6 +1470,30 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
}
protected:
+
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z, data_for_rebalance &info)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z, info);
+ insert_commit(header1, z, commit_data);
+ }
+ return transferable;
+ }
+
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z, data_for_rebalance &info)
+ {
+ insert_commit_data commit_data;
+ insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z, info);
+ insert_commit(header1, z, commit_data);
+ }
+
static void erase(const node_ptr & header, const node_ptr & z, data_for_rebalance &info)
{
node_ptr y(z);
@@ -1563,7 +1626,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant.
//!
//! <b>Throws</b>: Nothing.
- static bool is_left_child(const node_ptr & p)
+ BOOST_INTRUSIVE_FORCEINLINE static bool is_left_child(const node_ptr & p)
{ return NodeTraits::get_left(NodeTraits::get_parent(p)) == p; }
//! <b>Requires</b>: p is a node of a tree.
@@ -1573,7 +1636,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Constant.
//!
//! <b>Throws</b>: Nothing.
- static bool is_right_child(const node_ptr & p)
+ BOOST_INTRUSIVE_FORCEINLINE static bool is_right_child(const node_ptr & p)
{ return NodeTraits::get_right(NodeTraits::get_parent(p)) == p; }
static void insert_before_check
diff --git a/boost/intrusive/circular_list_algorithms.hpp b/boost/intrusive/circular_list_algorithms.hpp
index f3430455ae..72eae326d1 100644
--- a/boost/intrusive/circular_list_algorithms.hpp
+++ b/boost/intrusive/circular_list_algorithms.hpp
@@ -67,7 +67,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init(const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr &this_node)
{
const node_ptr null_node((node_ptr()));
NodeTraits::set_next(this_node, null_node);
@@ -80,7 +80,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static bool inited(const const_node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr &this_node)
{ return !NodeTraits::get_next(this_node); }
//! <b>Effects</b>: Constructs an empty list, making this_node the only
@@ -91,7 +91,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init_header(const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr &this_node)
{
NodeTraits::set_next(this_node, this_node);
NodeTraits::set_previous(this_node, this_node);
@@ -106,7 +106,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static bool unique(const const_node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr &this_node)
{
node_ptr next = NodeTraits::get_next(this_node);
return !next || next == this_node;
@@ -138,7 +138,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static node_ptr unlink(const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr unlink(const node_ptr &this_node)
{
node_ptr next(NodeTraits::get_next(this_node));
node_ptr prev(NodeTraits::get_previous(this_node));
@@ -154,7 +154,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void unlink(const node_ptr &b, const node_ptr &e)
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink(const node_ptr &b, const node_ptr &e)
{
if (b != e) {
node_ptr prevb(NodeTraits::get_previous(b));
@@ -170,14 +170,14 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void link_before(const node_ptr &nxt_node, const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void link_before(const node_ptr &nxt_node, const node_ptr &this_node)
{
node_ptr prev(NodeTraits::get_previous(nxt_node));
NodeTraits::set_previous(this_node, prev);
NodeTraits::set_next(this_node, nxt_node);
//nxt_node might be an alias for prev->next_
//so use it before NodeTraits::set_next(prev, ...)
- //is called and the reference changes it's value
+ //is called and the reference changes its value
NodeTraits::set_previous(nxt_node, this_node);
NodeTraits::set_next(prev, this_node);
}
@@ -189,7 +189,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void link_after(const node_ptr &prev_node, const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr &prev_node, const node_ptr &this_node)
{
node_ptr next(NodeTraits::get_next(prev_node));
NodeTraits::set_previous(this_node, prev_node);
@@ -435,14 +435,14 @@ class circular_list_algorithms
}
private:
- static void swap_prev(const node_ptr &this_node, const node_ptr &other_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void swap_prev(const node_ptr &this_node, const node_ptr &other_node)
{
node_ptr temp(NodeTraits::get_previous(this_node));
NodeTraits::set_previous(this_node, NodeTraits::get_previous(other_node));
NodeTraits::set_previous(other_node, temp);
}
- static void swap_next(const node_ptr &this_node, const node_ptr &other_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void swap_next(const node_ptr &this_node, const node_ptr &other_node)
{
node_ptr temp(NodeTraits::get_next(this_node));
NodeTraits::set_next(this_node, NodeTraits::get_next(other_node));
diff --git a/boost/intrusive/circular_slist_algorithms.hpp b/boost/intrusive/circular_slist_algorithms.hpp
index 951a40ab87..da840ef0c1 100644
--- a/boost/intrusive/circular_slist_algorithms.hpp
+++ b/boost/intrusive/circular_slist_algorithms.hpp
@@ -141,7 +141,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init_header(const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr &this_node)
{ NodeTraits::set_next(this_node, this_node); }
//! <b>Requires</b>: this_node and prev_init_node must be in the same circular list.
@@ -153,7 +153,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_node(const node_ptr &prev_init_node, const node_ptr &this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr &prev_init_node, const node_ptr &this_node)
{ return base_t::get_previous_node(prev_init_node, this_node); }
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
@@ -163,7 +163,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_node(const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & this_node)
{ return base_t::get_previous_node(this_node, this_node); }
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
@@ -173,7 +173,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_previous_node(const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_previous_node(const node_ptr & this_node)
{ return get_previous_previous_node(this_node, this_node); }
//! <b>Requires</b>: this_node and p must be in the same circular list.
@@ -223,7 +223,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements in the circular list
//!
//! <b>Throws</b>: Nothing.
- static void unlink(const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink(const node_ptr & this_node)
{
if(NodeTraits::get_next(this_node))
base_t::unlink_after(get_previous_node(this_node));
@@ -236,7 +236,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
//!
//! <b>Throws</b>: Nothing.
- static void link_before (const node_ptr & nxt_node, const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void link_before (const node_ptr & nxt_node, const node_ptr & this_node)
{ base_t::link_after(get_previous_node(nxt_node), this_node); }
//! <b>Requires</b>: this_node and other_node must be nodes inserted
diff --git a/boost/intrusive/detail/algo_type.hpp b/boost/intrusive/detail/algo_type.hpp
index 6da48e9e79..70ec63f574 100644
--- a/boost/intrusive/detail/algo_type.hpp
+++ b/boost/intrusive/detail/algo_type.hpp
@@ -35,7 +35,10 @@ enum algo_types
AvlTreeAlgorithms,
SgTreeAlgorithms,
SplayTreeAlgorithms,
- TreapAlgorithms
+ TreapAlgorithms,
+ UnorderedAlgorithms,
+ UnorderedCircularSlistAlgorithms,
+ AnyAlgorithm
};
template<algo_types AlgoType, class NodeTraits>
diff --git a/boost/intrusive/detail/any_node_and_algorithms.hpp b/boost/intrusive/detail/any_node_and_algorithms.hpp
index 4b087b582b..26a1edcd3e 100644
--- a/boost/intrusive/detail/any_node_and_algorithms.hpp
+++ b/boost/intrusive/detail/any_node_and_algorithms.hpp
@@ -23,8 +23,9 @@
#include <boost/intrusive/detail/workaround.hpp>
#include <boost/intrusive/pointer_rebind.hpp>
-#include <cstddef>
#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <cstddef>
namespace boost {
namespace intrusive {
@@ -279,6 +280,17 @@ class any_algorithms
}
};
+///@cond
+
+template<class NodeTraits>
+struct get_algo<AnyAlgorithm, NodeTraits>
+{
+ typedef typename pointer_rebind<typename NodeTraits::node_ptr, void>::type void_pointer;
+ typedef any_algorithms<void_pointer> type;
+};
+
+///@endcond
+
} //namespace intrusive
} //namespace boost
diff --git a/boost/intrusive/detail/common_slist_algorithms.hpp b/boost/intrusive/detail/common_slist_algorithms.hpp
index c6fa289a23..5e6ff4d1aa 100644
--- a/boost/intrusive/detail/common_slist_algorithms.hpp
+++ b/boost/intrusive/detail/common_slist_algorithms.hpp
@@ -52,34 +52,34 @@ class common_slist_algorithms
return p;
}
- static void init(const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & this_node)
{ NodeTraits::set_next(this_node, node_ptr()); }
- static bool unique(const const_node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
{
node_ptr next = NodeTraits::get_next(this_node);
return !next || next == this_node;
}
- static bool inited(const const_node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
{ return !NodeTraits::get_next(this_node); }
- static void unlink_after(const node_ptr & prev_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node)
{
const_node_ptr this_node(NodeTraits::get_next(prev_node));
NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
}
- static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
{ NodeTraits::set_next(prev_node, last_node); }
- static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
{
NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
NodeTraits::set_next(prev_node, this_node);
}
- static void incorporate_after(const node_ptr & bp, const node_ptr & b, const node_ptr & be)
+ BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(const node_ptr & bp, const node_ptr & b, const node_ptr & be)
{
node_ptr p(NodeTraits::get_next(bp));
NodeTraits::set_next(bp, b);
diff --git a/boost/intrusive/detail/ebo_functor_holder.hpp b/boost/intrusive/detail/ebo_functor_holder.hpp
index ef278ed805..31b2f81398 100644
--- a/boost/intrusive/detail/ebo_functor_holder.hpp
+++ b/boost/intrusive/detail/ebo_functor_holder.hpp
@@ -259,7 +259,7 @@ class ebo_functor_holder<T, false>
BOOST_INTRUSIVE_FORCEINLINE ebo_functor_holder& operator=(BOOST_COPY_ASSIGN_REF(ebo_functor_holder) x)
{
const ebo_functor_holder&r = x;
- this->get() = x.get();
+ this->get() = r;
return *this;
}
diff --git a/boost/intrusive/detail/generic_hook.hpp b/boost/intrusive/detail/generic_hook.hpp
index b57a12b458..13421b8805 100644
--- a/boost/intrusive/detail/generic_hook.hpp
+++ b/boost/intrusive/detail/generic_hook.hpp
@@ -26,6 +26,7 @@
#include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/detail/assert.hpp>
#include <boost/intrusive/detail/node_holder.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
#include <boost/static_assert.hpp>
namespace boost {
@@ -120,7 +121,8 @@ struct hooktags_impl
/// @endcond
template
- < class NodeAlgorithms
+ < boost::intrusive::algo_types Algo
+ , class NodeTraits
, class Tag
, link_mode_type LinkMode
, base_hook_type BaseHookType
@@ -135,20 +137,20 @@ class generic_hook
//from the hook.
: public detail::if_c
< detail::is_same<Tag, member_tag>::value
- , typename NodeAlgorithms::node
- , node_holder<typename NodeAlgorithms::node, Tag, BaseHookType>
+ , typename NodeTraits::node
+ , node_holder<typename NodeTraits::node, Tag, BaseHookType>
>::type
//If this is the a default-tagged base hook derive from a class that
//will define an special internal typedef. Containers will be able to detect this
//special typedef and obtain generic_hook's internal types in order to deduce
//value_traits for this hook.
, public hook_tags_definer
- < generic_hook<NodeAlgorithms, Tag, LinkMode, BaseHookType>
- , detail::is_same<Tag, dft_tag>::value*BaseHookType>
+ < generic_hook<Algo, NodeTraits, Tag, LinkMode, BaseHookType>
+ , detail::is_same<Tag, dft_tag>::value ? BaseHookType : NoBaseHookId>
/// @endcond
{
/// @cond
- typedef NodeAlgorithms node_algorithms;
+ typedef typename get_algo<Algo, NodeTraits>::type node_algorithms;
typedef typename node_algorithms::node node;
typedef typename node_algorithms::node_ptr node_ptr;
typedef typename node_algorithms::const_node_ptr const_node_ptr;
@@ -156,7 +158,7 @@ class generic_hook
public:
typedef hooktags_impl
- < typename NodeAlgorithms::node_traits
+ < NodeTraits
, Tag, LinkMode, BaseHookType> hooktags;
node_ptr this_ptr()
diff --git a/boost/intrusive/detail/has_member_function_callable_with.hpp b/boost/intrusive/detail/has_member_function_callable_with.hpp
index 2e73305d17..92ef60ee6d 100644
--- a/boost/intrusive/detail/has_member_function_callable_with.hpp
+++ b/boost/intrusive/detail/has_member_function_callable_with.hpp
@@ -11,13 +11,22 @@
#ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP
-//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and
-//wrong SFINAE for GCC 4.2/4.3
-#if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
- #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
-#elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200 )
- #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
#endif
+
+//In case no decltype and no variadics, mark that we don't support 0 arg calls due to
+//compiler ICE in GCC 3.4/4.0/4.1 and, wrong SFINAE for GCC 4.2/4.3/MSVC10/MSVC11
+#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+# if defined(BOOST_GCC) && (BOOST_GCC < 40400)
+# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+# elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200)
+# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
+# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+# endif
+#endif //#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
#include <cstddef>
#include <boost/move/utility_core.hpp>
#include <boost/move/detail/fwd_macros.hpp>
@@ -27,6 +36,11 @@ namespace boost_intrusive_hmfcw {
typedef char yes_type;
struct no_type{ char dummy[2]; };
+struct dont_care
+{
+ dont_care(...);
+};
+
#if defined(BOOST_NO_CXX11_DECLTYPE)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
@@ -39,11 +53,6 @@ struct make_dontcare
#endif
-struct dont_care
-{
- dont_care(...);
-};
-
struct private_type
{
static private_type p;
@@ -56,7 +65,7 @@ yes_type is_private_type(private_type const &);
#endif //#if defined(BOOST_NO_CXX11_DECLTYPE)
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE)
template<typename T> struct remove_cv { typedef T type; };
template<typename T> struct remove_cv<const T> { typedef T type; };
@@ -124,7 +133,31 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
// declaration, special case and 0 arg specializaton
//
/////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////
+
+ template <typename Type>
+ class BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ {
+ struct BaseMixin
+ {
+ void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
+ {} //Some compilers require the definition or linker errors happen
+ };
+
+ struct Base
+ : public boost_intrusive_hmfcw::remove_cv<Type>::type, public BaseMixin
+ { //Declare the unneeded default constructor as some old compilers wrongly require it with is_convertible
+ Base(){}
+ };
+ template <typename T, T t> class Helper{};
+
+ template <typename U>
+ static boost_intrusive_hmfcw::no_type deduce
+ (U*, Helper<void (BaseMixin::*)(), &U::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME>* = 0);
+ static boost_intrusive_hmfcw::yes_type deduce(...);
+
+ public:
+ static const bool value = sizeof(boost_intrusive_hmfcw::yes_type) == sizeof(deduce((Base*)0));
+ };
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/////////////////////////////////////////////////////////
@@ -136,53 +169,45 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
/////////////////////////////////////////////////////////
//defined(BOOST_NO_CXX11_DECLTYPE) must be true
- template<class Fun, class ...DontCares>
+ template<class Fun>
struct FunWrapTmpl : Fun
{
using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME;
+ FunWrapTmpl();
+ template<class ...DontCares>
boost_intrusive_hmfcw::private_type BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(DontCares...) const;
};
+ template<typename Fun, bool HasFunc, class ...Args>
+ struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME);
+
+ //No BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME member specialization
template<typename Fun, class ...Args>
- struct BOOST_MOVE_CAT(has_member_function_callable_with_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, Args...>
+ struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ <Fun, false, Args...>
{
- typedef FunWrapTmpl<typename boost_intrusive_hmfcw::make_dontcare<Args>::type...> FunWrap;
+ static const bool value = false;
+ };
- static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) ==
- sizeof(boost_intrusive_hmfcw::is_private_type
- ( (::boost::move_detail::declval< FunWrap<Fun> >().
+ template<typename Fun, class ...Args>
+ struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true, Args...>
+ {
+ static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) == sizeof(boost_intrusive_hmfcw::is_private_type
+ ( (::boost::move_detail::declval
+ < FunWrapTmpl<Fun> >().
BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(::boost::move_detail::declval<Args>()...), 0) )
)
);
};
- #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //Preprocessor must be used to generate specializations instead of variadic templates
- template <typename Type>
- class BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
- {
- struct BaseMixin
- {
- void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME()
- {} //Some compilers require the definition or linker errors happen
- };
-
- struct Base
- : public boost_intrusive_hmfcw::remove_cv<Type>::type, public BaseMixin
- { //Declare the unneeded default constructor as some old compilers wrongly require it with is_convertible
- Base(){}
- };
- template <typename T, T t> class Helper{};
-
- template <typename U>
- static boost_intrusive_hmfcw::no_type deduce
- (U*, Helper<void (BaseMixin::*)(), &U::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME>* = 0);
- static boost_intrusive_hmfcw::yes_type deduce(...);
-
- public:
- static const bool value = sizeof(boost_intrusive_hmfcw::yes_type) == sizeof(deduce((Base*)0));
- };
+ template<typename Fun, class ...Args>
+ struct BOOST_MOVE_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ : public BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ <Fun
+ , BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun>::value
+ , Args...>
+ {};
+ #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
@@ -222,24 +247,24 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG
#if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
- template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(), 0)>
- struct BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
- { boost_intrusive_hmfcw::yes_type dummy[N ? 1 : 2]; };
+ template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(), 0)>
+ struct BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)
+ { boost_intrusive_hmfcw::yes_type dummy[N ? 1 : 2]; };
- template<typename Fun>
- struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
- {
- template<class U> static BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
- Test(BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
- template<class U> static boost_intrusive_hmfcw::no_type Test(...);
- static const bool value = sizeof(Test< Fun >(0)) == sizeof(boost_intrusive_hmfcw::yes_type);
- };
+ template<typename Fun>
+ struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
+ {
+ template<class U> static BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>
+ Test(BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<U>*);
+ template<class U> static boost_intrusive_hmfcw::no_type Test(...);
+ static const bool value = sizeof(Test< Fun >(0)) == sizeof(boost_intrusive_hmfcw::yes_type);
+ };
#else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
template<typename Fun>
struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)<Fun, true>
- {//GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported.
+ { //Some compilers gives ICE when instantiating the 0 arg version so it is not supported.
static const bool value = true;
};
diff --git a/boost/intrusive/detail/key_nodeptr_comp.hpp b/boost/intrusive/detail/key_nodeptr_comp.hpp
index 1a5ec32acc..9d64f09bcd 100644
--- a/boost/intrusive/detail/key_nodeptr_comp.hpp
+++ b/boost/intrusive/detail/key_nodeptr_comp.hpp
@@ -23,6 +23,8 @@
#include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/tree_value_compare.hpp>
+
namespace boost {
namespace intrusive {
@@ -30,64 +32,84 @@ namespace detail {
template < class KeyTypeKeyCompare
, class ValueTraits
- , class KeyOfValue = void
+ , class KeyOfValue
>
-struct key_nodeptr_comp
- //Use public inheritance to avoid MSVC bugs with closures
- : public ebo_functor_holder<KeyTypeKeyCompare>
+struct key_nodeptr_comp_types
{
- typedef ValueTraits value_traits;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::node_ptr node_ptr;
- typedef typename value_traits::const_node_ptr const_node_ptr;
- typedef ebo_functor_holder<KeyTypeKeyCompare> base_t;
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::node_ptr node_ptr;
+ typedef typename value_traits::const_node_ptr const_node_ptr;
typedef typename detail::if_c
< detail::is_same<KeyOfValue, void>::value
, detail::identity<value_type>
, KeyOfValue
- >::type key_of_value;
- typedef typename key_of_value::type key_type;
-
- key_nodeptr_comp(KeyTypeKeyCompare kcomp, const ValueTraits *traits)
- : base_t(kcomp), traits_(traits)
- {}
+ >::type key_of_value;
+ typedef tree_value_compare
+ <typename ValueTraits::pointer, KeyTypeKeyCompare, key_of_value> base_t;
+};
- template<class T>
- struct is_node_ptr
+//This function object transforms a key comparison type to
+//a function that can compare nodes or nodes with nodes or keys.
+template < class KeyTypeKeyCompare
+ , class ValueTraits
+ , class KeyOfValue = void
+ >
+struct key_nodeptr_comp
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::base_t
+{
+ typedef key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue> types_t;
+ typedef typename types_t::value_traits value_traits;
+ typedef typename types_t::value_type value_type;
+ typedef typename types_t::node_ptr node_ptr;
+ typedef typename types_t::const_node_ptr const_node_ptr;
+ typedef typename types_t::base_t base_t;
+ typedef typename types_t::key_of_value key_of_value;
+
+ template <class P1>
+ struct is_same_or_nodeptr_convertible
{
- static const bool value = is_same<T, const_node_ptr>::value || is_same<T, node_ptr>::value;
+ static const bool same_type = is_same<P1,const_node_ptr>::value || is_same<P1,node_ptr>::value;
+ static const bool value = same_type || is_convertible<P1, const_node_ptr>::value;
};
- //key_forward
- template<class T>
- typename enable_if<is_node_ptr<T>, const key_type &>::type key_forward(const T &node) const
- { return key_of_value()(*traits_->to_value_ptr(node)); }
+ base_t base() const
+ { return static_cast<const base_t&>(*this); }
- template<class T>
- #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
- const T &key_forward (const T &key, typename disable_if<is_node_ptr<T> >::type* =0) const
- #else
- typename disable_if<is_node_ptr<T>, const T &>::type key_forward(const T &key) const
- #endif
- { return key; }
-
- //operator() 1 arg
- template<class KeyType>
- bool operator()(const KeyType &key1) const
- { return base_t::get()(this->key_forward(key1)); }
+ BOOST_INTRUSIVE_FORCEINLINE key_nodeptr_comp(KeyTypeKeyCompare kcomp, const ValueTraits *traits)
+ : base_t(kcomp), traits_(traits)
+ {}
- template<class KeyType>
- bool operator()(const KeyType &key1)
- { return base_t::get()(this->key_forward(key1)); }
+ //pred(pnode)
+ template<class T1>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value >::type* =0) const
+ { return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); }
//operator() 2 arg
- template<class KeyType, class KeyType2>
- bool operator()(const KeyType &key1, const KeyType2 &key2) const
- { return base_t::get()(this->key_forward(key1), this->key_forward(key2)); }
-
- template<class KeyType, class KeyType2>
- bool operator()(const KeyType &key1, const KeyType2 &key2)
- { return base_t::get()(this->key_forward(key1), this->key_forward(key2)); }
+ //pred(pnode, pnode)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ { return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); }
+
+ //pred(pnode, key)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ { return base()(*traits_->to_value_ptr(t1), t2); }
+
+ //pred(key, pnode)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ { return base()(t1, *traits_->to_value_ptr(t2)); }
+
+ //pred(key, key)
+ template<class T1, class T2>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()
+ (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
+ { return base()(t1, t2); }
const ValueTraits *const traits_;
};
diff --git a/boost/intrusive/detail/size_holder.hpp b/boost/intrusive/detail/size_holder.hpp
index 9802ac32f1..bd14dc5049 100644
--- a/boost/intrusive/detail/size_holder.hpp
+++ b/boost/intrusive/detail/size_holder.hpp
@@ -51,6 +51,9 @@ struct size_holder
BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType n)
{ size_ -= n; }
+ BOOST_INTRUSIVE_FORCEINLINE void swap(size_holder &other)
+ { SizeType tmp(size_); size_ = other.size_; other.size_ = tmp; }
+
SizeType size_;
};
@@ -77,6 +80,8 @@ struct size_holder<false, SizeType, Tag>
BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType)
{}
+
+ BOOST_INTRUSIVE_FORCEINLINE void swap(size_holder){}
};
} //namespace detail{
diff --git a/boost/intrusive/detail/tree_value_compare.hpp b/boost/intrusive/detail/tree_value_compare.hpp
index 810d894066..c8f596fc96 100644
--- a/boost/intrusive/detail/tree_value_compare.hpp
+++ b/boost/intrusive/detail/tree_value_compare.hpp
@@ -21,67 +21,140 @@
#include <boost/intrusive/detail/workaround.hpp>
#include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
namespace boost{
namespace intrusive{
-template<class Key, class T, class KeyCompare, class KeyOfValue>
+//Needed to support smart references to value types
+template <class From, class ValuePtr>
+struct disable_if_smartref_to
+ : detail::disable_if_c
+ < detail::is_same
+ <From, typename pointer_traits
+ <ValuePtr>
+ ::reference>::value
+ || detail::is_same
+ <From, typename pointer_traits
+ < typename pointer_rebind
+ <ValuePtr, const typename pointer_element<ValuePtr>::type>::type>
+ ::reference>::value
+ >
+{};
+
+//This function object takes a KeyCompare function object
+//and compares values that contains keys using KeyOfValue
+template< class ValuePtr, class KeyCompare, class KeyOfValue
+ , bool = boost::intrusive::detail::is_same<typename pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value >
struct tree_value_compare
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
{
- typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
- typedef T value_type;
- typedef KeyCompare key_compare;
- typedef KeyOfValue key_of_value;
- typedef Key key_type;
+ typedef typename pointer_element<ValuePtr>::type value_type;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
- tree_value_compare()
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
: base_t()
{}
- explicit tree_value_compare(const key_compare &kcomp)
+ BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
: base_t(kcomp)
{}
- tree_value_compare (const tree_value_compare &x)
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
: base_t(x.base_t::get())
{}
- tree_value_compare &operator=(const tree_value_compare &x)
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
{ this->base_t::get() = x.base_t::get(); return *this; }
- tree_value_compare &operator=(const key_compare &x)
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
{ this->base_t::get() = x; return *this; }
BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
{ return static_cast<const key_compare &>(*this); }
- BOOST_INTRUSIVE_FORCEINLINE key_compare &key_comp()
- { return static_cast<key_compare &>(*this); }
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const value_type &value2) const
+ { return this->key_comp()(KeyOfValue()(value1), KeyOfValue()(value2)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const value_type &value2) const
+ { return this->key_comp()(key1, KeyOfValue()(value2)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const key_type &key2) const
+ { return this->key_comp()(KeyOfValue()(value1), key2); }
template<class U>
- struct is_key
- : boost::intrusive::detail::is_same<const U, const key_type>
- {};
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(key1, nonkey2); }
template<class U>
- const key_type & key_forward
- (const U &key, typename boost::intrusive::detail::enable_if<is_key<U> >::type* = 0) const
- { return key; }
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonkey1, const key_type &key2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey1, key2); }
template<class U>
- BOOST_INTRUSIVE_FORCEINLINE const key_type & key_forward
- (const U &key, typename boost::intrusive::detail::disable_if<is_key<U> >::type* = 0) const
- { return KeyOfValue()(key); }
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()( const value_type &value1, const U &nonvalue2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(KeyOfValue()(value1), nonvalue2); }
- template<class KeyType, class KeyType2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const KeyType &key1, const KeyType2 &key2) const
- { return key_compare::operator()(this->key_forward(key1), this->key_forward(key2)); }
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonvalue1, const value_type &value2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonvalue1, KeyOfValue()(value2)); }
+};
- template<class KeyType, class KeyType2>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const KeyType &key1, const KeyType2 &key2)
- { return key_compare::operator()(this->key_forward(key1), this->key_forward(key2)); }
+template<class ValuePtr, class KeyCompare, class KeyOfValue>
+struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, true>
+ : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
+{
+ typedef typename pointer_element<ValuePtr>::type value_type;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
+
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
+ : base_t()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
+ : base_t(kcomp)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
+ : base_t(x.base_t::get())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
+ { this->base_t::get() = x.base_t::get(); return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
+ { this->base_t::get() = x; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
+ { return static_cast<const key_compare &>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(key1, nonkey2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey1, key2); }
};
} //namespace intrusive{
diff --git a/boost/intrusive/hashtable.hpp b/boost/intrusive/hashtable.hpp
index f9074c0141..313da829d3 100644
--- a/boost/intrusive/hashtable.hpp
+++ b/boost/intrusive/hashtable.hpp
@@ -119,6 +119,8 @@ struct prime_list_holder
static const std::size_t prime_list_size;
};
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
//We only support LLP64(Win64) or LP64(most Unix) data models
#ifdef _WIN64 //In 64 bit windows sizeof(size_t) == sizeof(unsigned long long)
#define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##ULL
@@ -173,6 +175,8 @@ const std::size_t prime_list_holder<Dummy>::prime_list[] = {
#undef BOOST_INTRUSIVE_PRIME_C
#undef BOOST_INTRUSIVE_64_BIT_SIZE_T
+#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
template<int Dummy>
const std::size_t prime_list_holder<Dummy>::prime_list_size
= sizeof(prime_list)/sizeof(std::size_t);
@@ -251,7 +255,7 @@ struct insert_commit_data_impl
};
template<class Node, class SlistNodePtr>
-inline typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type
+BOOST_INTRUSIVE_FORCEINLINE typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type
dcast_bucket_ptr(const SlistNodePtr &p)
{
typedef typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type node_ptr;
@@ -341,13 +345,13 @@ struct group_functions
}
}
- static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
+ BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
{}
- static node_ptr get_last_in_group(const node_ptr &first_in_group, detail::true_)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(const node_ptr &first_in_group, detail::true_)
{ return group_traits::get_next(first_in_group); }
- static node_ptr get_last_in_group(node_ptr n, detail::false_)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr n, detail::false_)
{ return n; }
static node_ptr get_first_in_group(node_ptr n, detail::true_)
@@ -359,21 +363,21 @@ struct group_functions
return n;
}
- static node_ptr next_group_if_first_in_group(node_ptr ptr)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr next_group_if_first_in_group(node_ptr ptr)
{
return node_traits::get_next(group_traits::get_next(ptr));
}
- static node_ptr get_first_in_group(const node_ptr &n, detail::false_)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_first_in_group(const node_ptr &n, detail::false_)
{ return n; }
- static void insert_in_group(const node_ptr &first_in_group, const node_ptr &n, true_)
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_in_group(const node_ptr &first_in_group, const node_ptr &n, true_)
{ group_algorithms::link_after(first_in_group, n); }
static void insert_in_group(const node_ptr&, const node_ptr&, false_)
{}
- static node_ptr split_group(node_ptr const new_first_in_group)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr split_group(node_ptr const new_first_in_group)
{
node_ptr const first((get_first_in_group)(new_first_in_group, detail::true_()));
if(first != new_first_in_group){
@@ -403,7 +407,7 @@ class incremental_rehash_rollback
, split_traits_(split_traits), released_(false)
{}
- void release()
+ BOOST_INTRUSIVE_FORCEINLINE void release()
{ released_ = true; }
~incremental_rehash_rollback()
@@ -426,21 +430,21 @@ class incremental_rehash_rollback
template<class NodeTraits>
struct node_functions
{
- static void store_hash(typename NodeTraits::node_ptr p, std::size_t h, true_)
+ BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr p, std::size_t h, true_)
{ return NodeTraits::set_hash(p, h); }
- static void store_hash(typename NodeTraits::node_ptr, std::size_t, false_)
+ BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr, std::size_t, false_)
{}
};
-inline std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::false_)
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::false_)
{ return hash_value % bucket_cnt; }
-inline std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::true_)
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::true_)
{ return hash_value & (bucket_cnt - 1); }
template<bool Power2Buckets, bool Incremental>
-inline std::size_t hash_to_bucket_split(std::size_t hash_value, std::size_t bucket_cnt, std::size_t split)
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket_split(std::size_t hash_value, std::size_t bucket_cnt, std::size_t split)
{
std::size_t bucket_number = detail::hash_to_bucket(hash_value, bucket_cnt, detail::bool_<Power2Buckets>());
if(Incremental)
@@ -535,11 +539,11 @@ struct downcast_node_to_value_t
template rebind_pointer
<const ValueTraits>::type const_value_traits_ptr;
- downcast_node_to_value_t(const const_value_traits_ptr &ptr)
+ BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const const_value_traits_ptr &ptr)
: base_t(ptr)
{}
- result_type operator()(first_argument_type arg) const
+ BOOST_INTRUSIVE_FORCEINLINE result_type operator()(first_argument_type arg) const
{ return this->base_t::operator()(static_cast<intermediate_argument_type>(arg)); }
};
@@ -554,14 +558,14 @@ struct node_cast_adaptor
typedef typename pointer_traits<NodePtr>::element_type node;
template<class ConvertibleToF, class RealValuTraits>
- node_cast_adaptor(const ConvertibleToF &c2f, const RealValuTraits *traits)
+ BOOST_INTRUSIVE_FORCEINLINE node_cast_adaptor(const ConvertibleToF &c2f, const RealValuTraits *traits)
: base_t(base_t(c2f, traits))
{}
- typename base_t::node_ptr operator()(const slist_node &to_clone)
+ BOOST_INTRUSIVE_FORCEINLINE typename base_t::node_ptr operator()(const slist_node &to_clone)
{ return base_t::operator()(static_cast<const node &>(to_clone)); }
- void operator()(SlistNodePtr to_clone)
+ BOOST_INTRUSIVE_FORCEINLINE void operator()(SlistNodePtr to_clone)
{
base_t::operator()(pointer_traits<NodePtr>::pointer_to(static_cast<node &>(*to_clone)));
}
@@ -610,56 +614,57 @@ struct bucket_plus_vtraits
<value_traits>::type bucket_ptr;
template<class BucketTraitsType>
- bucket_plus_vtraits(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
: data(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
{}
- bucket_plus_vtraits & operator =(const bucket_plus_vtraits &x)
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits & operator =(const bucket_plus_vtraits &x)
{ data.bucket_traits_ = x.data.bucket_traits_; return *this; }
- const_value_traits_ptr priv_value_traits_ptr() const
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
{ return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
//bucket_value_traits
//
- const bucket_plus_vtraits &get_bucket_value_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_plus_vtraits &get_bucket_value_traits() const
{ return *this; }
- bucket_plus_vtraits &get_bucket_value_traits()
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits &get_bucket_value_traits()
{ return *this; }
- const_bucket_value_traits_ptr bucket_value_traits_ptr() const
+ BOOST_INTRUSIVE_FORCEINLINE const_bucket_value_traits_ptr bucket_value_traits_ptr() const
{ return pointer_traits<const_bucket_value_traits_ptr>::pointer_to(this->get_bucket_value_traits()); }
//value traits
//
- const value_traits &priv_value_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
{ return this->data; }
- value_traits &priv_value_traits()
+ BOOST_INTRUSIVE_FORCEINLINE value_traits &priv_value_traits()
{ return this->data; }
//bucket_traits
//
- const bucket_traits &priv_bucket_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
{ return this->data.bucket_traits_; }
- bucket_traits &priv_bucket_traits()
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits &priv_bucket_traits()
{ return this->data.bucket_traits_; }
//bucket operations
- bucket_ptr priv_bucket_pointer() const
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_bucket_pointer() const
{ return this->priv_bucket_traits().bucket_begin(); }
typename slist_impl::size_type priv_bucket_count() const
{ return this->priv_bucket_traits().bucket_count(); }
- bucket_ptr priv_invalid_bucket() const
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_invalid_bucket() const
{
const bucket_traits &rbt = this->priv_bucket_traits();
return rbt.bucket_begin() + rbt.bucket_count();
}
- siterator priv_invalid_local_it() const
+
+ BOOST_INTRUSIVE_FORCEINLINE siterator priv_invalid_local_it() const
{ return this->priv_bucket_traits().bucket_begin()->before_begin(); }
template<class NodeDisposer>
@@ -748,7 +753,7 @@ struct bucket_plus_vtraits
}
template<class NodeDisposer>
- static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::false_) //optimize multikey
+ BOOST_INTRUSIVE_FORCEINLINE static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::false_) //optimize multikey
{ b.erase_after_and_dispose(b.previous(i), node_disposer); }
template<class NodeDisposer, bool OptimizeMultikey>
@@ -807,7 +812,7 @@ struct bucket_plus_vtraits
return num_erased;
}
- static siterator priv_get_last(bucket_type &b, detail::false_) //NOT optimize multikey
+ BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_last(bucket_type &b, detail::false_) //NOT optimize multikey
{ return b.previous(b.end()); }
static siterator priv_get_previous(bucket_type &b, siterator i, detail::true_) //optimize multikey
@@ -822,7 +827,7 @@ struct bucket_plus_vtraits
return bucket_type::s_iterator_to(n);
}
- static siterator priv_get_previous(bucket_type &b, siterator i, detail::false_) //NOT optimize multikey
+ BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_previous(bucket_type &b, siterator i, detail::false_) //NOT optimize multikey
{ return b.previous(i); }
std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::true_) //optimize multikey
@@ -858,22 +863,22 @@ struct bucket_plus_vtraits
return static_cast<std::size_t>(&b - &*f);
}
- static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) //store_hash
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) //store_hash
{ return node_traits::get_hash(detail::dcast_bucket_ptr<node>(n)); }
- static std::size_t priv_stored_hash(slist_node_ptr, detail::false_) //NO store_hash
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr, detail::false_) //NO store_hash
{ return std::size_t(-1); }
- node &priv_value_to_node(reference v)
+ BOOST_INTRUSIVE_FORCEINLINE node &priv_value_to_node(reference v)
{ return *this->priv_value_traits().to_node_ptr(v); }
- const node &priv_value_to_node(const_reference v) const
+ BOOST_INTRUSIVE_FORCEINLINE const node &priv_value_to_node(const_reference v) const
{ return *this->priv_value_traits().to_node_ptr(v); }
- reference priv_value_from_slist_node(slist_node_ptr n)
+ BOOST_INTRUSIVE_FORCEINLINE reference priv_value_from_slist_node(slist_node_ptr n)
{ return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
- const_reference priv_value_from_slist_node(slist_node_ptr n) const
+ BOOST_INTRUSIVE_FORCEINLINE const_reference priv_value_from_slist_node(slist_node_ptr n) const
{ return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
void priv_clear_buckets(const bucket_ptr buckets_ptr, const size_type bucket_cnt)
@@ -889,19 +894,19 @@ struct bucket_plus_vtraits
}
}
- std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const //For store_hash == true
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const //For store_hash == true
{ return node_traits::get_hash(this->priv_value_traits().to_node_ptr(v)); }
typedef hashtable_iterator<bucket_plus_vtraits, false> iterator;
typedef hashtable_iterator<bucket_plus_vtraits, true> const_iterator;
- iterator end()
+ BOOST_INTRUSIVE_FORCEINLINE iterator end()
{ return iterator(this->priv_invalid_local_it(), 0); }
- const_iterator end() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
{ return this->cend(); }
- const_iterator cend() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
{ return const_iterator(this->priv_invalid_local_it(), 0); }
static size_type suggested_upper_bucket_count(size_type n)
@@ -926,9 +931,10 @@ struct bucket_plus_vtraits
struct data_type : public ValueTraits
{
template<class BucketTraitsType>
- data_type(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
+ BOOST_INTRUSIVE_FORCEINLINE data_type(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
: ValueTraits(val_traits), bucket_traits_(::boost::forward<BucketTraitsType>(b_traits))
{}
+
bucket_traits bucket_traits_;
} data;
};
@@ -1020,11 +1026,11 @@ struct bucket_hash_t
typedef detail::ebo_functor_holder<hasher> base_t;
template<class BucketTraitsType>
- bucket_hash_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h)
+ BOOST_INTRUSIVE_FORCEINLINE bucket_hash_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h)
: detail::ebo_functor_holder<hasher>(h), bucket_plus_vtraits_t(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
{}
- const hasher &priv_hasher() const
+ BOOST_INTRUSIVE_FORCEINLINE const hasher &priv_hasher() const
{ return this->base_t::get(); }
hasher &priv_hasher()
@@ -1032,7 +1038,7 @@ struct bucket_hash_t
using bucket_plus_vtraits_t::priv_stored_or_compute_hash; //For store_hash == true
- std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const //For store_hash == false
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const //For store_hash == false
{ return this->priv_hasher()(key_of_value()(v)); }
};
@@ -1077,19 +1083,19 @@ struct bucket_hash_equal_t
, equal_holder_t(e)
{}
- bucket_ptr priv_get_cache()
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache()
{ return this->bucket_hash_type::priv_bucket_pointer(); }
- void priv_set_cache(const bucket_ptr &)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &)
{}
- size_type priv_get_cache_bucket_num()
+ BOOST_INTRUSIVE_FORCEINLINE size_type priv_get_cache_bucket_num()
{ return 0u; }
- void priv_initialize_cache()
+ BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
{}
- void priv_swap_cache(bucket_hash_equal_t &)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &)
{}
siterator priv_begin() const
@@ -1105,19 +1111,19 @@ struct bucket_hash_equal_t
return this->bucket_hash_type::priv_invalid_local_it();
}
- void priv_insertion_update_cache(size_type)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_insertion_update_cache(size_type)
{}
- void priv_erasure_update_cache_range(size_type, size_type)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache_range(size_type, size_type)
{}
- void priv_erasure_update_cache()
+ BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache()
{}
- const key_equal &priv_equal() const
+ BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
{ return this->equal_holder_t::get(); }
- key_equal &priv_equal()
+ BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
{ return this->equal_holder_t::get(); }
};
@@ -1151,22 +1157,22 @@ struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrK
typedef typename detail::unordered_bucket_ptr_impl
<typename bucket_hash_type::value_traits>::type bucket_ptr;
- bucket_ptr &priv_get_cache()
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr &priv_get_cache()
{ return cached_begin_; }
- const bucket_ptr &priv_get_cache() const
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &priv_get_cache() const
{ return cached_begin_; }
- void priv_set_cache(const bucket_ptr &p)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &p)
{ cached_begin_ = p; }
- std::size_t priv_get_cache_bucket_num()
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
{ return this->cached_begin_ - this->bucket_hash_type::priv_bucket_pointer(); }
- void priv_initialize_cache()
+ BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
{ this->cached_begin_ = this->bucket_hash_type::priv_invalid_bucket(); }
- void priv_swap_cache(bucket_hash_equal_t &other)
+ BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &other)
{
::boost::adl_move_swap(this->cached_begin_, other.cached_begin_);
}
@@ -1189,10 +1195,10 @@ struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrK
}
}
- const key_equal &priv_equal() const
+ BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
{ return this->equal_holder_t::get(); }
- key_equal &priv_equal()
+ BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
{ return this->equal_holder_t::get(); }
void priv_erasure_update_cache_range(size_type first_bucket_num, size_type last_bucket_num)
@@ -1243,10 +1249,13 @@ struct hashtable_size_traits_wrapper
size_traits size_traits_;
- const size_traits &priv_size_traits() const
+ typedef const size_traits & size_traits_const_t;
+ typedef size_traits & size_traits_t;
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits_const_t priv_size_traits() const
{ return size_traits_; }
- size_traits &priv_size_traits()
+ BOOST_INTRUSIVE_FORCEINLINE size_traits_t priv_size_traits()
{ return size_traits_; }
};
@@ -1265,18 +1274,13 @@ struct hashtable_size_traits_wrapper<DeriveFrom, SizeType, false>
typedef detail::size_holder< false, SizeType> size_traits;
- const size_traits &priv_size_traits() const
- { return size_traits_; }
-
- size_traits &priv_size_traits()
- { return size_traits_; }
+ typedef size_traits size_traits_const_t;
+ typedef size_traits size_traits_t;
- static size_traits size_traits_;
+ BOOST_INTRUSIVE_FORCEINLINE size_traits priv_size_traits() const
+ { return size_traits(); }
};
-template<class DeriveFrom, class SizeType>
-detail::size_holder< false, SizeType > hashtable_size_traits_wrapper<DeriveFrom, SizeType, false>::size_traits_;
-
//hashdata_internal
//Stores bucket_hash_equal_t and split_traits
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
@@ -1360,10 +1364,10 @@ struct hashdata_internal
: internal_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h, e)
{}
- split_traits &priv_split_traits()
+ BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_t priv_split_traits()
{ return this->priv_size_traits(); }
- const split_traits &priv_split_traits() const
+ BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_const_t priv_split_traits() const
{ return this->priv_size_traits(); }
~hashdata_internal()
@@ -1402,12 +1406,12 @@ struct hashdata_internal
{ return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, false_value); }
//public functions
- SizeType split_count() const
+ BOOST_INTRUSIVE_FORCEINLINE SizeType split_count() const
{
return this->priv_split_traits().get_size();
}
- iterator iterator_to(reference value)
+ BOOST_INTRUSIVE_FORCEINLINE iterator iterator_to(reference value)
{
return iterator(bucket_type::s_iterator_to
(this->priv_value_to_node(value)), &this->get_bucket_value_traits());
@@ -1454,19 +1458,19 @@ struct hashdata_internal
return const_local_iterator(sit, this->priv_value_traits_ptr());
}
- size_type bucket_count() const
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
{ return this->priv_bucket_count(); }
- size_type bucket_size(size_type n) const
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket_size(size_type n) const
{ return this->priv_bucket_pointer()[n].size(); }
- bucket_ptr bucket_pointer() const
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_pointer() const
{ return this->priv_bucket_pointer(); }
- local_iterator begin(size_type n)
+ BOOST_INTRUSIVE_FORCEINLINE local_iterator begin(size_type n)
{ return local_iterator(this->priv_bucket_pointer()[n].begin(), this->priv_value_traits_ptr()); }
- const_local_iterator begin(size_type n) const
+ BOOST_INTRUSIVE_FORCEINLINE const_local_iterator begin(size_type n) const
{ return this->cbegin(n); }
const_local_iterator cbegin(size_type n) const
@@ -1481,7 +1485,7 @@ struct hashdata_internal
local_iterator end(size_type n)
{ return local_iterator(this->priv_bucket_pointer()[n].end(), this->priv_value_traits_ptr()); }
- const_local_iterator end(size_type n) const
+ BOOST_INTRUSIVE_FORCEINLINE const_local_iterator end(size_type n) const
{ return this->cend(n); }
const_local_iterator cend(size_type n) const
@@ -1493,19 +1497,19 @@ struct hashdata_internal
//Public functions for hashtable_impl
- iterator begin()
+ BOOST_INTRUSIVE_FORCEINLINE iterator begin()
{ return iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
- const_iterator begin() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
{ return this->cbegin(); }
- const_iterator cbegin() const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const
{ return const_iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
- hasher hash_function() const
+ BOOST_INTRUSIVE_FORCEINLINE hasher hash_function() const
{ return this->priv_hasher(); }
- key_equal key_eq() const
+ BOOST_INTRUSIVE_FORCEINLINE key_equal key_eq() const
{ return this->priv_equal(); }
};
@@ -1790,15 +1794,10 @@ class hashtable_impl
{
this->priv_swap_cache(x);
x.priv_initialize_cache();
- if(constant_time_size){
- this->priv_size_traits().set_size(size_type(0));
- this->priv_size_traits().set_size(x.priv_size_traits().get_size());
- x.priv_size_traits().set_size(size_type(0));
- }
- if(incremental){
- this->priv_split_traits().set_size(x.priv_split_traits().get_size());
- x.priv_split_traits().set_size(size_type(0));
- }
+ this->priv_size_traits().set_size(x.priv_size_traits().get_size());
+ x.priv_size_traits().set_size(size_type(0));
+ this->priv_split_traits().set_size(x.priv_split_traits().get_size());
+ x.priv_split_traits().set_size(size_type(0));
}
//! <b>Effects</b>: to-do
@@ -1946,8 +1945,8 @@ class hashtable_impl
::boost::adl_move_swap(this->priv_bucket_traits(), other.priv_bucket_traits());
::boost::adl_move_swap(this->priv_value_traits(), other.priv_value_traits());
this->priv_swap_cache(other);
- ::boost::adl_move_swap(this->priv_size_traits(), other.priv_size_traits());
- ::boost::adl_move_swap(this->priv_split_traits(), other.priv_split_traits());
+ this->priv_size_traits().swap(other.priv_size_traits());
+ this->priv_split_traits().swap(other.priv_split_traits());
}
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
@@ -1970,7 +1969,7 @@ class hashtable_impl
//! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
//! throws. Basic guarantee.
template <class Cloner, class Disposer>
- void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer)
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer)
{ this->priv_clone_from(src, cloner, disposer); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
@@ -1993,7 +1992,7 @@ class hashtable_impl
//! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
//! throws. Basic guarantee.
template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(hashtable_impl) src, Cloner cloner, Disposer disposer)
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable_impl) src, Cloner cloner, Disposer disposer)
{ this->priv_clone_from(static_cast<hashtable_impl&>(src), cloner, disposer); }
//! <b>Requires</b>: value must be an lvalue
@@ -2160,7 +2159,7 @@ class hashtable_impl
//! objects are inserted or erased from the unordered_set.
//!
//! After a successful rehashing insert_commit_data remains valid.
- std::pair<iterator, bool> insert_unique_check
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
( const key_type &key, insert_commit_data &commit_data)
{ return this->insert_unique_check(key, this->priv_hasher(), this->priv_equal(), commit_data); }
@@ -2204,7 +2203,7 @@ class hashtable_impl
//!
//! <b>Note</b>: Invalidates the iterators (but not the references)
//! to the erased element. No destructors are called.
- void erase(const_iterator i)
+ BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator i)
{ this->erase_and_dispose(i, detail::null_disposer()); }
//! <b>Effects</b>: Erases the range pointed to by b end e.
@@ -2216,7 +2215,7 @@ class hashtable_impl
//!
//! <b>Note</b>: Invalidates the iterators (but not the references)
//! to the erased elements. No destructors are called.
- void erase(const_iterator b, const_iterator e)
+ BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator b, const_iterator e)
{ this->erase_and_dispose(b, e, detail::null_disposer()); }
//! <b>Effects</b>: Erases all the elements with the given value.
@@ -2231,7 +2230,7 @@ class hashtable_impl
//!
//! <b>Note</b>: Invalidates the iterators (but not the references)
//! to the erased elements. No destructors are called.
- size_type erase(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase(const key_type &key)
{ return this->erase(key, this->priv_hasher(), this->priv_equal()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2255,7 +2254,7 @@ class hashtable_impl
//! <b>Note</b>: Invalidates the iterators (but not the references)
//! to the erased elements. No destructors are called.
template<class KeyType, class KeyHasher, class KeyEqual>
- size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
{ return this->erase_and_dispose(key, hash_func, equal_func, detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -2342,7 +2341,7 @@ class hashtable_impl
//! <b>Note</b>: Invalidates the iterators (but not the references)
//! to the erased elements. No destructors are called.
template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer)
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase_and_dispose(const key_type &key, Disposer disposer)
{ return this->erase_and_dispose(key, this->priv_hasher(), this->priv_equal(), disposer); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -2440,7 +2439,7 @@ class hashtable_impl
//! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
//!
//! <b>Throws</b>: If the internal hasher or the equality functor throws.
- size_type count(const key_type &key) const
+ BOOST_INTRUSIVE_FORCEINLINE size_type count(const key_type &key) const
{ return this->count(key, this->priv_hasher(), this->priv_equal()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2471,7 +2470,7 @@ class hashtable_impl
//! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
//!
//! <b>Throws</b>: If the internal hasher or the equality functor throws.
- iterator find(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
{ return this->find(key, this->priv_hasher(), this->priv_equal()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2509,7 +2508,7 @@ class hashtable_impl
//! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
//!
//! <b>Throws</b>: If the internal hasher or the equality functor throws.
- const_iterator find(const key_type &key) const
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
{ return this->find(key, this->priv_hasher(), this->priv_equal()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2549,7 +2548,7 @@ class hashtable_impl
//! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
//!
//! <b>Throws</b>: If the internal hasher or the equality functor throws.
- std::pair<iterator,iterator> equal_range(const key_type &key)
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
{ return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2590,7 +2589,7 @@ class hashtable_impl
//! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
//!
//! <b>Throws</b>: If the internal hasher or the equality functor throws.
- std::pair<const_iterator, const_iterator>
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
equal_range(const key_type &key) const
{ return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
@@ -2725,7 +2724,7 @@ class hashtable_impl
//! <b>Throws</b>: If the hash functor throws.
//!
//! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
- size_type bucket(const key_type& k) const
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const key_type& k) const
{ return this->bucket(k, this->priv_hasher()); }
//! <b>Requires</b>: "hash_func" must be a hash function that induces
@@ -2741,7 +2740,7 @@ class hashtable_impl
//!
//! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
template<class KeyType, class KeyHasher>
- size_type bucket(const KeyType& k, KeyHasher hash_func) const
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const KeyType& k, KeyHasher hash_func) const
{ return this->priv_hash_to_bucket(hash_func(k)); }
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
@@ -2838,101 +2837,52 @@ class hashtable_impl
//! new_bucket_traits.bucket_count() can be bigger or smaller than this->bucket_count().
//! 'new_bucket_traits' copy constructor should not throw.
//!
- //! <b>Effects</b>: Updates the internal reference with the new bucket, erases
- //! the values from the old bucket and inserts then in the new one.
+ //! <b>Effects</b>:
+ //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is false,
+ //! unlinks values from the old bucket and inserts then in the new one according
+ //! to the hash value of values.
+ //!
+ //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is true,
+ //! the implementations avoids moving values as much as possible.
+ //!
//! Bucket traits hold by *this is assigned from new_bucket_traits.
//! If the container is configured as incremental<>, the split bucket is set
//! to the new bucket_count().
//!
//! If store_hash option is true, this method does not use the hash function.
+ //! If false, the implementation tries to minimize calls to the hash function
+ //! (e.g. once for equivalent values if optimize_multikey<true> is true).
+ //!
+ //! If rehash is successful updates the internal bucket_traits with new_bucket_traits.
//!
//! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
//!
//! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
- void rehash(const bucket_traits &new_bucket_traits)
- {
- const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
- size_type new_bucket_count = new_bucket_traits.bucket_count();
- const bucket_ptr old_buckets = this->priv_bucket_pointer();
- size_type old_bucket_count = this->priv_bucket_count();
-
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (new_bucket_count & (new_bucket_count-1u))));
-
- size_type n = this->priv_get_cache_bucket_num();
- const bool same_buffer = old_buckets == new_buckets;
- //If the new bucket length is a common factor
- //of the old one we can avoid hash calculations.
- const bool fast_shrink = (!incremental) && (old_bucket_count >= new_bucket_count) &&
- (power_2_buckets || (old_bucket_count % new_bucket_count) == 0);
- //If we are shrinking the same bucket array and it's
- //is a fast shrink, just rehash the last nodes
- size_type new_first_bucket_num = new_bucket_count;
- if(same_buffer && fast_shrink && (n < new_bucket_count)){
- new_first_bucket_num = n;
- n = new_bucket_count;
- }
-
- //Anti-exception stuff: they destroy the elements if something goes wrong.
- //If the source and destination buckets are the same, the second rollback function
- //is harmless, because all elements have been already unlinked and destroyed
- typedef detail::init_disposer<node_algorithms> NodeDisposer;
- typedef detail::exception_array_disposer<bucket_type, NodeDisposer, size_type> ArrayDisposer;
- NodeDisposer node_disp;
- ArrayDisposer rollback1(new_buckets[0], node_disp, new_bucket_count);
- ArrayDisposer rollback2(old_buckets[0], node_disp, old_bucket_count);
-
- //Put size in a safe value for rollback exception
- size_type const size_backup = this->priv_size_traits().get_size();
- this->priv_size_traits().set_size(0);
- //Put cache to safe position
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(size_type(0u));
-
- //Iterate through nodes
- for(; n < old_bucket_count; ++n){
- bucket_type &old_bucket = old_buckets[n];
- if(!fast_shrink){
- for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
- ; i != end_sit
- ; i = before_i, ++i){
- const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>
- (hash_value, new_bucket_count, new_bucket_count);
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
- siterator const last = (priv_last_in_group)(i);
- if(same_buffer && new_n == n){
- before_i = last;
- }
- else{
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
- }
- }
- }
- else{
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>(n, new_bucket_count, new_bucket_count);
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after( new_b.before_begin()
- , old_bucket
- , old_bucket.before_begin()
- , bucket_plus_vtraits_t::priv_get_last(old_bucket, optimize_multikey_t()));
- }
- }
+ BOOST_INTRUSIVE_FORCEINLINE void rehash(const bucket_traits &new_bucket_traits)
+ { this->rehash_impl(new_bucket_traits, false); }
- this->priv_size_traits().set_size(size_backup);
- this->priv_split_traits().set_size(new_bucket_count);
- this->priv_bucket_traits() = new_bucket_traits;
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(new_first_bucket_num);
- rollback1.release();
- rollback2.release();
- }
+ //! <b>Note</b>: This function is used when keys from inserted elements are changed
+ //! (e.g. a language change when key is a string) but uniqueness and hash properties are
+ //! preserved so a fast full rehash recovers invariants for *this without extracting and
+ //! reinserting all elements again.
+ //!
+ //! <b>Requires</b>: Calls produced to the hash function should not alter the value uniqueness
+ //! properties of already inserted elements. If hasher(key1) == hasher(key2) was true when
+ //! elements were inserted, it shall be true during calls produced in the execution of this function.
+ //!
+ //! key_equal is not called inside this function so it is assumed that key_equal(value1, value2)
+ //! should produce the same results as before for inserted elements.
+ //!
+ //! <b>Effects</b>: Reprocesses all values hold by *this, recalculating their hash values
+ //! and redistributing them though the buckets.
+ //!
+ //! If store_hash option is true, this method uses the hash function and updates the stored hash value.
+ //!
+ //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
+ //!
+ //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
+ BOOST_INTRUSIVE_FORCEINLINE void full_rehash()
+ { this->rehash_impl(this->priv_bucket_traits(), true); }
//! <b>Requires</b>:
//!
@@ -3113,9 +3063,113 @@ class hashtable_impl
{ return !(x < y); }
/// @cond
- void check() const {}
+ BOOST_INTRUSIVE_FORCEINLINE void check() const {}
private:
+ void rehash_impl(const bucket_traits &new_bucket_traits, bool do_full_rehash)
+ {
+ const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
+ size_type new_bucket_count = new_bucket_traits.bucket_count();
+ const bucket_ptr old_buckets = this->priv_bucket_pointer();
+ size_type old_bucket_count = this->priv_bucket_count();
+
+ //Check power of two bucket array if the option is activated
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (new_bucket_count & (new_bucket_count-1u))));
+
+ size_type n = this->priv_get_cache_bucket_num();
+ const bool same_buffer = old_buckets == new_buckets;
+ //If the new bucket length is a common factor
+ //of the old one we can avoid hash calculations.
+ const bool fast_shrink = (!do_full_rehash) && (!incremental) && (old_bucket_count >= new_bucket_count) &&
+ (power_2_buckets || (old_bucket_count % new_bucket_count) == 0);
+ //If we are shrinking the same bucket array and it's
+ //is a fast shrink, just rehash the last nodes
+ size_type new_first_bucket_num = new_bucket_count;
+ if(same_buffer && fast_shrink && (n < new_bucket_count)){
+ new_first_bucket_num = n;
+ n = new_bucket_count;
+ }
+
+ //Anti-exception stuff: they destroy the elements if something goes wrong.
+ //If the source and destination buckets are the same, the second rollback function
+ //is harmless, because all elements have been already unlinked and destroyed
+ typedef detail::init_disposer<node_algorithms> NodeDisposer;
+ typedef detail::exception_array_disposer<bucket_type, NodeDisposer, size_type> ArrayDisposer;
+ NodeDisposer node_disp;
+ ArrayDisposer rollback1(new_buckets[0], node_disp, new_bucket_count);
+ ArrayDisposer rollback2(old_buckets[0], node_disp, old_bucket_count);
+
+ //Put size in a safe value for rollback exception
+ size_type const size_backup = this->priv_size_traits().get_size();
+ this->priv_size_traits().set_size(0);
+ //Put cache to safe position
+ this->priv_initialize_cache();
+ this->priv_insertion_update_cache(size_type(0u));
+
+ //Iterate through nodes
+ for(; n < old_bucket_count; ++n){
+ bucket_type &old_bucket = old_buckets[n];
+ if(!fast_shrink){
+ for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
+ ; i != end_sit
+ ; i = before_i, ++i){
+
+ //First obtain hash value (and store it if do_full_rehash)
+ std::size_t hash_value;
+ if(do_full_rehash){
+ value_type &v = this->priv_value_from_slist_node(i.pointed_node());
+ hash_value = this->priv_hasher()(key_of_value()(v));
+ node_functions_t::store_hash(pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(v)), hash_value, store_hash_t());
+ }
+ else{
+ const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
+ hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
+ }
+
+ //Now calculate the new bucket position
+ const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>
+ (hash_value, new_bucket_count, new_bucket_count);
+
+ //Update first used bucket cache
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+
+ //If the target bucket is new, transfer the whole group
+ siterator const last = (priv_last_in_group)(i);
+
+ if(same_buffer && new_n == n){
+ before_i = last;
+ }
+ else{
+ bucket_type &new_b = new_buckets[new_n];
+ new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
+ }
+ }
+ }
+ else{
+ const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>(n, new_bucket_count, new_bucket_count);
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+ bucket_type &new_b = new_buckets[new_n];
+ new_b.splice_after( new_b.before_begin()
+ , old_bucket
+ , old_bucket.before_begin()
+ , bucket_plus_vtraits_t::priv_get_last(old_bucket, optimize_multikey_t()));
+ }
+ }
+
+ this->priv_size_traits().set_size(size_backup);
+ this->priv_split_traits().set_size(new_bucket_count);
+ if(&new_bucket_traits != &this->priv_bucket_traits()){
+ this->priv_bucket_traits() = new_bucket_traits;
+ }
+ this->priv_initialize_cache();
+ this->priv_insertion_update_cache(new_first_bucket_num);
+ rollback1.release();
+ rollback2.release();
+ }
+
template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
void priv_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
{
@@ -3498,26 +3552,26 @@ class hashtable
//Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
- explicit hashtable ( const bucket_traits &b_traits
+ BOOST_INTRUSIVE_FORCEINLINE explicit hashtable ( const bucket_traits &b_traits
, const hasher & hash_func = hasher()
, const key_equal &equal_func = key_equal()
, const value_traits &v_traits = value_traits())
: Base(b_traits, hash_func, equal_func, v_traits)
{}
- hashtable(BOOST_RV_REF(hashtable) x)
+ BOOST_INTRUSIVE_FORCEINLINE hashtable(BOOST_RV_REF(hashtable) x)
: Base(BOOST_MOVE_BASE(Base, x))
{}
- hashtable& operator=(BOOST_RV_REF(hashtable) x)
+ BOOST_INTRUSIVE_FORCEINLINE hashtable& operator=(BOOST_RV_REF(hashtable) x)
{ return static_cast<hashtable&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
template <class Cloner, class Disposer>
- void clone_from(const hashtable &src, Cloner cloner, Disposer disposer)
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable &src, Cloner cloner, Disposer disposer)
{ Base::clone_from(src, cloner, disposer); }
template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(hashtable) src, Cloner cloner, Disposer disposer)
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable) src, Cloner cloner, Disposer disposer)
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
};
diff --git a/boost/intrusive/linear_slist_algorithms.hpp b/boost/intrusive/linear_slist_algorithms.hpp
index 4b1f06ff9f..6c8e9b797c 100644
--- a/boost/intrusive/linear_slist_algorithms.hpp
+++ b/boost/intrusive/linear_slist_algorithms.hpp
@@ -141,7 +141,7 @@ class linear_slist_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init_header(const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & this_node)
{ NodeTraits::set_next(this_node, node_ptr ()); }
//! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
@@ -153,7 +153,7 @@ class linear_slist_algorithms
//! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
{ return base_t::get_previous_node(prev_init_node, this_node); }
//! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
diff --git a/boost/intrusive/list.hpp b/boost/intrusive/list.hpp
index a59734a7de..a955c441ef 100644
--- a/boost/intrusive/list.hpp
+++ b/boost/intrusive/list.hpp
@@ -542,11 +542,7 @@ class list_impl
void swap(list_impl& other)
{
node_algorithms::swap_nodes(this->get_root_node(), other.get_root_node());
- if(constant_time_size){
- size_type backup = this->priv_size_traits().get_size();
- this->priv_size_traits().set_size(other.priv_size_traits().get_size());
- other.priv_size_traits().set_size(backup);
- }
+ this->priv_size_traits().swap(other.priv_size_traits());
}
//! <b>Effects</b>: Moves backwards all the elements, so that the first
diff --git a/boost/intrusive/list_hook.hpp b/boost/intrusive/list_hook.hpp
index aef72537e7..892e4e20d7 100644
--- a/boost/intrusive/list_hook.hpp
+++ b/boost/intrusive/list_hook.hpp
@@ -50,7 +50,8 @@ struct make_list_base_hook
>::type packed_options;
typedef generic_hook
- < circular_list_algorithms<list_node_traits<typename packed_options::void_pointer> >
+ < CircularListAlgorithms
+ , list_node_traits<typename packed_options::void_pointer>
, typename packed_options::tag
, packed_options::link_mode
, ListBaseHookId
@@ -177,7 +178,8 @@ struct make_list_member_hook
>::type packed_options;
typedef generic_hook
- < circular_list_algorithms<list_node_traits<typename packed_options::void_pointer> >
+ < CircularListAlgorithms
+ , list_node_traits<typename packed_options::void_pointer>
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/intrusive/options.hpp b/boost/intrusive/options.hpp
index fdcb5cb3c5..6523ffb574 100644
--- a/boost/intrusive/options.hpp
+++ b/boost/intrusive/options.hpp
@@ -61,12 +61,12 @@ BOOST_INTRUSIVE_OPTION_TYPE(size_type, SizeType, SizeType, size_type)
//!comparison functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(compare, Compare, Compare, compare)
-//!This option setter specifies the a function object
+//!This option setter specifies a function object
//!that specifies the type of the key of an associative
//!container and an operator to obtain it from a value type.
//!
-//!This function object must the define a `key_type` and
-//!a member with signature `const key_type & operator()(const value_type &) const`
+//!This function object must the define a `type` member typedef and
+//!a member with signature `type [const&] operator()(const value_type &) const`
//!that will return the key from a value_type of an associative container
BOOST_INTRUSIVE_OPTION_TYPE(key_of_value, KeyOfValue, KeyOfValue, key_of_value)
@@ -88,7 +88,7 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(floating_point, bool, Enabled, floating_point)
//!functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(equal, Equal, Equal, equal)
-//!This option setter specifies the equality
+//!This option setter specifies the priority comparison
//!functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(priority, Priority, Priority, priority)
diff --git a/boost/intrusive/priority_compare.hpp b/boost/intrusive/priority_compare.hpp
index ffade48b7c..f5589ce27b 100644
--- a/boost/intrusive/priority_compare.hpp
+++ b/boost/intrusive/priority_compare.hpp
@@ -26,7 +26,14 @@
namespace boost {
namespace intrusive {
-template <class T>
+/// @cond
+
+template<class U>
+void priority_order();
+
+/// @endcond
+
+template <class T = void>
struct priority_compare
{
//Compatibility with std::binary_function
@@ -40,6 +47,16 @@ struct priority_compare
}
};
+template <>
+struct priority_compare<void>
+{
+ template<class T, class U>
+ BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
+ {
+ return priority_order(t, u);
+ }
+};
+
/// @cond
template<class PrioComp, class T>
diff --git a/boost/intrusive/rbtree.hpp b/boost/intrusive/rbtree.hpp
index 276362d2fc..4f5d86dd6a 100644
--- a/boost/intrusive/rbtree.hpp
+++ b/boost/intrusive/rbtree.hpp
@@ -188,6 +188,15 @@ class rbtree_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static rbtree_impl &container_from_end_iterator(iterator end_iterator);
@@ -430,6 +439,14 @@ class rbtree_impl
//! @copydoc ::boost::intrusive::bstree::remove_node
void remove_node(reference value);
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(rbtree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(rbtree<T, Options2...> &);
+
friend bool operator< (const rbtree_impl &x, const rbtree_impl &y);
friend bool operator==(const rbtree_impl &x, const rbtree_impl &y);
diff --git a/boost/intrusive/rbtree_algorithms.hpp b/boost/intrusive/rbtree_algorithms.hpp
index 2a74e1b2cd..6a7c563cf0 100644
--- a/boost/intrusive/rbtree_algorithms.hpp
+++ b/boost/intrusive/rbtree_algorithms.hpp
@@ -284,20 +284,33 @@ class rbtree_algorithms
{
typename bstree_algo::data_for_rebalance info;
bstree_algo::erase(header, z, info);
+ rebalance_after_erasure(header, z, info);
+ return z;
+ }
- color new_z_color;
- if(info.y != z){
- new_z_color = NodeTraits::get_color(info.y);
- NodeTraits::set_color(info.y, NodeTraits::get_color(z));
- }
- else{
- new_z_color = NodeTraits::get_color(z);
- }
- //Rebalance rbtree if needed
- if(new_z_color != NodeTraits::red()){
- rebalance_after_erasure(header, info.x, info.x_parent);
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
+ if(transferred){
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
}
- return z;
+ return transferred;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::transfer_equal(header1, comp, header2, z, info);
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
}
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
@@ -431,7 +444,24 @@ class rbtree_algorithms
/// @cond
private:
- static void rebalance_after_erasure(const node_ptr & header, node_ptr x, node_ptr x_parent)
+ static void rebalance_after_erasure
+ ( const node_ptr & header, const node_ptr &z, const typename bstree_algo::data_for_rebalance &info)
+ {
+ color new_z_color;
+ if(info.y != z){
+ new_z_color = NodeTraits::get_color(info.y);
+ NodeTraits::set_color(info.y, NodeTraits::get_color(z));
+ }
+ else{
+ new_z_color = NodeTraits::get_color(z);
+ }
+ //Rebalance rbtree if needed
+ if(new_z_color != NodeTraits::red()){
+ rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
+ }
+ }
+
+ static void rebalance_after_erasure_restore_invariants(const node_ptr & header, node_ptr x, node_ptr x_parent)
{
while(1){
if(x_parent == header || (x && NodeTraits::get_color(x) != NodeTraits::black())){
diff --git a/boost/intrusive/set.hpp b/boost/intrusive/set.hpp
index 36c46c7e6e..3cd9013d4b 100644
--- a/boost/intrusive/set.hpp
+++ b/boost/intrusive/set.hpp
@@ -28,6 +28,11 @@
namespace boost {
namespace intrusive {
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class multiset_impl;
+#endif
+
//! The class template set is an intrusive container, that mimics most of
//! the interface of std::set as described in the C++ standard.
//!
@@ -150,6 +155,15 @@ class set_impl
//! @copydoc ::boost::intrusive::rbtree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::rbtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::rbtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
static set_impl &container_from_end_iterator(iterator end_iterator);
@@ -399,6 +413,26 @@ class set_impl
//! @copydoc ::boost::intrusive::rbtree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -658,6 +692,15 @@ class multiset_impl
//! @copydoc ::boost::intrusive::rbtree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::rbtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::rbtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::rbtree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
static multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -865,6 +908,25 @@ class multiset_impl
//! @copydoc ::boost::intrusive::rbtree::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_equal
+ template<class ...Options2>
+ void merge(multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_equal
+ template<class ...Options2>
+ void merge(set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/set_hook.hpp b/boost/intrusive/set_hook.hpp
index b641280878..e303b6442b 100644
--- a/boost/intrusive/set_hook.hpp
+++ b/boost/intrusive/set_hook.hpp
@@ -49,7 +49,8 @@ struct make_set_base_hook
>::type packed_options;
typedef generic_hook
- < rbtree_algorithms<rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> >
+ < RbTreeAlgorithms
+ , rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, typename packed_options::tag
, packed_options::link_mode
, RbTreeBaseHookId
@@ -180,7 +181,8 @@ struct make_set_member_hook
>::type packed_options;
typedef generic_hook
- < rbtree_algorithms<rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> >
+ < RbTreeAlgorithms
+ , rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/intrusive/sg_set.hpp b/boost/intrusive/sg_set.hpp
index 171bd59ed1..745c3790b9 100644
--- a/boost/intrusive/sg_set.hpp
+++ b/boost/intrusive/sg_set.hpp
@@ -26,6 +26,11 @@
namespace boost {
namespace intrusive {
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class sg_multiset_impl;
+#endif
+
//! The class template sg_set is an intrusive container, that mimics most of
//! the interface of std::sg_set as described in the C++ standard.
//!
@@ -148,6 +153,15 @@ class sg_set_impl
//! @copydoc ::boost::intrusive::sgtree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::sgtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::sgtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
static sg_set_impl &container_from_end_iterator(iterator end_iterator);
@@ -410,6 +424,24 @@ class sg_set_impl
//! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
void balance_factor(float new_alpha);
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(sg_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::rbtree::merge_unique
+ template<class ...Options2>
+ void merge(sg_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ template<class Compare2>
+ void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -669,6 +701,15 @@ class sg_multiset_impl
//! @copydoc ::boost::intrusive::sgtree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::sgtree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::sgtree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::sgtree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
static sg_multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -889,6 +930,24 @@ class sg_multiset_impl
//! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
void balance_factor(float new_alpha);
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(sg_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(sg_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/sgtree.hpp b/boost/intrusive/sgtree.hpp
index 6e7af7dfd3..033efb878d 100644
--- a/boost/intrusive/sgtree.hpp
+++ b/boost/intrusive/sgtree.hpp
@@ -156,6 +156,9 @@ struct alpha_holder
multiply_by_alpha_t get_multiply_by_alpha_t() const
{ return multiply_by_alpha_t(alpha_); }
+ SizeType &get_max_tree_size()
+ { return max_tree_size_; }
+
protected:
float alpha_;
float inv_minus_logalpha_;
@@ -189,6 +192,10 @@ struct alpha_holder<false, SizeType>
multiply_by_alpha_t get_multiply_by_alpha_t() const
{ return multiply_by_alpha_t(); }
+ SizeType &get_max_tree_size()
+ { return max_tree_size_; }
+
+ protected:
SizeType max_tree_size_;
};
@@ -375,6 +382,15 @@ class sgtree_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static sgtree_impl &container_from_end_iterator(iterator end_iterator);
@@ -696,6 +712,66 @@ class sgtree_impl
this->max_tree_size_ = 0;
}
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(sgtree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+
+ std::size_t max_tree1_size = this->max_tree_size_;
+ std::size_t max_tree2_size = source.get_max_tree_size();
+ if( node_algorithms::transfer_unique
+ ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
+ , source.header_ptr(), p, source.size(), max_tree2_size
+ , this->get_h_alpha_func(), this->get_alpha_by_max_size_func()) ){
+ this->max_tree_size_ = (size_type)max_tree1_size;
+ this->sz_traits().increment();
+ source.get_max_tree_size() = (size_type)max_tree2_size;
+ source.sz_traits().decrement();
+ }
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_equal
+ template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(sgtree_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ std::size_t max_tree1_size = this->max_tree_size_;
+ std::size_t max_tree2_size = source.get_max_tree_size();
+ node_algorithms::transfer_equal
+ ( this->header_ptr(), this->key_node_comp(this->key_comp()), this->size(), max_tree1_size
+ , source.header_ptr(), p, source.size(), max_tree2_size
+ , this->get_h_alpha_func(), this->get_alpha_by_max_size_func());
+ this->max_tree_size_ = (size_type)max_tree1_size;
+ this->sz_traits().increment();
+ source.get_max_tree_size() = (size_type)max_tree2_size;
+ source.sz_traits().decrement();
+ }
+ }
+
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
size_type count(const key_type &key) const;
diff --git a/boost/intrusive/sgtree_algorithms.hpp b/boost/intrusive/sgtree_algorithms.hpp
index 2d741841e1..e6002a73b0 100644
--- a/boost/intrusive/sgtree_algorithms.hpp
+++ b/boost/intrusive/sgtree_algorithms.hpp
@@ -138,7 +138,6 @@ class sgtree_algorithms
template<class AlphaByMaxSize>
static node_ptr erase(const node_ptr & header, const node_ptr & z, std::size_t tree_size, std::size_t &max_tree_size, AlphaByMaxSize alpha_by_maxsize)
{
- //typename bstree_algo::data_for_rebalance info;
bstree_algo::erase(header, z);
--tree_size;
if (tree_size > 0 &&
@@ -288,12 +287,38 @@ class sgtree_algorithms
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(const node_ptr&,const node_ptr&,const insert_commit_data&)
template<class H_Alpha>
- static void insert_unique_commit
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
(const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ { return insert_commit(header, new_value, commit_data, tree_size, h_alpha, max_tree_size); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
+ static bool transfer_unique
+ ( const node_ptr & header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
+ , const node_ptr &header2, const node_ptr & z, std::size_t tree2_size, std::size_t &max_tree2_size
+ ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
{
- bstree_algo::insert_unique_commit(header, new_value, commit_data);
- rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size);
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
+ insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
+ static void transfer_equal
+ ( const node_ptr & header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
+ , const node_ptr &header2, const node_ptr & z, std::size_t tree2_size, std::size_t &max_tree2_size
+ ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
+ {
+ insert_commit_data commit_data;
+ insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
+ insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
}
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
@@ -310,6 +335,25 @@ class sgtree_algorithms
/// @cond
private:
+ template<class KeyType, class KeyNodePtrCompare>
+ static void insert_equal_upper_bound_check
+ (const node_ptr & header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ std::size_t depth;
+ bstree_algo::insert_equal_upper_bound_check(header, key, comp, commit_data, &depth);
+ commit_data.depth = depth;
+ }
+
+ template<class H_Alpha>
+ static void insert_commit
+ (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ bstree_algo::insert_unique_commit(header, new_value, commit_data);
+ rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size);
+ }
+
template<class H_Alpha>
static void rebalance_after_insertion
(const node_ptr &x, std::size_t depth
diff --git a/boost/intrusive/slist.hpp b/boost/intrusive/slist.hpp
index d64bf49d18..00206990f6 100644
--- a/boost/intrusive/slist.hpp
+++ b/boost/intrusive/slist.hpp
@@ -343,8 +343,7 @@ class slist_impl
slist_impl(BOOST_RV_REF(slist_impl) x)
: data_(::boost::move(x.priv_value_traits()))
{
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
+ this->set_default_constructed_state();
//nothrow, no need to rollback to release elements on exception
this->swap(x);
}
@@ -717,11 +716,7 @@ class slist_impl
else{
this->priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_<linear>());
}
- if(constant_time_size){
- size_type backup = this->priv_size_traits().get_size();
- this->priv_size_traits().set_size(other.priv_size_traits().get_size());
- other.priv_size_traits().set_size(backup);
- }
+ this->priv_size_traits().swap(other.priv_size_traits());
}
//! <b>Effects</b>: Moves backwards all the elements, so that the first
@@ -1265,7 +1260,7 @@ class slist_impl
if(l) *l = this->previous(this->cend());
}
else{
- const_iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
+ const_iterator last_x(x.previous(x.end())); //constant time if cache_last is active
node_ptr prev_n(prev.pointed_node());
node_ptr last_x_n(last_x.pointed_node());
if(cache_last){
diff --git a/boost/intrusive/slist_hook.hpp b/boost/intrusive/slist_hook.hpp
index eac27370ec..0f37772c6d 100644
--- a/boost/intrusive/slist_hook.hpp
+++ b/boost/intrusive/slist_hook.hpp
@@ -50,7 +50,8 @@ struct make_slist_base_hook
>::type packed_options;
typedef generic_hook
- < circular_slist_algorithms<slist_node_traits<typename packed_options::void_pointer> >
+ < CircularSListAlgorithms
+ , slist_node_traits<typename packed_options::void_pointer>
, typename packed_options::tag
, packed_options::link_mode
, SlistBaseHookId
@@ -178,7 +179,8 @@ struct make_slist_member_hook
>::type packed_options;
typedef generic_hook
- < circular_slist_algorithms<slist_node_traits<typename packed_options::void_pointer> >
+ < CircularSListAlgorithms
+ , slist_node_traits<typename packed_options::void_pointer>
, member_tag
, packed_options::link_mode
, NoBaseHookId
@@ -270,6 +272,11 @@ class slist_member_hook
//! otherwise. This function can be used to test whether \c slist::iterator_to
//! will return a valid iterator.
//!
+ //! <b>Note</b>: If this member is called when the value is inserted in a
+ //! slist with the option linear<true>, this function will return "false"
+ //! for the last element, as it is not linked to anything (the next element is null),
+ //! so use with care.
+ //!
//! <b>Complexity</b>: Constant
bool is_linked() const;
diff --git a/boost/intrusive/splay_set.hpp b/boost/intrusive/splay_set.hpp
index 893b580812..da7662eeb1 100644
--- a/boost/intrusive/splay_set.hpp
+++ b/boost/intrusive/splay_set.hpp
@@ -23,6 +23,11 @@
# pragma once
#endif
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class splay_multiset_impl;
+#endif
+
namespace boost {
namespace intrusive {
@@ -148,6 +153,15 @@ class splay_set_impl
//! @copydoc ::boost::intrusive::splaytree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::splaytree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::splaytree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
static splay_set_impl &container_from_end_iterator(iterator end_iterator);
@@ -420,6 +434,26 @@ class splay_set_impl
//! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_unique
+ template<class ...Options2>
+ void merge(splay_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_unique
+ template<class ...Options2>
+ void merge(splay_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+
+ template<class Compare2>
+ void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -679,6 +713,15 @@ class splay_multiset_impl
//! @copydoc ::boost::intrusive::splaytree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::splaytree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::splaytree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::splaytree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
static splay_multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -902,6 +945,25 @@ class splay_multiset_impl
//! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
iterator rebalance_subtree(iterator root);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_equal
+ template<class ...Options2>
+ void merge(splay_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::splaytree::merge_equal
+ template<class ...Options2>
+ void merge(splay_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/splaytree.hpp b/boost/intrusive/splaytree.hpp
index afc10819a3..f6a1a93a9d 100644
--- a/boost/intrusive/splaytree.hpp
+++ b/boost/intrusive/splaytree.hpp
@@ -183,6 +183,15 @@ class splaytree_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
static splaytree_impl &container_from_end_iterator(iterator end_iterator);
@@ -454,6 +463,14 @@ class splaytree_impl
//! @copydoc ::boost::intrusive::bstree::remove_node
void remove_node(reference value);
+ //! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_unique(splaytree<T, Options2...> &);
+
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2>
+ void merge_equal(splaytree<T, Options2...> &);
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Requires</b>: i must be a valid iterator of *this.
diff --git a/boost/intrusive/splaytree_algorithms.hpp b/boost/intrusive/splaytree_algorithms.hpp
index 1c6afdf63c..be2e18227e 100644
--- a/boost/intrusive/splaytree_algorithms.hpp
+++ b/boost/intrusive/splaytree_algorithms.hpp
@@ -251,6 +251,33 @@ class splaytree_algorithms
bstree_algo::erase(header, z);
}
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ typename bstree_algo::insert_commit_data commit_data;
+ bool const transferable = bstree_algo::insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z);
+ bstree_algo::insert_commit(header1, z, commit_data);
+ splay_up(z, header1);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
+ {
+ insert_commit_data commit_data;
+ splay_down(header1, z, comp);
+ bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z);
+ bstree_algo::insert_commit(header1, z, commit_data);
+ }
+
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
template <class Cloner, class Disposer>
diff --git a/boost/intrusive/treap.hpp b/boost/intrusive/treap.hpp
index 385271943e..8567072d54 100644
--- a/boost/intrusive/treap.hpp
+++ b/boost/intrusive/treap.hpp
@@ -274,6 +274,16 @@ class treap_impl
//! @copydoc ::boost::intrusive::bstree::crend()const
const_reverse_iterator crend() const;
+
+ //! @copydoc ::boost::intrusive::bstree::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::bstree::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::bstree::croot()const
+ const_iterator croot() const;
+
#endif
//! <b>Effects</b>: Returns a reverse_iterator pointing to the highest priority object of the
@@ -997,6 +1007,56 @@ class treap_impl
this->tree_type::sz_traits().set_size(0);
}
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_unique
+ template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_unique(treap_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+
+ if( node_algorithms::transfer_unique
+ ( this->header_ptr(), this->key_node_comp(this->key_comp())
+ , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p) ){
+ this->sz_traits().increment();
+ source.sz_traits().decrement();
+ }
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
+ template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
+ #else
+ template<class Compare2>
+ void merge_equal(treap_impl
+ <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ #endif
+ {
+ node_ptr it (node_algorithms::begin_node(source.header_ptr()))
+ , itend(node_algorithms::end_node (source.header_ptr()));
+
+ while(it != itend){
+ node_ptr const p(it);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
+ it = node_algorithms::next_node(it);
+ node_algorithms::transfer_equal
+ ( this->header_ptr(), this->key_node_comp(this->key_comp())
+ , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p);
+ this->sz_traits().increment();
+ source.sz_traits().decrement();
+ }
+ }
+
//! @copydoc ::boost::intrusive::bstree::check(ExtraChecker)const
template <class ExtraChecker>
void check(ExtraChecker extra_checker) const
diff --git a/boost/intrusive/treap_algorithms.hpp b/boost/intrusive/treap_algorithms.hpp
index 006a880d15..b1a82b3d0f 100644
--- a/boost/intrusive/treap_algorithms.hpp
+++ b/boost/intrusive/treap_algorithms.hpp
@@ -569,6 +569,34 @@ class treap_algorithms
rotate_up_n(header, new_node, commit_data.rotations);
}
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare, class KeyNodePtrPrioCompare>
+ static bool transfer_unique
+ (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, pcomp, commit_data).second;
+ if(transferable){
+ erase(header2, z, pcomp);
+ insert_unique_commit(header1, z, commit_data);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare, class KeyNodePtrPrioCompare>
+ static void transfer_equal
+ (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ rebalance_after_insertion_check(header1, commit_data.node, z, pcomp, commit_data.rotations);
+ rebalance_for_erasure(header2, z, pcomp);
+ bstree_algo::erase(header2, z);
+ bstree_algo::insert_unique_commit(header1, z, commit_data);
+ rotate_up_n(header1, z, commit_data.rotations);
+ }
+
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
diff --git a/boost/intrusive/treap_set.hpp b/boost/intrusive/treap_set.hpp
index f97b3760c2..bf162badf0 100644
--- a/boost/intrusive/treap_set.hpp
+++ b/boost/intrusive/treap_set.hpp
@@ -26,6 +26,11 @@
namespace boost {
namespace intrusive {
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
+class treap_multiset_impl;
+#endif
+
//! The class template treap_set is an intrusive container, that mimics most of
//! the interface of std::set as described in the C++ standard.
//!
@@ -155,6 +160,15 @@ class treap_set_impl
//! @copydoc ::boost::intrusive::treap::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::treap::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::treap::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::treap::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
static treap_set_impl &container_from_end_iterator(iterator end_iterator);
@@ -229,7 +243,7 @@ class treap_set_impl
iterator insert(const_iterator hint, reference value)
{ return tree_type::insert_unique(hint, value); }
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const key_type,insert_commit_data&)
+ //! @copydoc ::boost::intrusive::treap::insert_unique_check(const key_type&,insert_commit_data&)
std::pair<iterator, bool> insert_check( const key_type &key, insert_commit_data &commit_data)
{ return tree_type::insert_unique_check(key, commit_data); }
@@ -429,6 +443,25 @@ class treap_set_impl
//! @copydoc ::boost::intrusive::treap::remove_node
void remove_node(reference value);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_set<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_multiset<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
+ template<class Compare2>
+ void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_unique(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
@@ -682,6 +715,15 @@ class treap_multiset_impl
//! @copydoc ::boost::intrusive::treap::crend()const
const_reverse_iterator crend() const;
+ //! @copydoc ::boost::intrusive::treap::root()
+ iterator root();
+
+ //! @copydoc ::boost::intrusive::treap::root()const
+ const_iterator root() const;
+
+ //! @copydoc ::boost::intrusive::treap::croot()const
+ const_iterator croot() const;
+
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);
@@ -914,6 +956,24 @@ class treap_multiset_impl
//! @copydoc ::boost::intrusive::treap::remove_node
void remove_node(reference value);
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_multiset<T, Options2...> &source);
+
+ //! @copydoc ::boost::intrusive::treap::merge_unique
+ template<class ...Options2>
+ void merge(treap_set<T, Options2...> &source);
+
+ #else
+
+ template<class Compare2>
+ void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
+ template<class Compare2>
+ void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
+ { return tree_type::merge_equal(source); }
+
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
};
diff --git a/boost/intrusive/unordered_set.hpp b/boost/intrusive/unordered_set.hpp
index 1174dff26f..1968fa250e 100644
--- a/boost/intrusive/unordered_set.hpp
+++ b/boost/intrusive/unordered_set.hpp
@@ -360,6 +360,9 @@ class unordered_set_impl
//! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
void rehash(const bucket_traits &new_bucket_traits);
+ //! @copydoc ::boost::intrusive::hashtable::full_rehash
+ void full_rehash();
+
//! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
bool incremental_rehash(bool grow = true);
@@ -836,6 +839,9 @@ class unordered_multiset_impl
//! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
void rehash(const bucket_traits &new_bucket_traits);
+ //! @copydoc ::boost::intrusive::hashtable::full_rehash
+ void full_rehash();
+
//! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
bool incremental_rehash(bool grow = true);
diff --git a/boost/intrusive/unordered_set_hook.hpp b/boost/intrusive/unordered_set_hook.hpp
index 95a575a9fc..a18d2354c4 100644
--- a/boost/intrusive/unordered_set_hook.hpp
+++ b/boost/intrusive/unordered_set_hook.hpp
@@ -152,19 +152,33 @@ struct uset_algo_wrapper : public Algo
{};
template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct get_uset_node_algo
+struct get_uset_node_traits
{
typedef typename detail::if_c
< (StoreHash || OptimizeMultiKey)
, unordered_node_traits<VoidPointer, StoreHash, OptimizeMultiKey>
, slist_node_traits<VoidPointer>
- >::type node_traits_type;
- typedef typename detail::if_c
- < OptimizeMultiKey
- , unordered_algorithms<node_traits_type>
- , uset_algo_wrapper< circular_slist_algorithms<node_traits_type> >
>::type type;
};
+
+template<bool OptimizeMultiKey>
+struct get_uset_algo_type
+{
+ static const algo_types value = OptimizeMultiKey ? UnorderedAlgorithms : UnorderedCircularSlistAlgorithms;
+};
+
+template<class NodeTraits>
+struct get_algo<UnorderedAlgorithms, NodeTraits>
+{
+ typedef unordered_algorithms<NodeTraits> type;
+};
+
+template<class NodeTraits>
+struct get_algo<UnorderedCircularSlistAlgorithms, NodeTraits>
+{
+ typedef uset_algo_wrapper< circular_slist_algorithms<NodeTraits> > type;
+};
+
/// @endcond
//! Helper metafunction to define a \c unordered_set_base_hook that yields to the same
@@ -187,10 +201,11 @@ struct make_unordered_set_base_hook
>::type packed_options;
typedef generic_hook
- < typename get_uset_node_algo < typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
+ < get_uset_algo_type <packed_options::optimize_multikey>::value
+ , typename get_uset_node_traits < typename packed_options::void_pointer
+ , packed_options::store_hash
+ , packed_options::optimize_multikey
+ >::type
, typename packed_options::tag
, packed_options::link_mode
, HashBaseHookId
@@ -326,10 +341,11 @@ struct make_unordered_set_member_hook
>::type packed_options;
typedef generic_hook
- < typename get_uset_node_algo< typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
+ < get_uset_algo_type <packed_options::optimize_multikey>::value
+ , typename get_uset_node_traits < typename packed_options::void_pointer
+ , packed_options::store_hash
+ , packed_options::optimize_multikey
+ >::type
, member_tag
, packed_options::link_mode
, NoBaseHookId
diff --git a/boost/iostreams/categories.hpp b/boost/iostreams/categories.hpp
index faadba11e0..0e84de1e98 100644
--- a/boost/iostreams/categories.hpp
+++ b/boost/iostreams/categories.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED
#define BOOST_IOSTREAMS_CATEGORIES_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/chain.hpp b/boost/iostreams/chain.hpp
index 4af8cc985c..a199c9df38 100644
--- a/boost/iostreams/chain.hpp
+++ b/boost/iostreams/chain.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -39,14 +39,11 @@
#include <boost/throw_exception.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type.hpp>
-#include <boost/iostreams/detail/execute.hpp> // VC6.5 requires this
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1310) // #include order
-# include <boost/mpl/int.hpp>
-#endif
+#include <boost/iostreams/detail/execute.hpp>
// Sometimes type_info objects must be compared by name. Borrowed from
// Boost.Python and Boost.Function.
-#if (defined(__GNUC__) && __GNUC__ >= 3) || \
+#if defined(__GNUC__) || \
defined(_AIX) || \
(defined(__sgi) && defined(__host_mips)) || \
(defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) \
@@ -58,20 +55,15 @@
# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
#endif
-// Deprecated
+// Deprecated. Unused.
#define BOOST_IOSTREAMS_COMPONENT_TYPE(chain, index) \
chain.component_type( index ) \
/**/
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
-# define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \
+// Deprecated. Unused.
+#define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \
chain.component< target >( index ) \
/**/
-#else
-# define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \
- chain.component( index, ::boost::type< target >() ) \
- /**/
-#endif
namespace boost { namespace iostreams {
@@ -180,7 +172,6 @@ public:
return (*boost::next(list().begin(), n))->component_type();
}
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
// Deprecated.
template<int N>
const std::type_info& component_type() const { return component_type(N); }
@@ -191,9 +182,8 @@ public:
// Deprecated.
template<int N, typename T>
T* component() const { return component<T>(N); }
-#endif
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
private:
#endif
template<typename T>
@@ -456,7 +446,6 @@ public:
const std::type_info& component_type(int n) const
{ return chain_->component_type(n); }
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
// Deprecated.
template<int N>
const std::type_info& component_type() const
@@ -470,11 +459,6 @@ public:
template<int N, typename T>
T* component() const
{ return chain_->BOOST_NESTED_TEMPLATE component<N, T>(); }
-#else
- template<typename T>
- T* component(int n, boost::type<T> t) const
- { return chain_->component(n, t); }
-#endif
bool is_complete() const { return chain_->is_complete(); }
bool auto_close() const { return chain_->auto_close(); }
diff --git a/boost/iostreams/char_traits.hpp b/boost/iostreams/char_traits.hpp
index 4234907e47..76ddf9d4f2 100755..100644
--- a/boost/iostreams/char_traits.hpp
+++ b/boost/iostreams/char_traits.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_CHAR_TRAITS_HPP_INCLUDED
#define BOOST_IOSTREAMS_CHAR_TRAITS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/close.hpp b/boost/iostreams/close.hpp
index d0d186ecac..8ae499ff26 100644
--- a/boost/iostreams/close.hpp
+++ b/boost/iostreams/close.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED
#define BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -77,10 +77,6 @@ void close_all(T& t, Sink& snk)
} } // End namespaces iostreams, boost.
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------//
-# include <boost/iostreams/detail/vc6/close.hpp>
-#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------//
-
namespace boost { namespace iostreams {
namespace detail {
@@ -252,8 +248,6 @@ struct close_impl<two_sequence> {
} } // End namespaces iostreams, boost.
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------//
-
#include <boost/iostreams/detail/config/enable_warnings.hpp>
#endif // #ifndef BOOST_IOSTREAMS_CLOSE_HPP_INCLUDED
diff --git a/boost/iostreams/code_converter.hpp b/boost/iostreams/code_converter.hpp
index 7ac2ff3bef..85d5c80eeb 100644
--- a/boost/iostreams/code_converter.hpp
+++ b/boost/iostreams/code_converter.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_CODE_CONVERTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -264,14 +264,6 @@ public:
));
public:
code_converter() { }
-#if BOOST_WORKAROUND(__GNUC__, < 3)
- code_converter(code_converter& rhs)
- : code_converter_base<Device, Codecvt, Alloc>(rhs)
- { }
- code_converter(const code_converter& rhs)
- : code_converter_base<Device, Codecvt, Alloc>(rhs)
- { }
-#endif
BOOST_IOSTREAMS_FORWARD( code_converter, open_impl, Device,
BOOST_IOSTREAMS_CONVERTER_PARAMS,
BOOST_IOSTREAMS_CONVERTER_ARGS )
diff --git a/boost/iostreams/combine.hpp b/boost/iostreams/combine.hpp
index c404663031..107122a97b 100644
--- a/boost/iostreams/combine.hpp
+++ b/boost/iostreams/combine.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
#define BOOST_IOSTREAMS_COMBINE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/compose.hpp b/boost/iostreams/compose.hpp
index dfc3df6658..6d62721f33 100644
--- a/boost/iostreams/compose.hpp
+++ b/boost/iostreams/compose.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED
#define BOOST_IOSTREAMS_COMPOSE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -379,7 +379,6 @@ compose( const Filter& flt, const FilterOrDevice& fod
{ return compose(flt, fod, is_std_io<FilterOrDevice>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename Filter, typename FilterOrDevice>
@@ -387,7 +386,7 @@ composite<Filter, FilterOrDevice>
compose (const Filter& filter, FilterOrDevice& fod)
{ return composite<Filter, FilterOrDevice>(filter, fod); }
-# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------//
+# endif // Borland 5.x or GCC //--------------------------------//
#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
//----------------------------------------------------------------------------//
diff --git a/boost/iostreams/concepts.hpp b/boost/iostreams/concepts.hpp
index 1ea104e1c6..da4bfd6950 100755..100644
--- a/boost/iostreams/concepts.hpp
+++ b/boost/iostreams/concepts.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_CONCEPTS_HPP_INCLUDED
#define BOOST_IOSTREAMS_CONCEPTS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -25,7 +25,7 @@ namespace boost { namespace iostreams {
//--------------Definitions of helper templates for device concepts-----------//
-template<typename Mode, typename Ch = BOOST_IOSTREAMS_DEFAULT_ARG(char)>
+template<typename Mode, typename Ch = char>
struct device {
typedef Ch char_type;
struct category
@@ -51,7 +51,7 @@ struct device {
void imbue(const Locale&) { }
};
-template<typename Mode, typename Ch = BOOST_IOSTREAMS_DEFAULT_ARG(wchar_t)>
+template<typename Mode, typename Ch = wchar_t>
struct wdevice : device<Mode, Ch> { };
typedef device<input> source;
@@ -61,7 +61,7 @@ typedef wdevice<output> wsink;
//--------------Definitions of helper templates for simple filter concepts----//
-template<typename Mode, typename Ch = BOOST_IOSTREAMS_DEFAULT_ARG(char)>
+template<typename Mode, typename Ch = char>
struct filter {
typedef Ch char_type;
struct category
@@ -93,7 +93,7 @@ struct filter {
void imbue(const Locale&) { }
};
-template<typename Mode, typename Ch = BOOST_IOSTREAMS_DEFAULT_ARG(wchar_t)>
+template<typename Mode, typename Ch = wchar_t>
struct wfilter : filter<Mode, Ch> { };
typedef filter<input> input_filter;
diff --git a/boost/iostreams/constants.hpp b/boost/iostreams/constants.hpp
index 85eb7e7cc8..55e6f5fdf3 100755..100644
--- a/boost/iostreams/constants.hpp
+++ b/boost/iostreams/constants.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_CONSTANTS_HPP_INCLUDED
#define BOOST_IOSTREAMS_CONSTANTS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/copy.hpp b/boost/iostreams/copy.hpp
index b9f748a461..d165cc0e01 100755..100644
--- a/boost/iostreams/copy.hpp
+++ b/boost/iostreams/copy.hpp
@@ -15,7 +15,7 @@
#ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED
#define BOOST_IOSTREAMS_COPY_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -202,8 +202,6 @@ copy( const Source& src, const Sink& snk,
buffer_size );
}
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
-
// Overload of copy() for the case where the source, but not the sink, is
// a standard stream or stream buffer
template<typename Source, typename Sink>
@@ -245,8 +243,6 @@ copy( Source& src, Sink& snk,
return detail::copy_impl(detail::wrap(src), detail::wrap(snk), buffer_size);
}
-#endif // #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------//
-
} } // End namespaces iostreams, boost.
#endif // #ifndef BOOST_IOSTREAMS_COPY_HPP_INCLUDED
diff --git a/boost/iostreams/detail/access_control.hpp b/boost/iostreams/detail/access_control.hpp
index 2dce6ca8c2..9c3328a226 100755..100644
--- a/boost/iostreams/detail/access_control.hpp
+++ b/boost/iostreams/detail/access_control.hpp
@@ -13,7 +13,7 @@
#ifndef BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED
#define BOOST_IOSTREAMS_ACCESS_CONTROL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/direct_adapter.hpp b/boost/iostreams/detail/adapter/direct_adapter.hpp
index 88ab735a17..243b4b0abf 100644
--- a/boost/iostreams/detail/adapter/direct_adapter.hpp
+++ b/boost/iostreams/detail/adapter/direct_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/mode_adapter.hpp b/boost/iostreams/detail/adapter/mode_adapter.hpp
index 91fd97fbd4..46e83c58af 100644
--- a/boost/iostreams/detail/adapter/mode_adapter.hpp
+++ b/boost/iostreams/detail/adapter/mode_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_MODE_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -38,9 +38,7 @@ public:
device_tag,
mpl::if_<is_filter<T>, filter_tag, device_tag>,
mpl::if_<is_filter<T>, multichar_tag, empty_base>,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- closable_tag, // VC6 can't see member close()!
- #endif
+ closable_tag,
localizable_tag
{ };
explicit mode_adapter(const component_type& t) : t_(t) { }
@@ -52,10 +50,8 @@ public:
std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
BOOST_IOS::openmode which =
BOOST_IOS::in | BOOST_IOS::out );
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
void close();
void close(BOOST_IOS::openmode which);
-#endif
// Filter member functions.
@@ -108,15 +104,13 @@ std::streampos mode_adapter<Mode, T>::seek
(stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
{ return boost::iostreams::seek(t_, off, way, which); }
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- template<typename Mode, typename T>
- void mode_adapter<Mode, T>::close()
- { detail::close_all(t_); }
+template<typename Mode, typename T>
+void mode_adapter<Mode, T>::close()
+{ detail::close_all(t_); }
- template<typename Mode, typename T>
- void mode_adapter<Mode, T>::close(BOOST_IOS::openmode which)
- { iostreams::close(t_, which); }
-#endif
+template<typename Mode, typename T>
+void mode_adapter<Mode, T>::close(BOOST_IOS::openmode which)
+{ iostreams::close(t_, which); }
} } } // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
index 2944f25d75..2ed9039c7b 100755..100644
--- a/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
+++ b/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/adapter/range_adapter.hpp b/boost/iostreams/detail/adapter/range_adapter.hpp
index 4086d31867..b7fe56f7ed 100644
--- a/boost/iostreams/detail/adapter/range_adapter.hpp
+++ b/boost/iostreams/detail/adapter/range_adapter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_RANGE_ADAPTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/add_facet.hpp b/boost/iostreams/detail/add_facet.hpp
index 65a8951444..6033d4f8a1 100755..100644
--- a/boost/iostreams/detail/add_facet.hpp
+++ b/boost/iostreams/detail/add_facet.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ADD_FACET_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/buffer.hpp b/boost/iostreams/detail/buffer.hpp
index 1168289d91..72400f04ca 100644
--- a/boost/iostreams/detail/buffer.hpp
+++ b/boost/iostreams/detail/buffer.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -45,9 +45,9 @@ private:
#endif
public:
basic_buffer();
- basic_buffer(int buffer_size);
+ basic_buffer(std::streamsize buffer_size);
~basic_buffer();
- void resize(int buffer_size);
+ void resize(std::streamsize buffer_size);
Ch* begin() const { return buf_; }
Ch* end() const { return buf_ + size_; }
Ch* data() const { return buf_; }
@@ -83,7 +83,7 @@ public:
using base::data;
using base::size;
typedef Ch* const const_pointer;
- buffer(int buffer_size);
+ buffer(std::streamsize buffer_size);
Ch* & ptr() { return ptr_; }
const_pointer& ptr() const { return ptr_; }
Ch* & eptr() { return eptr_; }
@@ -98,7 +98,11 @@ public:
using namespace std;
std::streamsize keep;
if ((keep = static_cast<std::streamsize>(eptr_ - ptr_)) > 0)
- traits_type::move(this->data(), ptr_, keep);
+ traits_type::move(
+ this->data(),
+ ptr_,
+ static_cast<size_t>(keep)
+ );
set(0, keep);
std::streamsize result =
iostreams::read(src, this->data() + keep, this->size() - keep);
@@ -121,8 +125,8 @@ public:
std::streamsize result = iostreams::write_if(dest, ptr_, amt);
if (result < amt) {
traits_type::move( this->data(),
- ptr_ + result,
- amt - result );
+ ptr_ + static_cast<size_t>(result),
+ static_cast<size_t>(amt - result) );
}
this->set(0, amt - result);
return result != 0;
@@ -141,8 +145,9 @@ template<typename Ch, typename Alloc>
basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
template<typename Ch, typename Alloc>
-basic_buffer<Ch, Alloc>::basic_buffer(int buffer_size)
- : buf_(static_cast<Ch*>(allocator_type().allocate(buffer_size, 0))),
+basic_buffer<Ch, Alloc>::basic_buffer(std::streamsize buffer_size)
+ : buf_(static_cast<Ch*>(allocator_type().allocate(
+ static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0))),
size_(buffer_size) // Cast for SunPro 5.3.
{ }
@@ -156,7 +161,7 @@ inline basic_buffer<Ch, Alloc>::~basic_buffer()
}
template<typename Ch, typename Alloc>
-inline void basic_buffer<Ch, Alloc>::resize(int buffer_size)
+inline void basic_buffer<Ch, Alloc>::resize(std::streamsize buffer_size)
{
if (size_ != buffer_size) {
basic_buffer<Ch, Alloc> temp(buffer_size);
@@ -175,7 +180,7 @@ void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
//--------------Implementation of buffer--------------------------------------//
template<typename Ch, typename Alloc>
-buffer<Ch, Alloc>::buffer(int buffer_size)
+buffer<Ch, Alloc>::buffer(std::streamsize buffer_size)
: basic_buffer<Ch, Alloc>(buffer_size) { }
template<typename Ch, typename Alloc>
diff --git a/boost/iostreams/detail/call_traits.hpp b/boost/iostreams/detail/call_traits.hpp
index 6b04c7a656..be6123737b 100755..100644
--- a/boost/iostreams/detail/call_traits.hpp
+++ b/boost/iostreams/detail/call_traits.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_VALUE_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/char_traits.hpp b/boost/iostreams/detail/char_traits.hpp
index 2ee2fd0d4f..ce3eb6dbe7 100755..100644
--- a/boost/iostreams/detail/char_traits.hpp
+++ b/boost/iostreams/detail/char_traits.hpp
@@ -12,7 +12,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CHAR_TRAITS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/codecvt_helper.hpp b/boost/iostreams/detail/codecvt_helper.hpp
index deb4e30683..0bd8d598ea 100644
--- a/boost/iostreams/detail/codecvt_helper.hpp
+++ b/boost/iostreams/detail/codecvt_helper.hpp
@@ -28,7 +28,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CODECVT_HELPER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -162,7 +162,6 @@ protected:
#if defined(BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION) || \
defined(BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION) \
/**/
-# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \
namespace std { \
template<typename Intern, typename Extern> \
@@ -183,28 +182,6 @@ protected:
std::locale::id codecvt<Intern, Extern, state>::id; \
} \
/**/
-# else
-# define BOOST_IOSTREAMS_CODECVT_SPEC(state) \
- namespace std { \
- template<> \
- class codecvt<wchar_t, char, state> \
- : public ::boost::iostreams::detail::codecvt_impl< \
- wchar_t, char, state \
- > \
- { \
- public: \
- codecvt(std::size_t refs = 0) \
- : ::boost::iostreams::detail::codecvt_impl< \
- wchar_t, char, state \
- >(refs) \
- { } \
- static std::locale::id id; \
- }; \
- template<> \
- std::locale::id codecvt<wchar_t, char, state>::id; \
- } \
- /**/
-# endif
#else
# define BOOST_IOSTREAMS_CODECVT_SPEC(state)
#endif // no primary codecvt definition, or empty definition.
diff --git a/boost/iostreams/detail/codecvt_holder.hpp b/boost/iostreams/detail/codecvt_holder.hpp
index 6d6e1cf179..13a93334eb 100755..100644
--- a/boost/iostreams/detail/codecvt_holder.hpp
+++ b/boost/iostreams/detail/codecvt_holder.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CODECVT_HOLDER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/auto_link.hpp b/boost/iostreams/detail/config/auto_link.hpp
index 55f954b64f..07ab23c3c1 100755..100644
--- a/boost/iostreams/detail/config/auto_link.hpp
+++ b/boost/iostreams/detail/config/auto_link.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -19,7 +19,7 @@
# if defined(BOOST_MSVC) \
|| defined(__BORLANDC__) \
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
- || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ || (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
# pragma comment(lib, BOOST_EXTERNAL_LIB_NAME)
# endif
diff --git a/boost/iostreams/detail/config/bzip2.hpp b/boost/iostreams/detail/config/bzip2.hpp
index d716fd169c..bfcda40560 100755..100644
--- a/boost/iostreams/detail/config/bzip2.hpp
+++ b/boost/iostreams/detail/config/bzip2.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -19,7 +19,7 @@
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
- (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
// Specify the name of the .lib file.
diff --git a/boost/iostreams/detail/config/codecvt.hpp b/boost/iostreams/detail/config/codecvt.hpp
index 7c6cb1f385..b525c8435b 100755..100644
--- a/boost/iostreams/detail/config/codecvt.hpp
+++ b/boost/iostreams/detail/config/codecvt.hpp
@@ -13,7 +13,7 @@
#include <boost/iostreams/detail/config/wide_streams.hpp>
#include <cstddef>
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/dyn_link.hpp b/boost/iostreams/detail/config/dyn_link.hpp
index 518e0b03ce..15490cfe4d 100755..100644
--- a/boost/iostreams/detail/config/dyn_link.hpp
+++ b/boost/iostreams/detail/config/dyn_link.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/fpos.hpp b/boost/iostreams/detail/config/fpos.hpp
index 811a8d66f6..d1ba7dddcb 100644
--- a/boost/iostreams/detail/config/fpos.hpp
+++ b/boost/iostreams/detail/config/fpos.hpp
@@ -18,7 +18,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/gcc.hpp b/boost/iostreams/detail/config/gcc.hpp
index a1d57b081f..ff6892a5e5 100644
--- a/boost/iostreams/detail/config/gcc.hpp
+++ b/boost/iostreams/detail/config/gcc.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/overload_resolution.hpp b/boost/iostreams/detail/config/overload_resolution.hpp
index bbdd442788..63d9e2830d 100755..100644
--- a/boost/iostreams/detail/config/overload_resolution.hpp
+++ b/boost/iostreams/detail/config/overload_resolution.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -21,9 +21,7 @@
#if !defined(BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION)
# if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) || \
- BOOST_WORKAROUND(__BORLANDC__, < 0x600) || \
- BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(BOOST_IOSTREAMS_GCC, <= 295) \
+ BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
# define BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
# endif
diff --git a/boost/iostreams/detail/config/unreachable_return.hpp b/boost/iostreams/detail/config/unreachable_return.hpp
index 9e40033e8d..97b3709952 100644
--- a/boost/iostreams/detail/config/unreachable_return.hpp
+++ b/boost/iostreams/detail/config/unreachable_return.hpp
@@ -7,7 +7,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/wide_streams.hpp b/boost/iostreams/detail/config/wide_streams.hpp
index 425875e1f8..af3d716d49 100755..100644
--- a/boost/iostreams/detail/config/wide_streams.hpp
+++ b/boost/iostreams/detail/config/wide_streams.hpp
@@ -15,7 +15,7 @@
#include <boost/detail/workaround.hpp>
#include <cstddef>
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/config/zlib.hpp b/boost/iostreams/detail/config/zlib.hpp
index 9283e4caa9..017dd0c182 100755..100644
--- a/boost/iostreams/detail/config/zlib.hpp
+++ b/boost/iostreams/detail/config/zlib.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -21,7 +21,7 @@
# if defined(BOOST_MSVC) || \
defined(__BORLANDC__) || \
(defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
- (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS)) \
/**/
// Specify the name of the .lib file.
diff --git a/boost/iostreams/detail/counted_array.hpp b/boost/iostreams/detail/counted_array.hpp
index d37193e7ab..c0cd8a1765 100755
--- a/boost/iostreams/detail/counted_array.hpp
+++ b/boost/iostreams/detail/counted_array.hpp
@@ -9,6 +9,8 @@
#define BOOST_IOSTREAMS_DETAIL_COUNTED_ARRAY_HPP_INCLUDED
#include <algorithm> // min.
+#include <cstddef> // size_t
+#include <string> // char_traits
#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/detail/char_traits.hpp>
#include <boost/iostreams/detail/ios.hpp> // streamsize.
@@ -25,9 +27,13 @@ public:
{ }
std::streamsize read(Ch* s, std::streamsize n)
{
- std::streamsize result = (std::min)(n, end_ - ptr_);
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy
- (s, buf_ + ptr_, result);
+ using namespace std;
+ streamsize result = (std::min)(n, end_ - ptr_);
+ char_traits<char_type>::copy(
+ s,
+ buf_ + ptr_,
+ static_cast<size_t>(result)
+ );
ptr_ += result;
return result;
}
@@ -47,9 +53,13 @@ public:
{ }
std::streamsize write(const Ch* s, std::streamsize n)
{
+ using namespace std;
std::streamsize result = (std::min)(n, end_ - ptr_);
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type)::copy
- (buf_ + ptr_, s, result);
+ char_traits<char_type>::copy(
+ buf_ + ptr_,
+ s,
+ static_cast<size_t>(result)
+ );
ptr_ += result;
return result;
}
diff --git a/boost/iostreams/detail/default_arg.hpp b/boost/iostreams/detail/default_arg.hpp
index 9364ca27fa..c443e9872a 100755..100644
--- a/boost/iostreams/detail/default_arg.hpp
+++ b/boost/iostreams/detail/default_arg.hpp
@@ -8,18 +8,14 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include <boost/mpl/identity.hpp>
-# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) mpl::identity< arg >::type
-#else
-# define BOOST_IOSTREAMS_DEFAULT_ARG(arg) arg
-#endif
+// Obsolete. Remove.
+#define BOOST_IOSTREAMS_DEFAULT_ARG(arg) arg
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DEFAULT_ARG_HPP_INCLUDED
diff --git a/boost/iostreams/detail/dispatch.hpp b/boost/iostreams/detail/dispatch.hpp
index b482e04319..35cf244141 100755..100644
--- a/boost/iostreams/detail/dispatch.hpp
+++ b/boost/iostreams/detail/dispatch.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/double_object.hpp b/boost/iostreams/detail/double_object.hpp
index 69f6587753..efb3b78601 100755..100644
--- a/boost/iostreams/detail/double_object.hpp
+++ b/boost/iostreams/detail/double_object.hpp
@@ -14,7 +14,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DOUBLE_OBJECT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/enable_if_stream.hpp b/boost/iostreams/detail/enable_if_stream.hpp
index 2cdd7068cb..826e44d2a5 100755..100644
--- a/boost/iostreams/detail/enable_if_stream.hpp
+++ b/boost/iostreams/detail/enable_if_stream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ENABLE_IF_STREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/error.hpp b/boost/iostreams/detail/error.hpp
index 57999d4ef5..85cbd98fe2 100755..100644
--- a/boost/iostreams/detail/error.hpp
+++ b/boost/iostreams/detail/error.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/execute.hpp b/boost/iostreams/detail/execute.hpp
index 14d1a48f80..28e4217234 100755..100644
--- a/boost/iostreams/detail/execute.hpp
+++ b/boost/iostreams/detail/execute.hpp
@@ -28,7 +28,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_EXECUTE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/forward.hpp b/boost/iostreams/detail/forward.hpp
index 0ff2a35a98..f5ed4f85dc 100644
--- a/boost/iostreams/detail/forward.hpp
+++ b/boost/iostreams/detail/forward.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FORWARD_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -62,8 +62,14 @@
BOOST_IOSTREAMS_FORWARDING_FN, (class, impl, device) \
) \
/**/
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \
+#define BOOST_IOSTREAMS_FORWARDING_CTOR(z, n, tuple) \
+ template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
+ BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
+ (BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
+ BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
+ { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
+ ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
+ (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \
BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
@@ -75,7 +81,13 @@
( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u)) ); } \
/**/
-# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \
+#define BOOST_IOSTREAMS_FORWARDING_FN(z, n, tuple) \
+ template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
+ void open(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
+ BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
+ { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
+ ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
+ (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
template< typename U100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), typename U) > \
void open \
@@ -86,29 +98,6 @@
( u100 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \
BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), u) ); } \
/**/
-#else
-# define BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple)
-# define BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple)
-#endif
-#define BOOST_IOSTREAMS_FORWARDING_CTOR(z, n, tuple) \
- template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
- BOOST_PP_TUPLE_ELEM(3, 0, tuple) \
- (BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
- BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
- { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
- ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
- (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
- BOOST_IOSTREAMS_FORWARDING_CTOR_I(z, n, tuple) \
- /**/
-#define BOOST_IOSTREAMS_FORWARDING_FN(z, n, tuple) \
- template<BOOST_PP_ENUM_PARAMS_Z(z, n, typename U)> \
- void open(BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, const U, &u) \
- BOOST_IOSTREAMS_DISABLE_IF_SAME(U0, BOOST_PP_TUPLE_ELEM(3, 2, tuple))) \
- { this->BOOST_PP_TUPLE_ELEM(3, 1, tuple) \
- ( BOOST_PP_TUPLE_ELEM(3, 2, tuple) \
- (BOOST_PP_ENUM_PARAMS_Z(z, n, u)) ); } \
- BOOST_IOSTREAMS_FORWARDING_FN_I(z, n, tuple) \
- /**/
// Disable forwarding constructors if first parameter type is the same
// as the device type
diff --git a/boost/iostreams/detail/fstream.hpp b/boost/iostreams/detail/fstream.hpp
index b8070a7291..848258d97c 100755..100644
--- a/boost/iostreams/detail/fstream.hpp
+++ b/boost/iostreams/detail/fstream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FSTREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/functional.hpp b/boost/iostreams/detail/functional.hpp
index a7b9b6bbb1..97b7fe5e75 100755..100644
--- a/boost/iostreams/detail/functional.hpp
+++ b/boost/iostreams/detail/functional.hpp
@@ -17,7 +17,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_FUNCTIONAL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/ios.hpp b/boost/iostreams/detail/ios.hpp
index 4d34f8fdb0..b123ddeb58 100755..100644
--- a/boost/iostreams/detail/ios.hpp
+++ b/boost/iostreams/detail/ios.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IOS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -32,8 +32,7 @@ namespace boost { namespace iostreams { namespace detail {
#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------------------//
# define BOOST_IOSTREAMS_BASIC_IOS(ch, tr) std::basic_ios< ch, tr >
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x3003) && \
- !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
+ !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
#define BOOST_IOS std::ios
diff --git a/boost/iostreams/detail/iostream.hpp b/boost/iostreams/detail/iostream.hpp
index 45692b35a0..1e19f08278 100755..100644
--- a/boost/iostreams/detail/iostream.hpp
+++ b/boost/iostreams/detail/iostream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IOSTREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/is_dereferenceable.hpp b/boost/iostreams/detail/is_dereferenceable.hpp
index 8b86819979..06744abbdf 100644
--- a/boost/iostreams/detail/is_dereferenceable.hpp
+++ b/boost/iostreams/detail/is_dereferenceable.hpp
@@ -9,8 +9,6 @@
#ifndef BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_IS_DEREFERENCEABLE_HPP_INCLUDED
-# include <boost/type_traits/detail/bool_trait_def.hpp>
-# include <boost/type_traits/detail/template_arity_spec.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
# include <boost/mpl/bool.hpp>
@@ -39,8 +37,7 @@ namespace is_dereferenceable_
// This is a last-resort operator* for when none other is found
tag operator*(any const&);
-# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
- || BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
# define BOOST_comma(a,b) (a)
# else
// In case an operator++ is found that returns void, we'll use ++x,0
@@ -70,15 +67,13 @@ namespace is_dereferenceable_
template<typename T>
struct is_dereferenceable
- BOOST_TT_AUX_BOOL_C_BASE(is_dereferenceable_::impl<T>::value)
+ : public ::boost::integral_constant<bool, is_dereferenceable_::impl<T>::value >
{
- BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(is_dereferenceable_::impl<T>::value)
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_dereferenceable,(T))
};
} }
-BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::iostreams::detail::is_dereferenceable)
} // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/is_iterator_range.hpp b/boost/iostreams/detail/is_iterator_range.hpp
index ac61064022..39d845f4a3 100644
--- a/boost/iostreams/detail/is_iterator_range.hpp
+++ b/boost/iostreams/detail/is_iterator_range.hpp
@@ -17,8 +17,6 @@
namespace boost {
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //---------------------------------//
-
// We avoid dependence on Boost.Range by using a forward declaration.
template<typename Iterator>
class iterator_range;
@@ -29,19 +27,6 @@ BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_iterator_range, boost::iterator_range, 1)
} // End namespace iostreams.
-# else // # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) //-----------------------//
-
-namespace iostreams {
-
- template<typename T>
- struct is_iterator_range {
- BOOST_STATIC_CONSTANT(bool, value = false);
- };
-
-} // End namespace iostreams.
-
-# endif // # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) //----------------------//
-
} // End namespace boost.
#include <boost/iostreams/detail/config/enable_warnings.hpp>
diff --git a/boost/iostreams/detail/newline.hpp b/boost/iostreams/detail/newline.hpp
index 41b5b5268d..d6fceb04b0 100755..100644
--- a/boost/iostreams/detail/newline.hpp
+++ b/boost/iostreams/detail/newline.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_NEWLINE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/optional.hpp b/boost/iostreams/detail/optional.hpp
index dbb25f0040..867dfbda69 100644
--- a/boost/iostreams/detail/optional.hpp
+++ b/boost/iostreams/detail/optional.hpp
@@ -14,7 +14,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OPTIONAL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/param_type.hpp b/boost/iostreams/detail/param_type.hpp
index c10f1d8bb2..3a9949348c 100755..100644
--- a/boost/iostreams/detail/param_type.hpp
+++ b/boost/iostreams/detail/param_type.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PARAM_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/push.hpp b/boost/iostreams/detail/push.hpp
index c1e7d9aa5e..1a9393cb02 100755..100644
--- a/boost/iostreams/detail/push.hpp
+++ b/boost/iostreams/detail/push.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PUSH_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -53,8 +53,7 @@
BOOST_IOSTREAMS_PUSH_ARGS() ); \
/**/
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
- !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) \
/**/
# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
# define BOOST_IOSTREAMS_DEFINE_PUSH_IMPL(name, mode, ch, helper, has_return, result) \
diff --git a/boost/iostreams/detail/push_params.hpp b/boost/iostreams/detail/push_params.hpp
index 7e80d09af1..8d8e5d74b3 100644
--- a/boost/iostreams/detail/push_params.hpp
+++ b/boost/iostreams/detail/push_params.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_PUSH_PARAMS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/resolve.hpp b/boost/iostreams/detail/resolve.hpp
index fd1fbb6522..2d480950e1 100644
--- a/boost/iostreams/detail/resolve.hpp
+++ b/boost/iostreams/detail/resolve.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_RESOLVE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -32,9 +32,7 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp> // true_.
#include <boost/mpl/if.hpp>
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-# include <boost/range/iterator_range.hpp>
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#include <boost/range/iterator_range.hpp>
#include <boost/type_traits/is_array.hpp>
// Must come last.
@@ -102,12 +100,10 @@ template<typename Mode, typename Ch, std::size_t N>
array_adapter<Mode, Ch> resolve(Ch (&array)[N])
{ return array_adapter<Mode, Ch>(array); }
-# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- template<typename Mode, typename Ch, typename Iter>
- range_adapter< Mode, boost::iterator_range<Iter> >
- resolve(const boost::iterator_range<Iter>& rng)
- { return range_adapter< Mode, boost::iterator_range<Iter> >(rng); }
-# endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+template<typename Mode, typename Ch, typename Iter>
+range_adapter< Mode, boost::iterator_range<Iter> >
+resolve(const boost::iterator_range<Iter>& rng)
+{ return range_adapter< Mode, boost::iterator_range<Iter> >(rng); }
# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //---------------------//
@@ -201,7 +197,6 @@ resolve(const T& t BOOST_IOSTREAMS_DISABLE_IF_STREAM(T))
{ return resolve<Mode, Ch>(t, is_std_io<T>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename Mode, typename Ch, typename T>
@@ -225,7 +220,7 @@ typename resolve_traits<Mode, Ch, T>::type
resolve(T& t BOOST_IOSTREAMS_ENABLE_IF_STREAM(T))
{ return resolve<Mode, Ch>(t, is_std_io<T>()); }
-# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //--------------------------------//
+# endif // Borland 5.x or GCC //--------------------------------//
#endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
} } } // End namespaces detail, iostreams, boost.
diff --git a/boost/iostreams/detail/restrict_impl.hpp b/boost/iostreams/detail/restrict_impl.hpp
index aab9411462..8278db5a6a 100644
--- a/boost/iostreams/detail/restrict_impl.hpp
+++ b/boost/iostreams/detail/restrict_impl.hpp
@@ -466,7 +466,6 @@ BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io<T>()); }
# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
!defined(__GNUC__) // ---------------------------------------------------//
template<typename T>
@@ -474,7 +473,7 @@ restriction<T>
BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
{ return restriction<T>(t, off, len); }
-# endif // Borland 5.x, VC6-7.0 or GCC 2.9x //-------------------------------//
+# endif // Borland 5.x or GCC //-------------------------------//
# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------//
} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/select.hpp b/boost/iostreams/detail/select.hpp
index bfe1d09dea..16c5973ad1 100755..100644
--- a/boost/iostreams/detail/select.hpp
+++ b/boost/iostreams/detail/select.hpp
@@ -25,7 +25,7 @@
#ifndef BOOST_IOSTREAMS_SELECT_HPP_INCLUDED
#define BOOST_IOSTREAMS_SELECT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/streambuf.hpp b/boost/iostreams/detail/streambuf.hpp
index 49a48ce38f..f2e8081b20 100755..100644
--- a/boost/iostreams/detail/streambuf.hpp
+++ b/boost/iostreams/detail/streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/streambuf/chainbuf.hpp b/boost/iostreams/detail/streambuf/chainbuf.hpp
index 4e14383843..c3714fe041 100644
--- a/boost/iostreams/detail/streambuf/chainbuf.hpp
+++ b/boost/iostreams/detail/streambuf/chainbuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_CHAINBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -75,9 +75,6 @@ protected:
typename Chain::char_type,
typename Chain::traits_type
) base_type;
-//#if !BOOST_WORKAROUND(__GNUC__, == 2)
-// BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-//#endif
private:
// Translate from std int_type to chain's int_type.
diff --git a/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/boost/iostreams/detail/streambuf/direct_streambuf.hpp
index 46e5444b28..69efe2b128 100644
--- a/boost/iostreams/detail/streambuf/direct_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/direct_streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -67,9 +67,7 @@ public: // stream needs access.
// Declared in linked_streambuf.
T* component() { return storage_.get(); }
protected:
-#if !BOOST_WORKAROUND(__GNUC__, == 2)
BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-#endif
direct_streambuf();
//--------------Virtual functions-----------------------------------------//
diff --git a/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
index 42a3c97959..8da5ef3c50 100644
--- a/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
@@ -73,9 +73,7 @@ public:
// Declared in linked_streambuf.
T* component() { return &*obj(); }
protected:
-#if !BOOST_WORKAROUND(__GNUC__, == 2)
BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-#endif
//----------virtual functions---------------------------------------------//
diff --git a/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/boost/iostreams/detail/streambuf/linked_streambuf.hpp
index 10aedb89df..9999ded62f 100755..100644
--- a/boost/iostreams/detail/streambuf/linked_streambuf.hpp
+++ b/boost/iostreams/detail/streambuf/linked_streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/system_failure.hpp b/boost/iostreams/detail/system_failure.hpp
index 7d86eafec4..10b291a516 100644
--- a/boost/iostreams/detail/system_failure.hpp
+++ b/boost/iostreams/detail/system_failure.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_SYSTEM_FAILURE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/translate_int_type.hpp b/boost/iostreams/detail/translate_int_type.hpp
index 88b9341f74..ae48a2c46f 100755..100644
--- a/boost/iostreams/detail/translate_int_type.hpp
+++ b/boost/iostreams/detail/translate_int_type.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_TRANSLATE_INT_TYPE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/detail/vc6/close.hpp b/boost/iostreams/detail/vc6/close.hpp
deleted file mode 100755
index f8936742b7..0000000000
--- a/boost/iostreams/detail/vc6/close.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct close_impl;
-
-} // End namespace detail.
-
-template<typename T>
-void close(T& t) { detail::close_all(t); }
-
-template<typename T>
-void close(T& t, BOOST_IOS::openmode which)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- detail::close_impl<T>::inner<unwrapped>::close(detail::unwrap(t), which);
-}
-
-template<typename T, typename Sink>
-void close(T& t, Sink& snk, BOOST_IOS::openmode which)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- detail::close_impl<T>::inner<unwrapped>::close(detail::unwrap(t), snk, which);
-}
-
-namespace detail {
-
-//------------------Definition of close_impl----------------------------------//
-
-template<typename T>
-struct close_tag {
- typedef typename category_of<T>::type category;
- typedef typename
- mpl::eval_if<
- is_convertible<category, closable_tag>,
- mpl::if_<
- mpl::or_<
- is_convertible<category, two_sequence>,
- is_convertible<category, dual_use>
- >,
- two_sequence,
- closable_tag
- >,
- mpl::identity<any_tag>
- >::type type;
-};
-
-template<typename T>
-struct close_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- close_impl<BOOST_DEDUCED_TYPENAME close_tag<T>::type>
- >::type
- { };
-
-template<>
-struct close_impl<any_tag> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::out)
- iostreams::flush(t);
- }
-
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- if (which == BOOST_IOS::out) {
- non_blocking_adapter<Sink> nb(snk);
- iostreams::flush(t, nb);
- }
- }
- };
-};
-
-template<>
-struct close_impl<closable_tag> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which)
- {
- typedef typename category_of<T>::type category;
- const bool in = is_convertible<category, input>::value &&
- !is_convertible<category, output>::value;
- if (in == (which == BOOST_IOS::in))
- t.close();
- }
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- typedef typename category_of<T>::type category;
- const bool in = is_convertible<category, input>::value &&
- !is_convertible<category, output>::value;
- if (in == (which == BOOST_IOS::in)) {
- non_blocking_adapter<Sink> nb(snk);
- t.close(nb);
- }
- }
- };
-};
-
-template<>
-struct close_impl<two_sequence> {
- template<typename T>
- struct inner {
- static void close(T& t, BOOST_IOS::openmode which) { t.close(which); }
-
- template<typename Sink>
- static void close(T& t, Sink& snk, BOOST_IOS::openmode which)
- {
- non_blocking_adapter<Sink> nb(snk);
- t.close(nb, which);
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/vc6/read.hpp b/boost/iostreams/detail/vc6/read.hpp
deleted file mode 100755
index 1e01f665b9..0000000000
--- a/boost/iostreams/detail/vc6/read.hpp
+++ /dev/null
@@ -1,238 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct read_device_impl;
-
-template<typename T>
-struct read_filter_impl;
-
-} // End namespace detail.
-
-template<typename T>
-typename int_type_of<T>::type get(T& t)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::get(detail::unwrap(t));
-}
-
-template<typename T>
-inline std::streamsize
-read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::read(detail::unwrap(t), s, n);
-}
-
-template<typename T, typename Source>
-std::streamsize
-read(T& t, Source& src, typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_filter_impl<T>::inner<unwrapped>::read(detail::unwrap(t), src, s, n);
-}
-
-template<typename T>
-bool putback(T& t, typename char_type_of<T>::type c)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::read_device_impl<T>::inner<unwrapped>::putback(detail::unwrap(t), c);
-}
-
-//----------------------------------------------------------------------------//
-
-namespace detail {
-
-// Helper function for adding -1 as EOF indicator.
-inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; }
-
-// Helper templates for reading from streambufs.
-template<bool IsLinked>
-struct true_eof_impl;
-
-template<>
-struct true_eof_impl<true> {
- template<typename T>
- static bool true_eof(T& t) { return t.true_eof(); }
-};
-
-template<>
-struct true_eof_impl<false> {
- template<typename T>
- static bool true_eof(T& t) { return true; }
-};
-
-template<typename T>
-inline bool true_eof(T& t)
-{
- const bool linked = is_linked<T>::value;
- return true_eof_impl<linked>::true_eof(t);
-}
-
-//------------------Definition of read_device_impl----------------------------//
-
-template<typename T>
-struct read_device_impl
- : mpl::if_<
- detail::is_custom<T>,
- operations<T>,
- read_device_impl<
- BOOST_DEDUCED_TYPENAME
- detail::dispatch<
- T, istream_tag, streambuf_tag, input
- >::type
- >
- >::type
- { };
-
-template<>
-struct read_device_impl<istream_tag> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type get(T& t)
- { return t.get(); }
-
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- { return check_eof(t.rdbuf()->sgetn(s, n)); }
-
- static bool putback(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c),
- traits_type::eof() );
- }
- };
-};
-
-template<>
-struct read_device_impl<streambuf_tag> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type
- get(T& t)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- typename int_type_of<T>::type c;
- return !traits_type::is_eof(c = t.sbumpc()) ||
- detail::true_eof(t)
- ?
- c : traits_type::would_block();
- }
-
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- {
- std::streamsize amt;
- return (amt = t.sgetn(s, n)) != 0 ?
- amt :
- detail::true_eof(t) ?
- -1 :
- 0;
- }
-
- static bool putback(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- return !traits_type::is_eof(t.sputbackc(c));
- }
- };
-};
-
-template<>
-struct read_device_impl<input> {
- template<typename T>
- struct inner {
- static typename int_type_of<T>::type
- get(T& t)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- char_type c;
- std::streamsize amt;
- return (amt = t.read(&c, 1)) == 1 ?
- traits_type::to_int_type(c) :
- amt == -1 ?
- traits_type::eof() :
- traits_type::would_block();
- }
-
- template<typename T>
- static std::streamsize
- read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
- { return t.read(s, n); }
-
- template<typename T>
- static bool putback(T& t, typename char_type_of<T>::type c)
- { // T must be Peekable.
- return t.putback(c);
- }
- };
-};
-
-//------------------Definition of read_filter_impl----------------------------//
-
-template<typename T>
-struct read_filter_impl
- : mpl::if_<
- detail::is_custom<T>,
- operations<T>,
- read_filter_impl<
- BOOST_DEDUCED_TYPENAME
- detail::dispatch<
- T, multichar_tag, any_tag
- >::type
- >
- >::type
- { };
-
-template<>
-struct read_filter_impl<multichar_tag> {
- template<typename T>
- struct inner {
- template<typename Source>
- static std::streamsize read
- ( T& t, Source& src, typename char_type_of<T>::type* s,
- std::streamsize n )
- { return t.read(src, s, n); }
- };
-};
-
-template<>
-struct read_filter_impl<any_tag> {
- template<typename T>
- struct inner {
- template<typename Source>
- static std::streamsize read
- ( T& t, Source& src, typename char_type_of<T>::type* s,
- std::streamsize n )
- {
- typedef typename char_type_of<T>::type char_type;
- typedef char_traits<char_type> traits_type;
- for (std::streamsize off = 0; off < n; ++off) {
- typename traits_type::int_type c = t.get(src);
- if (traits_type::is_eof(c))
- return check_eof(off);
- if (traits_type::would_block(c))
- return off;
- s[off] = traits_type::to_char_type(c);
- }
- return n;
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/vc6/write.hpp b/boost/iostreams/detail/vc6/write.hpp
deleted file mode 100755
index ee8b9488ff..0000000000
--- a/boost/iostreams/detail/vc6/write.hpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template<typename T>
-struct write_device_impl;
-
-template<typename T>
-struct write_filter_impl;
-
-} // End namespace detail.
-
-template<typename T>
-bool put(T& t, typename char_type_of<T>::type c)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_device_impl<T>::inner<unwrapped>::put(detail::unwrap(t), c);
-}
-
-template<typename T>
-inline std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_device_impl<T>::inner<unwrapped>::write(detail::unwrap(t), s, n);
-}
-
-template<typename T, typename Sink>
-inline std::streamsize
-write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
-{
- typedef typename detail::unwrapped_type<T>::type unwrapped;
- return detail::write_filter_impl<T>::inner<unwrapped>::write(detail::unwrap(t), snk, s, n);
-}
-
-namespace detail {
-
-//------------------Definition of write_device_impl---------------------------//
-
-template<typename T>
-struct write_device_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- write_device_impl<
- BOOST_DEDUCED_TYPENAME
- dispatch<
- T, ostream_tag, streambuf_tag, output
- >::type
- >
- >::type
- { };
-
-template<>
-struct write_device_impl<ostream_tag> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type( t.rdbuf()->s.sputc(),
- traits_type::eof() );
- }
-
- static std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.rdbuf()->sputn(s, n); }
- };
-};
-
-template<>
-struct write_device_impl<streambuf_tag> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- {
- typedef typename char_type_of<T>::type char_type;
- typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type) traits_type;
- return !traits_type::eq_int_type(t.sputc(c), traits_type::eof());
- }
-
- template<typename T>
- static std::streamsize write
- (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.sputn(s, n); }
- };
-};
-
-template<>
-struct write_device_impl<output> {
- template<typename T>
- struct inner {
- static bool put(T& t, typename char_type_of<T>::type c)
- { return t.write(&c, 1) == 1; }
-
- template<typename T>
- static std::streamsize
- write(T& t, const typename char_type_of<T>::type* s, std::streamsize n)
- { return t.write(s, n); }
- };
-};
-
-//------------------Definition of write_filter_impl---------------------------//
-
-template<typename T>
-struct write_filter_impl
- : mpl::if_<
- is_custom<T>,
- operations<T>,
- write_filter_impl<
- BOOST_DEDUCED_TYPENAME
- dispatch<
- T, multichar_tag, any_tag
- >::type
- >
- >::type
- { };
-
-template<>
-struct write_filter_impl<multichar_tag> {
- template<typename T>
- struct inner {
- template<typename Sink>
- static std::streamsize
- write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
- { return t.write(snk, s, n); }
- };
-};
-
-template<>
-struct write_filter_impl<any_tag> {
- template<typename T>
- struct inner {
- template<typename Sink>
- static std::streamsize
- write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
- std::streamsize n )
- {
- for (std::streamsize off = 0; off < n; ++off)
- if (!t.put(snk, s[off]))
- return off;
- return n;
- }
- };
-};
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
diff --git a/boost/iostreams/detail/wrap_unwrap.hpp b/boost/iostreams/detail/wrap_unwrap.hpp
index 6e3d231422..f5f97897f9 100755..100644
--- a/boost/iostreams/detail/wrap_unwrap.hpp
+++ b/boost/iostreams/detail/wrap_unwrap.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -83,8 +83,6 @@ struct unwrap_ios
//------------------Definition of unwrap--------------------------------------//
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //----------------------------------//
-
template<typename T>
typename unwrapped_type<T>::type&
unwrap(const reference_wrapper<T>& ref) { return ref.get(); }
@@ -95,33 +93,6 @@ typename unwrapped_type<T>::type& unwrap(T& t) { return t; }
template<typename T>
const typename unwrapped_type<T>::type& unwrap(const T& t) { return t; }
-#else // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //-------------------------//
-
-// Since unwrap is a potential bottleneck, we avoid runtime tag dispatch.
-template<bool IsRefWrap>
-struct unwrap_impl;
-
-template<>
-struct unwrap_impl<true> {
- template<typename T>
- static typename unwrapped_type<T>::type& unwrap(const T& t)
- { return t.get(); }
-};
-
-template<>
-struct unwrap_impl<false> {
- template<typename T>
- static typename unwrapped_type<T>::type& unwrap(const T& t)
- { return const_cast<T&>(t); }
-};
-
-template<typename T>
-typename unwrapped_type<T>::type&
-unwrap(const T& t)
-{ return unwrap_impl<is_reference_wrapper<T>::value>::unwrap(t); }
-
-#endif // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) //------------------------//
-
} } } // End namespaces detail, iostreams, boost.
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_WRAP_UNWRAP_HPP_INCLUDED
diff --git a/boost/iostreams/device/array.hpp b/boost/iostreams/device/array.hpp
index 3e08f04470..768a5644a1 100755..100644
--- a/boost/iostreams/device/array.hpp
+++ b/boost/iostreams/device/array.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_ARRAY_HPP_INCLUDED
#define BOOST_IOSTREAMS_ARRAY_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -40,12 +40,10 @@ public:
array_adapter(char_type* begin, std::size_t length);
array_adapter(const char_type* begin, const char_type* end);
array_adapter(const char_type* begin, std::size_t length);
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template<int N>
array_adapter(char_type (&ar)[N])
: begin_(ar), end_(ar + N)
{ }
-#endif
pair_type input_sequence();
pair_type output_sequence();
private:
@@ -55,16 +53,6 @@ private:
} // End namespace detail.
-// Local macros, #undef'd below.
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-# define BOOST_IOSTREAMS_ARRAY_CTOR(name, ch) \
- template<int N> \
- BOOST_PP_CAT(basic_, name)(ch (&ar)[N]) \
- : base_type(ar) { } \
- /**/
-#else
-# define BOOST_IOSTREAMS_ARRAY_CTOR(name, ch)
-#endif
#define BOOST_IOSTREAMS_ARRAY(name, mode) \
template<typename Ch> \
struct BOOST_PP_CAT(basic_, name) : detail::array_adapter<mode, Ch> { \
@@ -81,7 +69,9 @@ private:
: base_type(begin, end) { } \
BOOST_PP_CAT(basic_, name)(const char_type* begin, std::size_t length) \
: base_type(begin, length) { } \
- BOOST_IOSTREAMS_ARRAY_CTOR(name, Ch) \
+ template<int N> \
+ BOOST_PP_CAT(basic_, name)(Ch (&ar)[N]) \
+ : base_type(ar) { } \
}; \
typedef BOOST_PP_CAT(basic_, name)<char> name; \
typedef BOOST_PP_CAT(basic_, name)<wchar_t> BOOST_PP_CAT(w, name); \
@@ -89,7 +79,6 @@ private:
BOOST_IOSTREAMS_ARRAY(array_source, input_seekable)
BOOST_IOSTREAMS_ARRAY(array_sink, output_seekable)
BOOST_IOSTREAMS_ARRAY(array, seekable)
-#undef BOOST_IOSTREAMS_ARRAY_CTOR
#undef BOOST_IOSTREAMS_ARRAY
diff --git a/boost/iostreams/device/back_inserter.hpp b/boost/iostreams/device/back_inserter.hpp
index 563e397918..669c889e0a 100755..100644
--- a/boost/iostreams/device/back_inserter.hpp
+++ b/boost/iostreams/device/back_inserter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_BACK_INSERTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_BACK_INSERTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/device/file.hpp b/boost/iostreams/device/file.hpp
index f701c9d650..3eb0301647 100644
--- a/boost/iostreams/device/file.hpp
+++ b/boost/iostreams/device/file.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_FILE_HPP_INCLUDED
#define BOOST_IOSTREAMS_FILE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/device/file_descriptor.hpp b/boost/iostreams/device/file_descriptor.hpp
index bb470589b0..5d6af12814 100644
--- a/boost/iostreams/device/file_descriptor.hpp
+++ b/boost/iostreams/device/file_descriptor.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED
#define BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -28,6 +28,10 @@
#include <boost/shared_ptr.hpp>
// Must come last.
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251) // Missing DLL interface for shared_ptr
+#endif
#include <boost/config/abi_prefix.hpp>
namespace boost { namespace iostreams {
@@ -314,5 +318,8 @@ private:
} } // End namespaces iostreams, boost.
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+#if defined(BOOST_MSVC)
+# pragma warning(pop) // pops #pragma warning(disable:4251)
+#endif
#endif // #ifndef BOOST_IOSTREAMS_FILE_DESCRIPTOR_HPP_INCLUDED
diff --git a/boost/iostreams/device/mapped_file.hpp b/boost/iostreams/device/mapped_file.hpp
index 8493b17736..8ee11c47dd 100644
--- a/boost/iostreams/device/mapped_file.hpp
+++ b/boost/iostreams/device/mapped_file.hpp
@@ -7,7 +7,7 @@
#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -32,6 +32,10 @@
#include <boost/type_traits/is_same.hpp>
// Must come last.
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4251) // Missing DLL interface for shared_ptr
+#endif
#include <boost/config/abi_prefix.hpp>
namespace boost { namespace iostreams {
@@ -595,5 +599,8 @@ operator^=(mapped_file::mapmode& a, mapped_file::mapmode b)
} } // End namespaces iostreams, boost.
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+#if defined(BOOST_MSVC)
+# pragma warning(pop) // pops #pragma warning(disable:4251)
+#endif
#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
diff --git a/boost/iostreams/device/null.hpp b/boost/iostreams/device/null.hpp
index 6a723218e6..031c3e2fa2 100755..100644
--- a/boost/iostreams/device/null.hpp
+++ b/boost/iostreams/device/null.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_NULL_HPP_INCLUDED
#define BOOST_IOSTREAMS_NULL_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/aggregate.hpp b/boost/iostreams/filter/aggregate.hpp
index d578582e6e..a645a75a2e 100644
--- a/boost/iostreams/filter/aggregate.hpp
+++ b/boost/iostreams/filter/aggregate.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_AGGREGATE_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/bzip2.hpp b/boost/iostreams/filter/bzip2.hpp
index bc4b18f04a..7c1d1efc10 100644
--- a/boost/iostreams/filter/bzip2.hpp
+++ b/boost/iostreams/filter/bzip2.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
#define BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -157,10 +157,8 @@ protected:
{
bool custom = bzip2_allocator<Alloc>::custom;
do_init( compress,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- custom ? bzip2_allocator<Alloc>::allocate : 0,
- custom ? bzip2_allocator<Alloc>::deallocate : 0,
- #endif
+ custom ? bzip2_allocator<Alloc>::allocate : 0,
+ custom ? bzip2_allocator<Alloc>::deallocate : 0,
custom ? &alloc : 0 );
}
void before( const char*& src_begin, const char* src_end,
@@ -172,10 +170,8 @@ protected:
void end(bool compress);
private:
void do_init( bool compress,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- bzip2::alloc_func,
- bzip2::free_func,
- #endif
+ bzip2::alloc_func,
+ bzip2::free_func,
void* derived );
bzip2_params params_;
void* stream_; // Actual type: bz_stream*.
diff --git a/boost/iostreams/filter/counter.hpp b/boost/iostreams/filter/counter.hpp
index 646d2875a1..8cf775e703 100644
--- a/boost/iostreams/filter/counter.hpp
+++ b/boost/iostreams/filter/counter.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_COUNTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/grep.hpp b/boost/iostreams/filter/grep.hpp
index a41da5b992..b30309734e 100644
--- a/boost/iostreams/filter/grep.hpp
+++ b/boost/iostreams/filter/grep.hpp
@@ -17,7 +17,7 @@
#ifndef BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_GREP_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/gzip.hpp b/boost/iostreams/filter/gzip.hpp
index 0f483b4463..fb18224ea1 100644
--- a/boost/iostreams/filter/gzip.hpp
+++ b/boost/iostreams/filter/gzip.hpp
@@ -12,7 +12,7 @@
#ifndef BOOST_IOSTREAMS_GZIP_HPP_INCLUDED
#define BOOST_IOSTREAMS_GZIP_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -27,6 +27,7 @@
#include <boost/config.hpp> // Put size_t in std.
#include <boost/detail/workaround.hpp>
#include <boost/cstdint.hpp> // uint8_t, uint32_t.
+#include <boost/iostreams/checked_operations.hpp>
#include <boost/iostreams/constants.hpp> // buffer size.
#include <boost/iostreams/detail/adapter/non_blocking_adapter.hpp>
#include <boost/iostreams/detail/adapter/range_adapter.hpp>
@@ -43,7 +44,9 @@
// Must come last.
#if defined(BOOST_MSVC)
# pragma warning(push)
-# pragma warning(disable: 4309) // Truncation of constant value.
+# pragma warning(disable:4244) // Possible truncation
+# pragma warning(disable:4251) // Missing DLL interface for std::string
+# pragma warning(disable:4309) // Truncation of constant value.
#endif
#ifdef BOOST_NO_STDC_NAMESPACE
@@ -235,7 +238,7 @@ public:
if (!(flags_ & f_header_done)) {
std::streamsize amt =
static_cast<std::streamsize>(header_.size() - offset_);
- offset_ += boost::iostreams::write(snk, header_.data() + offset_, amt);
+ offset_ += boost::iostreams::write_if(snk, header_.data() + offset_, amt);
if (offset_ == header_.size())
flags_ |= f_header_done;
else
@@ -248,6 +251,9 @@ public:
void close(Sink& snk, BOOST_IOS::openmode m)
{
try {
+ if (m == BOOST_IOS::out && !(flags_ & f_header_done))
+ this->write(snk, 0, 0);
+
// Close zlib compressor.
base_type::close(snk, m);
@@ -292,13 +298,7 @@ private:
void close_impl()
{
- #if BOOST_WORKAROUND(__GNUC__, == 2) && defined(__STL_CONFIG_H) || \
- BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) \
- /**/
- footer_.erase(0, std::string::npos);
- #else
- footer_.clear();
- #endif
+ footer_.clear();
offset_ = 0;
flags_ = 0;
}
diff --git a/boost/iostreams/filter/line.hpp b/boost/iostreams/filter/line.hpp
index 3597ef7898..2c66f0ed91 100644
--- a/boost/iostreams/filter/line.hpp
+++ b/boost/iostreams/filter/line.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_LINE_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -37,13 +37,7 @@ namespace boost { namespace iostreams {
// Description: Filter which processes data one line at a time.
//
template< typename Ch,
- typename Alloc =
- #if BOOST_WORKAROUND(__GNUC__, < 3)
- typename std::basic_string<Ch>::allocator_type
- #else
- std::allocator<Ch>
- #endif
- >
+ typename Alloc = std::allocator<Ch> >
class basic_line_filter {
private:
typedef typename std::basic_string<Ch>::traits_type string_traits;
diff --git a/boost/iostreams/filter/newline.hpp b/boost/iostreams/filter/newline.hpp
index ac064b716f..57a36395ed 100644
--- a/boost/iostreams/filter/newline.hpp
+++ b/boost/iostreams/filter/newline.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_NEWLINE_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -214,7 +214,6 @@ public:
template<typename Sink>
void close(Sink& dest, BOOST_IOS::openmode)
{
- typedef typename iostreams::category_of<Sink>::type category;
if ((flags_ & f_write) != 0 && (flags_ & f_has_CR) != 0)
newline_if_sink(dest);
flags_ &= ~f_has_LF; // Restore original flags.
diff --git a/boost/iostreams/filter/regex.hpp b/boost/iostreams/filter/regex.hpp
index e6efd6d8ae..e943553c61 100755..100644
--- a/boost/iostreams/filter/regex.hpp
+++ b/boost/iostreams/filter/regex.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_REGEX_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/stdio.hpp b/boost/iostreams/filter/stdio.hpp
index e2addf569c..5ad921b2ce 100755..100644
--- a/boost/iostreams/filter/stdio.hpp
+++ b/boost/iostreams/filter/stdio.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_STDIO_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/symmetric.hpp b/boost/iostreams/filter/symmetric.hpp
index cc92b0cfa8..57ceea7727 100644
--- a/boost/iostreams/filter/symmetric.hpp
+++ b/boost/iostreams/filter/symmetric.hpp
@@ -37,7 +37,7 @@
#ifndef BOOST_IOSTREAMS_SYMMETRIC_FILTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_SYMMETRIC_FILTER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filter/test.hpp b/boost/iostreams/filter/test.hpp
index ea2fd601ca..00e2dffd4c 100644
--- a/boost/iostreams/filter/test.hpp
+++ b/boost/iostreams/filter/test.hpp
@@ -7,7 +7,7 @@
#ifndef BOOST_IOSTREAMS_FILTER_TEST_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -15,8 +15,7 @@
#include <boost/detail/workaround.hpp>
#include <algorithm> // min.
#include <cstddef> // size_t.
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
# include <cstdlib> // rand.
@@ -25,8 +24,7 @@
#include <iterator>
#include <string>
#include <vector>
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
- !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
# include <boost/random/linear_congruential.hpp>
@@ -52,8 +50,7 @@
namespace std {
using ::memcpy;
using ::strlen;
- #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
- BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
using ::rand;
@@ -67,18 +64,17 @@ BOOST_IOSTREAMS_BOOL_TRAIT_DEF(is_string, std::basic_string, 3)
const std::streamsize default_increment = 5;
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && \
- !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \
/**/
- std::streamsize rand(int inc)
+ std::streamsize rand(std::streamsize inc)
{
static rand48 random_gen;
- static uniform_smallint<int> random_dist(0, inc);
+ static uniform_smallint<int> random_dist(0, static_cast<int>(inc));
return random_dist(random_gen);
}
#else
- std::streamsize rand(int inc)
+ std::streamsize rand(std::streamsize inc)
{
return (std::rand() * inc + 1) / RAND_MAX;
}
@@ -97,13 +93,14 @@ public:
{ }
std::streamsize read(char* s, std::streamsize n)
{
- if (pos_ == static_cast<std::streamsize>(data_.size()))
+ using namespace std;
+ if (pos_ == static_cast<streamsize>(data_.size()))
return -1;
- std::streamsize avail =
- (std::min) (n, static_cast<std::streamsize>(data_.size() - pos_));
- std::streamsize amt = (std::min) (rand(inc_), avail);
+ streamsize avail =
+ (std::min) (n, static_cast<streamsize>(data_.size() - pos_));
+ streamsize amt = (std::min) (rand(inc_), avail);
if (amt)
- std::memcpy(s, data_.c_str() + pos_, amt);
+ memcpy(s, data_.c_str() + pos_, static_cast<size_t>(amt));
pos_ += amt;
return amt;
}
@@ -111,7 +108,7 @@ public:
bool putback(char c)
{
if (pos_ > 0) {
- data_[--pos_] = c;
+ data_[static_cast<std::string::size_type>(--pos_)] = c;
return true;
}
return false;
diff --git a/boost/iostreams/filter/zlib.hpp b/boost/iostreams/filter/zlib.hpp
index b0327f3cb8..848af89255 100644
--- a/boost/iostreams/filter/zlib.hpp
+++ b/boost/iostreams/filter/zlib.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_ZLIB_HPP_INCLUDED
#define BOOST_IOSTREAMS_ZLIB_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -35,7 +35,7 @@
// Must come last.
#ifdef BOOST_MSVC
# pragma warning(push)
-# pragma warning(disable:4251 4231 4660) // Dependencies not exported.
+# pragma warning(disable:4251 4275 4231 4660) // Dependencies not exported.
#endif
#include <boost/config/abi_prefix.hpp>
@@ -183,10 +183,8 @@ protected:
{
bool custom = zlib_allocator<Alloc>::custom;
do_init( p, compress,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- custom ? zlib_allocator<Alloc>::allocate : 0,
- custom ? zlib_allocator<Alloc>::deallocate : 0,
- #endif
+ custom ? zlib_allocator<Alloc>::allocate : 0,
+ custom ? zlib_allocator<Alloc>::deallocate : 0,
&zalloc );
}
void before( const char*& src_begin, const char* src_end,
@@ -202,10 +200,8 @@ public:
int total_out() const { return total_out_; }
private:
void do_init( const zlib_params& p, bool compress,
- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
- zlib::xalloc_func,
- zlib::xfree_func,
- #endif
+ zlib::xalloc_func,
+ zlib::xfree_func,
void* derived );
void* stream_; // Actual type: z_stream*.
bool calculate_crc_;
diff --git a/boost/iostreams/filtering_stream.hpp b/boost/iostreams/filtering_stream.hpp
index 548ef0c60a..3279c590cf 100755..100644
--- a/boost/iostreams/filtering_stream.hpp
+++ b/boost/iostreams/filtering_stream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_FILTER_STREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_FILTER_STREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/filtering_streambuf.hpp b/boost/iostreams/filtering_streambuf.hpp
index e49bf612ee..affe4a71c4 100755..100644
--- a/boost/iostreams/filtering_streambuf.hpp
+++ b/boost/iostreams/filtering_streambuf.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_FILTERING_STREAMBUF_HPP_INCLUDED
#define BOOST_IOSTREAMS_FILTERING_STREAMBUF_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/flush.hpp b/boost/iostreams/flush.hpp
index 73d160051c..5212a448f1 100755..100644
--- a/boost/iostreams/flush.hpp
+++ b/boost/iostreams/flush.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_FLUSH_HPP_INCLUDED
#define BOOST_IOSTREAMS_FLUSH_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/get.hpp b/boost/iostreams/get.hpp
index bb82204b79..12d530fd81 100755..100644
--- a/boost/iostreams/get.hpp
+++ b/boost/iostreams/get.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_GET_HPP_INCLUDED
#define BOOST_IOSTREAMS_GET_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/imbue.hpp b/boost/iostreams/imbue.hpp
index 608481a505..48d2e1845a 100755..100644
--- a/boost/iostreams/imbue.hpp
+++ b/boost/iostreams/imbue.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_IMBUE_HPP_INCLUDED
#define BOOST_IOSTREAMS_IMBUE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/input_sequence.hpp b/boost/iostreams/input_sequence.hpp
index 8e0e77b4f6..e504c8e8ff 100755..100644
--- a/boost/iostreams/input_sequence.hpp
+++ b/boost/iostreams/input_sequence.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED
#define BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/invert.hpp b/boost/iostreams/invert.hpp
index 82e6a4b437..1d3787e13f 100644
--- a/boost/iostreams/invert.hpp
+++ b/boost/iostreams/invert.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
#define BOOST_IOSTREAMS_INVERT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/operations.hpp b/boost/iostreams/operations.hpp
index 5da1610816..28bd773172 100755..100644
--- a/boost/iostreams/operations.hpp
+++ b/boost/iostreams/operations.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_OPERATIONS_HPP_INCLUDED
#define BOOST_IOSTREAMS_OPERATIONS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/operations_fwd.hpp b/boost/iostreams/operations_fwd.hpp
index e2380b12f9..ae68d70467 100755..100644
--- a/boost/iostreams/operations_fwd.hpp
+++ b/boost/iostreams/operations_fwd.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_OPERATIONS_FWD_HPP_INCLUDED
#define BOOST_IOSTREAMS_OPERATIONS_FWD_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/optimal_buffer_size.hpp b/boost/iostreams/optimal_buffer_size.hpp
index 79715b2cb8..13894faab8 100755..100644
--- a/boost/iostreams/optimal_buffer_size.hpp
+++ b/boost/iostreams/optimal_buffer_size.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_OPTIMAL_BUFFER_SIZE_HPP_INCLUDED
#define BOOST_IOSTREAMS_OPTIMAL_BUFFER_SIZE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/output_sequence.hpp b/boost/iostreams/output_sequence.hpp
index 36bd7e523b..5b42bf457d 100755..100644
--- a/boost/iostreams/output_sequence.hpp
+++ b/boost/iostreams/output_sequence.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_OUTPUT_SEQUENCE_HPP_INCLUDED
#define BOOST_IOSTREAMS_OUTPUT_SEQUENCE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/pipeline.hpp b/boost/iostreams/pipeline.hpp
index 1573e160c2..d29c2da3f7 100755..100644
--- a/boost/iostreams/pipeline.hpp
+++ b/boost/iostreams/pipeline.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_PIPABLE_HPP_INCLUDED
#define BOOST_IOSTREAMS_PIPABLE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -20,9 +20,6 @@
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/static_assert.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include <boost/type_traits/is_base_and_derived.hpp>
-#endif
#define BOOST_IOSTREAMS_PIPABLE(filter, arity) \
template< BOOST_PP_ENUM_PARAMS(arity, typename T) \
@@ -50,14 +47,6 @@ struct pipeline;
namespace detail {
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- struct pipeline_base { };
-
- template<typename T>
- struct is_pipeline
- : is_base_and_derived<pipeline_base, T>
- { };
-#endif
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
template<typename T>
struct is_pipeline : mpl::false_ { };
@@ -68,9 +57,6 @@ namespace detail {
template<typename Component>
class pipeline_segment
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- : pipeline_base
-#endif
{
public:
pipeline_segment(const Component& component)
diff --git a/boost/iostreams/positioning.hpp b/boost/iostreams/positioning.hpp
index 12493d9353..19e3aa532a 100644
--- a/boost/iostreams/positioning.hpp
+++ b/boost/iostreams/positioning.hpp
@@ -11,7 +11,7 @@
#ifndef BOOST_IOSTREAMS_POSITIONING_HPP_INCLUDED
#define BOOST_IOSTREAMS_POSITIONING_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/put.hpp b/boost/iostreams/put.hpp
index 5ad96ce629..a3fe33f207 100755..100644
--- a/boost/iostreams/put.hpp
+++ b/boost/iostreams/put.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_PUT_HPP_INCLUDED
#define BOOST_IOSTREAMS_PUT_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/putback.hpp b/boost/iostreams/putback.hpp
index d0fabb311c..a4969f641a 100755..100644
--- a/boost/iostreams/putback.hpp
+++ b/boost/iostreams/putback.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_PUTBACK_HPP_INCLUDED
#define BOOST_IOSTREAMS_PUTBACK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/read.hpp b/boost/iostreams/read.hpp
index 4443b62804..a8652c5644 100755..100644
--- a/boost/iostreams/read.hpp
+++ b/boost/iostreams/read.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED
#define BOOST_IOSTREAMS_READ_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -26,10 +26,6 @@
// Must come last.
#include <boost/iostreams/detail/config/disable_warnings.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------//
-# include <boost/iostreams/detail/vc6/read.hpp>
-#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------//
-
namespace boost { namespace iostreams {
namespace detail {
@@ -240,8 +236,6 @@ struct read_filter_impl<any_tag> {
} } // End namespaces iostreams, boost.
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------//
-
#include <boost/iostreams/detail/config/enable_warnings.hpp>
#endif // #ifndef BOOST_IOSTREAMS_READ_HPP_INCLUDED
diff --git a/boost/iostreams/seek.hpp b/boost/iostreams/seek.hpp
index efa3c7daf0..148c90bfa8 100755..100644
--- a/boost/iostreams/seek.hpp
+++ b/boost/iostreams/seek.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_SEEK_HPP_INCLUDED
#define BOOST_IOSTREAMS_SEEK_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/skip.hpp b/boost/iostreams/skip.hpp
index 4c62d4528b..eb097dd7bb 100644
--- a/boost/iostreams/skip.hpp
+++ b/boost/iostreams/skip.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_SKIP_HPP_INCLUDED
#define BOOST_IOSTREAMS_SKIP_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/stream.hpp b/boost/iostreams/stream.hpp
index 25f6a7d81d..f706288eae 100644
--- a/boost/iostreams/stream.hpp
+++ b/boost/iostreams/stream.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_STREAM_HPP_INCLUDED
#define BOOST_IOSTREAMS_STREAM_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/stream_buffer.hpp b/boost/iostreams/stream_buffer.hpp
index 0f8a64754e..dbcb786c65 100644
--- a/boost/iostreams/stream_buffer.hpp
+++ b/boost/iostreams/stream_buffer.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_STREAM_BUFFER_HPP_INCLUDED
#define BOOST_IOSTREAMS_STREAM_BUFFER_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/tee.hpp b/boost/iostreams/tee.hpp
index a940dc214d..6df85e9b40 100644
--- a/boost/iostreams/tee.hpp
+++ b/boost/iostreams/tee.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_TEE_HPP_INCLUDED
#define BOOST_IOSTREAMS_TEE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/traits.hpp b/boost/iostreams/traits.hpp
index be7e98f1d9..f8d7a3ff5b 100644
--- a/boost/iostreams/traits.hpp
+++ b/boost/iostreams/traits.hpp
@@ -15,7 +15,7 @@
#ifndef BOOST_IOSTREAMS_IO_TRAITS_HPP_INCLUDED
#define BOOST_IOSTREAMS_IO_TRAITS_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -35,10 +35,8 @@
#include <boost/mpl/identity.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/or.hpp>
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-# include <boost/range/iterator_range.hpp>
-# include <boost/range/value_type.hpp>
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/value_type.hpp>
#include <boost/ref.hpp>
#include <boost/type_traits/is_convertible.hpp>
@@ -182,7 +180,6 @@ struct member_char_type { typedef typename T::char_type type; };
} // End namespace detail.
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------//
# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------------------//
template<typename T>
@@ -212,27 +209,6 @@ struct char_type_of< iterator_range<Iter> > {
typedef typename iterator_value<Iter>::type type;
};
-#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //------------------//
-
-template<typename T>
-struct char_type_of {
- template<typename U>
- struct get_value_type {
- #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- typedef typename range_value<U>::type type;
- #endif // #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
- };
- typedef typename
- mpl::eval_if<
- is_iterator_range<T>,
- get_value_type<T>,
- detail::member_char_type<
- BOOST_DEDUCED_TYPENAME detail::unwrapped_type<T>::type
- >
- >::type type;
-};
-
-#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------//
//------------------Definitions of category_of--------------------------------//
@@ -275,14 +251,12 @@ struct category_of {
};
// Partial specialization for reference wrappers
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------//
template<typename T>
struct category_of< reference_wrapper<T> >
: category_of<T>
{ };
-#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------//
//------------------Definition of get_category--------------------------------//
@@ -340,14 +314,12 @@ template<typename T> // Borland 5.6.4 requires this circumlocution.
struct mode_of : detail::io_mode_impl< detail::io_mode_id<T>::value > { };
// Partial specialization for reference wrappers
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //---------------------------//
template<typename T>
struct mode_of< reference_wrapper<T> >
: mode_of<T>
{ };
-#endif // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //-----------------//
//------------------Definition of is_device, is_filter and is_direct----------//
diff --git a/boost/iostreams/traits_fwd.hpp b/boost/iostreams/traits_fwd.hpp
index 7114f89b36..a3e952623a 100755..100644
--- a/boost/iostreams/traits_fwd.hpp
+++ b/boost/iostreams/traits_fwd.hpp
@@ -10,7 +10,7 @@
#ifndef BOOST_IOSTREAMS_IO_TRAITS_FWD_HPP_INCLUDED
#define BOOST_IOSTREAMS_IO_TRAITS_FWD_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
diff --git a/boost/iostreams/write.hpp b/boost/iostreams/write.hpp
index 91cb9bd550..8faf986ae0 100644
--- a/boost/iostreams/write.hpp
+++ b/boost/iostreams/write.hpp
@@ -8,7 +8,7 @@
#ifndef BOOST_IOSTREAMS_WRITE_HPP_INCLUDED
#define BOOST_IOSTREAMS_WRITE_HPP_INCLUDED
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -27,10 +27,6 @@
// Must come last.
#include <boost/iostreams/detail/config/disable_warnings.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-----------------------------------//
-# include <boost/iostreams/detail/vc6/write.hpp>
-#else // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //--------------------------//
-
namespace boost { namespace iostreams {
namespace detail {
@@ -164,8 +160,6 @@ struct write_filter_impl<any_tag> {
} } // End namespaces iostreams, boost.
-#endif // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) //-------------------------//
-
#include <boost/iostreams/detail/config/enable_warnings.hpp>
#endif // #ifndef BOOST_IOSTREAMS_WRITE_HPP_INCLUDED
diff --git a/boost/lexical_cast/detail/converter_lexical_streams.hpp b/boost/lexical_cast/detail/converter_lexical_streams.hpp
index ba8d3b4dc3..981594995a 100644
--- a/boost/lexical_cast/detail/converter_lexical_streams.hpp
+++ b/boost/lexical_cast/detail/converter_lexical_streams.hpp
@@ -467,7 +467,7 @@ namespace boost {
template <std::size_t N>
bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT {
- return shl_char_array_limited(input.begin(), N);
+ return shl_char_array_limited(input.data(), N);
}
template <std::size_t N>
@@ -697,7 +697,7 @@ namespace boost {
template <class C, std::size_t N>
bool operator>>(std::array<C, N>& output) BOOST_NOEXCEPT {
BOOST_STATIC_ASSERT_MSG(
- (sizeof(boost::array<C, N>) == sizeof(boost::array<C, N>)),
+ (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
"std::array<C, N> and boost::array<C, N> must have exactly the same layout."
);
return ((*this) >> reinterpret_cast<boost::array<C, N>& >(output));
diff --git a/boost/lockfree/detail/atomic.hpp b/boost/lockfree/detail/atomic.hpp
index d15474ada9..6083800f0f 100644
--- a/boost/lockfree/detail/atomic.hpp
+++ b/boost/lockfree/detail/atomic.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2013 Tim Blechmann
+// Copyright (C) 2011-2013, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -51,7 +51,7 @@
#endif // BOOST_LOCKFREE_FORCE_STD_ATOMIC
-#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
+#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC) || defined(BOOST_LOCKFREE_FORCE_BOOST_ATOMIC)
#include <boost/atomic.hpp>
#else
#include <atomic>
@@ -61,7 +61,7 @@ namespace boost {
namespace lockfree {
namespace detail {
-#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
+#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC) || defined(BOOST_LOCKFREE_FORCE_BOOST_ATOMIC)
using boost::atomic;
using boost::memory_order_acquire;
using boost::memory_order_consume;
diff --git a/boost/lockfree/detail/copy_payload.hpp b/boost/lockfree/detail/copy_payload.hpp
index 75b1b52a2b..5972da7c64 100644
--- a/boost/lockfree/detail/copy_payload.hpp
+++ b/boost/lockfree/detail/copy_payload.hpp
@@ -1,6 +1,6 @@
// boost lockfree: copy_payload helper
//
-// Copyright (C) 2011 Tim Blechmann
+// Copyright (C) 2011, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/boost/lockfree/detail/freelist.hpp b/boost/lockfree/detail/freelist.hpp
index 3a134e29b9..48dbb508f5 100644
--- a/boost/lockfree/detail/freelist.hpp
+++ b/boost/lockfree/detail/freelist.hpp
@@ -49,6 +49,7 @@ class freelist_stack:
typedef tagged_ptr<freelist_node> tagged_node_ptr;
public:
+ typedef T * index_t;
typedef tagged_ptr<T> tagged_node_handle;
template <typename Allocator>
@@ -254,7 +255,9 @@ private:
atomic<tagged_node_ptr> pool_;
};
-class tagged_index
+class
+BOOST_ALIGNMENT( 4 ) // workaround for bugs in MSVC
+tagged_index
{
public:
typedef boost::uint16_t tag_t;
@@ -396,8 +399,6 @@ class fixed_size_freelist:
tagged_index next;
};
- typedef tagged_index::index_t index_t;
-
void initialize(void)
{
T * nodes = NodeStorage::nodes();
@@ -415,6 +416,7 @@ class fixed_size_freelist:
public:
typedef tagged_index tagged_node_handle;
+ typedef tagged_index::index_t index_t;
template <typename Allocator>
fixed_size_freelist (Allocator const & alloc, std::size_t count):
diff --git a/boost/lockfree/detail/parameter.hpp b/boost/lockfree/detail/parameter.hpp
index 2e2b068bed..e5db1206e5 100644
--- a/boost/lockfree/detail/parameter.hpp
+++ b/boost/lockfree/detail/parameter.hpp
@@ -1,6 +1,6 @@
// boost lockfree
//
-// Copyright (C) 2011 Tim Blechmann
+// Copyright (C) 2011, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -10,6 +10,11 @@
#define BOOST_LOCKFREE_DETAIL_PARAMETER_HPP
#include <boost/lockfree/policies.hpp>
+#include <boost/parameter/parameters.hpp>
+#include <boost/parameter/binding.hpp>
+
+#include <boost/mpl/void.hpp>
+
namespace boost {
namespace lockfree {
diff --git a/boost/lockfree/detail/prefix.hpp b/boost/lockfree/detail/prefix.hpp
index 6ed9446cb0..0c9f29af16 100644
--- a/boost/lockfree/detail/prefix.hpp
+++ b/boost/lockfree/detail/prefix.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 Tim Blechmann
+// Copyright (C) 2009, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -11,46 +11,14 @@
BOOST_LOCKFREE_CACHELINE_BYTES: size of a cache line
BOOST_LOCKFREE_PTR_COMPRESSION: use tag/pointer compression to utilize parts
of the virtual address space as tag (at least 16bit)
- BOOST_LOCKFREE_DCAS_ALIGNMENT: symbol used for aligning structs at cache line
- boundaries
*/
#define BOOST_LOCKFREE_CACHELINE_BYTES 64
-#ifdef _MSC_VER
+#include <boost/predef.h>
-#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __declspec(align(BOOST_LOCKFREE_CACHELINE_BYTES))
-
-#if defined(_M_IX86)
- #define BOOST_LOCKFREE_DCAS_ALIGNMENT
-#elif defined(_M_X64) || defined(_M_IA64)
- #define BOOST_LOCKFREE_PTR_COMPRESSION 1
- #define BOOST_LOCKFREE_DCAS_ALIGNMENT __declspec(align(16))
-#endif
-
-#endif /* _MSC_VER */
-
-#ifdef __GNUC__
-
-#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(BOOST_LOCKFREE_CACHELINE_BYTES)))
-
-#if defined(__i386__) || defined(__ppc__)
- #define BOOST_LOCKFREE_DCAS_ALIGNMENT
-#elif defined(__x86_64__)
- #define BOOST_LOCKFREE_PTR_COMPRESSION 1
- #define BOOST_LOCKFREE_DCAS_ALIGNMENT __attribute__((aligned(16)))
-#elif defined(__alpha__)
- // LATER: alpha may benefit from pointer compression. but what is the maximum size of the address space?
- #define BOOST_LOCKFREE_DCAS_ALIGNMENT
-#endif
-#endif /* __GNUC__ */
-
-#ifndef BOOST_LOCKFREE_DCAS_ALIGNMENT
-#define BOOST_LOCKFREE_DCAS_ALIGNMENT /*BOOST_LOCKFREE_DCAS_ALIGNMENT*/
-#endif
-
-#ifndef BOOST_LOCKFREE_CACHELINE_ALIGNMENT
-#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT /*BOOST_LOCKFREE_CACHELINE_ALIGNMENT*/
+#ifdef BOOST_ARCH_X86_64
+#define BOOST_LOCKFREE_PTR_COMPRESSION 1
#endif
#endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */
diff --git a/boost/lockfree/detail/tagged_ptr.hpp b/boost/lockfree/detail/tagged_ptr.hpp
index f70a2c751a..10ab2e9126 100644
--- a/boost/lockfree/detail/tagged_ptr.hpp
+++ b/boost/lockfree/detail/tagged_ptr.hpp
@@ -1,6 +1,6 @@
// tagged pointer, for aba prevention
//
-// Copyright (C) 2008 Tim Blechmann
+// Copyright (C) 2008, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
diff --git a/boost/lockfree/detail/tagged_ptr_dcas.hpp b/boost/lockfree/detail/tagged_ptr_dcas.hpp
index 6cb5a0616b..83718daea2 100644
--- a/boost/lockfree/detail/tagged_ptr_dcas.hpp
+++ b/boost/lockfree/detail/tagged_ptr_dcas.hpp
@@ -1,6 +1,6 @@
// tagged pointer, for aba prevention
//
-// Copyright (C) 2008 Tim Blechmann
+// Copyright (C) 2008, 2016 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -12,13 +12,16 @@
#include <cstddef> /* for std::size_t */
#include <limits>
+#include <boost/predef.h>
-namespace boost {
+namespace boost {
namespace lockfree {
-namespace detail {
+namespace detail {
+
+
template <class T>
-class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr
+class BOOST_ALIGNMENT(2 * sizeof(void*)) tagged_ptr
{
public:
typedef std::size_t tag_t;
diff --git a/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp b/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp
index 15d383018c..bcf6e34f6b 100644
--- a/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp
+++ b/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp
@@ -1,6 +1,6 @@
// tagged pointer, for aba prevention
//
-// Copyright (C) 2008, 2009 Tim Blechmann, based on code by Cory Nelson
+// Copyright (C) 2008, 2009, 2016 Tim Blechmann, based on code by Cory Nelson
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,13 +13,13 @@
#include <limits>
#include <boost/cstdint.hpp>
-
+#include <boost/predef.h>
namespace boost {
namespace lockfree {
namespace detail {
-#if defined (__x86_64__) || defined (_M_X64)
+#ifdef BOOST_ARCH_X86_64
template <class T>
class tagged_ptr
diff --git a/boost/lockfree/lockfree_forward.hpp b/boost/lockfree/lockfree_forward.hpp
new file mode 100644
index 0000000000..b1d72b32d2
--- /dev/null
+++ b/boost/lockfree/lockfree_forward.hpp
@@ -0,0 +1,72 @@
+// Copyright (C) 2008-2016 Tim Blechmann
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_LOCKFREE_FORWARD_HPP_INCLUDED
+#define BOOST_LOCKFREE_FORWARD_HPP_INCLUDED
+
+
+#ifndef BOOST_DOXYGEN_INVOKED
+
+#include <cstddef> // size_t
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#include <boost/parameter/aux_/void.hpp>
+#endif
+
+namespace boost {
+namespace lockfree {
+
+// policies
+template <bool IsFixedSized>
+struct fixed_sized;
+
+template <size_t Size>
+struct capacity;
+
+template <class Alloc>
+struct allocator;
+
+
+// data structures
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T,
+ class A0 = boost::parameter::void_,
+ class A1 = boost::parameter::void_,
+ class A2 = boost::parameter::void_>
+#else
+template <typename T, typename ...Options>
+#endif
+class queue;
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T,
+ class A0 = boost::parameter::void_,
+ class A1 = boost::parameter::void_,
+ class A2 = boost::parameter::void_>
+#else
+template <typename T, typename ...Options>
+#endif
+class stack;
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T,
+ class A0 = boost::parameter::void_,
+ class A1 = boost::parameter::void_>
+#else
+template <typename T, typename ...Options>
+#endif
+class spsc_queue;
+
+}
+}
+
+#endif // BOOST_DOXYGEN_INVOKED
+
+#endif // BOOST_LOCKFREE_FORWARD_HPP_INCLUDED
diff --git a/boost/lockfree/policies.hpp b/boost/lockfree/policies.hpp
index cec9b57f89..cf43ad22f3 100644
--- a/boost/lockfree/policies.hpp
+++ b/boost/lockfree/policies.hpp
@@ -9,10 +9,9 @@
#ifndef BOOST_LOCKFREE_POLICIES_HPP_INCLUDED
#define BOOST_LOCKFREE_POLICIES_HPP_INCLUDED
-#include <boost/parameter.hpp>
+#include <boost/parameter/aux_/template_keyword.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/size_t.hpp>
-#include <boost/mpl/void.hpp>
namespace boost {
namespace lockfree {
@@ -56,4 +55,3 @@ struct allocator:
}
#endif /* BOOST_LOCKFREE_POLICIES_HPP_INCLUDED */
-
diff --git a/boost/lockfree/queue.hpp b/boost/lockfree/queue.hpp
index 4c982c4dd4..aa46f54229 100644
--- a/boost/lockfree/queue.hpp
+++ b/boost/lockfree/queue.hpp
@@ -15,7 +15,7 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits/has_trivial_assign.hpp>
#include <boost/type_traits/has_trivial_destructor.hpp>
-#include <boost/config.hpp> // for BOOST_LIKELY
+#include <boost/config.hpp> // for BOOST_LIKELY & BOOST_ALIGNMENT
#include <boost/lockfree/detail/atomic.hpp>
#include <boost/lockfree/detail/copy_payload.hpp>
@@ -23,6 +23,8 @@
#include <boost/lockfree/detail/parameter.hpp>
#include <boost/lockfree/detail/tagged_ptr.hpp>
+#include <boost/lockfree/lockfree_forward.hpp>
+
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
@@ -70,13 +72,10 @@ typedef parameter::parameters<boost::parameter::optional<tag::allocator>,
* - T must have a trivial destructor
*
* */
-#ifndef BOOST_DOXYGEN_INVOKED
-template <typename T,
- class A0 = boost::parameter::void_,
- class A1 = boost::parameter::void_,
- class A2 = boost::parameter::void_>
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T, class A0, class A1, class A2>
#else
-template <typename T, ...Options>
+template <typename T, typename ...Options>
#endif
class queue
{
@@ -91,7 +90,11 @@ private:
BOOST_STATIC_ASSERT((boost::has_trivial_assign<T>::value));
#endif
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
typedef typename detail::queue_signature::bind<A0, A1, A2>::type bound_args;
+#else
+ typedef typename detail::queue_signature::bind<Options...>::type bound_args;
+#endif
static const bool has_capacity = detail::extract_capacity<bound_args>::has_capacity;
static const size_t capacity = detail::extract_capacity<bound_args>::capacity + 1; // the queue uses one dummy node
@@ -99,7 +102,7 @@ private:
static const bool node_based = !(has_capacity || fixed_sized);
static const bool compile_time_sized = has_capacity;
- struct BOOST_LOCKFREE_CACHELINE_ALIGNMENT node
+ struct BOOST_ALIGNMENT(BOOST_LOCKFREE_CACHELINE_BYTES) node
{
typedef typename detail::select_tagged_handle<node, node_based>::tagged_handle_type tagged_node_handle;
typedef typename detail::select_tagged_handle<node, node_based>::handle_type handle_type;
diff --git a/boost/lockfree/spsc_queue.hpp b/boost/lockfree/spsc_queue.hpp
index 5ecfb2a21e..7903d2cdf3 100644
--- a/boost/lockfree/spsc_queue.hpp
+++ b/boost/lockfree/spsc_queue.hpp
@@ -28,6 +28,8 @@
#include <boost/lockfree/detail/parameter.hpp>
#include <boost/lockfree/detail/prefix.hpp>
+#include <boost/lockfree/lockfree_forward.hpp>
+
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
@@ -626,10 +628,18 @@ public:
}
};
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
template <typename T, typename A0, typename A1>
+#else
+template <typename T, typename ...Options>
+#endif
struct make_ringbuffer
{
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
typedef typename ringbuffer_signature::bind<A0, A1>::type bound_args;
+#else
+ typedef typename ringbuffer_signature::bind<Options...>::type bound_args;
+#endif
typedef extract_capacity<bound_args> extract_capacity_t;
@@ -669,22 +679,32 @@ struct make_ringbuffer
* - T must have a default constructor
* - T must be copyable
* */
-#ifndef BOOST_DOXYGEN_INVOKED
-template <typename T,
- class A0 = boost::parameter::void_,
- class A1 = boost::parameter::void_>
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T, class A0, class A1>
#else
-template <typename T, ...Options>
+template <typename T, typename ...Options>
#endif
class spsc_queue:
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
public detail::make_ringbuffer<T, A0, A1>::ringbuffer_type
+#else
+ public detail::make_ringbuffer<T, Options...>::ringbuffer_type
+#endif
{
private:
#ifndef BOOST_DOXYGEN_INVOKED
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
typedef typename detail::make_ringbuffer<T, A0, A1>::ringbuffer_type base_type;
static const bool runtime_sized = detail::make_ringbuffer<T, A0, A1>::runtime_sized;
typedef typename detail::make_ringbuffer<T, A0, A1>::allocator allocator_arg;
+#else
+ typedef typename detail::make_ringbuffer<T, Options...>::ringbuffer_type base_type;
+ static const bool runtime_sized = detail::make_ringbuffer<T, Options...>::runtime_sized;
+ typedef typename detail::make_ringbuffer<T, Options...>::allocator allocator_arg;
+#endif
+
struct implementation_defined
{
diff --git a/boost/lockfree/stack.hpp b/boost/lockfree/stack.hpp
index 6db986c87b..23488b1ad0 100644
--- a/boost/lockfree/stack.hpp
+++ b/boost/lockfree/stack.hpp
@@ -9,11 +9,11 @@
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
+#include <boost/core/no_exceptions_support.hpp>
#include <boost/integer_traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/has_trivial_assign.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/is_copy_constructible.hpp>
#include <boost/lockfree/detail/atomic.hpp>
#include <boost/lockfree/detail/copy_payload.hpp>
@@ -21,6 +21,8 @@
#include <boost/lockfree/detail/parameter.hpp>
#include <boost/lockfree/detail/tagged_ptr.hpp>
+#include <boost/lockfree/lockfree_forward.hpp>
+
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
@@ -58,22 +60,22 @@ typedef parameter::parameters<boost::parameter::optional<tag::allocator>,
* \b Requirements:
* - T must have a copy constructor
* */
-#ifndef BOOST_DOXYGEN_INVOKED
-template <typename T,
- class A0 = boost::parameter::void_,
- class A1 = boost::parameter::void_,
- class A2 = boost::parameter::void_>
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+template <typename T, class A0, class A1, class A2>
#else
-template <typename T, ...Options>
+template <typename T, typename ...Options>
#endif
class stack
{
private:
#ifndef BOOST_DOXYGEN_INVOKED
- BOOST_STATIC_ASSERT(boost::has_trivial_assign<T>::value);
- BOOST_STATIC_ASSERT(boost::has_trivial_destructor<T>::value);
+ BOOST_STATIC_ASSERT(boost::is_copy_constructible<T>::value);
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
typedef typename detail::stack_signature::bind<A0, A1, A2>::type bound_args;
+#else
+ typedef typename detail::stack_signature::bind<Options...>::type bound_args;
+#endif
static const bool has_capacity = detail::extract_capacity<bound_args>::has_capacity;
static const size_t capacity = detail::extract_capacity<bound_args>::capacity;
@@ -253,7 +255,7 @@ private:
node * new_top_node = end_node;
end_node->next = NULL;
- try {
+ BOOST_TRY {
/* link nodes */
for (; it != end; ++it) {
node * newnode = pool.template construct<Threadsafe, Bounded>(*it);
@@ -262,14 +264,16 @@ private:
newnode->next = new_top_node;
new_top_node = newnode;
}
- } catch (...) {
+ } BOOST_CATCH (...) {
for (node * current_node = new_top_node; current_node != NULL;) {
node * next = current_node->next;
pool.template destruct<Threadsafe>(current_node);
current_node = next;
}
- throw;
+ BOOST_RETHROW;
}
+ BOOST_CATCH_END
+
ret = it;
return make_tuple(new_top_node, end_node);
}
@@ -555,6 +559,215 @@ public:
return element_count;
}
+ /** consumes all elements via a functor
+ *
+ * atomically pops all elements from the stack and applies the functor on each object
+ *
+ * \returns number of elements that are consumed
+ *
+ * \note Thread-safe and non-blocking, if functor is thread-safe and non-blocking
+ * */
+ template <typename Functor>
+ size_t consume_all_atomic(Functor & f)
+ {
+ size_t element_count = 0;
+ tagged_node_handle old_tos = tos.load(detail::memory_order_consume);
+
+ for (;;) {
+ node * old_tos_pointer = pool.get_pointer(old_tos);
+ if (!old_tos_pointer)
+ return 0;
+
+ tagged_node_handle new_tos(typename pool_t::index_t(NULL), old_tos.get_next_tag());
+
+ if (tos.compare_exchange_weak(old_tos, new_tos))
+ break;
+ }
+
+ tagged_node_handle nodes_to_consume = old_tos;
+
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_to_consume);
+ f(node_pointer->v);
+ element_count += 1;
+
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ if (!next_node) {
+ pool.template destruct<true>(nodes_to_consume);
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_to_consume.get_next_tag());
+ pool.template destruct<true>(nodes_to_consume);
+ nodes_to_consume = next;
+ }
+
+ return element_count;
+ }
+
+ /// \copydoc boost::lockfree::stack::consume_all_atomic(Functor & rhs)
+ template <typename Functor>
+ size_t consume_all_atomic(Functor const & f)
+ {
+ size_t element_count = 0;
+ tagged_node_handle old_tos = tos.load(detail::memory_order_consume);
+
+ for (;;) {
+ node * old_tos_pointer = pool.get_pointer(old_tos);
+ if (!old_tos_pointer)
+ return 0;
+
+ tagged_node_handle new_tos(typename pool_t::index_t(NULL), old_tos.get_next_tag());
+
+ if (tos.compare_exchange_weak(old_tos, new_tos))
+ break;
+ }
+
+ tagged_node_handle nodes_to_consume = old_tos;
+
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_to_consume);
+ f(node_pointer->v);
+ element_count += 1;
+
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ if (!next_node) {
+ pool.template destruct<true>(nodes_to_consume);
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_to_consume.get_next_tag());
+ pool.template destruct<true>(nodes_to_consume);
+ nodes_to_consume = next;
+ }
+
+ return element_count;
+ }
+
+ /** consumes all elements via a functor
+ *
+ * atomically pops all elements from the stack and applies the functor on each object in reversed order
+ *
+ * \returns number of elements that are consumed
+ *
+ * \note Thread-safe and non-blocking, if functor is thread-safe and non-blocking
+ * */
+ template <typename Functor>
+ size_t consume_all_atomic_reversed(Functor & f)
+ {
+ size_t element_count = 0;
+ tagged_node_handle old_tos = tos.load(detail::memory_order_consume);
+
+ for (;;) {
+ node * old_tos_pointer = pool.get_pointer(old_tos);
+ if (!old_tos_pointer)
+ return 0;
+
+ tagged_node_handle new_tos(pool.null_handle(), old_tos.get_next_tag());
+
+ if (tos.compare_exchange_weak(old_tos, new_tos))
+ break;
+ }
+
+ tagged_node_handle nodes_to_consume = old_tos;
+
+ node * last_node_pointer = NULL;
+ tagged_node_handle nodes_in_reversed_order;
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_to_consume);
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ node_pointer->next = pool.get_handle(last_node_pointer);
+ last_node_pointer = node_pointer;
+
+ if (!next_node) {
+ nodes_in_reversed_order = nodes_to_consume;
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_to_consume.get_next_tag());
+ nodes_to_consume = next;
+ }
+
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_in_reversed_order);
+ f(node_pointer->v);
+ element_count += 1;
+
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ if (!next_node) {
+ pool.template destruct<true>(nodes_in_reversed_order);
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_in_reversed_order.get_next_tag());
+ pool.template destruct<true>(nodes_in_reversed_order);
+ nodes_in_reversed_order = next;
+ }
+
+ return element_count;
+ }
+
+ /// \copydoc boost::lockfree::stack::consume_all_atomic_reversed(Functor & rhs)
+ template <typename Functor>
+ size_t consume_all_atomic_reversed(Functor const & f)
+ {
+ size_t element_count = 0;
+ tagged_node_handle old_tos = tos.load(detail::memory_order_consume);
+
+ for (;;) {
+ node * old_tos_pointer = pool.get_pointer(old_tos);
+ if (!old_tos_pointer)
+ return 0;
+
+ tagged_node_handle new_tos(pool.null_handle(), old_tos.get_next_tag());
+
+ if (tos.compare_exchange_weak(old_tos, new_tos))
+ break;
+ }
+
+ tagged_node_handle nodes_to_consume = old_tos;
+
+ node * last_node_pointer = NULL;
+ tagged_node_handle nodes_in_reversed_order;
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_to_consume);
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ node_pointer->next = pool.get_handle(last_node_pointer);
+ last_node_pointer = node_pointer;
+
+ if (!next_node) {
+ nodes_in_reversed_order = nodes_to_consume;
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_to_consume.get_next_tag());
+ nodes_to_consume = next;
+ }
+
+ for(;;) {
+ node * node_pointer = pool.get_pointer(nodes_in_reversed_order);
+ f(node_pointer->v);
+ element_count += 1;
+
+ node * next_node = pool.get_pointer(node_pointer->next);
+
+ if (!next_node) {
+ pool.template destruct<true>(nodes_in_reversed_order);
+ break;
+ }
+
+ tagged_node_handle next(pool.get_handle(next_node), nodes_in_reversed_order.get_next_tag());
+ pool.template destruct<true>(nodes_in_reversed_order);
+ nodes_in_reversed_order = next;
+ }
+
+ return element_count;
+ }
/**
* \return true, if stack is empty.
*
diff --git a/boost/log/attributes/attribute_value_impl.hpp b/boost/log/attributes/attribute_value_impl.hpp
index b21091e58b..e18015bec3 100644
--- a/boost/log/attributes/attribute_value_impl.hpp
+++ b/boost/log/attributes/attribute_value_impl.hpp
@@ -17,7 +17,7 @@
#include <boost/type_index.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/attributes/attribute_value.hpp>
diff --git a/boost/log/attributes/constant.hpp b/boost/log/attributes/constant.hpp
index 1e9a036176..f10b0a7e5b 100644
--- a/boost/log/attributes/constant.hpp
+++ b/boost/log/attributes/constant.hpp
@@ -16,7 +16,7 @@
#define BOOST_LOG_ATTRIBUTES_CONSTANT_HPP_INCLUDED_
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/embedded_string_type.hpp>
diff --git a/boost/log/attributes/mutable_constant.hpp b/boost/log/attributes/mutable_constant.hpp
index 52356b45de..6ff76ddc2c 100644
--- a/boost/log/attributes/mutable_constant.hpp
+++ b/boost/log/attributes/mutable_constant.hpp
@@ -19,7 +19,7 @@
#include <boost/smart_ptr/intrusive_ptr.hpp>
#include <boost/mpl/if.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/type_traits/is_void.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/locks.hpp>
diff --git a/boost/log/attributes/scoped_attribute.hpp b/boost/log/attributes/scoped_attribute.hpp
index bd0e52da7f..88dd218e4c 100644
--- a/boost/log/attributes/scoped_attribute.hpp
+++ b/boost/log/attributes/scoped_attribute.hpp
@@ -17,8 +17,8 @@
#include <utility>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/core/core.hpp>
#include <boost/log/sources/basic_logger.hpp>
diff --git a/boost/log/attributes/value_extraction.hpp b/boost/log/attributes/value_extraction.hpp
index 7ec3f1d174..87fd1495e3 100644
--- a/boost/log/attributes/value_extraction.hpp
+++ b/boost/log/attributes/value_extraction.hpp
@@ -25,7 +25,7 @@
#include <boost/mpl/contains.hpp>
#include <boost/mpl/push_back.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/exceptions.hpp>
#include <boost/log/core/record.hpp>
@@ -137,14 +137,14 @@ private:
//! The function unwraps \c value_ref, if possible
template< typename T, typename TagT >
-BOOST_FORCEINLINE typename enable_if< mpl::is_sequence< T >, value_ref< T, TagT > >::type
+BOOST_FORCEINLINE typename boost::enable_if_c< mpl::is_sequence< T >::value, value_ref< T, TagT > >::type
unwrap_value_ref(value_ref< T, TagT > const& r)
{
return r;
}
template< typename T, typename TagT >
-BOOST_FORCEINLINE typename disable_if< mpl::is_sequence< T >, T const& >::type
+BOOST_FORCEINLINE typename boost::disable_if_c< mpl::is_sequence< T >::value, T const& >::type
unwrap_value_ref(value_ref< T, TagT > const& r)
{
return r.get();
diff --git a/boost/log/core/record.hpp b/boost/log/core/record.hpp
index b58177c58a..b666214c61 100644
--- a/boost/log/core/record.hpp
+++ b/boost/log/core/record.hpp
@@ -55,6 +55,10 @@ private:
//! A pointer to the log record implementation
public_data* m_impl;
+private:
+ // A private constructor, accessible from core
+ BOOST_CONSTEXPR explicit record(public_data* impl) BOOST_NOEXCEPT : m_impl(impl) {}
+
#endif // BOOST_LOG_DOXYGEN_PASS
public:
@@ -63,7 +67,7 @@ public:
*
* \post <tt>!*this == true</tt>
*/
- record() : m_impl(NULL) {}
+ BOOST_CONSTEXPR record() BOOST_NOEXCEPT : m_impl(NULL) {}
/*!
* Move constructor. Source record contents unspecified after the operation.
diff --git a/boost/log/core/record_view.hpp b/boost/log/core/record_view.hpp
index 6fa7a63f98..515627aebd 100644
--- a/boost/log/core/record_view.hpp
+++ b/boost/log/core/record_view.hpp
@@ -17,6 +17,7 @@
#include <boost/smart_ptr/intrusive_ptr.hpp>
#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/utility/explicit_operator_bool.hpp>
#include <boost/log/attributes/attribute_value_set.hpp>
@@ -72,10 +73,10 @@ private:
//! Attribute values view
attribute_value_set m_attribute_values;
- //! Constructor from the attribute sets
- explicit public_data(BOOST_RV_REF(attribute_value_set) values) :
+ //! Constructor from the attribute value set
+ explicit public_data(BOOST_RV_REF(attribute_value_set) values) BOOST_NOEXCEPT :
m_ref_counter(1),
- m_attribute_values(values)
+ m_attribute_values(boost::move(values))
{
}
@@ -98,7 +99,7 @@ private:
private:
// A private constructor, accessible from record
- explicit record_view(public_data* impl) : m_impl(impl, false) {}
+ explicit record_view(public_data* impl) BOOST_NOEXCEPT : m_impl(impl, false) {}
#endif // BOOST_LOG_DOXYGEN_PASS
@@ -108,7 +109,12 @@ public:
*
* \post <tt>!*this == true</tt>
*/
- BOOST_DEFAULTED_FUNCTION(record_view(), {})
+ BOOST_CONSTEXPR record_view() BOOST_NOEXCEPT
+#if !defined(BOOST_LOG_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS)
+ = default;
+#else
+ {}
+#endif
/*!
* Copy constructor
diff --git a/boost/log/detail/adaptive_mutex.hpp b/boost/log/detail/adaptive_mutex.hpp
index 25e7559e17..f9830effde 100644
--- a/boost/log/detail/adaptive_mutex.hpp
+++ b/boost/log/detail/adaptive_mutex.hpp
@@ -37,19 +37,11 @@
#if defined(BOOST_LOG_ADAPTIVE_MUTEX_USE_WINAPI)
+#include <boost/log/detail/pause.hpp>
#include <boost/detail/interlocked.hpp>
#include <boost/detail/winapi/thread.hpp>
#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
-# if defined(_M_IX86)
-# define BOOST_LOG_PAUSE_OP __asm { pause }
-# elif defined(_M_AMD64)
-extern "C" void _mm_pause(void);
-# if defined(BOOST_MSVC)
-# pragma intrinsic(_mm_pause)
-# endif
-# define BOOST_LOG_PAUSE_OP _mm_pause()
-# endif
# if defined(__INTEL_COMPILER)
# define BOOST_LOG_COMPILER_BARRIER __memory_barrier()
# else
@@ -60,7 +52,6 @@ extern "C" void _ReadWriteBarrier(void);
# define BOOST_LOG_COMPILER_BARRIER _ReadWriteBarrier()
# endif
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# define BOOST_LOG_PAUSE_OP __asm__ __volatile__("pause;")
# define BOOST_LOG_COMPILER_BARRIER __asm__ __volatile__("" : : : "memory")
#endif
@@ -94,17 +85,17 @@ public:
void lock()
{
-#if defined(BOOST_LOG_PAUSE_OP)
+#if defined(BOOST_LOG_AUX_PAUSE)
unsigned int pause_count = initial_pause;
#endif
while (!try_lock())
{
-#if defined(BOOST_LOG_PAUSE_OP)
+#if defined(BOOST_LOG_AUX_PAUSE)
if (pause_count < max_pause)
{
for (unsigned int i = 0; i < pause_count; ++i)
{
- BOOST_LOG_PAUSE_OP;
+ BOOST_LOG_AUX_PAUSE;
}
pause_count += pause_count;
}
@@ -136,7 +127,7 @@ public:
BOOST_DELETED_FUNCTION(adaptive_mutex& operator= (adaptive_mutex const&))
};
-#undef BOOST_LOG_PAUSE_OP
+#undef BOOST_LOG_AUX_PAUSE
#undef BOOST_LOG_COMPILER_BARRIER
} // namespace aux
diff --git a/boost/log/detail/attachable_sstream_buf.hpp b/boost/log/detail/attachable_sstream_buf.hpp
index ae536a4316..3608bb1083 100644
--- a/boost/log/detail/attachable_sstream_buf.hpp
+++ b/boost/log/detail/attachable_sstream_buf.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright Andrey Semashev 2007 - 2015.
+ * Copyright Andrey Semashev 2007 - 2016.
* Distributed under the 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,14 @@
#ifndef BOOST_LOG_ATTACHABLE_SSTREAM_BUF_HPP_INCLUDED_
#define BOOST_LOG_ATTACHABLE_SSTREAM_BUF_HPP_INCLUDED_
+#include <cstddef>
#include <memory>
+#include <locale>
#include <string>
#include <streambuf>
#include <boost/assert.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/locale/utf.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/header.hpp>
@@ -58,66 +61,196 @@ public:
typedef typename base_type::traits_type traits_type;
//! String type
typedef std::basic_string< char_type, traits_type, AllocatorT > string_type;
+ //! Size type
+ typedef typename string_type::size_type size_type;
//! Int type
typedef typename base_type::int_type int_type;
+ struct storage_state
+ {
+ //! A reference to the string that will be filled
+ string_type* storage;
+ //! Max size of the storage, in characters
+ size_type max_size;
+ //! Indicates that storage overflow happened
+ bool overflow;
+
+ BOOST_CONSTEXPR storage_state() BOOST_NOEXCEPT : storage(NULL), max_size(0u), overflow(false)
+ {
+ }
+ };
+
private:
- //! A reference to the string that will be filled
- string_type* m_Storage;
+ //! Buffer storage state
+ storage_state m_storage_state;
//! A buffer used to temporarily store output
- char_type m_Buffer[buffer_size];
+ char_type m_buffer[buffer_size];
public:
//! Constructor
- explicit basic_ostringstreambuf() : m_Storage(0)
+ basic_ostringstreambuf() BOOST_NOEXCEPT
{
- base_type::setp(m_Buffer, m_Buffer + (sizeof(m_Buffer) / sizeof(*m_Buffer)));
+ base_type::setp(m_buffer, m_buffer + (sizeof(m_buffer) / sizeof(*m_buffer)));
}
//! Constructor
- explicit basic_ostringstreambuf(string_type& storage) : m_Storage(boost::addressof(storage))
+ explicit basic_ostringstreambuf(string_type& storage) BOOST_NOEXCEPT
{
- base_type::setp(m_Buffer, m_Buffer + (sizeof(m_Buffer) / sizeof(*m_Buffer)));
+ base_type::setp(m_buffer, m_buffer + (sizeof(m_buffer) / sizeof(*m_buffer)));
+ attach(storage);
}
- //! Clears the buffer to the initial state
- void clear()
- {
- char_type* pBase = this->pbase();
- char_type* pPtr = this->pptr();
- if (pBase != pPtr)
- this->pbump(static_cast< int >(pBase - pPtr));
- }
+ storage_state const& get_storage_state() const BOOST_NOEXCEPT { return m_storage_state; }
+ void set_storage_state(storage_state const& st) BOOST_NOEXCEPT { m_storage_state = st; }
//! Detaches the buffer from the string
void detach()
{
- if (m_Storage)
+ if (m_storage_state.storage)
{
this_type::sync();
- m_Storage = 0;
+ m_storage_state.storage = NULL;
+ m_storage_state.max_size = 0u;
+ m_storage_state.overflow = false;
}
}
//! Attaches the buffer to another string
void attach(string_type& storage)
{
+ attach(storage, storage.max_size());
+ }
+
+ //! Attaches the buffer to another string
+ void attach(string_type& storage, size_type max_size)
+ {
detach();
- m_Storage = boost::addressof(storage);
+ m_storage_state.storage = &storage;
+ this->max_size(max_size);
}
//! Returns a pointer to the attached string
- string_type* storage() const { return m_Storage; }
+ string_type* storage() const BOOST_NOEXCEPT { return m_storage_state.storage; }
+
+ //! Returns the maximum size of the storage
+ size_type max_size() const BOOST_NOEXCEPT { return m_storage_state.max_size; }
+ //! Sets the maximum size of the storage
+ void max_size(size_type size)
+ {
+ if (m_storage_state.storage)
+ {
+ const size_type storage_max_size = m_storage_state.storage->max_size();
+ size = size > storage_max_size ? storage_max_size : size;
+ }
+
+ m_storage_state.max_size = size;
+ ensure_max_size();
+ }
+ //! Makes sure the storage does not exceed the max size limit. Should be called after the storage is modified externally.
+ void ensure_max_size()
+ {
+ if (m_storage_state.storage && m_storage_state.storage->size() > m_storage_state.max_size)
+ {
+ const size_type len = length_until_boundary(m_storage_state.storage->c_str(), m_storage_state.storage->size(), m_storage_state.max_size);
+ m_storage_state.storage->resize(len);
+ m_storage_state.overflow = true;
+ }
+ }
+
+ //! Returns true if the max size limit has been exceeded
+ bool storage_overflow() const BOOST_NOEXCEPT { return m_storage_state.overflow; }
+ //! Sets the overflow flag
+ void storage_overflow(bool f) BOOST_NOEXCEPT { m_storage_state.overflow = f; }
+
+ //! Returns the size left in the storage
+ size_type size_left() const BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT(m_storage_state.storage != NULL);
+
+ const size_type size = m_storage_state.storage->size();
+ return size < m_storage_state.max_size ? m_storage_state.max_size - size : static_cast< size_type >(0u);
+ }
+
+ //! Appends a string to the storage and returns the number of written characters
+ size_type append(const char_type* s, size_type n)
+ {
+ if (!m_storage_state.overflow)
+ {
+ BOOST_ASSERT(m_storage_state.storage != NULL);
+
+ size_type left = size_left();
+ BOOST_LOG_ASSUME(left <= m_storage_state.storage->max_size());
+ if (BOOST_LIKELY(n <= left))
+ {
+ m_storage_state.storage->append(s, n);
+ return n;
+ }
+ else
+ {
+ // We have to find out where the last character that fits before the limit ends
+ left = length_until_boundary(s, n, left);
+ m_storage_state.storage->append(s, left);
+ m_storage_state.overflow = true;
+ return left;
+ }
+ }
+ return 0u;
+ }
+
+ //! Appends the specified number of characters to the storage and returns the number of written characters
+ size_type append(size_type n, char_type c)
+ {
+ if (!m_storage_state.overflow)
+ {
+ BOOST_ASSERT(m_storage_state.storage != NULL);
+
+ const size_type left = size_left();
+ BOOST_LOG_ASSUME(left <= m_storage_state.storage->max_size());
+ if (BOOST_LIKELY(n <= left))
+ {
+ m_storage_state.storage->append(n, c);
+ return n;
+ }
+ else
+ {
+ m_storage_state.storage->append(left, c);
+ m_storage_state.overflow = true;
+ return left;
+ }
+ }
+ return 0u;
+ }
+
+ //! Appends a character to the storage and returns the number of written characters
+ size_type push_back(char_type c)
+ {
+ if (!m_storage_state.overflow)
+ {
+ BOOST_ASSERT(m_storage_state.storage != NULL);
+
+ BOOST_LOG_ASSUME(m_storage_state.max_size <= m_storage_state.storage->max_size());
+ if (BOOST_LIKELY(m_storage_state.storage->size() < m_storage_state.max_size))
+ {
+ m_storage_state.storage->push_back(c);
+ return 1u;
+ }
+ else
+ {
+ m_storage_state.overflow = true;
+ return 0u;
+ }
+ }
+ return 0u;
+ }
protected:
//! Puts all buffered data to the string
int sync()
{
- BOOST_ASSERT(m_Storage != 0);
char_type* pBase = this->pbase();
char_type* pPtr = this->pptr();
if (pBase != pPtr)
{
- m_Storage->append(pBase, pPtr);
+ this->append(pBase, static_cast< size_type >(pPtr - pBase));
this->pbump(static_cast< int >(pBase - pPtr));
}
return 0;
@@ -125,11 +258,10 @@ protected:
//! Puts an unbuffered character to the string
int_type overflow(int_type c)
{
- BOOST_ASSERT(m_Storage != 0);
- basic_ostringstreambuf::sync();
+ this_type::sync();
if (!traits_type::eq_int_type(c, traits_type::eof()))
{
- m_Storage->push_back(traits_type::to_char_type(c));
+ this->push_back(traits_type::to_char_type(c));
return c;
}
else
@@ -138,21 +270,47 @@ protected:
//! Puts a character sequence to the string
std::streamsize xsputn(const char_type* s, std::streamsize n)
{
- BOOST_ASSERT(m_Storage != 0);
- basic_ostringstreambuf::sync();
- typedef typename string_type::size_type string_size_type;
- const string_size_type max_storage_left =
- m_Storage->max_size() - m_Storage->size();
- if (static_cast< string_size_type >(n) < max_storage_left)
- {
- m_Storage->append(s, static_cast< string_size_type >(n));
- return n;
- }
- else
+ this_type::sync();
+ return static_cast< std::streamsize >(this->append(s, static_cast< size_type >(n)));
+ }
+
+ //! Finds the string length so that it includes only complete characters, and does not exceed \a max_size
+ size_type length_until_boundary(const char_type* s, size_type n, size_type max_size) const
+ {
+ return length_until_boundary(s, n, max_size, mpl::bool_< sizeof(char_type) == 1u >());;
+ }
+
+ //! Finds the string length so that it includes only complete characters, and does not exceed \a max_size
+ size_type length_until_boundary(const char_type* s, size_type n, size_type max_size, mpl::true_) const
+ {
+ std::locale loc = this->getloc();
+ std::codecvt< wchar_t, char, std::mbstate_t > const& fac = std::use_facet< std::codecvt< wchar_t, char, std::mbstate_t > >(loc);
+ std::mbstate_t mbs = std::mbstate_t();
+ return static_cast< size_type >(fac.length(mbs, s, s + max_size, ~static_cast< std::size_t >(0u)));
+ }
+
+ //! Finds the string length so that it includes only complete characters, and does not exceed \a max_size
+ static size_type length_until_boundary(const char_type* s, size_type n, size_type max_size, mpl::false_)
+ {
+ // Note: Although it's not required to be true for wchar_t, here we assume that the string has Unicode encoding.
+ // Compilers use some version of Unicode for wchar_t on all tested platforms, and std::locale doesn't offer a way
+ // to find the character boundary for character types other than char anyway.
+ typedef boost::locale::utf::utf_traits< CharT > utf_traits;
+
+ size_type pos = max_size;
+ while (pos > 0u)
{
- m_Storage->append(s, max_storage_left);
- return static_cast< std::streamsize >(max_storage_left);
+ --pos;
+ if (utf_traits::is_lead(s[pos]))
+ {
+ const char_type* p = s + pos;
+ boost::locale::utf::code_point cp = utf_traits::decode(p, s + n);
+ if (boost::locale::utf::is_valid_codepoint(cp) && p <= (s + max_size))
+ return static_cast< size_type >(p - s);
+ }
}
+
+ return 0u;
}
//! Copy constructor (closed)
diff --git a/boost/log/detail/c_str.hpp b/boost/log/detail/c_str.hpp
new file mode 100644
index 0000000000..049d1c389e
--- /dev/null
+++ b/boost/log/detail/c_str.hpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file c_str.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * This header is the Boost.Log library implementation, see the library documentation
+ * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
+ */
+
+#ifndef BOOST_LOG_DETAIL_C_STR_HPP_INCLUDED_
+#define BOOST_LOG_DETAIL_C_STR_HPP_INCLUDED_
+
+#include <string>
+#include <boost/core/enable_if.hpp>
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/is_character_type.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace aux {
+
+template< typename T >
+inline typename boost::enable_if_c< is_character_type< T >::value, const T* >::type c_str(const T* str) BOOST_NOEXCEPT
+{
+ return str;
+}
+
+template< typename T, typename TraitsT, typename AllocatorT >
+inline typename boost::enable_if_c< is_character_type< T >::value, const T* >::type c_str(std::basic_string< T, TraitsT, AllocatorT > const& str) BOOST_NOEXCEPT
+{
+ return str.c_str();
+}
+
+} // namespace aux
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_DETAIL_C_STR_HPP_INCLUDED_
diff --git a/boost/log/detail/code_conversion.hpp b/boost/log/detail/code_conversion.hpp
index 86cdfd8800..b39970d022 100644
--- a/boost/log/detail/code_conversion.hpp
+++ b/boost/log/detail/code_conversion.hpp
@@ -38,64 +38,99 @@ namespace aux {
// type. These conversions are used in sinks, e.g. to convert multibyte strings to wide-character filesystem paths.
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const wchar_t* str1, std::size_t len, std::string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const wchar_t* str1, std::size_t len, std::string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char* str1, std::size_t len, std::wstring& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char* str1, std::size_t len, std::wstring& str2, std::size_t max_size, std::locale const& loc = std::locale());
#if !defined(BOOST_LOG_NO_CXX11_CODECVT_FACETS)
#if !defined(BOOST_NO_CXX11_CHAR16_T)
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char16_t* str1, std::size_t len, std::string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char16_t* str1, std::size_t len, std::string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char* str1, std::size_t len, std::u16string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char* str1, std::size_t len, std::u16string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char16_t* str1, std::size_t len, std::wstring& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char16_t* str1, std::size_t len, std::wstring& str2, std::size_t max_size, std::locale const& loc = std::locale());
#endif
#if !defined(BOOST_NO_CXX11_CHAR32_T)
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char32_t* str1, std::size_t len, std::string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char32_t* str1, std::size_t len, std::string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char* str1, std::size_t len, std::u32string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char* str1, std::size_t len, std::u32string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char32_t* str1, std::size_t len, std::wstring& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char32_t* str1, std::size_t len, std::wstring& str2, std::size_t max_size, std::locale const& loc = std::locale());
#endif
#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_CHAR32_T)
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char16_t* str1, std::size_t len, std::u32string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char16_t* str1, std::size_t len, std::u32string& str2, std::size_t max_size, std::locale const& loc = std::locale());
//! The function converts one string to the character type of another
-BOOST_LOG_API void code_convert_impl(const char32_t* str1, std::size_t len, std::u16string& str2, std::locale const& loc = std::locale());
+BOOST_LOG_API bool code_convert_impl(const char32_t* str1, std::size_t len, std::u16string& str2, std::size_t max_size, std::locale const& loc = std::locale());
#endif
#endif // !defined(BOOST_LOG_NO_CXX11_CODECVT_FACETS)
//! The function converts one string to the character type of another
+template< typename SourceCharT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT), bool >::type
+code_convert(const SourceCharT* str1, std::size_t len, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::size_t max_size, std::locale const& = std::locale())
+{
+ std::size_t size_left = str2.size() < max_size ? max_size - str2.size() : static_cast< std::size_t >(0u);
+ const bool overflow = len > size_left;
+ str2.append(reinterpret_cast< const TargetCharT* >(str1), overflow ? size_left : len);
+ return !overflow;
+}
+
+//! The function converts one string to the character type of another
template< typename SourceCharT, typename SourceTraitsT, typename SourceAllocatorT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
-inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT) >::type
-code_convert(std::basic_string< SourceCharT, SourceTraitsT, SourceAllocatorT > const& str1, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& = std::locale())
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT), bool >::type
+code_convert(std::basic_string< SourceCharT, SourceTraitsT, SourceAllocatorT > const& str1, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::size_t max_size, std::locale const& loc = std::locale())
+{
+ return aux::code_convert(str1.data(), str1.size(), str2, max_size, loc);
+}
+
+//! The function converts one string to the character type of another
+template< typename SourceCharT, typename SourceTraitsT, typename SourceAllocatorT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT), bool >::type
+code_convert(std::basic_string< SourceCharT, SourceTraitsT, SourceAllocatorT > const& str1, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& loc = std::locale())
{
- str2.append(reinterpret_cast< const TargetCharT* >(str1.c_str()), str1.size());
+ return aux::code_convert(str1.data(), str1.size(), str2, str2.max_size(), loc);
}
//! The function converts one string to the character type of another
template< typename SourceCharT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
-inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT) >::type
-code_convert(const SourceCharT* str1, std::size_t len, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& = std::locale())
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) == sizeof(TargetCharT), bool >::type
+code_convert(const SourceCharT* str1, std::size_t len, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& loc = std::locale())
{
- str2.append(reinterpret_cast< const TargetCharT* >(str1), len);
+ return aux::code_convert(str1, len, str2, str2.max_size(), loc);
}
//! The function converts one string to the character type of another
template< typename SourceCharT, typename SourceTraitsT, typename SourceAllocatorT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
-inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT) >::type
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT), bool >::type
code_convert(std::basic_string< SourceCharT, SourceTraitsT, SourceAllocatorT > const& str1, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& loc = std::locale())
{
- aux::code_convert_impl(str1.c_str(), str1.size(), str2, loc);
+ return aux::code_convert_impl(str1.c_str(), str1.size(), str2, str2.max_size(), loc);
}
//! The function converts one string to the character type of another
template< typename SourceCharT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
-inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT) >::type
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT), bool >::type
code_convert(const SourceCharT* str1, std::size_t len, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::locale const& loc = std::locale())
{
- aux::code_convert_impl(str1, len, str2, loc);
+ return aux::code_convert_impl(str1, len, str2, str2.max_size(), loc);
+}
+
+//! The function converts one string to the character type of another
+template< typename SourceCharT, typename SourceTraitsT, typename SourceAllocatorT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT), bool >::type
+code_convert(std::basic_string< SourceCharT, SourceTraitsT, SourceAllocatorT > const& str1, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::size_t max_size, std::locale const& loc = std::locale())
+{
+ return aux::code_convert_impl(str1.c_str(), str1.size(), str2, max_size, loc);
+}
+
+//! The function converts one string to the character type of another
+template< typename SourceCharT, typename TargetCharT, typename TargetTraitsT, typename TargetAllocatorT >
+inline typename boost::enable_if_c< is_character_type< SourceCharT >::value && is_character_type< TargetCharT >::value && sizeof(SourceCharT) != sizeof(TargetCharT), bool >::type
+code_convert(const SourceCharT* str1, std::size_t len, std::basic_string< TargetCharT, TargetTraitsT, TargetAllocatorT >& str2, std::size_t max_size, std::locale const& loc = std::locale())
+{
+ return aux::code_convert_impl(str1, len, str2, max_size, loc);
}
//! The function converts the passed string to the narrow-character encoding
@@ -114,8 +149,8 @@ inline std::string const& to_narrow(std::string const& str, std::locale const&)
inline std::string to_narrow(std::wstring const& str, std::locale const& loc = std::locale())
{
std::string res;
- aux::code_convert_impl(str.c_str(), str.size(), res, loc);
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ aux::code_convert_impl(str.c_str(), str.size(), res, res.max_size(), loc);
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_NRVO)
return static_cast< std::string&& >(res);
#else
return res;
@@ -138,8 +173,8 @@ inline std::wstring const& to_wide(std::wstring const& str, std::locale const&)
inline std::wstring to_wide(std::string const& str, std::locale const& loc = std::locale())
{
std::wstring res;
- aux::code_convert_impl(str.c_str(), str.size(), res, loc);
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ aux::code_convert_impl(str.c_str(), str.size(), res, res.max_size(), loc);
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_NRVO)
return static_cast< std::wstring&& >(res);
#else
return res;
diff --git a/boost/log/detail/config.hpp b/boost/log/detail/config.hpp
index ce9aeb2dc1..7265d2b6e4 100644
--- a/boost/log/detail/config.hpp
+++ b/boost/log/detail/config.hpp
@@ -134,6 +134,16 @@
#define BOOST_LOG_NO_CXX11_ARG_PACKS_TO_NON_VARIADIC_ARGS_EXPANSION
#endif
+#if defined(BOOST_NO_CXX11_CONSTEXPR) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 does not support in-class brace initializers for static constexpr array members
+#define BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS
+#endif
+
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 cannot handle a defaulted function with noexcept specifier
+#define BOOST_LOG_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+#endif
+
#if defined(_MSC_VER)
# define BOOST_LOG_NO_VTABLE __declspec(novtable)
#elif defined(__GNUC__)
@@ -168,6 +178,14 @@
# define BOOST_LOG_UNREACHABLE_RETURN(r) BOOST_LOG_UNREACHABLE()
#endif
+// The macro efficiently returns a local lvalue from a function.
+// It employs NRVO, if supported by compiler, or uses a move constructor otherwise.
+#if defined(BOOST_HAS_NRVO)
+#define BOOST_LOG_NRVO_RESULT(x) x
+#else
+#define BOOST_LOG_NRVO_RESULT(x) boost::move(x)
+#endif
+
// Some compilers support a special attribute that shows that a function won't return
#if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
// GCC and Sun Studio 12 support attribute syntax
diff --git a/boost/log/detail/decomposed_time.hpp b/boost/log/detail/decomposed_time.hpp
index 6008d6a798..0328106edc 100644
--- a/boost/log/detail/decomposed_time.hpp
+++ b/boost/log/detail/decomposed_time.hpp
@@ -25,6 +25,7 @@
#include <boost/range/iterator_range_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/date_time_format_parser.hpp>
+#include <boost/log/detail/attachable_sstream_buf.hpp>
#include <boost/log/utility/formatting_ostream.hpp>
#include <boost/log/detail/header.hpp>
@@ -108,7 +109,7 @@ struct decomposed_time_wrapper :
};
template< typename CharT >
-BOOST_LOG_API void put_integer(std::basic_string< CharT >& str, uint32_t value, unsigned int width, CharT fill_char);
+BOOST_LOG_API void put_integer(boost::log::aux::basic_ostringstreambuf< CharT >& strbuf, uint32_t value, unsigned int width, CharT fill_char);
template< typename T, typename CharT >
class date_time_formatter
@@ -130,14 +131,12 @@ public:
{
date_time_formatter const& self;
stream_type& strm;
- string_type& str;
value_type const& value;
unsigned int literal_index, literal_pos;
context(date_time_formatter const& self_, stream_type& strm_, value_type const& value_) :
self(self_),
strm(strm_),
- str(*strm_.rdbuf()->storage()),
value(value_),
literal_index(0),
literal_pos(0)
@@ -166,12 +165,12 @@ public:
m_literal_chars(that.m_literal_chars)
{
}
- date_time_formatter(BOOST_RV_REF(date_time_formatter) that)
+ date_time_formatter(BOOST_RV_REF(date_time_formatter) that) BOOST_NOEXCEPT
{
this->swap(static_cast< date_time_formatter& >(that));
}
- date_time_formatter& operator= (date_time_formatter that)
+ date_time_formatter& operator= (date_time_formatter that) BOOST_NOEXCEPT
{
this->swap(that);
return *this;
@@ -200,7 +199,7 @@ public:
m_formatters.push_back(&date_time_formatter_::format_literal);
}
- void swap(date_time_formatter& that)
+ void swap(date_time_formatter& that) BOOST_NOEXCEPT
{
m_formatters.swap(that.m_formatters);
m_literal_lens.swap(that.m_literal_lens);
@@ -220,55 +219,55 @@ public:
static void format_full_year(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.year, 4, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.year, 4, static_cast< char_type >('0'));
}
static void format_short_year(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.year % 100u, 2, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.year % 100u, 2, static_cast< char_type >('0'));
}
static void format_numeric_month(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.month, 2, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.month, 2, static_cast< char_type >('0'));
}
template< char_type FillCharV >
static void format_month_day(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.day, 2, static_cast< char_type >(FillCharV));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.day, 2, static_cast< char_type >(FillCharV));
}
static void format_week_day(context& ctx)
{
- (put_integer)(ctx.str, static_cast< decomposed_time const& >(ctx.value).week_day(), 1, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), static_cast< decomposed_time const& >(ctx.value).week_day(), 1, static_cast< char_type >('0'));
}
template< char_type FillCharV >
static void format_hours(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.hours, 2, static_cast< char_type >(FillCharV));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.hours, 2, static_cast< char_type >(FillCharV));
}
template< char_type FillCharV >
static void format_hours_12(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.hours % 12u + 1u, 2, static_cast< char_type >(FillCharV));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.hours % 12u + 1u, 2, static_cast< char_type >(FillCharV));
}
static void format_minutes(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.minutes, 2, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.minutes, 2, static_cast< char_type >('0'));
}
static void format_seconds(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.seconds, 2, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.seconds, 2, static_cast< char_type >('0'));
}
static void format_fractional_seconds(context& ctx)
{
- (put_integer)(ctx.str, ctx.value.subseconds, decomposed_time::subseconds_digits10, static_cast< char_type >('0'));
+ (put_integer)(*ctx.strm.rdbuf(), ctx.value.subseconds, decomposed_time::subseconds_digits10, static_cast< char_type >('0'));
}
template< bool UpperCaseV >
@@ -277,16 +276,16 @@ public:
static const char_type am[] = { static_cast< char_type >(UpperCaseV ? 'A' : 'a'), static_cast< char_type >(UpperCaseV ? 'M' : 'm'), static_cast< char_type >(0) };
static const char_type pm[] = { static_cast< char_type >(UpperCaseV ? 'P' : 'p'), static_cast< char_type >(UpperCaseV ? 'M' : 'm'), static_cast< char_type >(0) };
- ctx.str.append(((static_cast< decomposed_time const& >(ctx.value).hours > 11) ? pm : am), 2u);
+ ctx.strm.rdbuf()->append(((static_cast< decomposed_time const& >(ctx.value).hours > 11) ? pm : am), 2u);
}
template< bool DisplayPositiveV >
static void format_sign(context& ctx)
{
if (static_cast< decomposed_time const& >(ctx.value).negative)
- ctx.str.push_back('-');
+ ctx.strm.rdbuf()->push_back('-');
else if (DisplayPositiveV)
- ctx.str.push_back('+');
+ ctx.strm.rdbuf()->push_back('+');
}
private:
@@ -296,7 +295,7 @@ private:
++ctx.literal_index;
ctx.literal_pos += len;
const char_type* lit = ctx.self.m_literal_chars.c_str();
- ctx.str.append(lit + pos, len);
+ ctx.strm.rdbuf()->append(lit + pos, len);
}
};
diff --git a/boost/log/detail/enqueued_record.hpp b/boost/log/detail/enqueued_record.hpp
index ef6377799f..f4821363a2 100644
--- a/boost/log/detail/enqueued_record.hpp
+++ b/boost/log/detail/enqueued_record.hpp
@@ -18,7 +18,7 @@
#define BOOST_LOG_DETAIL_ENQUEUED_RECORD_HPP_INCLUDED_
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/timestamp.hpp>
#include <boost/log/core/record_view.hpp>
diff --git a/boost/log/detail/format.hpp b/boost/log/detail/format.hpp
index 89c6a9fb01..449f85edfa 100644
--- a/boost/log/detail/format.hpp
+++ b/boost/log/detail/format.hpp
@@ -21,7 +21,7 @@
#include <iosfwd>
#include <boost/assert.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/unhandled_exception_count.hpp>
#include <boost/log/detail/cleanup_scope_guard.hpp>
@@ -188,37 +188,19 @@ public:
}
//! Creates a pump that will receive all format arguments and put the formatted string into the stream
- pump make_pump(stream_type& strm) BOOST_NOEXCEPT
+ pump make_pump(stream_type& strm)
{
+ // Flush the stream beforehand so that the pump can safely switch the stream storage string
+ strm.flush();
return pump(*this, strm);
}
//! Composes the final string from the formatted pieces
- void compose(string_type& str) const
- {
- typename format_description_type::format_element_list::const_iterator it = m_format.format_elements.begin(), end = m_format.format_elements.end();
- for (; it != end; ++it)
- {
- if (it->arg_number >= 0)
- {
- // This is a placeholder
- str.append(m_formatting_params[it->arg_number].target);
- }
- else
- {
- // This is a literal
- const char_type* p = m_format.literal_chars.c_str() + it->literal_start_pos;
- str.append(p, it->literal_len);
- }
- }
- }
-
- //! Composes the final string from the formatted pieces
string_type str() const
{
string_type result;
compose(result);
- return boost::move(result);
+ return BOOST_LOG_NRVO_RESULT(result);
}
private:
@@ -236,6 +218,28 @@ private:
}
}
}
+
+ //! Composes the final string from the formatted pieces
+ template< typename T >
+ void compose(T& str) const
+ {
+ typename format_description_type::format_element_list::const_iterator it = m_format.format_elements.begin(), end = m_format.format_elements.end();
+ for (; it != end; ++it)
+ {
+ if (it->arg_number >= 0)
+ {
+ // This is a placeholder
+ string_type const& target = m_formatting_params[it->arg_number].target;
+ str.append(target.data(), target.size());
+ }
+ else
+ {
+ // This is a literal
+ const char_type* p = m_format.literal_chars.c_str() + it->literal_start_pos;
+ str.append(p, it->literal_len);
+ }
+ }
+ }
};
//! The pump receives arguments and formats them into strings. At destruction the pump composes the final string in the attached stream.
@@ -248,18 +252,18 @@ private:
//! The guard temporarily replaces storage string in the specified stream
struct scoped_storage
{
- scoped_storage(stream_type& strm, string_type& storage) : m_stream(strm), m_storage_backup(*strm.rdbuf()->storage())
+ scoped_storage(stream_type& strm, string_type& storage) : m_stream(strm), m_storage_state_backup(strm.rdbuf()->get_storage_state())
{
strm.attach(storage);
}
~scoped_storage()
{
- m_stream.attach(m_storage_backup);
+ m_stream.rdbuf()->set_storage_state(m_storage_state_backup);
}
private:
stream_type& m_stream;
- string_type& m_storage_backup;
+ typename stream_type::streambuf_type::storage_state m_storage_state_backup;
};
private:
@@ -296,7 +300,7 @@ public:
{
// Compose the final string in the stream buffer
m_stream->flush();
- m_owner->compose(*m_stream->rdbuf()->storage());
+ m_owner->compose(*m_stream->rdbuf());
}
}
}
diff --git a/boost/log/detail/light_function.hpp b/boost/log/detail/light_function.hpp
index d6606e0e67..0835772f66 100644
--- a/boost/log/detail/light_function.hpp
+++ b/boost/log/detail/light_function.hpp
@@ -21,7 +21,7 @@
#include <cstddef>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/utility/explicit_operator_bool.hpp>
#include <boost/type_traits/remove_cv.hpp>
@@ -33,7 +33,7 @@
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
#endif
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#include <boost/utility/enable_if.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#else
#include <boost/type_traits/remove_reference.hpp>
#endif
@@ -194,12 +194,12 @@ public:
}
#else
template< typename FunT >
- light_function(FunT const& fun, typename disable_if_c< is_rv_or_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(FunT const& fun, typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< FunT >(fun))
{
}
template< typename FunT >
- light_function(BOOST_RV_REF(FunT) fun, typename disable_if_c< is_cv_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(BOOST_RV_REF(FunT) fun, typename boost::disable_if_c< is_cv_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< typename remove_cv< FunT >::type >(fun))
{
}
@@ -256,7 +256,7 @@ public:
}
#else
template< typename FunT >
- typename disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
+ typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
operator= (FunT const& fun)
{
light_function tmp(fun);
@@ -400,12 +400,12 @@ public:
}
#else
template< typename FunT >
- light_function(FunT const& fun, typename disable_if_c< is_rv_or_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(FunT const& fun, typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< FunT >(fun))
{
}
template< typename FunT >
- light_function(BOOST_RV_REF(FunT) fun, typename disable_if_c< is_cv_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(BOOST_RV_REF(FunT) fun, typename boost::disable_if_c< is_cv_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< typename remove_cv< FunT >::type >(fun))
{
}
@@ -462,7 +462,7 @@ public:
}
#else
template< typename FunT >
- typename disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
+ typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
operator= (FunT const& fun)
{
light_function tmp(fun);
diff --git a/boost/log/detail/light_function_pp.hpp b/boost/log/detail/light_function_pp.hpp
index 92df419a52..9bf5f573fe 100644
--- a/boost/log/detail/light_function_pp.hpp
+++ b/boost/log/detail/light_function_pp.hpp
@@ -119,12 +119,12 @@ public:
}
#else
template< typename FunT >
- light_function(FunT const& fun, typename disable_if_c< is_rv_or_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(FunT const& fun, typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< FunT >(fun))
{
}
template< typename FunT >
- light_function(BOOST_RV_REF(FunT) fun, typename disable_if_c< is_cv_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(BOOST_RV_REF(FunT) fun, typename boost::disable_if_c< is_cv_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< typename remove_cv< FunT >::type >(fun))
{
}
@@ -181,7 +181,7 @@ public:
}
#else
template< typename FunT >
- typename disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
+ typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
operator= (FunT const& fun)
{
light_function tmp(fun);
@@ -327,12 +327,12 @@ public:
}
#else
template< typename FunT >
- light_function(FunT const& fun, typename disable_if_c< is_rv_or_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(FunT const& fun, typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< FunT >(fun))
{
}
template< typename FunT >
- light_function(BOOST_RV_REF(FunT) fun, typename disable_if_c< is_cv_same< FunT, this_type >::value, int >::type = 0) :
+ light_function(BOOST_RV_REF(FunT) fun, typename boost::disable_if_c< is_cv_same< FunT, this_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :
m_pImpl(new impl< typename remove_cv< FunT >::type >(fun))
{
}
@@ -389,7 +389,7 @@ public:
}
#else
template< typename FunT >
- typename disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
+ typename boost::disable_if_c< is_rv_or_same< FunT, this_type >::value, this_type& >::type
operator= (FunT const& fun)
{
light_function tmp(fun);
diff --git a/boost/log/detail/locks.hpp b/boost/log/detail/locks.hpp
index 99bc7e17f9..224d8e59bb 100644
--- a/boost/log/detail/locks.hpp
+++ b/boost/log/detail/locks.hpp
@@ -32,6 +32,8 @@ namespace boost {
template< typename >
class lock_guard;
template< typename >
+class shared_lock_guard;
+template< typename >
class shared_lock;
template< typename >
class upgrade_lock;
@@ -92,6 +94,25 @@ struct is_shared_lockable
enum value_t { value = sizeof(check_shared_lockable((MutexT*)NULL)) == sizeof(true_type) };
};
+//! A scope guard that automatically unlocks the mutex on destruction
+template< typename MutexT >
+struct exclusive_auto_unlocker
+{
+ explicit exclusive_auto_unlocker(MutexT& m) BOOST_NOEXCEPT : m_Mutex(m)
+ {
+ }
+ ~exclusive_auto_unlocker()
+ {
+ m_Mutex.unlock();
+ }
+
+ BOOST_DELETED_FUNCTION(exclusive_auto_unlocker(exclusive_auto_unlocker const&))
+ BOOST_DELETED_FUNCTION(exclusive_auto_unlocker& operator= (exclusive_auto_unlocker const&))
+
+protected:
+ MutexT& m_Mutex;
+};
+
//! An analogue to the minimalistic \c lock_guard template. Defined here to avoid including Boost.Thread.
template< typename MutexT >
struct exclusive_lock_guard
@@ -105,9 +126,8 @@ struct exclusive_lock_guard
m_Mutex.unlock();
}
-private:
- exclusive_lock_guard(exclusive_lock_guard const&);
- exclusive_lock_guard& operator= (exclusive_lock_guard const&);
+ BOOST_DELETED_FUNCTION(exclusive_lock_guard(exclusive_lock_guard const&))
+ BOOST_DELETED_FUNCTION(exclusive_lock_guard& operator= (exclusive_lock_guard const&))
private:
MutexT& m_Mutex;
@@ -126,9 +146,8 @@ struct shared_lock_guard
m_Mutex.unlock_shared();
}
-private:
- shared_lock_guard(shared_lock_guard const&);
- shared_lock_guard& operator= (shared_lock_guard const&);
+ BOOST_DELETED_FUNCTION(shared_lock_guard(shared_lock_guard const&))
+ BOOST_DELETED_FUNCTION(shared_lock_guard& operator= (shared_lock_guard const&))
private:
MutexT& m_Mutex;
diff --git a/boost/log/detail/parameter_tools.hpp b/boost/log/detail/parameter_tools.hpp
index 01df40536c..55695e3cde 100644
--- a/boost/log/detail/parameter_tools.hpp
+++ b/boost/log/detail/parameter_tools.hpp
@@ -17,6 +17,8 @@
#define BOOST_LOG_DETAIL_PARAMETER_TOOLS_HPP_INCLUDED_
#include <boost/parameter/keyword.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
@@ -24,6 +26,7 @@
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#include <boost/log/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
@@ -40,23 +43,37 @@
public:\
BOOST_PP_REPEAT_FROM_TO(1, BOOST_LOG_MAX_PARAMETER_ARGS, macro, args)
+#define BOOST_LOG_CTOR_FORWARD_1(n, types)\
+ template< typename T0 >\
+ explicit BOOST_PP_TUPLE_ELEM(2, 0, types)(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :\
+ BOOST_PP_TUPLE_ELEM(2, 1, types)((BOOST_PP_ENUM_PARAMS(n, arg))) {}
-#define BOOST_LOG_CTOR_FORWARD(z, n, types)\
+#define BOOST_LOG_CTOR_FORWARD_N(n, types)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
explicit BOOST_PP_TUPLE_ELEM(2, 0, types)(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg)) :\
BOOST_PP_TUPLE_ELEM(2, 1, types)((BOOST_PP_ENUM_PARAMS(n, arg))) {}
+#define BOOST_LOG_CTOR_FORWARD(z, n, types)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_CTOR_FORWARD_1, BOOST_LOG_CTOR_FORWARD_N)(n, types)
+
// The macro expands to a number of templated constructors that aggregate their named arguments
// into an ArgumentsPack and pass it to the base class constructor.
#define BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_FORWARD(class_type, base_type)\
BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_GEN(BOOST_LOG_CTOR_FORWARD, (class_type, base_type))
+#define BOOST_LOG_CTOR_CALL_1(n, types)\
+ template< typename T0 >\
+ explicit BOOST_PP_TUPLE_ELEM(2, 0, types)(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy())\
+ { BOOST_PP_TUPLE_ELEM(2, 1, types)((BOOST_PP_ENUM_PARAMS(n, arg))); }
-#define BOOST_LOG_CTOR_CALL(z, n, types)\
+#define BOOST_LOG_CTOR_CALL_N(n, types)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
explicit BOOST_PP_TUPLE_ELEM(2, 0, types)(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg))\
{ BOOST_PP_TUPLE_ELEM(2, 1, types)((BOOST_PP_ENUM_PARAMS(n, arg))); }
+#define BOOST_LOG_CTOR_CALL(z, n, types)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_CTOR_CALL_1, BOOST_LOG_CTOR_CALL_N)(n, types)
+
// The macro expands to a number of templated constructors that aggregate their named arguments
// into an ArgumentsPack and pass it to a function call.
#define BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_CALL(class_type, fun)\
@@ -69,6 +86,7 @@ BOOST_LOG_OPEN_NAMESPACE
namespace aux {
// Yeah, not too cute. The empty_arg_list class should really be public.
+// https://svn.boost.org/trac/boost/ticket/7247
typedef boost::parameter::aux::empty_arg_list empty_arg_list;
#if !(defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_LOG_NO_CXX11_ARG_PACKS_TO_NON_VARIADIC_ARGS_EXPANSION))
@@ -103,6 +121,27 @@ struct make_arg_list< ArgT0, BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(BOOST_LOG_MAX_PAR
#endif
+template< typename T, typename R >
+struct enable_if_named_parameters {};
+
+template< typename R >
+struct enable_if_named_parameters< empty_arg_list, R >
+{
+ typedef R type;
+};
+
+template< typename Keyword, typename Arg, typename R >
+struct enable_if_named_parameters< boost::parameter::aux::tagged_argument< Keyword, Arg >, R >
+{
+ typedef R type;
+};
+
+template< typename TaggedArg, typename Next, typename R >
+struct enable_if_named_parameters< boost::parameter::aux::arg_list< TaggedArg, Next >, R >
+{
+ typedef R type;
+};
+
} // namespace aux
BOOST_LOG_CLOSE_NAMESPACE // namespace log
diff --git a/boost/log/detail/pause.hpp b/boost/log/detail/pause.hpp
new file mode 100644
index 0000000000..c1b43498f0
--- /dev/null
+++ b/boost/log/detail/pause.hpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file pause.hpp
+ * \author Andrey Semashev
+ * \date 06.01.2016
+ *
+ * \brief This header is the Boost.Log library implementation, see the library documentation
+ * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
+ */
+
+#ifndef BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
+#define BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
+# if defined(_M_IX86)
+# define BOOST_LOG_AUX_PAUSE __asm { pause }
+# elif defined(_M_AMD64)
+extern "C" void _mm_pause(void);
+# if defined(BOOST_MSVC)
+# pragma intrinsic(_mm_pause)
+# endif
+# define BOOST_LOG_AUX_PAUSE _mm_pause()
+# endif
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+# define BOOST_LOG_AUX_PAUSE __asm__ __volatile__("pause;")
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace aux {
+
+BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT
+{
+#if defined(BOOST_LOG_AUX_PAUSE)
+ BOOST_LOG_AUX_PAUSE;
+#endif
+}
+
+} // namespace aux
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_DETAIL_PAUSE_HPP_INCLUDED_
diff --git a/boost/log/detail/sfinae_tools.hpp b/boost/log/detail/sfinae_tools.hpp
new file mode 100644
index 0000000000..e9f2735b25
--- /dev/null
+++ b/boost/log/detail/sfinae_tools.hpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file sfinae_tools.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * \brief This header is the Boost.Log library implementation, see the library documentation
+ * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
+ */
+
+#ifndef BOOST_LOG_DETAIL_SFINAE_TOOLS_HPP_INCLUDED_
+#define BOOST_LOG_DETAIL_SFINAE_TOOLS_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace aux {
+
+//! A distinct type that can be used as a fake argument type in constructors filtered by SFINAE
+struct sfinae_dummy {};
+
+} // namespace aux
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_DETAIL_SFINAE_TOOLS_HPP_INCLUDED_
diff --git a/boost/log/detail/sink_init_helpers.hpp b/boost/log/detail/sink_init_helpers.hpp
index c94b5630c4..a3bbe0e8a1 100644
--- a/boost/log/detail/sink_init_helpers.hpp
+++ b/boost/log/detail/sink_init_helpers.hpp
@@ -20,7 +20,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/parameter/binding.hpp>
#include <boost/type_traits/is_void.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/phoenix/core/is_actor.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/core/core.hpp>
@@ -54,8 +54,8 @@ inline filter acquire_filter(std::basic_string< CharT, TraitsT, AllocatorT > con
return boost::log::parse_filter(filter);
}
template< typename FilterT >
-inline typename enable_if<
- phoenix::is_actor< FilterT >,
+inline typename boost::enable_if_c<
+ phoenix::is_actor< FilterT >::value,
FilterT const&
>::type acquire_filter(FilterT const& filter)
{
@@ -87,8 +87,8 @@ inline basic_formatter< CharT > acquire_formatter(std::basic_string< CharT, Trai
return boost::log::parse_formatter(formatter);
}
template< typename FormatterT >
-inline typename enable_if<
- phoenix::is_actor< FormatterT >,
+inline typename boost::enable_if_c<
+ phoenix::is_actor< FormatterT >::value,
FormatterT const&
>::type acquire_formatter(FormatterT const& formatter)
{
diff --git a/boost/log/detail/snprintf.hpp b/boost/log/detail/snprintf.hpp
index 7fae834526..14c6a6b1dc 100644
--- a/boost/log/detail/snprintf.hpp
+++ b/boost/log/detail/snprintf.hpp
@@ -35,20 +35,10 @@ BOOST_LOG_OPEN_NAMESPACE
namespace aux {
-#if !defined(_MSC_VER)
+#if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
-// Standard-conforming compilers already have the correct snprintfs
-using ::snprintf;
-using ::vsnprintf;
-
-# ifdef BOOST_LOG_USE_WCHAR_T
-using ::swprintf;
-using ::vswprintf;
-# endif // BOOST_LOG_USE_WCHAR_T
-
-#else // !defined(_MSC_VER)
-
-// MSVC snprintfs are not conforming but they are good enough for our cases
+// MSVC snprintfs are not conforming but they are good enough for our cases.
+// MinGW32, at least the older versions up until gcc 4.7, also provide the non-conforming interface.
inline int vsnprintf(char* buf, std::size_t size, const char* format, std::va_list args)
{
int n = _vsnprintf(buf, size, format, args);
@@ -93,7 +83,18 @@ inline int swprintf(wchar_t* buf, std::size_t size, const wchar_t* format, ...)
}
# endif // BOOST_LOG_USE_WCHAR_T
-#endif // !defined(_MSC_VER)
+#else
+
+// Standard-conforming compilers already have the correct snprintfs
+using ::snprintf;
+using ::vsnprintf;
+
+# ifdef BOOST_LOG_USE_WCHAR_T
+using ::swprintf;
+using ::vswprintf;
+# endif // BOOST_LOG_USE_WCHAR_T
+
+#endif
} // namespace aux
diff --git a/boost/log/detail/tagged_integer.hpp b/boost/log/detail/tagged_integer.hpp
index f72b9af78d..82c9706863 100644
--- a/boost/log/detail/tagged_integer.hpp
+++ b/boost/log/detail/tagged_integer.hpp
@@ -42,17 +42,17 @@ struct tagged_integer
integer_type value;
//! Conversion operator
- operator integer_type() const { return value; }
+ BOOST_CONSTEXPR operator integer_type() const BOOST_NOEXCEPT { return value; }
// Increment
- tagged_integer& operator++ () { ++value; return *this; }
- tagged_integer operator++ (int) { tagged_integer temp = *this; ++value; return temp; }
+ tagged_integer& operator++ () BOOST_NOEXCEPT { ++value; return *this; }
+ tagged_integer operator++ (int) BOOST_NOEXCEPT { tagged_integer temp = *this; ++value; return temp; }
// Decrement
- tagged_integer& operator-- () { --value; return *this; }
- tagged_integer operator-- (int) { tagged_integer temp = *this; --value; return temp; }
+ tagged_integer& operator-- () BOOST_NOEXCEPT { --value; return *this; }
+ tagged_integer operator-- (int) BOOST_NOEXCEPT { tagged_integer temp = *this; --value; return temp; }
#define BOOST_LOG_TAGGED_INTEGER_OP(op)\
- tagged_integer& operator op (tagged_integer const& that) { value op that.value; return *this; }
+ tagged_integer& operator op (tagged_integer const& that) BOOST_NOEXCEPT { value op that.value; return *this; }
BOOST_LOG_TAGGED_INTEGER_OP(|=)
BOOST_LOG_TAGGED_INTEGER_OP(&=)
@@ -66,13 +66,13 @@ struct tagged_integer
#undef BOOST_LOG_TAGGED_INTEGER_OP
//! Inversion operator
- tagged_integer& operator~ () { ~value; return *this; }
+ tagged_integer& operator~ () BOOST_NOEXCEPT { ~value; return *this; }
// Shift operators
template< typename T >
- tagged_integer& operator<<= (T const& that) { value <<= that; return *this; }
+ tagged_integer& operator<<= (T const& that) BOOST_NOEXCEPT { value <<= that; return *this; }
template< typename T >
- tagged_integer& operator>>= (T const& that) { value >>= that; return *this; }
+ tagged_integer& operator>>= (T const& that) BOOST_NOEXCEPT { value >>= that; return *this; }
private:
// Protection against improper usage
@@ -86,7 +86,7 @@ private:
#define BOOST_LOG_TAGGED_INTEGER_OP(op)\
template< typename IntT, typename TagT >\
inline bool operator op (\
- tagged_integer< IntT, TagT > const& left, tagged_integer< IntT, TagT > const& right)\
+ tagged_integer< IntT, TagT > const& left, tagged_integer< IntT, TagT > const& right) BOOST_NOEXCEPT\
{\
return (left.value op right.value);\
}
@@ -103,7 +103,7 @@ BOOST_LOG_TAGGED_INTEGER_OP(>=)
#define BOOST_LOG_TAGGED_INTEGER_OP(op)\
template< typename IntT, typename TagT >\
inline tagged_integer< IntT, TagT > operator op (\
- tagged_integer< IntT, TagT > const& left, tagged_integer< IntT, TagT > const& right)\
+ tagged_integer< IntT, TagT > const& left, tagged_integer< IntT, TagT > const& right) BOOST_NOEXCEPT\
{\
tagged_integer< IntT, TagT > temp = left;\
temp op##= right;\
@@ -124,7 +124,7 @@ BOOST_LOG_TAGGED_INTEGER_OP(%)
#define BOOST_LOG_TAGGED_INTEGER_OP(op)\
template< typename IntT, typename TagT, typename T >\
inline tagged_integer< IntT, TagT > operator op (\
- tagged_integer< IntT, TagT > const& left, T const& right)\
+ tagged_integer< IntT, TagT > const& left, T const& right) BOOST_NOEXCEPT\
{\
tagged_integer< IntT, TagT > temp = left;\
temp op##= right;\
diff --git a/boost/log/detail/threadsafe_queue.hpp b/boost/log/detail/threadsafe_queue.hpp
index 2ab2172b13..b8b3dbe60a 100644
--- a/boost/log/detail/threadsafe_queue.hpp
+++ b/boost/log/detail/threadsafe_queue.hpp
@@ -29,7 +29,7 @@
#include <cstddef>
#include <boost/aligned_storage.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/type_traits/alignment_of.hpp>
#include <boost/type_traits/type_with_alignment.hpp>
#include <boost/log/detail/header.hpp>
diff --git a/boost/log/exceptions.hpp b/boost/log/exceptions.hpp
index 8f305fabeb..32d55d40c5 100644
--- a/boost/log/exceptions.hpp
+++ b/boost/log/exceptions.hpp
@@ -20,6 +20,8 @@
#include <stdexcept>
#include <boost/type_index.hpp>
#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/attributes/attribute_name.hpp>
#include <boost/log/detail/header.hpp>
@@ -59,6 +61,68 @@ BOOST_LOG_API void attach_attribute_name_info(exception& e, attribute_name const
} // namespace aux
/*!
+ * \brief Base class for memory allocation errors
+ *
+ * Exceptions derived from this class indicate problems with memory allocation.
+ */
+class BOOST_LOG_API bad_alloc :
+ public std::bad_alloc
+{
+private:
+ std::string m_message;
+
+public:
+ /*!
+ * Initializing constructor. Creates an exception with the specified error message.
+ */
+ explicit bad_alloc(const char* descr);
+ /*!
+ * Initializing constructor. Creates an exception with the specified error message.
+ */
+ explicit bad_alloc(std::string const& descr);
+ /*!
+ * Destructor
+ */
+ ~bad_alloc() throw();
+
+ /*!
+ * Error message accessor.
+ */
+ const char* what() const throw();
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+#endif
+};
+
+/*!
+ * \brief The exception is used to indicate reaching a storage capacity limit
+ */
+class BOOST_LOG_API capacity_limit_reached :
+ public bad_alloc
+{
+public:
+ /*!
+ * Initializing constructor. Creates an exception with the specified error message.
+ */
+ explicit capacity_limit_reached(const char* descr);
+ /*!
+ * Initializing constructor. Creates an exception with the specified error message.
+ */
+ explicit capacity_limit_reached(std::string const& descr);
+ /*!
+ * Destructor
+ */
+ ~capacity_limit_reached() throw();
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+#endif
+};
+
+/*!
* \brief Base class for runtime exceptions from the logging library
*
* Exceptions derived from this class indicate a problem that may not directly
@@ -68,7 +132,7 @@ BOOST_LOG_API void attach_attribute_name_info(exception& e, attribute_name const
class BOOST_LOG_API runtime_error :
public std::runtime_error
{
-protected:
+public:
/*!
* Initializing constructor. Creates an exception with the specified error message.
*/
@@ -101,7 +165,9 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, attribute_name const& name);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name);
#endif
};
@@ -128,9 +194,13 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, attribute_name const& name);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, typeindex::type_index const& type);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, typeindex::type_index const& type);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, attribute_name const& name, typeindex::type_index const& type);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name, typeindex::type_index const& type);
#endif
};
@@ -157,6 +227,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
@@ -183,8 +254,11 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, std::size_t content_line);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, std::size_t content_line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, attribute_name const& name);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, attribute_name const& name);
#endif
};
@@ -211,6 +285,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
@@ -219,25 +294,23 @@ public:
* \brief Exception class that is used to indicate underlying OS API errors
*/
class BOOST_LOG_API system_error :
- public runtime_error
+ public boost::system::system_error
{
public:
/*!
- * Default constructor. Creates an exception with the default error message.
- */
- system_error();
- /*!
* Initializing constructor. Creates an exception with the specified error message.
*/
- explicit system_error(std::string const& descr);
+ system_error(boost::system::error_code code, std::string const& descr);
/*!
* Destructor
*/
~system_error() throw();
#ifndef BOOST_LOG_DOXYGEN_PASS
- static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
- static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, int system_error_code);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, int system_error_code);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr, boost::system::error_code code);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr, boost::system::error_code code);
#endif
};
@@ -250,7 +323,7 @@ public:
class BOOST_LOG_API logic_error :
public std::logic_error
{
-protected:
+public:
/*!
* Initializing constructor. Creates an exception with the specified error message.
*/
@@ -259,6 +332,11 @@ protected:
* Destructor
*/
~logic_error() throw();
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
+#endif
};
/*!
@@ -283,6 +361,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
@@ -309,6 +388,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
@@ -335,6 +415,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
@@ -361,6 +442,7 @@ public:
#ifndef BOOST_LOG_DOXYGEN_PASS
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line);
+ static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, const char* descr);
static BOOST_LOG_NORETURN void throw_(const char* file, std::size_t line, std::string const& descr);
#endif
};
diff --git a/boost/log/expressions/attr.hpp b/boost/log/expressions/attr.hpp
index aca0447cff..60540e7d77 100644
--- a/boost/log/expressions/attr.hpp
+++ b/boost/log/expressions/attr.hpp
@@ -56,8 +56,10 @@ private:
typedef attribute_terminal< T, FallbackPolicyT, TagT > this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Attribute tag type
typedef TagT tag_type;
diff --git a/boost/log/expressions/filter.hpp b/boost/log/expressions/filter.hpp
index ae43abe150..1e53f5c3bd 100644
--- a/boost/log/expressions/filter.hpp
+++ b/boost/log/expressions/filter.hpp
@@ -16,11 +16,11 @@
#define BOOST_LOG_EXPRESSIONS_FILTER_HPP_INCLUDED_
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#endif
#include <boost/log/detail/config.hpp>
#include <boost/log/attributes/attribute_value_set.hpp>
@@ -89,13 +89,13 @@ public:
filter(FunT&& fun) : m_Filter(boost::forward< FunT >(fun))
{
}
-#elif !defined(BOOST_MSVC) || BOOST_MSVC > 1400
+#elif !defined(BOOST_MSVC) || BOOST_MSVC >= 1600
template< typename FunT >
- filter(FunT const& fun, typename disable_if_c< move_detail::is_rv< FunT >::value, int >::type = 0) : m_Filter(fun)
+ filter(FunT const& fun, typename boost::disable_if_c< move_detail::is_rv< FunT >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) : m_Filter(fun)
{
}
#else
- // MSVC 8 blows up in unexpected ways if we use SFINAE to disable constructor instantiation
+ // MSVC 9 and older blows up in unexpected ways if we use SFINAE to disable constructor instantiation
template< typename FunT >
filter(FunT const& fun) : m_Filter(fun)
{
@@ -137,7 +137,7 @@ public:
filter& operator= (FunT const& fun)
#else
template< typename FunT >
- typename disable_if< is_same< typename remove_cv< FunT >::type, filter >, filter& >::type
+ typename boost::disable_if_c< is_same< typename remove_cv< FunT >::type, filter >::value, filter& >::type
operator= (FunT const& fun)
#endif
{
diff --git a/boost/log/expressions/formatter.hpp b/boost/log/expressions/formatter.hpp
index bdbabb504e..bc80dfa250 100644
--- a/boost/log/expressions/formatter.hpp
+++ b/boost/log/expressions/formatter.hpp
@@ -19,11 +19,11 @@
#include <ostream>
#include <boost/ref.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#endif
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/light_function.hpp>
@@ -376,11 +376,11 @@ public:
}
#elif !defined(BOOST_MSVC) || BOOST_MSVC >= 1600
template< typename FunT >
- basic_formatter(FunT const& fun, typename disable_if_c< move_detail::is_rv< FunT >::value, int >::type = 0) : m_Formatter(fun)
+ basic_formatter(FunT const& fun, typename boost::disable_if_c< move_detail::is_rv< FunT >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) : m_Formatter(fun)
{
}
#else
- // MSVC 9 blows up in unexpected ways if we use SFINAE to disable constructor instantiation
+ // MSVC 9 and older blows up in unexpected ways if we use SFINAE to disable constructor instantiation
template< typename FunT >
basic_formatter(FunT const& fun) : m_Formatter(fun)
{
@@ -426,7 +426,7 @@ public:
}
#else
template< typename FunT >
- typename disable_if< is_same< typename remove_cv< FunT >::type, this_type >, this_type& >::type
+ typename boost::disable_if_c< is_same< typename remove_cv< FunT >::type, this_type >::value, this_type& >::type
operator= (FunT const& fun)
{
this_type(fun).swap(*this);
diff --git a/boost/log/expressions/formatters.hpp b/boost/log/expressions/formatters.hpp
index 1d3f4edd54..f85cb7903b 100644
--- a/boost/log/expressions/formatters.hpp
+++ b/boost/log/expressions/formatters.hpp
@@ -27,6 +27,7 @@
#include <boost/log/expressions/formatters/xml_decorator.hpp>
#include <boost/log/expressions/formatters/csv_decorator.hpp>
#include <boost/log/expressions/formatters/c_decorator.hpp>
+#include <boost/log/expressions/formatters/max_size_decorator.hpp>
#include <boost/log/expressions/formatters/if.hpp>
#include <boost/log/expressions/formatters/wrap_formatter.hpp>
diff --git a/boost/log/expressions/formatters/char_decorator.hpp b/boost/log/expressions/formatters/char_decorator.hpp
index e3188810ff..229e72ae89 100644
--- a/boost/log/expressions/formatters/char_decorator.hpp
+++ b/boost/log/expressions/formatters/char_decorator.hpp
@@ -27,9 +27,8 @@
#include <boost/range/const_iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/core/enable_if.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/phoenix/core/actor.hpp>
#include <boost/phoenix/core/meta_grammar.hpp>
#include <boost/phoenix/core/terminal_fwd.hpp>
@@ -43,6 +42,7 @@
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/custom_terminal_spec.hpp>
#include <boost/log/detail/deduce_char_type.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#include <boost/log/utility/formatting_ostream.hpp>
#include <boost/log/detail/header.hpp>
@@ -113,7 +113,7 @@ public:
explicit pattern_replacer(RangeT const& decorations
#ifndef BOOST_LOG_DOXYGEN_PASS
// This is needed for a workaround against an MSVC-10 and older bug in constructor overload resolution
- , typename boost::enable_if_has_type< typename range_const_iterator< RangeT >::type, int >::type = 0
+ , typename boost::enable_if_has_type< typename range_const_iterator< RangeT >::type, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()
#endif
)
{
@@ -235,8 +235,10 @@ private:
typedef char_decorator_output_terminal< LeftT, SubactorT, ImplT > this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Implementation type
typedef ImplT impl_type;
@@ -300,12 +302,12 @@ public:
typename string_type::size_type const start_pos = strm.rdbuf()->storage()->size();
// Invoke the adopted formatter
- typedef typename result< this_type(ContextT const&) >::type result_type;
phoenix::eval(m_subactor, ctx);
// Flush the buffered characters and apply decorations
strm.flush();
m_impl(*strm.rdbuf()->storage(), start_pos);
+ strm.rdbuf()->ensure_max_size();
return strm;
}
@@ -323,12 +325,12 @@ public:
typename string_type::size_type const start_pos = strm.rdbuf()->storage()->size();
// Invoke the adopted formatter
- typedef typename result< const this_type(ContextT const&) >::type result_type;
phoenix::eval(m_subactor, ctx);
// Flush the buffered characters and apply decorations
strm.flush();
m_impl(*strm.rdbuf()->storage(), start_pos);
+ strm.rdbuf()->ensure_max_size();
return strm;
}
@@ -357,8 +359,10 @@ private:
typedef char_decorator_terminal< SubactorT, ImplT > this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Implementation type
typedef ImplT impl_type;
@@ -439,7 +443,7 @@ public:
strm.flush();
m_impl(*strm.rdbuf()->storage());
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
/*!
@@ -471,7 +475,7 @@ public:
strm.flush();
m_impl(*strm.rdbuf()->storage());
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
BOOST_DELETED_FUNCTION(char_decorator_terminal())
diff --git a/boost/log/expressions/formatters/date_time.hpp b/boost/log/expressions/formatters/date_time.hpp
index 45091fc206..b8de0b4cb7 100644
--- a/boost/log/expressions/formatters/date_time.hpp
+++ b/boost/log/expressions/formatters/date_time.hpp
@@ -17,7 +17,7 @@
#include <string>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/phoenix/core/actor.hpp>
#include <boost/phoenix/core/terminal_fwd.hpp>
#include <boost/phoenix/core/is_nullary.hpp>
@@ -54,8 +54,10 @@ template< typename T, typename FallbackPolicyT, typename CharT >
class format_date_time_terminal
{
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Attribute value type
typedef T value_type;
@@ -126,7 +128,7 @@ public:
stream_type strm(str);
m_visitor_invoker(m_name, fusion::at_c< 0 >(phoenix::env(ctx).args()), binder1st< formatter_function_type&, stream_type& >(m_formatter, strm));
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
//! Invokation operator
@@ -137,7 +139,7 @@ public:
stream_type strm(str);
m_visitor_invoker(m_name, fusion::at_c< 0 >(phoenix::env(ctx).args()), binder1st< formatter_function_type const&, stream_type& >(m_formatter, strm));
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
BOOST_DELETED_FUNCTION(format_date_time_terminal())
diff --git a/boost/log/expressions/formatters/format.hpp b/boost/log/expressions/formatters/format.hpp
index ceccae942e..d312d8e36d 100644
--- a/boost/log/expressions/formatters/format.hpp
+++ b/boost/log/expressions/formatters/format.hpp
@@ -44,8 +44,10 @@ template< typename CharT >
class format_terminal
{
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Character type
typedef CharT char_type;
diff --git a/boost/log/expressions/formatters/if.hpp b/boost/log/expressions/formatters/if.hpp
index 360622f843..3e1e1abc5a 100644
--- a/boost/log/expressions/formatters/if.hpp
+++ b/boost/log/expressions/formatters/if.hpp
@@ -48,8 +48,10 @@ private:
typedef if_output_terminal this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Result type definition
template< typename >
@@ -113,8 +115,10 @@ private:
typedef if_else_output_terminal this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Result type definition
template< typename >
diff --git a/boost/log/expressions/formatters/max_size_decorator.hpp b/boost/log/expressions/formatters/max_size_decorator.hpp
new file mode 100644
index 0000000000..0ab44d6fa4
--- /dev/null
+++ b/boost/log/expressions/formatters/max_size_decorator.hpp
@@ -0,0 +1,561 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file formatters/max_size_decorator.hpp
+ * \author Andrey Semashev
+ * \date 06.07.2016
+ *
+ * The header contains implementation of a string length limiting decorator.
+ */
+
+#ifndef BOOST_LOG_EXPRESSIONS_FORMATTERS_MAX_SIZE_DECORATOR_HPP_INCLUDED_
+#define BOOST_LOG_EXPRESSIONS_FORMATTERS_MAX_SIZE_DECORATOR_HPP_INCLUDED_
+
+#include <cstddef>
+#include <string>
+#include <boost/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/move/core.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/phoenix/core/actor.hpp>
+#include <boost/phoenix/core/meta_grammar.hpp>
+#include <boost/phoenix/core/terminal_fwd.hpp>
+#include <boost/phoenix/core/is_nullary.hpp>
+#include <boost/phoenix/core/environment.hpp>
+#include <boost/phoenix/support/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/at_c.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/custom_terminal_spec.hpp>
+#include <boost/log/utility/formatting_ostream.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace expressions {
+
+namespace aux {
+
+//! String size limiting decorator stream output terminal
+template< typename LeftT, typename SubactorT, typename CharT >
+class max_size_decorator_output_terminal
+{
+private:
+ //! Self type
+ typedef max_size_decorator_output_terminal< LeftT, SubactorT, CharT > this_type;
+
+public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ //! Internal typedef for type categorization
+ typedef void _is_boost_log_terminal;
+#endif
+
+ //! Character type
+ typedef CharT char_type;
+ //! String type
+ typedef std::basic_string< char_type > string_type;
+ //! String size type
+ typedef std::size_t size_type;
+ //! Adopted actor type
+ typedef SubactorT subactor_type;
+
+ //! Result type definition
+ template< typename >
+ struct result;
+
+ template< typename ThisT, typename ContextT >
+ struct result< ThisT(ContextT) >
+ {
+ typedef typename remove_cv< typename remove_reference< ContextT >::type >::type context_type;
+ typedef typename phoenix::evaluator::impl<
+ typename LeftT::proto_base_expr&,
+ context_type,
+ phoenix::unused
+ >::result_type type;
+ };
+
+private:
+ //! Left argument actor
+ LeftT m_left;
+ //! Adopted formatter actor
+ subactor_type m_subactor;
+ //! Max size of the formatted string produced by the adopted formatter
+ size_type m_max_size;
+ //! Overflow marker
+ string_type m_overflow_marker;
+
+public:
+ /*!
+ * Initializing constructor. Creates decorator of the \a fmt formatter with the specified \a decorations.
+ */
+ max_size_decorator_output_terminal(LeftT const& left, subactor_type const& sub, size_type max_size, string_type const& overflow_marker = string_type()) :
+ m_left(left), m_subactor(sub), m_max_size(max_size), m_overflow_marker(overflow_marker)
+ {
+ BOOST_ASSERT(overflow_marker.size() <= max_size);
+ }
+ /*!
+ * Copy constructor
+ */
+ max_size_decorator_output_terminal(max_size_decorator_output_terminal const& that) :
+ m_left(that.m_left), m_subactor(that.m_subactor), m_max_size(that.m_max_size), m_overflow_marker(that.m_overflow_marker)
+ {
+ }
+
+ /*!
+ * Invokation operator
+ */
+ template< typename ContextT >
+ typename result< this_type(ContextT const&) >::type operator() (ContextT const& ctx)
+ {
+ // Flush the stream and keep the current write position in the target string
+ typedef typename result< this_type(ContextT const&) >::type result_type;
+ result_type strm = phoenix::eval(m_left, ctx);
+ strm.flush();
+
+ if (!strm.rdbuf()->storage_overflow())
+ {
+ const size_type old_max_size = strm.rdbuf()->max_size();
+ const size_type start_pos = strm.rdbuf()->storage()->size(), max_size_left = strm.rdbuf()->storage()->max_size() - start_pos;
+ strm.rdbuf()->max_size(start_pos + (m_max_size <= max_size_left ? m_max_size : max_size_left));
+
+ try
+ {
+ // Invoke the adopted formatter
+ phoenix::eval(m_subactor, ctx);
+
+ // Flush the buffered characters and apply decorations
+ strm.flush();
+
+ if (strm.rdbuf()->storage_overflow())
+ {
+ if (!m_overflow_marker.empty())
+ {
+ // Free up space for the overflow marker
+ strm.rdbuf()->max_size(strm.rdbuf()->max_size() - m_overflow_marker.size());
+
+ // Append the marker
+ strm.rdbuf()->max_size(strm.rdbuf()->storage()->max_size());
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->append(m_overflow_marker.data(), m_overflow_marker.size());
+ }
+ else
+ {
+ strm.rdbuf()->storage_overflow(false);
+ }
+ }
+
+ // Restore the original size limit
+ strm.rdbuf()->max_size(old_max_size);
+ }
+ catch (...)
+ {
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->max_size(old_max_size);
+ throw;
+ }
+ }
+
+ return strm;
+ }
+
+ /*!
+ * Invokation operator
+ */
+ template< typename ContextT >
+ typename result< const this_type(ContextT const&) >::type operator() (ContextT const& ctx) const
+ {
+ // Flush the stream and keep the current write position in the target string
+ typedef typename result< const this_type(ContextT const&) >::type result_type;
+ result_type strm = phoenix::eval(m_left, ctx);
+ strm.flush();
+
+ if (!strm.rdbuf()->storage_overflow())
+ {
+ const size_type old_max_size = strm.rdbuf()->max_size();
+ const size_type start_pos = strm.rdbuf()->storage()->size(), max_size_left = strm.rdbuf()->storage()->max_size() - start_pos;
+ strm.rdbuf()->max_size(start_pos + (m_max_size <= max_size_left ? m_max_size : max_size_left));
+
+ try
+ {
+ // Invoke the adopted formatter
+ phoenix::eval(m_subactor, ctx);
+
+ // Flush the buffered characters and apply decorations
+ strm.flush();
+
+ if (strm.rdbuf()->storage_overflow())
+ {
+ if (!m_overflow_marker.empty())
+ {
+ // Free up space for the overflow marker
+ strm.rdbuf()->max_size(strm.rdbuf()->max_size() - m_overflow_marker.size());
+
+ // Append the marker
+ strm.rdbuf()->max_size(strm.rdbuf()->storage()->max_size());
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->append(m_overflow_marker.data(), m_overflow_marker.size());
+ }
+ else
+ {
+ strm.rdbuf()->storage_overflow(false);
+ }
+ }
+
+ // Restore the original size limit
+ strm.rdbuf()->max_size(old_max_size);
+ }
+ catch (...)
+ {
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->max_size(old_max_size);
+ throw;
+ }
+ }
+
+ return strm;
+ }
+
+ BOOST_DELETED_FUNCTION(max_size_decorator_output_terminal())
+};
+
+} // namespace aux
+
+/*!
+ * String size limiting decorator terminal class. This formatter allows to limit the maximum total length
+ * of the strings generated by other formatters.
+ *
+ * The \c max_size_decorator_terminal class aggregates the formatter being decorated, the maximum string length
+ * it can produce and an optional truncation marker string, which will be put at the end of the output if the limit is exceeded. Note that
+ * the marker length is included in the limit and as such must not exceed it.
+ * The \c max_size_decorator_terminal class is a formatter itself, so it can be used to construct
+ * more complex formatters, including nesting decorators.
+ */
+template< typename SubactorT, typename CharT >
+class max_size_decorator_terminal
+{
+private:
+ //! Self type
+ typedef max_size_decorator_terminal< SubactorT, CharT > this_type;
+
+public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ //! Internal typedef for type categorization
+ typedef void _is_boost_log_terminal;
+#endif
+
+ //! Character type
+ typedef CharT char_type;
+ //! String type
+ typedef std::basic_string< char_type > string_type;
+ //! String size type
+ typedef std::size_t size_type;
+ //! Stream type
+ typedef basic_formatting_ostream< char_type > stream_type;
+ //! Adopted actor type
+ typedef SubactorT subactor_type;
+
+ //! Result type definition
+ typedef string_type result_type;
+
+private:
+ //! Adopted formatter actor
+ subactor_type m_subactor;
+ //! Max size of the formatted string produced by the adopted formatter
+ size_type m_max_size;
+ //! Overflow marker
+ string_type m_overflow_marker;
+
+public:
+ /*!
+ * Initializing constructor.
+ */
+ max_size_decorator_terminal(subactor_type const& sub, size_type max_size, string_type const& overflow_marker = string_type()) :
+ m_subactor(sub), m_max_size(max_size), m_overflow_marker(overflow_marker)
+ {
+ BOOST_ASSERT(overflow_marker.size() <= max_size);
+ }
+ /*!
+ * Copy constructor
+ */
+ max_size_decorator_terminal(max_size_decorator_terminal const& that) :
+ m_subactor(that.m_subactor), m_max_size(that.m_max_size), m_overflow_marker(that.m_overflow_marker)
+ {
+ }
+
+ /*!
+ * \returns Adopted subactor
+ */
+ subactor_type const& get_subactor() const
+ {
+ return m_subactor;
+ }
+
+ /*!
+ * \returns Max string size limit
+ */
+ size_type get_max_size() const
+ {
+ return m_max_size;
+ }
+
+ /*!
+ * \returns Max string size limit
+ */
+ string_type const& get_overflow_marker() const
+ {
+ return m_overflow_marker;
+ }
+
+ /*!
+ * Invokation operator
+ */
+ template< typename ContextT >
+ result_type operator() (ContextT const& ctx)
+ {
+ string_type str;
+ stream_type strm(str);
+ strm.rdbuf()->max_size(m_max_size);
+
+ // Invoke the adopted formatter
+ typedef phoenix::vector3<
+ subactor_type*,
+ typename fusion::result_of::at_c<
+ typename remove_cv<
+ typename remove_reference<
+ typename phoenix::result_of::env< ContextT const& >::type
+ >::type
+ >::type::args_type,
+ 0
+ >::type,
+ stream_type&
+ > env_type;
+ env_type env = { boost::addressof(m_subactor), fusion::at_c< 0 >(phoenix::env(ctx).args()), strm };
+ phoenix::eval(m_subactor, phoenix::make_context(env, phoenix::actions(ctx)));
+
+ // Flush the buffered characters and see of overflow happened
+ strm.flush();
+
+ if (strm.rdbuf()->storage_overflow() && !m_overflow_marker.empty())
+ {
+ strm.rdbuf()->max_size(strm.rdbuf()->max_size() - m_overflow_marker.size());
+ strm.rdbuf()->max_size(str.max_size());
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->append(m_overflow_marker.data(), m_overflow_marker.size());
+ strm.flush();
+ }
+
+ return BOOST_LOG_NRVO_RESULT(str);
+ }
+
+ /*!
+ * Invokation operator
+ */
+ template< typename ContextT >
+ result_type operator() (ContextT const& ctx) const
+ {
+ string_type str;
+ stream_type strm(str);
+ strm.rdbuf()->max_size(m_max_size);
+
+ // Invoke the adopted formatter
+ typedef phoenix::vector3<
+ const subactor_type*,
+ typename fusion::result_of::at_c<
+ typename remove_cv<
+ typename remove_reference<
+ typename phoenix::result_of::env< ContextT const& >::type
+ >::type
+ >::type::args_type,
+ 0
+ >::type,
+ stream_type&
+ > env_type;
+ env_type env = { boost::addressof(m_subactor), fusion::at_c< 0 >(phoenix::env(ctx).args()), strm };
+ phoenix::eval(m_subactor, phoenix::make_context(env, phoenix::actions(ctx)));
+
+ // Flush the buffered characters and see of overflow happened
+ strm.flush();
+
+ if (strm.rdbuf()->storage_overflow())
+ {
+ strm.rdbuf()->max_size(strm.rdbuf()->max_size() - m_overflow_marker.size());
+ strm.rdbuf()->max_size(str.max_size());
+ strm.rdbuf()->storage_overflow(false);
+ strm.rdbuf()->append(m_overflow_marker.data(), m_overflow_marker.size());
+ strm.flush();
+ }
+
+ return BOOST_LOG_NRVO_RESULT(str);
+ }
+
+ BOOST_DELETED_FUNCTION(max_size_decorator_terminal())
+};
+
+/*!
+ * Character decorator actor
+ */
+template< typename SubactorT, typename CharT, template< typename > class ActorT = phoenix::actor >
+class max_size_decorator_actor :
+ public ActorT< max_size_decorator_terminal< SubactorT, CharT > >
+{
+public:
+ //! Base terminal type
+ typedef max_size_decorator_terminal< SubactorT, CharT > terminal_type;
+ //! Character type
+ typedef typename terminal_type::char_type char_type;
+
+ //! Base actor type
+ typedef ActorT< terminal_type > base_type;
+
+public:
+ //! Initializing constructor
+ explicit max_size_decorator_actor(base_type const& act) : base_type(act)
+ {
+ }
+
+ //! Returns reference to the terminal
+ terminal_type const& get_terminal() const
+ {
+ return this->proto_expr_.child0;
+ }
+};
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+
+#define BOOST_LOG_AUX_OVERLOAD(left_ref, right_ref)\
+ template< typename LeftExprT, typename SubactorT, typename CharT, template< typename > class ActorT >\
+ BOOST_FORCEINLINE phoenix::actor< aux::max_size_decorator_output_terminal< phoenix::actor< LeftExprT >, SubactorT, CharT > >\
+ operator<< (phoenix::actor< LeftExprT > left_ref left, max_size_decorator_actor< SubactorT, CharT, ActorT > right_ref right)\
+ {\
+ typedef aux::max_size_decorator_output_terminal< phoenix::actor< LeftExprT >, SubactorT, CharT > terminal_type;\
+ phoenix::actor< terminal_type > actor = {{ terminal_type(left, right.get_terminal().get_subactor(), right.get_terminal().get_max_size(), right.get_terminal().get_overflow_marker()) }};\
+ return actor;\
+ }
+
+#include <boost/log/detail/generate_overloads.hpp>
+
+#undef BOOST_LOG_AUX_OVERLOAD
+
+#endif // BOOST_LOG_DOXYGEN_PASS
+
+namespace aux {
+
+template< typename CharT >
+class max_size_decorator_gen
+{
+private:
+ typedef CharT char_type;
+ typedef std::basic_string< char_type > string_type;
+ typedef std::size_t size_type;
+
+private:
+ size_type m_max_size;
+ string_type m_overflow_marker;
+
+public:
+ explicit max_size_decorator_gen(size_type max_size, string_type const& overflow_marker = string_type()) :
+ m_max_size(max_size), m_overflow_marker(overflow_marker)
+ {
+ BOOST_ASSERT(overflow_marker.size() <= max_size);
+ }
+
+ template< typename SubactorT >
+ BOOST_FORCEINLINE max_size_decorator_actor< SubactorT, char_type > operator[] (SubactorT const& subactor) const
+ {
+ typedef max_size_decorator_actor< SubactorT, char_type > result_type;
+ typedef typename result_type::terminal_type terminal_type;
+ typename result_type::base_type act = {{ terminal_type(subactor, m_max_size, m_overflow_marker) }};
+ return result_type(act);
+ }
+};
+
+} // namespace aux
+
+/*!
+ * The function returns a decorator generator object. The generator provides <tt>operator[]</tt> that can be used
+ * to construct the actual decorator.
+ *
+ * \param max_size The maximum number of characters (i.e. string element objects) that the decorated formatter can produce.
+ */
+template< typename CharT >
+BOOST_FORCEINLINE aux::max_size_decorator_gen< CharT > max_size_decor(std::size_t max_size)
+{
+ return aux::max_size_decorator_gen< CharT >(max_size);
+}
+
+/*!
+ * The function returns a decorator generator object. The generator provides <tt>operator[]</tt> that can be used
+ * to construct the actual decorator.
+ *
+ * \param max_size The maximum number of characters (i.e. string element objects) that the decorated formatter can produce.
+ * \param overflow_marker The marker string which is appended to the output if the \a max_size limit is exceeded. Must be
+ * a non-null pointer to a zero-terminated string.
+ *
+ * \pre The \a overflow_marker length must not exceed the \a max_size limit.
+ */
+template< typename CharT >
+BOOST_FORCEINLINE aux::max_size_decorator_gen< CharT > max_size_decor(std::size_t max_size, const CharT* overflow_marker)
+{
+ return aux::max_size_decorator_gen< CharT >(max_size, overflow_marker);
+}
+
+/*!
+ * The function returns a decorator generator object. The generator provides <tt>operator[]</tt> that can be used
+ * to construct the actual decorator.
+ *
+ * \param max_size The maximum number of characters (i.e. string element objects) that the decorated formatter can produce.
+ * \param overflow_marker The marker string which is appended to the output if the \a max_size limit is exceeded.
+ *
+ * \pre The \a overflow_marker length must not exceed the \a max_size limit.
+ */
+template< typename CharT >
+BOOST_FORCEINLINE aux::max_size_decorator_gen< CharT > max_size_decor(std::size_t max_size, std::basic_string< CharT > const& overflow_marker)
+{
+ return aux::max_size_decorator_gen< CharT >(max_size, overflow_marker);
+}
+
+} // namespace expressions
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+
+namespace phoenix {
+
+namespace result_of {
+
+template< typename SubactorT, typename CharT >
+struct is_nullary< custom_terminal< boost::log::expressions::max_size_decorator_terminal< SubactorT, CharT > > > :
+ public mpl::false_
+{
+};
+
+template< typename LeftT, typename SubactorT, typename CharT >
+struct is_nullary< custom_terminal< boost::log::expressions::aux::max_size_decorator_output_terminal< LeftT, SubactorT, CharT > > > :
+ public mpl::false_
+{
+};
+
+} // namespace result_of
+
+} // namespace phoenix
+
+#endif
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_EXPRESSIONS_FORMATTERS_MAX_SIZE_DECORATOR_HPP_INCLUDED_
diff --git a/boost/log/expressions/formatters/named_scope.hpp b/boost/log/expressions/formatters/named_scope.hpp
index cc45dc6e81..ae140b1956 100644
--- a/boost/log/expressions/formatters/named_scope.hpp
+++ b/boost/log/expressions/formatters/named_scope.hpp
@@ -21,7 +21,7 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/parameter/binding.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
@@ -257,8 +257,10 @@ template< typename FallbackPolicyT, typename CharT >
class format_named_scope_terminal
{
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Attribute value type
typedef attributes::named_scope::value_type value_type;
@@ -337,7 +339,7 @@ public:
stream_type strm(str);
m_visitor_invoker(m_name, fusion::at_c< 0 >(phoenix::env(ctx).args()), binder1st< formatter_function_type&, stream_type& >(m_formatter, strm));
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
//! Invokation operator
@@ -348,7 +350,7 @@ public:
stream_type strm(str);
m_visitor_invoker(m_name, fusion::at_c< 0 >(phoenix::env(ctx).args()), binder1st< formatter_function_type const&, stream_type& >(m_formatter, strm));
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
BOOST_DELETED_FUNCTION(format_named_scope_terminal())
diff --git a/boost/log/expressions/formatters/wrap_formatter.hpp b/boost/log/expressions/formatters/wrap_formatter.hpp
index 612be28d70..29c19c2f80 100644
--- a/boost/log/expressions/formatters/wrap_formatter.hpp
+++ b/boost/log/expressions/formatters/wrap_formatter.hpp
@@ -17,7 +17,7 @@
#include <string>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/mpl/has_xxx.hpp>
#include <boost/phoenix/core/actor.hpp>
#include <boost/phoenix/core/terminal_fwd.hpp>
@@ -53,8 +53,10 @@ private:
typedef wrapped_formatter_output_terminal< LeftT, FunT > this_type;
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Wrapped function type
typedef FunT function_type;
@@ -156,8 +158,10 @@ template< typename FunT, typename CharT >
class wrapped_formatter_terminal
{
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Character type
typedef CharT char_type;
@@ -199,7 +203,7 @@ public:
stream_type strm(str);
m_fun(fusion::at_c< 0 >(phoenix::env(ctx).args()), strm);
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
//! Invokation operator
@@ -210,7 +214,7 @@ public:
stream_type strm(str);
m_fun(fusion::at_c< 0 >(phoenix::env(ctx).args()), strm);
strm.flush();
- return boost::move(str);
+ return BOOST_LOG_NRVO_RESULT(str);
}
};
diff --git a/boost/log/expressions/predicates/channel_severity_filter.hpp b/boost/log/expressions/predicates/channel_severity_filter.hpp
index 079b79233d..c7430a1bd7 100644
--- a/boost/log/expressions/predicates/channel_severity_filter.hpp
+++ b/boost/log/expressions/predicates/channel_severity_filter.hpp
@@ -57,8 +57,10 @@ template<
class channel_severity_filter_terminal
{
public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
//! Internal typedef for type categorization
typedef void _is_boost_log_terminal;
+#endif
//! Function result type
typedef bool result_type;
diff --git a/boost/log/keywords/block_size.hpp b/boost/log/keywords/block_size.hpp
new file mode 100644
index 0000000000..daaa91fc25
--- /dev/null
+++ b/boost/log/keywords/block_size.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file keywords/block_size.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * The header contains the \c block_size keyword declaration.
+ */
+
+#ifndef BOOST_LOG_KEYWORDS_BLOCK_SIZE_HPP_INCLUDED_
+#define BOOST_LOG_KEYWORDS_BLOCK_SIZE_HPP_INCLUDED_
+
+#include <boost/parameter/keyword.hpp>
+#include <boost/log/detail/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace keywords {
+
+//! The keyword allows to pass interprocess queue name to the queue constructor
+BOOST_PARAMETER_KEYWORD(tag, block_size)
+
+} // namespace keywords
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#endif // BOOST_LOG_KEYWORDS_BLOCK_SIZE_HPP_INCLUDED_
diff --git a/boost/log/keywords/capacity.hpp b/boost/log/keywords/capacity.hpp
new file mode 100644
index 0000000000..d7b6345ce8
--- /dev/null
+++ b/boost/log/keywords/capacity.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file keywords/capacity.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * The header contains the \c capacity keyword declaration.
+ */
+
+#ifndef BOOST_LOG_KEYWORDS_CAPACITY_HPP_INCLUDED_
+#define BOOST_LOG_KEYWORDS_CAPACITY_HPP_INCLUDED_
+
+#include <boost/parameter/keyword.hpp>
+#include <boost/log/detail/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace keywords {
+
+//! The keyword allows to pass interprocess queue capacity to the queue constructor
+BOOST_PARAMETER_KEYWORD(tag, capacity)
+
+} // namespace keywords
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#endif // BOOST_LOG_KEYWORDS_CAPACITY_HPP_INCLUDED_
diff --git a/boost/log/keywords/name.hpp b/boost/log/keywords/name.hpp
new file mode 100644
index 0000000000..d0f93d3d74
--- /dev/null
+++ b/boost/log/keywords/name.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file keywords/name.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * The header contains the \c name keyword declaration.
+ */
+
+#ifndef BOOST_LOG_KEYWORDS_NAME_HPP_INCLUDED_
+#define BOOST_LOG_KEYWORDS_NAME_HPP_INCLUDED_
+
+#include <boost/parameter/keyword.hpp>
+#include <boost/log/detail/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace keywords {
+
+//! The keyword allows to pass interprocess queue name to the queue constructor
+BOOST_PARAMETER_KEYWORD(tag, name)
+
+} // namespace keywords
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#endif // BOOST_LOG_KEYWORDS_NAME_HPP_INCLUDED_
diff --git a/boost/log/keywords/overflow_policy.hpp b/boost/log/keywords/overflow_policy.hpp
new file mode 100644
index 0000000000..e66450d824
--- /dev/null
+++ b/boost/log/keywords/overflow_policy.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file keywords/overflow_policy.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * The header contains the \c overflow_policy keyword declaration.
+ */
+
+#ifndef BOOST_LOG_KEYWORDS_OVERFLOW_POLICY_HPP_INCLUDED_
+#define BOOST_LOG_KEYWORDS_OVERFLOW_POLICY_HPP_INCLUDED_
+
+#include <boost/parameter/keyword.hpp>
+#include <boost/log/detail/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace keywords {
+
+//! The keyword allows to pass interprocess queue overflow policy to the queue constructor
+BOOST_PARAMETER_KEYWORD(tag, overflow_policy)
+
+} // namespace keywords
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#endif // BOOST_LOG_KEYWORDS_OVERFLOW_POLICY_HPP_INCLUDED_
diff --git a/boost/log/keywords/permissions.hpp b/boost/log/keywords/permissions.hpp
new file mode 100644
index 0000000000..4b2451a0ab
--- /dev/null
+++ b/boost/log/keywords/permissions.hpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file keywords/permissions.hpp
+ * \author Andrey Semashev
+ * \date 23.02.2016
+ *
+ * The header contains the \c permissions keyword declaration.
+ */
+
+#ifndef BOOST_LOG_KEYWORDS_PERMISSIONS_HPP_INCLUDED_
+#define BOOST_LOG_KEYWORDS_PERMISSIONS_HPP_INCLUDED_
+
+#include <boost/parameter/keyword.hpp>
+#include <boost/log/detail/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace keywords {
+
+//! The keyword allows to pass interprocess queue permissions to the queue constructor
+BOOST_PARAMETER_KEYWORD(tag, permissions)
+
+} // namespace keywords
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#endif // BOOST_LOG_KEYWORDS_PERMISSIONS_HPP_INCLUDED_
diff --git a/boost/log/sinks.hpp b/boost/log/sinks.hpp
index 0969b31d3c..d22d1c1d1e 100644
--- a/boost/log/sinks.hpp
+++ b/boost/log/sinks.hpp
@@ -33,6 +33,7 @@
#include <boost/log/sinks/syslog_backend.hpp>
#include <boost/log/sinks/text_file_backend.hpp>
+#include <boost/log/sinks/text_ipc_message_queue_backend.hpp>
#include <boost/log/sinks/text_multifile_backend.hpp>
#include <boost/log/sinks/text_ostream_backend.hpp>
#ifdef BOOST_WINDOWS
diff --git a/boost/log/sinks/async_frontend.hpp b/boost/log/sinks/async_frontend.hpp
index c0209bfb2f..ec5371006e 100644
--- a/boost/log/sinks/async_frontend.hpp
+++ b/boost/log/sinks/async_frontend.hpp
@@ -32,6 +32,8 @@
#include <boost/atomic/atomic.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/thread.hpp>
@@ -54,7 +56,31 @@ namespace sinks {
#ifndef BOOST_LOG_DOXYGEN_PASS
-#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, types)\
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1(n, data)\
+ template< typename T0 >\
+ explicit asynchronous_sink(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :\
+ base_type(true),\
+ queue_base_type(arg0),\
+ m_pBackend(boost::make_shared< sink_backend_type >(arg0)),\
+ m_StopRequested(false),\
+ m_FlushRequested(false)\
+ {\
+ if (arg0[keywords::start_thread | true])\
+ start_feeding_thread();\
+ }\
+ template< typename T0 >\
+ explicit asynchronous_sink(shared_ptr< sink_backend_type > const& backend, T0 const& arg0) :\
+ base_type(true),\
+ queue_base_type(arg0),\
+ m_pBackend(backend),\
+ m_StopRequested(false),\
+ m_FlushRequested(false)\
+ {\
+ if (arg0[keywords::start_thread | true])\
+ start_feeding_thread();\
+ }
+
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N(n, data)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
explicit asynchronous_sink(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg)) :\
base_type(true),\
@@ -78,6 +104,9 @@ namespace sinks {
start_feeding_thread();\
}
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, data)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1, BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N)(n, data)
+
#endif // BOOST_LOG_DOXYGEN_PASS
/*!
@@ -254,8 +283,23 @@ public:
start_feeding_thread();
}
- // Constructors that pass arbitrary parameters to the backend constructor
+ /*!
+ * Constructor that passes arbitrary named parameters to the interprocess sink backend constructor.
+ * Refer to the backend documentation for the list of supported parameters.
+ *
+ * The frontend uses the following named parameters:
+ *
+ * \li start_thread - If \c true, the frontend creates a thread to feed
+ * log records to the backend. Otherwise no thread is
+ * started and it is assumed that the user will call
+ * either \c run or \c feed_records himself.
+ */
+#ifndef BOOST_LOG_DOXYGEN_PASS
BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_GEN(BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL, ~)
+#else
+ template< typename... Args >
+ explicit asynchronous_sink(Args&&... args);
+#endif
/*!
* Destructor. Implicitly stops the dedicated feeding thread, if one is running.
@@ -455,6 +499,8 @@ private:
#endif // BOOST_LOG_DOXYGEN_PASS
};
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N
#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL
} // namespace sinks
diff --git a/boost/log/sinks/attribute_mapping.hpp b/boost/log/sinks/attribute_mapping.hpp
index c14f5e7841..24cfe3387e 100644
--- a/boost/log/sinks/attribute_mapping.hpp
+++ b/boost/log/sinks/attribute_mapping.hpp
@@ -83,7 +83,7 @@ namespace aux {
template< typename T >
void operator() (T const& val) const
{
- mapped_type v = { val };
+ mapped_type v = { static_cast< IntT >(val) };
m_Extracted = v;
}
diff --git a/boost/log/sinks/basic_sink_frontend.hpp b/boost/log/sinks/basic_sink_frontend.hpp
index 965451c7a8..3686bc5917 100644
--- a/boost/log/sinks/basic_sink_frontend.hpp
+++ b/boost/log/sinks/basic_sink_frontend.hpp
@@ -17,7 +17,6 @@
#include <boost/mpl/bool.hpp>
#include <boost/log/detail/config.hpp>
-#include <boost/log/detail/cleanup_scope_guard.hpp>
#include <boost/log/detail/code_conversion.hpp>
#include <boost/log/detail/attachable_sstream_buf.hpp>
#include <boost/log/detail/fake_mutex.hpp>
@@ -29,7 +28,6 @@
#if !defined(BOOST_LOG_NO_THREADS)
#include <boost/thread/exceptions.hpp>
#include <boost/thread/tss.hpp>
-#include <boost/thread/locks.hpp>
#include <boost/log/detail/locks.hpp>
#include <boost/log/detail/light_rw_mutex.hpp>
#endif // !defined(BOOST_LOG_NO_THREADS)
@@ -186,13 +184,10 @@ protected:
bool try_feed_record(record_view const& rec, BackendMutexT& backend_mutex, BackendT& backend)
{
#if !defined(BOOST_LOG_NO_THREADS)
- unique_lock< BackendMutexT > lock;
try
{
- unique_lock< BackendMutexT > tmp_lock(backend_mutex, try_to_lock);
- if (!tmp_lock.owns_lock())
+ if (!backend_mutex.try_lock())
return false;
- lock.swap(tmp_lock);
}
catch (thread_interrupted&)
{
@@ -206,6 +201,8 @@ protected:
this->exception_handler()();
return false;
}
+
+ boost::log::aux::exclusive_auto_unlocker< BackendMutexT > unlocker(backend_mutex);
#endif
// No need to lock anything in the feed_record method
boost::log::aux::fake_mutex m;
@@ -280,6 +277,28 @@ protected:
private:
struct formatting_context
{
+ class cleanup_guard
+ {
+ private:
+ formatting_context& m_context;
+
+ public:
+ explicit cleanup_guard(formatting_context& ctx) BOOST_NOEXCEPT : m_context(ctx)
+ {
+ }
+
+ ~cleanup_guard()
+ {
+ m_context.m_FormattedRecord.clear();
+ m_context.m_FormattingStream.rdbuf()->max_size(m_context.m_FormattedRecord.max_size());
+ m_context.m_FormattingStream.rdbuf()->storage_overflow(false);
+ m_context.m_FormattingStream.clear();
+ }
+
+ BOOST_DELETED_FUNCTION(cleanup_guard(cleanup_guard const&))
+ BOOST_DELETED_FUNCTION(cleanup_guard& operator=(cleanup_guard const&))
+ };
+
#if !defined(BOOST_LOG_NO_THREADS)
//! Object version
const unsigned int m_Version;
@@ -431,8 +450,7 @@ protected:
context = &m_Context;
#endif
- boost::log::aux::cleanup_guard< stream_type > cleanup1(context->m_FormattingStream);
- boost::log::aux::cleanup_guard< string_type > cleanup2(context->m_FormattedRecord);
+ typename formatting_context::cleanup_guard cleanup(*context);
try
{
@@ -464,13 +482,10 @@ protected:
bool try_feed_record(record_view const& rec, BackendMutexT& backend_mutex, BackendT& backend)
{
#if !defined(BOOST_LOG_NO_THREADS)
- unique_lock< BackendMutexT > lock;
try
{
- unique_lock< BackendMutexT > tmp_lock(backend_mutex, try_to_lock);
- if (!tmp_lock.owns_lock())
+ if (!backend_mutex.try_lock())
return false;
- lock.swap(tmp_lock);
}
catch (thread_interrupted&)
{
@@ -484,6 +499,8 @@ protected:
this->exception_handler()();
return false;
}
+
+ boost::log::aux::exclusive_auto_unlocker< BackendMutexT > unlocker(backend_mutex);
#endif
// No need to lock anything in the feed_record method
boost::log::aux::fake_mutex m;
diff --git a/boost/log/sinks/sync_frontend.hpp b/boost/log/sinks/sync_frontend.hpp
index 6d3a57f4ee..6a927d0571 100644
--- a/boost/log/sinks/sync_frontend.hpp
+++ b/boost/log/sinks/sync_frontend.hpp
@@ -28,6 +28,8 @@
#include <boost/static_assert.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/log/detail/locking_ptr.hpp>
#include <boost/log/detail/parameter_tools.hpp>
@@ -44,12 +46,21 @@ namespace sinks {
#ifndef BOOST_LOG_DOXYGEN_PASS
-#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, data)\
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1(n, data)\
+ template< typename T0 >\
+ explicit synchronous_sink(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :\
+ base_type(false),\
+ m_pBackend(boost::make_shared< sink_backend_type >(arg0)) {}
+
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N(n, data)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
explicit synchronous_sink(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg)) :\
base_type(false),\
m_pBackend(boost::make_shared< sink_backend_type >(BOOST_PP_ENUM_PARAMS(n, arg))) {}
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, data)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1, BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N)(n, data)
+
#endif // BOOST_LOG_DOXYGEN_PASS
/*!
@@ -115,8 +126,16 @@ public:
{
}
- // Constructors that pass arbitrary parameters to the backend constructor
+ /*!
+ * Constructor that passes arbitrary named parameters to the interprocess sink backend constructor.
+ * Refer to the backend documentation for the list of supported parameters.
+ */
+#ifndef BOOST_LOG_DOXYGEN_PASS
BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_GEN(BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL, ~)
+#else
+ template< typename... Args >
+ explicit synchronous_sink(Args&&... args);
+#endif
/*!
* Locking accessor to the attached backend
@@ -153,6 +172,8 @@ public:
}
};
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N
#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL
} // namespace sinks
diff --git a/boost/log/sinks/text_ipc_message_queue_backend.hpp b/boost/log/sinks/text_ipc_message_queue_backend.hpp
new file mode 100644
index 0000000000..370ccfb32f
--- /dev/null
+++ b/boost/log/sinks/text_ipc_message_queue_backend.hpp
@@ -0,0 +1,172 @@
+/*
+ * Copyright Lingxi Li 2015.
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file text_ipc_message_queue_backend.hpp
+ * \author Lingxi Li
+ * \author Andrey Semashev
+ * \date 14.10.2015
+ *
+ * The header contains implementation of a text interprocess message queue sink
+ * backend along with implementation of a supporting interprocess message queue.
+ */
+
+#ifndef BOOST_LOG_SINKS_TEXT_IPC_MESSAGE_QUEUE_BACKEND_HPP_INCLUDED_
+#define BOOST_LOG_SINKS_TEXT_IPC_MESSAGE_QUEUE_BACKEND_HPP_INCLUDED_
+
+#include <limits>
+#include <string>
+#include <boost/cstdint.hpp>
+#include <boost/move/core.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/parameter_tools.hpp>
+#include <boost/log/core/record_view.hpp>
+#include <boost/log/sinks/basic_sink_backend.hpp>
+#include <boost/log/sinks/frontend_requirements.hpp>
+#include <boost/log/exceptions.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace sinks {
+
+#ifndef BOOST_LOG_DOXYGEN_PASS
+
+#define BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_1(n, data)\
+ template< typename T0 >\
+ explicit text_ipc_message_queue_backend(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :\
+ m_queue(arg0) {}
+
+#define BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_N(n, data)\
+ template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
+ explicit text_ipc_message_queue_backend(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg)) :\
+ m_queue(BOOST_PP_ENUM_PARAMS(n, arg)) {}
+
+#define BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL(z, n, data)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_1, BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_N)(n, data)
+
+#endif // BOOST_LOG_DOXYGEN_PASS
+
+/*!
+ * \brief An implementation of a text interprocess message queue sink backend and
+ * a supporting interprocess message queue.
+ *
+ * The sink backend sends formatted log messages to an interprocess message queue
+ * which can be extracted by a viewer process. Methods of this class are not
+ * thread-safe, unless otherwise specified.
+ */
+template< typename QueueT >
+class text_ipc_message_queue_backend :
+ public basic_formatted_sink_backend< char, concurrent_feeding >
+{
+ //! Base type
+ typedef basic_formatted_sink_backend< char, concurrent_feeding > base_type;
+
+public:
+ //! Character type
+ typedef base_type::char_type char_type;
+ //! String type to be used as a message text holder
+ typedef base_type::string_type string_type;
+ //! Interprocess message queue type
+ typedef QueueT queue_type;
+
+private:
+ //! Interprocess queue
+ queue_type m_queue;
+
+public:
+ /*!
+ * Default constructor. The method constructs the backend using the default-constructed
+ * interprocess message queue. The queue may need additional setup in order to be able
+ * to send messages.
+ */
+ text_ipc_message_queue_backend() BOOST_NOEXCEPT
+ {
+ }
+
+ /*!
+ * Initializing constructor. The method constructs the backend using the provided
+ * interprocess message queue. The constructor moves from the provided queue.
+ */
+ explicit text_ipc_message_queue_backend(BOOST_RV_REF(queue_type) queue) BOOST_NOEXCEPT :
+ m_queue(static_cast< BOOST_RV_REF(queue_type) >(queue))
+ {
+ }
+
+ /*!
+ * Constructor that passes arbitrary named parameters to the interprocess queue constructor.
+ * Refer to the queue documentation for the list of supported parameters.
+ */
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_GEN(BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL, ~)
+#else
+ template< typename... Args >
+ explicit text_ipc_message_queue_backend(Args&&... args);
+#endif
+
+ /*!
+ * The method returns a reference to the managed \c queue_type object.
+ *
+ * \return A reference to the managed \c queue_type object.
+ */
+ queue_type& message_queue() BOOST_NOEXCEPT { return m_queue; }
+
+ /*!
+ * The method returns a constant reference to the managed \c queue_type object.
+ *
+ * \return A constant reference to the managed \c queue_type object.
+ */
+ queue_type const& message_queue() const BOOST_NOEXCEPT { return m_queue; }
+
+ /*!
+ * Tests whether the object is associated with any message queue. Only when the backend has
+ * an associated message queue, will any message be sent.
+ *
+ * \return \c true if the object is associated with a message queue, and \c false otherwise.
+ */
+ bool is_open() const BOOST_NOEXCEPT { return m_queue.is_open(); }
+
+ /*!
+ * The method writes the message to the backend. Concurrent calls to this method
+ * are allowed. Therefore, the backend may be used with unlocked frontend. <tt>stop_local()</tt>
+ * can be used to have a blocked <tt>consume()</tt> call return and prevent future
+ * calls to <tt>consume()</tt> from blocking.
+ */
+ void consume(record_view const&, string_type const& formatted_message)
+ {
+ if (m_queue.is_open())
+ {
+ typedef typename queue_type::size_type size_type;
+ const string_type::size_type size = formatted_message.size();
+ if (BOOST_UNLIKELY(size > static_cast< string_type::size_type >((std::numeric_limits< size_type >::max)())))
+ BOOST_LOG_THROW_DESCR(limitation_error, "Message too long to send to an interprocess queue");
+ m_queue.send(formatted_message.data(), static_cast< size_type >(size));
+ }
+ }
+};
+
+#undef BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_1
+#undef BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL_N
+#undef BOOST_LOG_IPC_BACKEND_CTOR_FORWARD_INTERNAL
+
+} // namespace sinks
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_SINKS_TEXT_IPC_MESSAGE_QUEUE_BACKEND_HPP_INCLUDED_
diff --git a/boost/log/sinks/text_multifile_backend.hpp b/boost/log/sinks/text_multifile_backend.hpp
index 82c18bf4d9..8e707b990c 100644
--- a/boost/log/sinks/text_multifile_backend.hpp
+++ b/boost/log/sinks/text_multifile_backend.hpp
@@ -113,6 +113,9 @@ namespace file {
/*!
* The function adopts a log record formatter into a file name generator
+ *
+ * \param fmt The formatter function object to adopt
+ * \param loc The locale to use to character code conversion and formatting
*/
template< typename FormatterT >
inline file_name_composer_adapter< FormatterT > as_file_name_composer(
diff --git a/boost/log/sinks/unlocked_frontend.hpp b/boost/log/sinks/unlocked_frontend.hpp
index b7b0d353c4..918efeb6d2 100644
--- a/boost/log/sinks/unlocked_frontend.hpp
+++ b/boost/log/sinks/unlocked_frontend.hpp
@@ -18,6 +18,8 @@
#include <boost/static_assert.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/parameter_tools.hpp>
#include <boost/log/detail/fake_mutex.hpp>
@@ -37,12 +39,21 @@ namespace sinks {
#ifndef BOOST_LOG_DOXYGEN_PASS
-#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, types)\
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1(n, data)\
+ template< typename T0 >\
+ explicit unlocked_sink(T0 const& arg0, typename boost::log::aux::enable_if_named_parameters< T0, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()) :\
+ base_type(false),\
+ m_pBackend(boost::make_shared< sink_backend_type >(arg0)) {}
+
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N(n, data)\
template< BOOST_PP_ENUM_PARAMS(n, typename T) >\
explicit unlocked_sink(BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& arg)) :\
base_type(false),\
m_pBackend(boost::make_shared< sink_backend_type >(BOOST_PP_ENUM_PARAMS(n, arg))) {}
+#define BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL(z, n, data)\
+ BOOST_PP_IF(BOOST_PP_EQUAL(n, 1), BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1, BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N)(n, data)
+
#endif // BOOST_LOG_DOXYGEN_PASS
/*!
@@ -94,8 +105,16 @@ public:
{
}
- // Constructors that pass arbitrary parameters to the backend constructor
+ /*!
+ * Constructor that passes arbitrary named parameters to the interprocess sink backend constructor.
+ * Refer to the backend documentation for the list of supported parameters.
+ */
+#ifndef BOOST_LOG_DOXYGEN_PASS
BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_GEN(BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL, ~)
+#else
+ template< typename... Args >
+ explicit unlocked_sink(Args&&... args);
+#endif
/*!
* Locking accessor to the attached backend.
@@ -129,6 +148,8 @@ public:
}
};
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_1
+#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL_N
#undef BOOST_LOG_SINK_CTOR_FORWARD_INTERNAL
} // namespace sinks
diff --git a/boost/log/sources/basic_logger.hpp b/boost/log/sources/basic_logger.hpp
index bc35acf3a8..58bd6594c5 100644
--- a/boost/log/sources/basic_logger.hpp
+++ b/boost/log/sources/basic_logger.hpp
@@ -21,8 +21,8 @@
#include <ostream>
#include <boost/assert.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/facilities/identity.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
diff --git a/boost/log/sources/channel_feature.hpp b/boost/log/sources/channel_feature.hpp
index aa0349010c..d7e88c4aad 100644
--- a/boost/log/sources/channel_feature.hpp
+++ b/boost/log/sources/channel_feature.hpp
@@ -17,7 +17,7 @@
#include <string>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/locks.hpp>
#include <boost/log/detail/default_attribute_names.hpp>
diff --git a/boost/log/sources/exception_handler_feature.hpp b/boost/log/sources/exception_handler_feature.hpp
index bd77fca528..d29041109d 100644
--- a/boost/log/sources/exception_handler_feature.hpp
+++ b/boost/log/sources/exception_handler_feature.hpp
@@ -17,7 +17,7 @@
#include <boost/mpl/if.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/light_function.hpp>
diff --git a/boost/log/sources/global_logger_storage.hpp b/boost/log/sources/global_logger_storage.hpp
index a98e5e63e1..dad41a128c 100644
--- a/boost/log/sources/global_logger_storage.hpp
+++ b/boost/log/sources/global_logger_storage.hpp
@@ -37,7 +37,7 @@ namespace sources {
namespace aux {
//! The base class for logger holders
-struct BOOST_LOG_NO_VTABLE BOOST_SYMBOL_VISIBLE logger_holder_base
+struct logger_holder_base
{
//! The source file name where the logger was registered
const char* const m_RegistrationFile;
@@ -52,12 +52,11 @@ struct BOOST_LOG_NO_VTABLE BOOST_SYMBOL_VISIBLE logger_holder_base
m_LoggerType(logger_type)
{
}
- virtual ~logger_holder_base() {}
};
//! The actual logger holder class
template< typename LoggerT >
-struct BOOST_SYMBOL_VISIBLE logger_holder :
+struct logger_holder :
public logger_holder_base
{
//! The logger instance
@@ -68,6 +67,14 @@ struct BOOST_SYMBOL_VISIBLE logger_holder :
m_Logger(logger)
{
}
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ logger_holder(const char* file, unsigned int line, LoggerT&& logger) :
+ logger_holder_base(file, line, typeindex::type_id< LoggerT >()),
+ m_Logger(static_cast< LoggerT&& >(logger))
+ {
+ }
+#endif
};
//! The class implements a global repository of tagged loggers
@@ -122,8 +129,8 @@ struct logger_singleton :
if (holder->m_LoggerType == logger_type_index)
{
// Note: dynamic_cast may fail here if logger_type is not visible (for example, with Clang on Linux, if the original logger
- // instance was initialized in a different DSO than where it's being queried). logger_holder default visibility doesn't
- // help since it is inhibited by the template parameter visibility.
+ // instance was initialized in a different DSO than where it's being queried). logger_holder visibility doesn't
+ // have effect since it is inhibited by the template parameter visibility.
instance = boost::static_pointer_cast< logger_holder< logger_type > >(holder);
}
else
@@ -133,7 +140,7 @@ struct logger_singleton :
// happen if the same-named tag is defined differently in two or more
// dlls. This check is intended to detect such ODR violations. However, there
// is no protection against different definitions of the logger type itself.
- throw_odr_violation(tag_type_index, logger_type_index, *holder);
+ boost::log::sources::aux::throw_odr_violation(tag_type_index, logger_type_index, *holder);
}
}
diff --git a/boost/log/sources/record_ostream.hpp b/boost/log/sources/record_ostream.hpp
index c1e80593aa..5fac8742b7 100644
--- a/boost/log/sources/record_ostream.hpp
+++ b/boost/log/sources/record_ostream.hpp
@@ -20,8 +20,8 @@
#include <ostream>
#include <boost/assert.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/native_typeof.hpp>
#include <boost/log/detail/unhandled_exception_count.hpp>
diff --git a/boost/log/sources/severity_feature.hpp b/boost/log/sources/severity_feature.hpp
index 6ecf95e551..101769bda1 100644
--- a/boost/log/sources/severity_feature.hpp
+++ b/boost/log/sources/severity_feature.hpp
@@ -19,7 +19,7 @@
#include <boost/static_assert.hpp>
#include <boost/smart_ptr/intrusive_ptr.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/locks.hpp>
#include <boost/log/detail/default_attribute_names.hpp>
diff --git a/boost/log/support/date_time.hpp b/boost/log/support/date_time.hpp
index e1c9050adb..468f02fa40 100644
--- a/boost/log/support/date_time.hpp
+++ b/boost/log/support/date_time.hpp
@@ -22,7 +22,7 @@
#include <iterator>
#include <boost/cstdint.hpp>
#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
+#include <boost/move/utility_core.hpp>
#include <boost/date_time/time.hpp>
#include <boost/date_time/date.hpp>
#include <boost/date_time/gregorian/gregorian_types.hpp>
diff --git a/boost/log/support/exception.hpp b/boost/log/support/exception.hpp
index f6d9be20d5..160521d3c9 100644
--- a/boost/log/support/exception.hpp
+++ b/boost/log/support/exception.hpp
@@ -15,6 +15,7 @@
#ifndef BOOST_LOG_SUPPORT_EXCEPTION_HPP_INCLUDED_
#define BOOST_LOG_SUPPORT_EXCEPTION_HPP_INCLUDED_
+#include <string>
#include <boost/type_index.hpp>
#include <boost/exception/info.hpp>
#include <boost/log/detail/config.hpp>
@@ -63,6 +64,17 @@ inline current_scope_info current_scope()
return current_scope_info(attributes::named_scope::get_scopes());
}
+namespace ipc {
+
+class object_name;
+
+/*!
+ * System resource name
+ */
+typedef error_info< struct object_name_tag, object_name > object_name_info;
+
+} // namespace ipc
+
BOOST_LOG_CLOSE_NAMESPACE // namespace log
} // namespace boost
diff --git a/boost/log/support/spirit_classic.hpp b/boost/log/support/spirit_classic.hpp
index 36a680ac6f..5f117388d8 100644
--- a/boost/log/support/spirit_classic.hpp
+++ b/boost/log/support/spirit_classic.hpp
@@ -16,7 +16,7 @@
#define BOOST_LOG_SUPPORT_SPIRIT_CLASSIC_HPP_INCLUDED_
#include <boost/mpl/bool.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/utility/functional/matches.hpp>
diff --git a/boost/log/support/spirit_qi.hpp b/boost/log/support/spirit_qi.hpp
index 027552670a..e335d1ae55 100644
--- a/boost/log/support/spirit_qi.hpp
+++ b/boost/log/support/spirit_qi.hpp
@@ -15,7 +15,7 @@
#ifndef BOOST_LOG_SUPPORT_SPIRIT_QI_HPP_INCLUDED_
#define BOOST_LOG_SUPPORT_SPIRIT_QI_HPP_INCLUDED_
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/spirit/include/qi_parse.hpp>
#include <boost/spirit/include/qi_domain.hpp>
#include <boost/spirit/include/support_unused.hpp>
@@ -40,7 +40,7 @@ struct boost_spirit_qi_expression_tag;
//! The metafunction detects the matching expression kind and returns a tag that is used to specialize \c match_traits
template< typename ExpressionT >
-struct matching_expression_kind< ExpressionT, typename boost::enable_if< spirit::traits::matches< spirit::qi::domain, ExpressionT > >::type >
+struct matching_expression_kind< ExpressionT, typename boost::enable_if_c< spirit::traits::matches< spirit::qi::domain, ExpressionT >::value >::type >
{
typedef boost_spirit_qi_expression_tag type;
};
diff --git a/boost/log/utility/exception_handler.hpp b/boost/log/utility/exception_handler.hpp
index 6b369704d1..9b8551ac0d 100644
--- a/boost/log/utility/exception_handler.hpp
+++ b/boost/log/utility/exception_handler.hpp
@@ -22,10 +22,10 @@
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/has_xxx.hpp>
#include <boost/mpl/vector.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
-#include <boost/utility/enable_if.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/utility/functional/nop.hpp>
#include <boost/log/detail/header.hpp>
@@ -228,8 +228,8 @@ inline nop make_exception_suppressor()
#ifndef BOOST_LOG_DOXYGEN_PASS
template< typename HandlerT >
-inline typename lazy_enable_if<
- aux::has_exception_types< HandlerT >,
+inline typename boost::lazy_enable_if_c<
+ aux::has_exception_types< HandlerT >::value,
aux::make_self_contained_exception_handler< exception_handler, HandlerT >
>::type make_exception_handler(HandlerT const& handler)
{
@@ -238,8 +238,8 @@ inline typename lazy_enable_if<
}
template< typename HandlerT >
-inline typename lazy_enable_if<
- aux::has_exception_types< HandlerT >,
+inline typename boost::lazy_enable_if_c<
+ aux::has_exception_types< HandlerT >::value,
aux::make_self_contained_exception_handler< nothrow_exception_handler, HandlerT >
>::type make_exception_handler(HandlerT const& handler, std::nothrow_t const&)
{
diff --git a/boost/log/utility/formatting_ostream.hpp b/boost/log/utility/formatting_ostream.hpp
index d3732d36f4..4a79998b1c 100644
--- a/boost/log/utility/formatting_ostream.hpp
+++ b/boost/log/utility/formatting_ostream.hpp
@@ -245,7 +245,7 @@ public:
*/
string_type const& str() const
{
- string_type* storage = m_streambuf.storage();
+ string_type* const storage = m_streambuf.storage();
BOOST_ASSERT(storage != NULL);
m_streambuf.pubsync();
@@ -372,8 +372,12 @@ public:
{
m_stream.flush();
- string_type* storage = m_streambuf.storage();
- aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_stream.getloc());
+ if (!m_streambuf.storage_overflow())
+ {
+ string_type* storage = m_streambuf.storage();
+ if (!aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_streambuf.max_size(), m_stream.getloc()))
+ m_streambuf.storage_overflow(true);
+ }
}
return *this;
@@ -643,9 +647,10 @@ public:
}
#endif
-private:
+protected:
void init_stream()
{
+ m_stream.exceptions(ostream_type::goodbit);
m_stream.clear(m_streambuf.storage() ? ostream_type::goodbit : ostream_type::badbit);
m_stream.flags
(
@@ -658,6 +663,7 @@ private:
m_stream.fill(static_cast< char_type >(' '));
}
+private:
basic_formatting_ostream& formatted_write(const char_type* p, std::streamsize size)
{
sentry guard(*this);
@@ -666,7 +672,7 @@ private:
m_stream.flush();
if (m_stream.width() <= size)
- m_streambuf.storage()->append(p, static_cast< std::size_t >(size));
+ m_streambuf.append(p, static_cast< std::size_t >(size));
else
this->aligned_write(p, size);
@@ -685,7 +691,13 @@ private:
m_stream.flush();
if (m_stream.width() <= size)
- aux::code_convert(p, static_cast< std::size_t >(size), *m_streambuf.storage(), m_stream.getloc());
+ {
+ if (!m_streambuf.storage_overflow())
+ {
+ if (!aux::code_convert(p, static_cast< std::size_t >(size), *m_streambuf.storage(), m_streambuf.max_size(), m_stream.getloc()))
+ m_streambuf.storage_overflow(true);
+ }
+ }
else
this->aligned_write(p, size);
@@ -780,19 +792,18 @@ BOOST_CONSTEXPR_OR_CONST typename basic_formatting_ostream< CharT, TraitsT, Allo
template< typename CharT, typename TraitsT, typename AllocatorT >
void basic_formatting_ostream< CharT, TraitsT, AllocatorT >::aligned_write(const char_type* p, std::streamsize size)
{
- string_type* const storage = m_streambuf.storage();
typename string_type::size_type const alignment_size =
static_cast< typename string_type::size_type >(m_stream.width() - size);
const bool align_left = (m_stream.flags() & ostream_type::adjustfield) == ostream_type::left;
if (align_left)
{
- storage->append(p, static_cast< std::size_t >(size));
- storage->append(alignment_size, m_stream.fill());
+ m_streambuf.append(p, static_cast< std::size_t >(size));
+ m_streambuf.append(alignment_size, m_stream.fill());
}
else
{
- storage->append(alignment_size, m_stream.fill());
- storage->append(p, static_cast< std::size_t >(size));
+ m_streambuf.append(alignment_size, m_stream.fill());
+ m_streambuf.append(p, static_cast< std::size_t >(size));
}
}
@@ -806,13 +817,21 @@ void basic_formatting_ostream< CharT, TraitsT, AllocatorT >::aligned_write(const
const bool align_left = (m_stream.flags() & ostream_type::adjustfield) == ostream_type::left;
if (align_left)
{
- aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_stream.getloc());
- storage->append(alignment_size, m_stream.fill());
+ if (!m_streambuf.storage_overflow())
+ {
+ if (!aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_streambuf.max_size(), m_stream.getloc()))
+ m_streambuf.storage_overflow(true);
+ }
+ m_streambuf.append(alignment_size, m_stream.fill());
}
else
{
- storage->append(alignment_size, m_stream.fill());
- aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_stream.getloc());
+ m_streambuf.append(alignment_size, m_stream.fill());
+ if (!m_streambuf.storage_overflow())
+ {
+ if (!aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_streambuf.max_size(), m_stream.getloc()))
+ m_streambuf.storage_overflow(true);
+ }
}
}
diff --git a/boost/log/utility/ipc/object_name.hpp b/boost/log/utility/ipc/object_name.hpp
new file mode 100644
index 0000000000..582ecdcbf3
--- /dev/null
+++ b/boost/log/utility/ipc/object_name.hpp
@@ -0,0 +1,271 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file utility/ipc/object_name.hpp
+ * \author Andrey Semashev
+ * \date 05.03.2016
+ *
+ * The header contains declaration of a system object name wrapper.
+ */
+
+#ifndef BOOST_LOG_UTILITY_IPC_OBJECT_NAME_HPP_INCLUDED_
+#define BOOST_LOG_UTILITY_IPC_OBJECT_NAME_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <cstddef>
+#include <iosfwd>
+#include <string>
+#include <boost/move/core.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace ipc {
+
+/*!
+ * \brief A system object name class
+ *
+ * In order to identify a system-wide object such as a shared memory segment or a named synchronization primitive the object has to be given a name.
+ * The format of the name is specific to the operating system and the \c object_name class provides an abstraction for names of objects. It also
+ * provides means for scoping, which allows to avoid name clashes between different processes.
+ *
+ * The object name is a UTF-8 encoded string. The portable object name should consist of the following characters:
+ *
+ * <pre>
+ * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+ * a b c d e f g h i j k l m n o p q r s t u v w x y z
+ * 0 1 2 3 4 5 6 7 8 9 . _ -
+ * </pre>
+ *
+ * \note The character set corresponds to the POSIX Portable Filename Character Set (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278).
+ *
+ * Use of other characters may result in non-portable system-specific behavior.
+ *
+ * The name can have one of the following scopes:
+ *
+ * \li \c global - objects within this scope are visible to any process on the system. In order to use this scope the process may need to have
+ * extended privileges. This scope is not available for Windows Store applications.
+ * \li \c user - objects within this scope can be opened by processes running under the same user as the current process.
+ * \li \c session - objects within this scope are visible to processes within the session of the current process. The definition of a session may vary between
+ * operating systems. On POSIX, a session is typically a group of processes attached to a single virtual terminal device. On Windows a session is
+ * started when a user logs into the system. There is also a separate session for Windows services.
+ * \li \c process_group - objects within this scope are visible to processes within the process group of the current process. Currently, on Windows all processes
+ * running in the current session are considered members of the same process group. This may change in future.
+ *
+ * The scopes are not overlapping. For instance, if an object is created in the global scope, the object cannot be opened with the same name but in user's scope.
+ *
+ * Note that name scoping is not a security feature. On some systems any process on the system has technical capability to open objects within any scope.
+ * The scope is only used to help avoid name clashes between processes using \c object_name to identify objects.
+ */
+class object_name
+{
+public:
+ //! Name scopes
+ enum scope
+ {
+ global, //!< The name has global scope; any process in the system has the potential to open the resource identified by the name
+ user, //!< The name is limited to processes running under the current user
+ session, //!< The name is limited to processes running in the current login session
+ process_group //!< The name is limited to processes running in the current process group
+ };
+
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+
+ BOOST_COPYABLE_AND_MOVABLE(object_name)
+
+private:
+ std::string m_name;
+
+#endif // !defined(BOOST_LOG_DOXYGEN_PASS)
+
+public:
+ /*!
+ * Default constructor. The method creates an empty object name.
+ *
+ * \post <tt>empty() == true</tt>
+ */
+ object_name() BOOST_NOEXCEPT
+ {
+ }
+
+ /*!
+ * Move constructor.
+ */
+ object_name(BOOST_RV_REF(object_name) that) BOOST_NOEXCEPT
+ {
+ m_name.swap(that.m_name);
+ }
+
+ /*!
+ * Copy constructor.
+ */
+ object_name(object_name const& that) : m_name(that.m_name)
+ {
+ }
+
+ /*!
+ * Constructor from the native string.
+ *
+ * \param str The object name string, must not be \c NULL. The string format is specific to the operating system.
+ */
+ static object_name from_native(const char* str)
+ {
+ object_name name;
+ name.m_name = str;
+ return name;
+ }
+
+ /*!
+ * Constructor from the native string.
+ *
+ * \param str The object name string. The string format is specific to the operating system.
+ */
+ static object_name from_native(std::string const& str)
+ {
+ object_name name;
+ name.m_name = str;
+ return name;
+ }
+
+ /*!
+ * Constructor from the object name
+ * \param ns The scope of the object name
+ * \param str The object name, must not be NULL.
+ */
+ BOOST_LOG_API object_name(scope ns, const char* str);
+
+ /*!
+ * Constructor from the object name
+ * \param ns The scope of the object name
+ * \param str The object name
+ */
+ BOOST_LOG_API object_name(scope ns, std::string const& str);
+
+ /*!
+ * Move assignment
+ */
+ object_name& operator= (BOOST_RV_REF(object_name) that) BOOST_NOEXCEPT
+ {
+ m_name.clear();
+ m_name.swap(that.m_name);
+ return *this;
+ }
+
+ /*!
+ * Copy assignment
+ */
+ object_name& operator= (BOOST_COPY_ASSIGN_REF(object_name) that)
+ {
+ m_name = that.m_name;
+ return *this;
+ }
+
+ /*!
+ * Returns \c true if the object name is empty
+ */
+ bool empty() const BOOST_NOEXCEPT { return m_name.empty(); }
+
+ /*!
+ * Returns length of the name, in bytes
+ */
+ std::size_t size() const BOOST_NOEXCEPT { return m_name.size(); }
+
+ /*!
+ * Returns the name string
+ */
+ const char* c_str() const BOOST_NOEXCEPT { return m_name.c_str(); }
+
+ /*!
+ * Swaps the object name with another object name
+ */
+ void swap(object_name& that) BOOST_NOEXCEPT { m_name.swap(that.m_name); }
+
+ /*!
+ * Swaps two object names
+ */
+ friend void swap(object_name& left, object_name& right) BOOST_NOEXCEPT
+ {
+ left.swap(right);
+ }
+
+ /*!
+ * Returns string representation of the object name
+ */
+ friend std::string to_string(object_name const& name)
+ {
+ return name.m_name;
+ }
+
+ /*!
+ * Equality operator
+ */
+ friend bool operator== (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name == right.m_name;
+ }
+ /*!
+ * Inequality operator
+ */
+ friend bool operator!= (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name != right.m_name;
+ }
+ /*!
+ * Less operator
+ */
+ friend bool operator< (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name < right.m_name;
+ }
+ /*!
+ * Greater operator
+ */
+ friend bool operator> (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name > right.m_name;
+ }
+ /*!
+ * Less or equal operator
+ */
+ friend bool operator<= (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name <= right.m_name;
+ }
+ /*!
+ * Greater or equal operator
+ */
+ friend bool operator>= (object_name const& left, object_name const& right) BOOST_NOEXCEPT
+ {
+ return left.m_name >= right.m_name;
+ }
+
+ /*!
+ * Stream ouput operator
+ */
+ template< typename CharT, typename TraitsT >
+ friend std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, object_name const& name)
+ {
+ strm << name.c_str();
+ return strm;
+ }
+};
+
+} // namespace ipc
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_UTILITY_IPC_OBJECT_NAME_HPP_INCLUDED_
diff --git a/boost/log/utility/ipc/reliable_message_queue.hpp b/boost/log/utility/ipc/reliable_message_queue.hpp
new file mode 100644
index 0000000000..934d6ab299
--- /dev/null
+++ b/boost/log/utility/ipc/reliable_message_queue.hpp
@@ -0,0 +1,776 @@
+/*
+ * Copyright Lingxi Li 2015.
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file utility/ipc/reliable_message_queue.hpp
+ * \author Lingxi Li
+ * \author Andrey Semashev
+ * \date 01.01.2016
+ *
+ * The header contains declaration of a reliable interprocess message queue.
+ */
+
+#ifndef BOOST_LOG_UTILITY_IPC_RELIABLE_MESSAGE_QUEUE_HPP_INCLUDED_
+#define BOOST_LOG_UTILITY_IPC_RELIABLE_MESSAGE_QUEUE_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <cstddef>
+#include <boost/cstdint.hpp>
+#include <boost/move/core.hpp>
+#include <boost/log/keywords/open_mode.hpp>
+#include <boost/log/keywords/name.hpp>
+#include <boost/log/keywords/capacity.hpp>
+#include <boost/log/keywords/block_size.hpp>
+#include <boost/log/keywords/overflow_policy.hpp>
+#include <boost/log/keywords/permissions.hpp>
+#include <boost/log/utility/open_mode.hpp>
+#include <boost/log/utility/permissions.hpp>
+#include <boost/log/utility/ipc/object_name.hpp>
+#include <boost/log/detail/parameter_tools.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace ipc {
+
+namespace aux {
+
+template< typename T, typename R >
+struct enable_if_byte {};
+template< typename R >
+struct enable_if_byte< char, R > { typedef R type; };
+template< typename R >
+struct enable_if_byte< signed char, R > { typedef R type; };
+template< typename R >
+struct enable_if_byte< unsigned char, R > { typedef R type; };
+
+} // namespace aux
+
+/*!
+ * \brief A reliable interprocess message queue
+ *
+ * The queue implements a reliable one-way channel of passing messages from one or multiple writers to a single reader.
+ * The format of the messages is user-defined and must be consistent across all writers and the reader. The queue does
+ * not enforce any specific format of the messages, other than they should be supplied as a contiguous array of bytes.
+ *
+ * The queue internally uses a process-shared storage identified by an \c object_name (the queue name). Refer to \c object_name
+ * documentation for details on restrictions imposed on object names.
+ *
+ * The queue storage is organized as a fixed number of blocks of a fixed size. The block size must be an integer power of 2 and
+ * is expressed in bytes. Each written message, together with some metadata added by the queue, consumes an integer number
+ * of blocks. Each read message received by the reader releases the blocks allocated for that message. As such the maximum size
+ * of a message is slightly less than block size times capacity of the queue. For efficiency, it is recommended to choose
+ * block size large enough to accommodate most of the messages to be passed through the queue.
+ *
+ * The queue is considered empty when no messages are enqueued (all blocks are free). The queue is considered full at the point
+ * of enqueueing a message when there is not enough free blocks to accommodate the message.
+ *
+ * The queue is reliable in that it will not drop successfully sent messages that are not received by the reader, other than the
+ * case when a non-empty queue is destroyed by the last user. If a message cannot be enqueued by the writer because the queue is
+ * full, the queue can either block the writer or return an error or throw an exception, depending on the policy specified at
+ * the queue creation. The policy is object local, i.e. different writers and the reader can have different overflow policies.
+ *
+ * If the queue is empty and the reader attempts to dequeue a message, it will block until a message is enqueued by a writer.
+ *
+ * A blocked reader or writer can be unblocked by calling \c stop_local. After this method is called, all threads blocked on
+ * this particular object are released and return \c operation_result::aborted. The other instances of the queue (in the current
+ * or other processes) are unaffected. In order to restore the normal functioning of the queue instance after the \c stop_local
+ * call the user has to invoke \c reset_local.
+ *
+ * The queue does not guarantee any particular order of received messages from different writer threads. Messages sent by a
+ * particular writer thread will be received in the order of sending.
+ *
+ * Methods of this class are not thread-safe, unless otherwise specified.
+ */
+class reliable_message_queue
+{
+public:
+ //! Result codes for various operations on the queue
+ enum operation_result
+ {
+ succeeded, //!< The operation has completed successfully
+ no_space, //!< The message could not be sent because the queue is full
+ aborted //!< The operation has been aborted because the queue method <tt>stop_local()</tt> has been called
+ };
+
+ //! Interprocess queue overflow policies
+ enum overflow_policy
+ {
+ //! Block the send operation when the queue is full
+ block_on_overflow,
+ //! Return \c operation_result::no_space when the queue is full
+ fail_on_overflow,
+ //! Throw \c capacity_limit_reached exception when the queue is full
+ throw_on_overflow
+ };
+
+ //! Queue message size type
+ typedef uint32_t size_type;
+
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(reliable_message_queue)
+
+private:
+ typedef void (*receive_handler)(void* state, const void* data, size_type size);
+
+ struct fixed_buffer_state
+ {
+ uint8_t* data;
+ size_type size;
+ };
+
+ struct implementation;
+ implementation* m_impl;
+
+#endif // !defined(BOOST_LOG_DOXYGEN_PASS)
+
+public:
+ /*!
+ * Default constructor. The method constructs an object that is not associated with any
+ * message queue.
+ *
+ * \post <tt>is_open() == false</tt>
+ */
+ BOOST_CONSTEXPR reliable_message_queue() BOOST_NOEXCEPT : m_impl(NULL)
+ {
+ }
+
+ /*!
+ * Constructor. The method is used to construct an object and create the associated
+ * message queue. The constructed object will be in running state if the message queue is
+ * successfully created.
+ *
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param capacity Maximum number of allocation blocks the queue can hold.
+ * \param block_size Size in bytes of allocation block. Must be a power of 2.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue.
+ */
+ reliable_message_queue
+ (
+ open_mode::create_only_tag,
+ object_name const& name,
+ uint32_t capacity,
+ size_type block_size,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ ) :
+ m_impl(NULL)
+ {
+ this->create(name, capacity, block_size, oflow_policy, perms);
+ }
+
+ /*!
+ * Constructor. The method is used to construct an object and create or open the associated
+ * message queue. The constructed object will be in running state if the message queue is
+ * successfully created or opened. If the message queue that is identified by the name already
+ * exists then the other queue parameters are ignored. The actual queue parameters can be obtained
+ * with accessors from the constructed object.
+ *
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param capacity Maximum number of allocation blocks the queue can hold.
+ * \param block_size Size in bytes of allocation block. Must be a power of 2.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue.
+ */
+ reliable_message_queue
+ (
+ open_mode::open_or_create_tag,
+ object_name const& name,
+ uint32_t capacity,
+ size_type block_size,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ ) :
+ m_impl(NULL)
+ {
+ this->open_or_create(name, capacity, block_size, oflow_policy, perms);
+ }
+
+ /*!
+ * Constructor. The method is used to construct an object and open the existing
+ * message queue. The constructed object will be in running state if the message queue is
+ * successfully opened.
+ *
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue. The permissions will only be used
+ * if the queue implementation has to create system objects while operating.
+ * This parameter is currently not used on POSIX systems.
+ */
+ reliable_message_queue
+ (
+ open_mode::open_only_tag,
+ object_name const& name,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ ) :
+ m_impl(NULL)
+ {
+ this->open(name, oflow_policy, perms);
+ }
+
+ /*!
+ * Constructor with named parameters. The method is used to construct an object and create or open
+ * the associated message queue. The constructed object will be in running state if the message queue is
+ * successfully created.
+ *
+ * The following named parameters are accepted:
+ *
+ * * open_mode - One of the open mode tags: \c open_mode::create_only, \c open_mode::open_only or
+ * \c open_mode::open_or_create.
+ * * name - Name of the message queue to be associated with.
+ * * capacity - Maximum number of allocation blocks the queue can hold. Used only if the queue is created.
+ * * block_size - Size in bytes of allocation block. Must be a power of 2. Used only if the queue is created.
+ * * overflow_policy - Queue behavior policy in case of overflow, see \c overflow_policy.
+ * * permissions - Access permissions for the associated message queue.
+ *
+ * \post <tt>is_open() == true</tt>
+ */
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+ BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_CALL(reliable_message_queue, construct)
+#else
+ template< typename... Args >
+ explicit reliable_message_queue(Args const&... args);
+#endif
+
+ /*!
+ * Destructor. Calls <tt>close()</tt>.
+ */
+ ~reliable_message_queue() BOOST_NOEXCEPT
+ {
+ this->close();
+ }
+
+ /*!
+ * Move constructor. The method move-constructs an object from \c other. After
+ * the call, the constructed object becomes \c other, while \c other is left in
+ * default constructed state.
+ *
+ * \param that The object to be moved.
+ */
+ reliable_message_queue(BOOST_RV_REF(reliable_message_queue) that) BOOST_NOEXCEPT :
+ m_impl(that.m_impl)
+ {
+ that.m_impl = NULL;
+ }
+
+ /*!
+ * Move assignment operator. If the object is associated with a message queue,
+ * <tt>close()</tt> is first called and the precondition to calling <tt>close()</tt>
+ * applies. After the call, the object becomes \a that while \a that is left
+ * in default constructed state.
+ *
+ * \param that The object to be moved.
+ *
+ * \return A reference to the assigned object.
+ */
+ reliable_message_queue& operator= (BOOST_RV_REF(reliable_message_queue) that) BOOST_NOEXCEPT
+ {
+ reliable_message_queue other(static_cast< BOOST_RV_REF(reliable_message_queue) >(that));
+ this->swap(other);
+ return *this;
+ }
+
+ /*!
+ * The method swaps the object with \a that.
+ *
+ * \param that The other object to swap with.
+ */
+ void swap(reliable_message_queue& that) BOOST_NOEXCEPT
+ {
+ implementation* p = m_impl;
+ m_impl = that.m_impl;
+ that.m_impl = p;
+ }
+
+ //! Swaps the two \c reliable_message_queue objects.
+ friend void swap(reliable_message_queue& a, reliable_message_queue& b) BOOST_NOEXCEPT
+ {
+ a.swap(b);
+ }
+
+ /*!
+ * The method creates the message queue to be associated with the object. After the call,
+ * the object will be in running state if a message queue is successfully created.
+ *
+ * \pre <tt>is_open() == false</tt>
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param capacity Maximum number of allocation blocks the queue can hold.
+ * \param block_size Size in bytes of allocation block. Must be a power of 2.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue.
+ */
+ BOOST_LOG_API void create
+ (
+ object_name const& name,
+ uint32_t capacity,
+ size_type block_size,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ );
+
+ /*!
+ * The method creates or opens the message queue to be associated with the object.
+ * After the call, the object will be in running state if a message queue is successfully
+ * created or opened. If the message queue that is identified by the name already exists then
+ * the other queue parameters are ignored. The actual queue parameters can be obtained
+ * with accessors from this object after this method returns.
+ *
+ * \pre <tt>is_open() == false</tt>
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param capacity Maximum number of allocation blocks the queue can hold.
+ * \param block_size Size in bytes of allocation block. Must be a power of 2.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue.
+ */
+ BOOST_LOG_API void open_or_create
+ (
+ object_name const& name,
+ uint32_t capacity,
+ size_type block_size,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ );
+
+ /*!
+ * The method opens the existing message queue to be associated with the object.
+ * After the call, the object will be in running state if a message queue is successfully
+ * opened.
+ *
+ * \pre <tt>is_open() == false</tt>
+ * \post <tt>is_open() == true</tt>
+ *
+ * \param name Name of the message queue to be associated with.
+ * \param oflow_policy Queue behavior policy in case of overflow.
+ * \param perms Access permissions for the associated message queue. The permissions will only be used
+ * if the queue implementation has to create system objects while operating.
+ * This parameter is currently not used on POSIX systems.
+ */
+ BOOST_LOG_API void open
+ (
+ object_name const& name,
+ overflow_policy oflow_policy = block_on_overflow,
+ permissions const& perms = permissions()
+ );
+
+ /*!
+ * Tests whether the object is associated with any message queue.
+ *
+ * \return \c true if the object is associated with a message queue, and \c false otherwise.
+ */
+ bool is_open() const BOOST_NOEXCEPT
+ {
+ return m_impl != NULL;
+ }
+
+ /*!
+ * This method empties the associated message queue. Concurrent calls to this method, <tt>send()</tt>,
+ * <tt>try_send()</tt>, <tt>receive()</tt>, <tt>try_receive()</tt>, and <tt>stop_local()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ */
+ BOOST_LOG_API void clear();
+
+ /*!
+ * The method returns the name of the associated message queue.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \return Name of the associated message queue
+ */
+ BOOST_LOG_API object_name const& name() const;
+
+ /*!
+ * The method returns the maximum number of allocation blocks the associated message queue
+ * can hold. Note that the returned value may be different from the corresponding
+ * value passed to the constructor or <tt>open_or_create()</tt>, for the message queue may
+ * not have been created by this object.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \return Maximum number of allocation blocks the associated message queue can hold.
+ */
+ BOOST_LOG_API uint32_t capacity() const;
+
+ /*!
+ * The method returns the allocation block size, in bytes. Each message in the
+ * associated message queue consumes an integer number of allocation blocks.
+ * Note that the returned value may be different from the corresponding value passed
+ * to the constructor or <tt>open_or_create()</tt>, for the message queue may not
+ * have been created by this object.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \return Allocation block size, in bytes.
+ */
+ BOOST_LOG_API size_type block_size() const;
+
+ /*!
+ * The method wakes up all threads that are blocked in calls to <tt>send()</tt> or
+ * <tt>receive()</tt>. Those calls would then return \c false with \c errno \c EINTR.
+ * Note that, the method does not block until the woken-up threads have actually
+ * returned from <tt>send()</tt> or <tt>receive()</tt>. Other means is needed to ensure
+ * that calls to <tt>send()</tt> or <tt>receive()</tt> have returned, e.g., joining the
+ * threads that might be blocking on the calls.
+ *
+ * The method also puts the object in stopped state. When in stopped state, calls to
+ * <tt>send()</tt> or <tt>receive()</tt> will return immediately with return value
+ * \c false and \c errno \c EINTR when they would otherwise block in running state.
+ *
+ * Concurrent calls to this method, <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ */
+ BOOST_LOG_API void stop_local();
+
+ /*!
+ * The method puts the object in running state where calls to <tt>send()</tt> or
+ * <tt>receive()</tt> may block. This method is not thread-safe.
+ *
+ * \pre <tt>is_open() == true</tt>
+ */
+ BOOST_LOG_API void reset_local();
+
+ /*!
+ * The method disassociates the associated message queue, if any. No other threads
+ * should be using this object before calling this method. The <tt>stop_local()</tt> method
+ * can be used to have any threads currently blocked in <tt>send()</tt> or
+ * <tt>receive()</tt> return, and prevent further calls to them from blocking. Typically,
+ * before calling this method, one would first call <tt>stop_local()</tt> and then join all
+ * threads that might be blocking on <tt>send()</tt> or <tt>receive()</tt> to ensure that
+ * they have returned from the calls. The associated message queue is destroyed if the
+ * object represents the last outstanding reference to it.
+ *
+ * \post <tt>is_open() == false</tt>
+ */
+ void close() BOOST_NOEXCEPT
+ {
+ if (is_open())
+ do_close();
+ }
+
+ /*!
+ * The method sends a message to the associated message queue. When the object is in
+ * running state and the queue has no free space for the message, the method either blocks
+ * or throws an exception, depending on the overflow policy that was specified on the queue
+ * opening/creation. If blocking policy is in effect, the blocking can be interrupted by
+ * calling <tt>stop_local()</tt>, in which case the method returns \c operation_result::aborted.
+ * When the object is already in the stopped state, the method does not block but returns
+ * immediately with return value \c operation_result::aborted.
+ *
+ * It is possible to send an empty message by passing \c 0 to the parameter \c message_size.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>, <tt>try_receive()</tt>,
+ * <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param message_data The message data to send. Ignored when \c message_size is \c 0.
+ * \param message_size Size of the message data in bytes. If the size is larger than
+ * the associated message queue capacity, an <tt>std::logic_error</tt> exception is thrown.
+ *
+ * \retval operation_result::succeeded if the operation is successful
+ * \retval operation_result::no_space if \c overflow_policy::fail_on_overflow is in effect and the queue is full
+ * \retval operation_result::aborted if the call was interrupted by <tt>stop_local()</tt>
+ *
+ * <b>Throws:</b> <tt>std::logic_error</tt> in case if the message size exceeds the queue
+ * capacity, <tt>system_error</tt> in case if a native OS method fails.
+ */
+ BOOST_LOG_API operation_result send(void const* message_data, size_type message_size);
+
+ /*!
+ * The method performs an attempt to send a message to the associated message queue.
+ * The method is non-blocking, and always returns immediately.
+ * <tt>boost::system::system_error</tt> is thrown for errors resulting from native
+ * operating system calls. Note that it is possible to send an empty message by passing
+ * \c 0 to the parameter \c message_size. Concurrent calls to <tt>send()</tt>,
+ * <tt>try_send()</tt>, <tt>receive()</tt>, <tt>try_receive()</tt>, <tt>stop_local()</tt>,
+ * and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param message_data The message data to send. Ignored when \c message_size is \c 0.
+ * \param message_size Size of the message data in bytes. If the size is larger than the
+ * maximum size allowed by the associated message queue, an
+ * <tt>std::logic_error</tt> exception is thrown.
+ *
+ * \return \c true if the message is successfully sent, and \c false otherwise (e.g.,
+ * when the queue is full).
+ *
+ * <b>Throws:</b> <tt>std::logic_error</tt> in case if the message size exceeds the queue
+ * capacity, <tt>system_error</tt> in case if a native OS method fails.
+ */
+ BOOST_LOG_API bool try_send(void const* message_data, size_type message_size);
+
+ /*!
+ * The method takes a message from the associated message queue. When the object is in
+ * running state and the queue is empty, the method blocks. The blocking is interrupted
+ * when <tt>stop_local()</tt> is called, in which case the method returns \c operation_result::aborted.
+ * When the object is already in the stopped state and the queue is empty, the method
+ * does not block but returns immediately with return value \c operation_result::aborted.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param buffer The memory buffer to store the received message in.
+ * \param buffer_size The size of the buffer, in bytes.
+ * \param message_size Receives the size of the received message, in bytes.
+ *
+ * \retval operation_result::succeeded if the operation is successful
+ * \retval operation_result::aborted if the call was interrupted by <tt>stop_local()</tt>
+ */
+ operation_result receive(void* buffer, size_type buffer_size, size_type& message_size)
+ {
+ fixed_buffer_state state = { static_cast< uint8_t* >(buffer), buffer_size };
+ operation_result result = do_receive(&reliable_message_queue::fixed_buffer_receive_handler, &state);
+ message_size = buffer_size - state.size;
+ return result;
+ }
+
+ /*!
+ * The method takes a message from the associated message queue. When the object is in
+ * running state and the queue is empty, the method blocks. The blocking is interrupted
+ * when <tt>stop_local()</tt> is called, in which case the method returns \c operation_result::aborted.
+ * When the object is already in the stopped state and the queue is empty, the method
+ * does not block but returns immediately with return value \c operation_result::aborted.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param buffer The memory buffer to store the received message in.
+ * \param message_size Receives the size of the received message, in bytes.
+ *
+ * \retval operation_result::succeeded if the operation is successful
+ * \retval operation_result::aborted if the call was interrupted by <tt>stop_local()</tt>
+ */
+ template< typename ElementT, size_type SizeV >
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+ typename aux::enable_if_byte< ElementT, operation_result >::type
+#else
+ operation_result
+#endif
+ receive(ElementT (&buffer)[SizeV], size_type& message_size)
+ {
+ return receive(buffer, SizeV, message_size);
+ }
+
+ /*!
+ * The method takes a message from the associated message queue. When the object is in
+ * running state and the queue is empty, the method blocks. The blocking is interrupted
+ * when <tt>stop_local()</tt> is called, in which case the method returns \c operation_result::aborted.
+ * When the object is already in the stopped state and the queue is empty, the method
+ * does not block but returns immediately with return value \c operation_result::aborted.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param container The container to store the received message in. The container should have
+ * value type of <tt>char</tt>, <tt>signed char</tt> or <tt>unsigned char</tt>
+ * and support inserting elements at the end.
+ *
+ * \retval operation_result::succeeded if the operation is successful
+ * \retval operation_result::aborted if the call was interrupted by <tt>stop_local()</tt>
+ */
+ template< typename ContainerT >
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+ typename aux::enable_if_byte< typename ContainerT::value_type, operation_result >::type
+#else
+ operation_result
+#endif
+ receive(ContainerT& container)
+ {
+ return do_receive(&reliable_message_queue::container_receive_handler< ContainerT >, &container);
+ }
+
+ /*!
+ * The method performs an attempt to take a message from the associated message queue. The
+ * method is non-blocking, and always returns immediately.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param buffer The memory buffer to store the received message in.
+ * \param buffer_size The size of the buffer, in bytes.
+ * \param message_size Receives the size of the received message, in bytes.
+ *
+ * \return \c true if a message is successfully received, and \c false otherwise (e.g.,
+ * when the queue is empty).
+ */
+ bool try_receive(void* buffer, size_type buffer_size, size_type& message_size)
+ {
+ fixed_buffer_state state = { static_cast< uint8_t* >(buffer), buffer_size };
+ bool result = do_try_receive(&reliable_message_queue::fixed_buffer_receive_handler, &state);
+ message_size = buffer_size - state.size;
+ return result;
+ }
+
+ /*!
+ * The method performs an attempt to take a message from the associated message queue. The
+ * method is non-blocking, and always returns immediately.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param buffer The memory buffer to store the received message in.
+ * \param message_size Receives the size of the received message, in bytes.
+ *
+ * \return \c true if a message is successfully received, and \c false otherwise (e.g.,
+ * when the queue is empty).
+ */
+ template< typename ElementT, size_type SizeV >
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+ typename aux::enable_if_byte< ElementT, bool >::type
+#else
+ bool
+#endif
+ try_receive(ElementT (&buffer)[SizeV], size_type& message_size)
+ {
+ return try_receive(buffer, SizeV, message_size);
+ }
+
+ /*!
+ * The method performs an attempt to take a message from the associated message queue. The
+ * method is non-blocking, and always returns immediately.
+ *
+ * Concurrent calls to <tt>send()</tt>, <tt>try_send()</tt>, <tt>receive()</tt>,
+ * <tt>try_receive()</tt>, <tt>stop_local()</tt>, and <tt>clear()</tt> are allowed.
+ *
+ * \pre <tt>is_open() == true</tt>
+ *
+ * \param container The container to store the received message in. The container should have
+ * value type of <tt>char</tt>, <tt>signed char</tt> or <tt>unsigned char</tt>
+ * and support inserting elements at the end.
+ *
+ * \return \c true if a message is successfully received, and \c false otherwise (e.g.,
+ * when the queue is empty).
+ */
+ template< typename ContainerT >
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+ typename aux::enable_if_byte< typename ContainerT::value_type, bool >::type
+#else
+ bool
+#endif
+ try_receive(ContainerT& container)
+ {
+ return do_try_receive(&reliable_message_queue::container_receive_handler< ContainerT >, &container);
+ }
+
+ /*!
+ * The method frees system-wide resources, associated with the interprocess queue with the supplied name.
+ * The queue referred to by the specified name must not be opened in any process at the point of this call.
+ * After this call succeeds a new queue with the specified name can be created.
+ *
+ * This call can be useful to recover from an earlier process misbehavior (e.g. a crash without properly
+ * closing the message queue). In this case resources allocated for the interprocess queue may remain
+ * allocated after the last process closed the queue, which in turn may prevent creating a new queue with
+ * the same name. By calling this method before creating a queue the application can attempt to ensure
+ * it starts with a clean slate.
+ *
+ * On some platforms resources associated with the queue are automatically reclaimed by the operating system
+ * when the last process using those resources terminates (even if it terminates abnormally). On these
+ * platforms this call may be a no-op. However, portable code should still call this method at appropriate
+ * places to ensure compatibility with other platforms and future library versions, which may change implementation
+ * of the queue.
+ *
+ * \param name Name of the message queue to be removed.
+ */
+ static BOOST_LOG_API void remove(object_name const& name);
+
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+private:
+ //! Implementation of the constructor with named arguments
+ template< typename ArgsT >
+ void construct(ArgsT const& args)
+ {
+ m_impl = NULL;
+ construct_dispatch(args[keywords::open_mode], args);
+ }
+
+ //! Implementation of the constructor with named arguments
+ template< typename ArgsT >
+ void construct_dispatch(open_mode::create_only_tag, ArgsT const& args)
+ {
+ this->create(args[keywords::name], args[keywords::capacity], args[keywords::block_size], args[keywords::overflow_policy | block_on_overflow], args[keywords::permissions | permissions()]);
+ }
+
+ //! Implementation of the constructor with named arguments
+ template< typename ArgsT >
+ void construct_dispatch(open_mode::open_or_create_tag, ArgsT const& args)
+ {
+ this->open_or_create(args[keywords::name], args[keywords::capacity], args[keywords::block_size], args[keywords::overflow_policy | block_on_overflow], args[keywords::permissions | permissions()]);
+ }
+
+ //! Implementation of the constructor with named arguments
+ template< typename ArgsT >
+ void construct_dispatch(open_mode::open_only_tag, ArgsT const& args)
+ {
+ this->open(args[keywords::name], args[keywords::overflow_policy | block_on_overflow], args[keywords::permissions | permissions()]);
+ }
+
+ //! Closes the message queue, if it's open
+ BOOST_LOG_API void do_close() BOOST_NOEXCEPT;
+
+ //! Receives the message from the queue and calls the handler to place the data in the user's storage
+ BOOST_LOG_API operation_result do_receive(receive_handler handler, void* state);
+ //! Attempts to receives the message from the queue and calls the handler to place the data in the user's storage
+ BOOST_LOG_API bool do_try_receive(receive_handler handler, void* state);
+
+ //! Fixed buffer receive handler
+ static BOOST_LOG_API void fixed_buffer_receive_handler(void* state, const void* data, size_type size);
+ //! Receive handler for a container
+ template< typename ContainerT >
+ static void container_receive_handler(void* state, const void* data, size_type size)
+ {
+ ContainerT* const container = static_cast< ContainerT* >(state);
+ container->insert
+ (
+ container->end(),
+ static_cast< typename ContainerT::value_type const* >(data),
+ static_cast< typename ContainerT::value_type const* >(data) + size
+ );
+ }
+#endif
+};
+
+} // namespace ipc
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_UTILITY_IPC_RELIABLE_MESSAGE_QUEUE_HPP_INCLUDED_
diff --git a/boost/log/utility/manipulators/dump.hpp b/boost/log/utility/manipulators/dump.hpp
index dc1856a47a..3341376f39 100644
--- a/boost/log/utility/manipulators/dump.hpp
+++ b/boost/log/utility/manipulators/dump.hpp
@@ -200,7 +200,7 @@ inline dump_manip dump_elements(T* data, std::size_t count) BOOST_NOEXCEPT
* \brief Creates a stream manipulator that will output contents of a memory region in hexadecimal form
* \param data The pointer to the beginning of the region
* \param size The size of the region, in bytes
- * \params max_size The maximum number of bytes of the region to output
+ * \param max_size The maximum number of bytes of the region to output
* \return The manipulator that is to be put to a stream
*/
template< typename T >
@@ -213,7 +213,7 @@ inline typename aux::enable_dump< T, bounded_dump_manip >::type dump(T* data, st
* \brief Creates a stream manipulator that will dump elements of an array in hexadecimal form
* \param data The pointer to the beginning of the array
* \param count The size of the region, in number of \c T elements
- * \params max_count The maximum number of elements to output
+ * \param max_count The maximum number of elements to output
* \return The manipulator that is to be put to a stream
*/
template< typename T >
diff --git a/boost/log/utility/open_mode.hpp b/boost/log/utility/open_mode.hpp
new file mode 100644
index 0000000000..34a3d8d1aa
--- /dev/null
+++ b/boost/log/utility/open_mode.hpp
@@ -0,0 +1,46 @@
+/*
+ * Copyright Andrey Semashev 2016.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file open_mode.hpp
+ * \author Andrey Semashev
+ * \date 01.01.2016
+ *
+ * The header defines resource opening modes.
+ */
+
+#ifndef BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
+#define BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+namespace boost {
+
+BOOST_LOG_OPEN_NAMESPACE
+
+namespace open_mode {
+
+//! Create a new resource; fail if exists already
+struct create_only_tag {} const create_only = create_only_tag();
+//! Opens an existing resource; fail if not exist
+struct open_only_tag {} const open_only = open_only_tag();
+//! Creates a new resource or opens an existing one
+struct open_or_create_tag {} const open_or_create = open_or_create_tag();
+
+} // namespace open_mode
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
diff --git a/boost/log/utility/permissions.hpp b/boost/log/utility/permissions.hpp
new file mode 100644
index 0000000000..e35649a185
--- /dev/null
+++ b/boost/log/utility/permissions.hpp
@@ -0,0 +1,213 @@
+/*
+ * Copyright Lingxi Li 2015.
+ * Copyright Andrey Semashev 2015.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+/*!
+ * \file permissions.hpp
+ * \author Lingxi Li
+ * \author Andrey Semashev
+ * \date 14.10.2015
+ *
+ * The header contains an abstraction wrapper for security permissions.
+ */
+
+#ifndef BOOST_LOG_UTILITY_PERMISSIONS_HPP_INCLUDED_
+#define BOOST_LOG_UTILITY_PERMISSIONS_HPP_INCLUDED_
+
+#include <boost/log/detail/config.hpp>
+#include <boost/log/detail/header.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef BOOST_WINDOWS
+extern "C" {
+struct _SECURITY_ATTRIBUTES;
+}
+#endif // BOOST_WINDOWS
+
+namespace boost {
+
+#ifdef BOOST_WINDOWS
+namespace detail {
+namespace winapi {
+struct BOOST_LOG_MAY_ALIAS _SECURITY_ATTRIBUTES;
+}
+}
+#endif
+
+namespace interprocess {
+class permissions;
+} // namespace interprocess
+
+BOOST_LOG_OPEN_NAMESPACE
+
+/*!
+ * \brief Access permissions wrapper.
+ *
+ * On Windows platforms, it represents a pointer to \c SECURITY_ATTRIBUTES. The user is responsible
+ * for allocating and reclaiming resources associated with the pointer, \c permissions instance does
+ * not own them.
+ *
+ * On POSIX platforms, it represents a \c mode_t value.
+ */
+class permissions
+{
+public:
+#if defined(BOOST_LOG_DOXYGEN_PASS)
+ //! The type of security permissions, specific to the operating system
+ typedef implementation_defined native_type;
+#elif defined(BOOST_WINDOWS)
+ typedef ::_SECURITY_ATTRIBUTES* native_type;
+#else
+ // Equivalent to POSIX mode_t
+ typedef unsigned int native_type;
+#endif
+
+#if !defined(BOOST_LOG_DOXYGEN_PASS)
+private:
+ native_type m_perms;
+#endif
+
+public:
+ /*!
+ * Default constructor. The method constructs an object that represents
+ * a null \c SECURITY_ATTRIBUTES pointer on Windows platforms, and a
+ * \c mode_t value \c 0644 on POSIX platforms.
+ */
+ permissions() BOOST_NOEXCEPT
+ {
+ set_default();
+ }
+
+ /*!
+ * Copy constructor.
+ */
+ permissions(permissions const& that) BOOST_NOEXCEPT : m_perms(that.m_perms)
+ {
+ }
+
+ /*!
+ * Copy assignment.
+ */
+ permissions& operator=(permissions const& that) BOOST_NOEXCEPT
+ {
+ m_perms = that.m_perms;
+ return *this;
+ }
+
+ /*!
+ * Initializing constructor.
+ */
+ permissions(native_type perms) BOOST_NOEXCEPT : m_perms(perms)
+ {
+ }
+
+#ifdef BOOST_WINDOWS
+ permissions(boost::detail::winapi::_SECURITY_ATTRIBUTES* perms) BOOST_NOEXCEPT : m_perms(reinterpret_cast< native_type >(perms))
+ {
+ }
+#endif
+
+ /*!
+ * Initializing constructor.
+ */
+ BOOST_LOG_API permissions(boost::interprocess::permissions const& perms) BOOST_NOEXCEPT;
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ /*!
+ * Move constructor.
+ */
+ permissions(permissions&& that) BOOST_NOEXCEPT : m_perms(that.m_perms)
+ {
+ that.set_default();
+ }
+
+ /*!
+ * Move assignment.
+ */
+ permissions& operator=(permissions&& that) BOOST_NOEXCEPT
+ {
+ m_perms = that.m_perms;
+ that.set_default();
+ return *this;
+ }
+#endif
+
+ /*!
+ * Sets permissions from the OS-specific permissions.
+ */
+ void set_native(native_type perms) BOOST_NOEXCEPT
+ {
+ m_perms = perms;
+ }
+
+ /*!
+ * Returns the underlying OS-specific permissions.
+ */
+ native_type get_native() const BOOST_NOEXCEPT
+ {
+ return m_perms;
+ }
+
+ /*!
+ * Sets the default permissions, which are equivalent to \c NULL \c SECURITY_ATTRIBUTES
+ * on Windows and \c 0644 on POSIX platforms.
+ */
+ void set_default() BOOST_NOEXCEPT
+ {
+#if defined(BOOST_WINDOWS)
+ m_perms = 0;
+#else
+ m_perms = 0644;
+#endif
+ }
+
+ /*!
+ * Sets unrestricted permissions, which are equivalent to \c SECURITY_ATTRIBUTES with \c NULL DACL
+ * on Windows and \c 0666 on POSIX platforms.
+ */
+ void set_unrestricted()
+ {
+#if defined(BOOST_WINDOWS)
+ m_perms = get_unrestricted_security_attributes();
+#else
+ m_perms = 0666;
+#endif
+ }
+
+ /*!
+ * The method swaps the object with \a that.
+ *
+ * \param that The other object to swap with.
+ */
+ void swap(permissions& that) BOOST_NOEXCEPT
+ {
+ native_type perms = m_perms;
+ m_perms = that.m_perms;
+ that.m_perms = perms;
+ }
+
+ //! Swaps the two \c permissions objects.
+ friend void swap(permissions& a, permissions& b) BOOST_NOEXCEPT
+ {
+ a.swap(b);
+ }
+
+#if !defined(BOOST_LOG_DOXYGEN_PASS) && defined(BOOST_WINDOWS)
+private:
+ static BOOST_LOG_API native_type get_unrestricted_security_attributes();
+#endif
+};
+
+BOOST_LOG_CLOSE_NAMESPACE // namespace log
+
+} // namespace boost
+
+#include <boost/log/detail/footer.hpp>
+
+#endif // BOOST_LOG_UTILITY_PERMISSIONS_HPP_INCLUDED_
diff --git a/boost/log/utility/record_ordering.hpp b/boost/log/utility/record_ordering.hpp
index f77cd49c43..f9963f62b8 100644
--- a/boost/log/utility/record_ordering.hpp
+++ b/boost/log/utility/record_ordering.hpp
@@ -15,7 +15,7 @@
#ifndef BOOST_LOG_UTILITY_RECORD_ORDERING_HPP_INCLUDED_
#define BOOST_LOG_UTILITY_RECORD_ORDERING_HPP_INCLUDED_
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/function_traits.hpp>
@@ -196,10 +196,10 @@ namespace aux {
//! An ordering predicate constructor that uses SFINAE to disable invalid instantiations
template<
typename FunT,
- typename ArityCheckT = typename enable_if_c< aux::arity_of< FunT >::value == 2 >::type,
+ typename ArityCheckT = typename boost::enable_if_c< aux::arity_of< FunT >::value == 2 >::type,
typename Arg1T = typename aux::first_argument_type_of< FunT >::type,
typename Arg2T = typename aux::second_argument_type_of< FunT >::type,
- typename ArgsCheckT = typename enable_if< is_same< Arg1T, Arg2T > >::type
+ typename ArgsCheckT = typename boost::enable_if_c< is_same< Arg1T, Arg2T >::value >::type
>
struct make_attr_ordering_type
{
diff --git a/boost/log/utility/setup/filter_parser.hpp b/boost/log/utility/setup/filter_parser.hpp
index 854ac72caf..f9aa831caf 100644
--- a/boost/log/utility/setup/filter_parser.hpp
+++ b/boost/log/utility/setup/filter_parser.hpp
@@ -21,7 +21,7 @@
#include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/phoenix/operator/comparison.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/log/detail/setup_config.hpp>
#include <boost/log/detail/code_conversion.hpp>
#include <boost/log/exceptions.hpp>
@@ -242,8 +242,8 @@ BOOST_LOG_SETUP_API void register_filter_factory(
* \param factory The filter factory
*/
template< typename FactoryT >
-inline typename enable_if<
- is_base_and_derived< filter_factory< typename FactoryT::char_type >, FactoryT >
+inline typename boost::enable_if_c<
+ is_base_and_derived< filter_factory< typename FactoryT::char_type >, FactoryT >::value
>::type register_filter_factory(attribute_name const& name, shared_ptr< FactoryT > const& factory)
{
typedef filter_factory< typename FactoryT::char_type > factory_base;
diff --git a/boost/log/utility/setup/formatter_parser.hpp b/boost/log/utility/setup/formatter_parser.hpp
index 8bdc2bca86..250c75c1d2 100644
--- a/boost/log/utility/setup/formatter_parser.hpp
+++ b/boost/log/utility/setup/formatter_parser.hpp
@@ -21,7 +21,7 @@
#include <string>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared_object.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/log/detail/setup_config.hpp>
#include <boost/log/attributes/attribute_name.hpp>
@@ -136,8 +136,8 @@ BOOST_LOG_SETUP_API void register_formatter_factory(
* \param factory Pointer to the formatter factory
*/
template< typename FactoryT >
-inline typename enable_if<
- is_base_and_derived< formatter_factory< typename FactoryT::char_type >, FactoryT >
+inline typename boost::enable_if_c<
+ is_base_and_derived< formatter_factory< typename FactoryT::char_type >, FactoryT >::value
>::type register_formatter_factory(attribute_name const& attr_name, shared_ptr< FactoryT > const& factory)
{
typedef formatter_factory< typename FactoryT::char_type > factory_base;
diff --git a/boost/log/utility/setup/from_settings.hpp b/boost/log/utility/setup/from_settings.hpp
index 27691bf2da..be1c1bc0b6 100644
--- a/boost/log/utility/setup/from_settings.hpp
+++ b/boost/log/utility/setup/from_settings.hpp
@@ -18,7 +18,7 @@
#include <string>
#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/log/detail/setup_config.hpp>
#include <boost/log/sinks/sink.hpp>
@@ -126,8 +126,8 @@ inline void register_sink_factory(std::string const& sink_name, shared_ptr< sink
* \param factory Pointer to the custom sink factory. Must not be NULL.
*/
template< typename FactoryT >
-inline typename enable_if<
- is_base_and_derived< sink_factory< typename FactoryT::char_type >, FactoryT >
+inline typename boost::enable_if_c<
+ is_base_and_derived< sink_factory< typename FactoryT::char_type >, FactoryT >::value
>::type register_sink_factory(const char* sink_name, shared_ptr< FactoryT > const& factory)
{
typedef sink_factory< typename FactoryT::char_type > factory_base;
@@ -147,8 +147,8 @@ inline typename enable_if<
* \param factory Pointer to the custom sink factory. Must not be NULL.
*/
template< typename FactoryT >
-inline typename enable_if<
- is_base_and_derived< sink_factory< typename FactoryT::char_type >, FactoryT >
+inline typename boost::enable_if_c<
+ is_base_and_derived< sink_factory< typename FactoryT::char_type >, FactoryT >::value
>::type register_sink_factory(std::string const& sink_name, shared_ptr< FactoryT > const& factory)
{
typedef sink_factory< typename FactoryT::char_type > factory_base;
diff --git a/boost/log/utility/setup/settings.hpp b/boost/log/utility/setup/settings.hpp
index 67b1f2339e..e63fea1200 100644
--- a/boost/log/utility/setup/settings.hpp
+++ b/boost/log/utility/setup/settings.hpp
@@ -28,7 +28,7 @@
#include <boost/log/detail/native_typeof.hpp>
#include <boost/utility/explicit_operator_bool.hpp>
#if !defined(BOOST_LOG_TYPEOF)
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/enable_if.hpp>
#endif
#if defined(BOOST_LOG_TYPEOF) && defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
#include <boost/utility/declval.hpp>
@@ -254,7 +254,7 @@ private:
}
template< typename T >
- typename enable_if< boost::property_tree::detail::is_character< T >, std::basic_string< T > >::type
+ typename boost::enable_if_c< boost::property_tree::detail::is_character< T >::value, std::basic_string< T > >::type
or_default(const T* def_value) const
{
if (m_section.m_ptree)
diff --git a/boost/log/utility/strictest_lock.hpp b/boost/log/utility/strictest_lock.hpp
index 9735961f92..5dd48b4ffb 100644
--- a/boost/log/utility/strictest_lock.hpp
+++ b/boost/log/utility/strictest_lock.hpp
@@ -79,6 +79,11 @@ struct thread_access_mode_of< lock_guard< MutexT > > : mpl::integral_c< lock_acc
};
template< typename MutexT >
+struct thread_access_mode_of< shared_lock_guard< MutexT > > : mpl::integral_c< lock_access_mode, shared_access >
+{
+};
+
+template< typename MutexT >
struct thread_access_mode_of< unique_lock< MutexT > > : mpl::integral_c< lock_access_mode, exclusive_access >
{
};
diff --git a/boost/log/utility/string_literal.hpp b/boost/log/utility/string_literal.hpp
index 0b737000bf..af5bf3640a 100644
--- a/boost/log/utility/string_literal.hpp
+++ b/boost/log/utility/string_literal.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright Andrey Semashev 2007 - 2015.
+ * Copyright Andrey Semashev 2007 - 2016.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -21,12 +21,11 @@
#include <ios> // std::streamsize
#include <string>
#include <iterator>
-#include <boost/operators.hpp>
#include <boost/throw_exception.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/utility/enable_if.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/utility/string_literal_fwd.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#include <boost/log/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
@@ -50,16 +49,6 @@ BOOST_LOG_OPEN_NAMESPACE
*/
template< typename CharT, typename TraitsT >
class basic_string_literal
- //! \cond
- : public totally_ordered1< basic_string_literal< CharT, TraitsT >,
- totally_ordered2< basic_string_literal< CharT, TraitsT >, const CharT*,
- totally_ordered2<
- basic_string_literal< CharT, TraitsT >,
- std::basic_string< CharT, TraitsT >
- >
- >
- >
- //! \endcond
{
//! Self type
typedef basic_string_literal< CharT, TraitsT > this_type;
@@ -84,8 +73,12 @@ private:
//! Length
size_type m_Len;
- //! Empty string literal to support clear
+ //! Empty string literal to support \c clear
+#if !defined(BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS)
+ static constexpr value_type g_EmptyString[1] = { 0 };
+#else
static const value_type g_EmptyString[1];
+#endif
public:
/*!
@@ -93,7 +86,7 @@ public:
*
* \post <tt>empty() == true</tt>
*/
- basic_string_literal() BOOST_NOEXCEPT { clear(); }
+ BOOST_CONSTEXPR basic_string_literal() BOOST_NOEXCEPT : m_pStart(g_EmptyString), m_Len(0) { }
/*!
* Constructor from a string literal
@@ -102,9 +95,9 @@ public:
* \param p A zero-terminated constant sequence of characters
*/
template< typename T, size_type LenV >
- basic_string_literal(T(&p)[LenV]
+ BOOST_CONSTEXPR basic_string_literal(T(&p)[LenV]
//! \cond
- , typename enable_if< is_same< T, const value_type >, int >::type = 0
+ , typename boost::enable_if_c< is_same< T, const value_type >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()
//! \endcond
) BOOST_NOEXCEPT
: m_pStart(p), m_Len(LenV - 1)
@@ -117,7 +110,7 @@ public:
* \post <tt>*this == that</tt>
* \param that Source literal to copy string from
*/
- basic_string_literal(basic_string_literal const& that) BOOST_NOEXCEPT : m_pStart(that.m_pStart), m_Len(that.m_Len) {}
+ BOOST_CONSTEXPR basic_string_literal(basic_string_literal const& that) BOOST_NOEXCEPT : m_pStart(that.m_pStart), m_Len(that.m_Len) {}
/*!
* Assignment operator
@@ -125,7 +118,7 @@ public:
* \post <tt>*this == that</tt>
* \param that Source literal to copy string from
*/
- this_type& operator= (this_type const& that) BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR this_type& operator= (this_type const& that) BOOST_NOEXCEPT
{
return assign(that);
}
@@ -136,9 +129,10 @@ public:
* \param p A zero-terminated constant sequence of characters
*/
template< typename T, size_type LenV >
+ BOOST_CXX14_CONSTEXPR
#ifndef BOOST_LOG_DOXYGEN_PASS
- typename enable_if<
- is_same< T, const value_type >,
+ typename boost::enable_if_c<
+ is_same< T, const value_type >::value,
this_type&
>::type
#else
@@ -175,12 +169,43 @@ public:
* \param that Comparand
* \return \c true if the comparand string equals to this string, \c false otherwise
*/
- bool operator== (string_type const& that) const
+ bool operator== (string_type const& that) const BOOST_NOEXCEPT
{
return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) == 0);
}
/*!
+ * Lexicographical comparison (inequality)
+ *
+ * \param that Comparand
+ * \return \c true if the comparand string is not equal to this string, \c false otherwise
+ */
+ bool operator!= (this_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.m_pStart, that.m_Len) != 0);
+ }
+ /*!
+ * Lexicographical comparison (inequality)
+ *
+ * \param str Comparand. Must point to a zero-terminated sequence of characters, must not be NULL.
+ * \return \c true if the comparand string is not equal to this string, \c false otherwise
+ */
+ bool operator!= (const_pointer str) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, str, traits_type::length(str)) != 0);
+ }
+ /*!
+ * Lexicographical comparison (inequality)
+ *
+ * \param that Comparand
+ * \return \c true if the comparand string is not equal to this string, \c false otherwise
+ */
+ bool operator!= (string_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) != 0);
+ }
+
+ /*!
* Lexicographical comparison (less ordering)
*
* \param that Comparand
@@ -206,12 +231,43 @@ public:
* \param that Comparand
* \return \c true if this string is less than the comparand, \c false otherwise
*/
- bool operator< (string_type const& that) const
+ bool operator< (string_type const& that) const BOOST_NOEXCEPT
{
return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) < 0);
}
/*!
+ * Lexicographical comparison (less or equal ordering)
+ *
+ * \param that Comparand
+ * \return \c true if this string is less or equal to the comparand, \c false otherwise
+ */
+ bool operator<= (this_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.m_pStart, that.m_Len) <= 0);
+ }
+ /*!
+ * Lexicographical comparison (less or equal ordering)
+ *
+ * \param str Comparand. Must point to a zero-terminated sequence of characters, must not be NULL.
+ * \return \c true if this string is less or equal to the comparand, \c false otherwise
+ */
+ bool operator<= (const_pointer str) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, str, traits_type::length(str)) <= 0);
+ }
+ /*!
+ * Lexicographical comparison (less or equal ordering)
+ *
+ * \param that Comparand
+ * \return \c true if this string is less or equal to the comparand, \c false otherwise
+ */
+ bool operator<= (string_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) <= 0);
+ }
+
+ /*!
* Lexicographical comparison (greater ordering)
*
* \param that Comparand
@@ -237,19 +293,50 @@ public:
* \param that Comparand
* \return \c true if this string is greater than the comparand, \c false otherwise
*/
- bool operator> (string_type const& that) const
+ bool operator> (string_type const& that) const BOOST_NOEXCEPT
{
return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) > 0);
}
/*!
+ * Lexicographical comparison (greater or equal ordering)
+ *
+ * \param that Comparand
+ * \return \c true if this string is greater or equal to the comparand, \c false otherwise
+ */
+ bool operator>= (this_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.m_pStart, that.m_Len) >= 0);
+ }
+ /*!
+ * Lexicographical comparison (greater or qual ordering)
+ *
+ * \param str Comparand. Must point to a zero-terminated sequence of characters, must not be NULL.
+ * \return \c true if this string is greater or equal to the comparand, \c false otherwise
+ */
+ bool operator>= (const_pointer str) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, str, traits_type::length(str)) >= 0);
+ }
+ /*!
+ * Lexicographical comparison (greater or equal ordering)
+ *
+ * \param that Comparand
+ * \return \c true if this string is greater or equal to the comparand, \c false otherwise
+ */
+ bool operator>= (string_type const& that) const BOOST_NOEXCEPT
+ {
+ return (compare_internal(m_pStart, m_Len, that.c_str(), that.size()) >= 0);
+ }
+
+ /*!
* Subscript operator
*
* \pre <tt>i < size()</tt>
* \param i Requested character index
* \return Constant reference to the requested character
*/
- const_reference operator[] (size_type i) const BOOST_NOEXCEPT
+ BOOST_CONSTEXPR const_reference operator[] (size_type i) const BOOST_NOEXCEPT
{
return m_pStart[i];
}
@@ -263,7 +350,7 @@ public:
*/
const_reference at(size_type i) const
{
- if (i >= m_Len)
+ if (BOOST_UNLIKELY(i >= m_Len))
BOOST_THROW_EXCEPTION(std::out_of_range("basic_string_literal::at: the index value is out of range"));
return m_pStart[i];
}
@@ -271,24 +358,24 @@ public:
/*!
* \return Pointer to the beginning of the literal
*/
- const_pointer c_str() const BOOST_NOEXCEPT { return m_pStart; }
+ BOOST_CONSTEXPR const_pointer c_str() const BOOST_NOEXCEPT { return m_pStart; }
/*!
* \return Pointer to the beginning of the literal
*/
- const_pointer data() const BOOST_NOEXCEPT { return m_pStart; }
+ BOOST_CONSTEXPR const_pointer data() const BOOST_NOEXCEPT { return m_pStart; }
/*!
* \return Length of the literal
*/
- size_type size() const BOOST_NOEXCEPT { return m_Len; }
+ BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return m_Len; }
/*!
* \return Length of the literal
*/
- size_type length() const BOOST_NOEXCEPT { return m_Len; }
+ BOOST_CONSTEXPR size_type length() const BOOST_NOEXCEPT { return m_Len; }
/*!
* \return \c true if the literal is an empty string, \c false otherwise
*/
- bool empty() const BOOST_NOEXCEPT
+ BOOST_CONSTEXPR bool empty() const BOOST_NOEXCEPT
{
return (m_Len == 0);
}
@@ -296,11 +383,11 @@ public:
/*!
* \return Iterator that points to the first character of the literal
*/
- const_iterator begin() const BOOST_NOEXCEPT { return m_pStart; }
+ BOOST_CONSTEXPR const_iterator begin() const BOOST_NOEXCEPT { return m_pStart; }
/*!
* \return Iterator that points after the last character of the literal
*/
- const_iterator end() const BOOST_NOEXCEPT { return m_pStart + m_Len; }
+ BOOST_CONSTEXPR const_iterator end() const BOOST_NOEXCEPT { return m_pStart + m_Len; }
/*!
* \return Reverse iterator that points to the last character of the literal
*/
@@ -323,7 +410,7 @@ public:
*
* \post <tt>empty() == true</tt>
*/
- void clear() BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR void clear() BOOST_NOEXCEPT
{
m_pStart = g_EmptyString;
m_Len = 0;
@@ -331,7 +418,7 @@ public:
/*!
* The method swaps two literals
*/
- void swap(this_type& that) BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR void swap(this_type& that) BOOST_NOEXCEPT
{
const_pointer p = m_pStart;
m_pStart = that.m_pStart;
@@ -348,7 +435,7 @@ public:
* \post <tt>*this == that</tt>
* \param that Source literal to copy string from
*/
- this_type& assign(this_type const& that) BOOST_NOEXCEPT
+ BOOST_CXX14_CONSTEXPR this_type& assign(this_type const& that) BOOST_NOEXCEPT
{
m_pStart = that.m_pStart;
m_Len = that.m_Len;
@@ -361,9 +448,10 @@ public:
* \param p A zero-terminated constant sequence of characters
*/
template< typename T, size_type LenV >
+ BOOST_CXX14_CONSTEXPR
#ifndef BOOST_LOG_DOXYGEN_PASS
- typename enable_if<
- is_same< T, const value_type >,
+ typename boost::enable_if_c<
+ is_same< T, const value_type >::value,
this_type&
>::type
#else
@@ -390,7 +478,7 @@ public:
*/
size_type copy(value_type* str, size_type n, size_type pos = 0) const
{
- if (pos > m_Len)
+ if (BOOST_UNLIKELY(pos > m_Len))
BOOST_THROW_EXCEPTION(std::out_of_range("basic_string_literal::copy: the position is out of range"));
size_type len = m_Len - pos;
@@ -415,7 +503,7 @@ public:
*/
int compare(size_type pos, size_type n, const_pointer str, size_type len) const
{
- if (pos > m_Len)
+ if (BOOST_UNLIKELY(pos > m_Len))
BOOST_THROW_EXCEPTION(std::out_of_range("basic_string_literal::compare: the position is out of range"));
size_type compare_size = m_Len - pos;
@@ -508,9 +596,15 @@ private:
#endif // BOOST_LOG_DOXYGEN_PASS
};
+#if !defined(BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS)
template< typename CharT, typename TraitsT >
-typename basic_string_literal< CharT, TraitsT >::value_type const
+constexpr typename basic_string_literal< CharT, TraitsT >::value_type
+basic_string_literal< CharT, TraitsT >::g_EmptyString[1];
+#else
+template< typename CharT, typename TraitsT >
+const typename basic_string_literal< CharT, TraitsT >::value_type
basic_string_literal< CharT, TraitsT >::g_EmptyString[1] = { 0 };
+#endif
namespace aux {
@@ -569,7 +663,7 @@ inline std::basic_ostream< CharT, StrmTraitsT >& operator<< (
//! External swap
template< typename CharT, typename TraitsT >
-inline void swap(basic_string_literal< CharT, TraitsT >& left, basic_string_literal< CharT, TraitsT >& right) BOOST_NOEXCEPT
+inline BOOST_CXX14_CONSTEXPR void swap(basic_string_literal< CharT, TraitsT >& left, basic_string_literal< CharT, TraitsT >& right) BOOST_NOEXCEPT
{
left.swap(right);
}
@@ -577,16 +671,16 @@ inline void swap(basic_string_literal< CharT, TraitsT >& left, basic_string_lite
//! Creates a string literal wrapper from a constant string literal
#ifdef BOOST_LOG_USE_CHAR
template< typename T, std::size_t LenV >
-inline
+inline BOOST_CONSTEXPR
#ifndef BOOST_LOG_DOXYGEN_PASS
-typename enable_if<
- is_same< T, const char >,
+typename boost::enable_if_c<
+ is_same< T, const char >::value,
string_literal
>::type
#else
basic_string_literal< T >
#endif // BOOST_LOG_DOXYGEN_PASS
-str_literal(T(&p)[LenV])
+str_literal(T(&p)[LenV]) BOOST_NOEXCEPT
{
return string_literal(p);
}
@@ -596,11 +690,11 @@ str_literal(T(&p)[LenV])
#ifdef BOOST_LOG_USE_WCHAR_T
template< typename T, std::size_t LenV >
-inline typename enable_if<
- is_same< T, const wchar_t >,
+inline BOOST_CONSTEXPR typename boost::enable_if_c<
+ is_same< T, const wchar_t >::value,
wstring_literal
>::type
-str_literal(T(&p)[LenV])
+str_literal(T(&p)[LenV]) BOOST_NOEXCEPT
{
return wstring_literal(p);
}
diff --git a/boost/log/utility/type_dispatch/static_type_dispatcher.hpp b/boost/log/utility/type_dispatch/static_type_dispatcher.hpp
index c580213d66..dcf2cd033d 100644
--- a/boost/log/utility/type_dispatch/static_type_dispatcher.hpp
+++ b/boost/log/utility/type_dispatch/static_type_dispatcher.hpp
@@ -29,7 +29,7 @@
#include <boost/mpl/deref.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/is_sequence.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/utility/once_block.hpp>
#include <boost/log/utility/type_dispatch/type_dispatcher.hpp>
diff --git a/boost/log/utility/value_ref.hpp b/boost/log/utility/value_ref.hpp
index 438f5db68b..1f9a360785 100644
--- a/boost/log/utility/value_ref.hpp
+++ b/boost/log/utility/value_ref.hpp
@@ -29,15 +29,14 @@
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/contains.hpp>
#include <boost/mpl/index_of.hpp>
-#include <boost/utility/addressof.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/core/explicit_operator_bool.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/optional/optional_fwd.hpp>
-#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_void.hpp>
#include <boost/log/detail/config.hpp>
#include <boost/log/detail/parameter_tools.hpp>
#include <boost/log/detail/value_ref_visitation.hpp>
-#include <boost/utility/explicit_operator_bool.hpp>
+#include <boost/log/detail/sfinae_tools.hpp>
#include <boost/log/utility/formatting_ostream_fwd.hpp>
#include <boost/log/utility/functional/logical.hpp>
#include <boost/log/utility/functional/bind.hpp>
@@ -78,6 +77,21 @@ private:
result_type m_def_val;
};
+//! Traits for testing type compatibility with the reference wrapper
+struct singular_ref_compatibility_traits
+{
+ template< typename T, typename U >
+ struct is_compatible
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+ template< typename T >
+ struct is_compatible< T, T >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+};
+
//! Attribute value reference implementation for a single type case
template< typename T, typename TagT >
class singular_ref
@@ -89,17 +103,8 @@ public:
typedef TagT tag_type;
protected:
- //! The metafunction tests if the type is compatible with the reference wrapper
-#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- template< typename U >
- using is_compatible = is_same< U, value_type >;
-#else
- template< typename U >
- struct is_compatible :
- public is_same< U, value_type >
- {
- };
-#endif
+ //! Traits for testing type compatibility with the reference wrapper
+ typedef singular_ref_compatibility_traits compatibility_traits;
protected:
//! Pointer to the value
@@ -132,7 +137,7 @@ public:
//! Returns a pointer to the referred value
template< typename U >
- typename enable_if< is_compatible< U >, const U* >::type get_ptr() const BOOST_NOEXCEPT
+ typename boost::enable_if_c< compatibility_traits::is_compatible< value_type, U >::value, const U* >::type get_ptr() const BOOST_NOEXCEPT
{
return m_ptr;
}
@@ -153,7 +158,7 @@ public:
//! Returns a reference to the value
template< typename U >
- typename enable_if< is_compatible< U >, U const& >::type get() const BOOST_NOEXCEPT
+ typename boost::enable_if_c< compatibility_traits::is_compatible< value_type, U >::value, U const& >::type get() const BOOST_NOEXCEPT
{
BOOST_ASSERT(m_ptr != NULL);
return *m_ptr;
@@ -190,7 +195,7 @@ public:
//! Applies a visitor function object to the referred value
template< typename VisitorT >
- typename enable_if< is_void< typename VisitorT::result_type >, bool >::type apply_visitor_optional(VisitorT visitor) const
+ typename boost::enable_if_c< is_void< typename VisitorT::result_type >::value, bool >::type apply_visitor_optional(VisitorT visitor) const
{
if (m_ptr)
{
@@ -203,7 +208,7 @@ public:
//! Applies a visitor function object to the referred value
template< typename VisitorT >
- typename disable_if< is_void< typename VisitorT::result_type >, optional< typename VisitorT::result_type > >::type apply_visitor_optional(VisitorT visitor) const
+ typename boost::disable_if_c< is_void< typename VisitorT::result_type >::value, optional< typename VisitorT::result_type > >::type apply_visitor_optional(VisitorT visitor) const
{
typedef optional< typename VisitorT::result_type > result_type;
if (m_ptr)
@@ -233,6 +238,16 @@ public:
}
};
+//! Traits for testing type compatibility with the reference wrapper
+struct variant_ref_compatibility_traits
+{
+ template< typename T, typename U >
+ struct is_compatible
+ {
+ BOOST_STATIC_CONSTANT(bool, value = (mpl::contains< T, U >::type::value));
+ };
+};
+
//! Attribute value reference implementation for multiple types case
template< typename T, typename TagT >
class variant_ref
@@ -244,17 +259,8 @@ public:
typedef TagT tag_type;
protected:
- //! The metafunction tests if the type is compatible with the reference wrapper
-#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- template< typename U >
- using is_compatible = mpl::contains< value_type, U >;
-#else
- template< typename U >
- struct is_compatible :
- public mpl::contains< value_type, U >
- {
- };
-#endif
+ //! Traits for testing type compatibility with the reference wrapper
+ typedef variant_ref_compatibility_traits compatibility_traits;
protected:
//! Pointer to the value
@@ -284,7 +290,7 @@ public:
//! Returns a pointer to the referred value
template< typename U >
- typename enable_if< is_compatible< U >, const U* >::type get_ptr() const BOOST_NOEXCEPT
+ typename boost::enable_if_c< compatibility_traits::is_compatible< value_type, U >::value, const U* >::type get_ptr() const BOOST_NOEXCEPT
{
if (m_type_idx == static_cast< unsigned int >(mpl::index_of< value_type, U >::type::value))
return static_cast< const U* >(m_ptr);
@@ -294,7 +300,7 @@ public:
//! Returns a reference to the value
template< typename U >
- typename enable_if< is_compatible< U >, U const& >::type get() const BOOST_NOEXCEPT
+ typename boost::enable_if_c< compatibility_traits::is_compatible< value_type, U >::value, U const& >::type get() const BOOST_NOEXCEPT
{
const U* const p = get_ptr< U >();
BOOST_ASSERT(p != NULL);
@@ -328,7 +334,7 @@ public:
//! Applies a visitor function object to the referred value
template< typename VisitorT >
- typename enable_if< is_void< typename VisitorT::result_type >, bool >::type apply_visitor_optional(VisitorT visitor) const
+ typename boost::enable_if_c< is_void< typename VisitorT::result_type >::value, bool >::type apply_visitor_optional(VisitorT visitor) const
{
if (m_ptr)
{
@@ -341,7 +347,7 @@ public:
//! Applies a visitor function object to the referred value
template< typename VisitorT >
- typename disable_if< is_void< typename VisitorT::result_type >, optional< typename VisitorT::result_type > >::type apply_visitor_optional(VisitorT visitor) const
+ typename boost::disable_if_c< is_void< typename VisitorT::result_type >::value, optional< typename VisitorT::result_type > >::type apply_visitor_optional(VisitorT visitor) const
{
typedef optional< typename VisitorT::result_type > result_type;
if (m_ptr)
@@ -423,6 +429,19 @@ public:
private:
//! Base implementation type
typedef typename aux::value_ref_base< T, TagT >::type base_type;
+ //! Traits for testing type compatibility with the reference wrapper
+ typedef typename base_type::compatibility_traits compatibility_traits;
+
+public:
+#ifndef BOOST_LOG_DOXYGEN_PASS
+ //! Referenced value type
+ typedef typename base_type::value_type value_type;
+#else
+ //! Referenced value type
+ typedef T value_type;
+ //! Tag type
+ typedef TagT tag_type;
+#endif
public:
/*!
@@ -439,7 +458,14 @@ public:
* Initializing constructor. Creates a reference wrapper that refers to the specified value.
*/
template< typename U >
- explicit value_ref(U const& val, typename enable_if< typename base_type::BOOST_NESTED_TEMPLATE is_compatible< U >, int >::type = 0) BOOST_NOEXCEPT :
+ explicit value_ref(U const& val
+#ifndef BOOST_LOG_DOXYGEN_PASS
+// MSVC-8 can't handle SFINAE in this case properly and often wrongly disables this constructor
+#if !defined(_MSC_VER) || (_MSC_VER + 0) >= 1500
+ , typename boost::enable_if_c< compatibility_traits::BOOST_NESTED_TEMPLATE is_compatible< value_type, U >::value, boost::log::aux::sfinae_dummy >::type = boost::log::aux::sfinae_dummy()
+#endif
+#endif
+ ) BOOST_NOEXCEPT :
base_type(boost::addressof(val))
{
}
diff --git a/boost/math/common_factor_rt.hpp b/boost/math/common_factor_rt.hpp
index 10a92ebf56..42320b62c2 100644
--- a/boost/math/common_factor_rt.hpp
+++ b/boost/math/common_factor_rt.hpp
@@ -1,455 +1,423 @@
-// Boost common_factor_rt.hpp header file ----------------------------------//
+// (C) Copyright Jeremy William Murphy 2016.
-// (C) Copyright Daryle Walker and Paul Moore 2001-2002. Permission to copy,
-// use, modify, sell and distribute this software is granted provided this
-// copyright notice appears in all copies. This software is provided "as is"
-// without express or implied warranty, and with no claim as to its suitability
-// for any purpose.
-
-// boostinspect:nolicense (don't complain about the lack of a Boost license)
-// (Paul Moore hasn't been in contact for years, so there's no way to change the
-// license.)
-
-// See http://www.boost.org for updates, documentation, and revision history.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MATH_COMMON_FACTOR_RT_HPP
#define BOOST_MATH_COMMON_FACTOR_RT_HPP
-#include <boost/math_fwd.hpp> // self include
+#include <boost/assert.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits.hpp>
#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
#include <boost/limits.hpp> // for std::numeric_limits
#include <climits> // for CHAR_MIN
#include <boost/detail/workaround.hpp>
+#include <iterator>
+#include <algorithm>
+#include <limits>
+
+#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#include <intrin.h>
+#endif
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127 4244) // Conditional expression is constant
#endif
-namespace boost
-{
-namespace math
-{
-
-
-// Forward declarations for function templates -----------------------------//
-
-template < typename IntegerType >
- IntegerType gcd( IntegerType const &a, IntegerType const &b );
-
-template < typename IntegerType >
- IntegerType lcm( IntegerType const &a, IntegerType const &b );
-
-
-// Greatest common divisor evaluator class declaration ---------------------//
-
-template < typename IntegerType >
-class gcd_evaluator
-{
-public:
- // Types
- typedef IntegerType result_type, first_argument_type, second_argument_type;
-
- // Function object interface
- result_type operator ()( first_argument_type const &a,
- second_argument_type const &b ) const;
-
-}; // boost::math::gcd_evaluator
-
-
-// Least common multiple evaluator class declaration -----------------------//
-
-template < typename IntegerType >
-class lcm_evaluator
-{
-public:
- // Types
- typedef IntegerType result_type, first_argument_type, second_argument_type;
-
- // Function object interface
- result_type operator ()( first_argument_type const &a,
- second_argument_type const &b ) const;
-
-}; // boost::math::lcm_evaluator
-
+namespace boost {
+ namespace math {
+
+ template <class T, bool a = is_unsigned<T>::value || (std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_signed)>
+ struct gcd_traits_abs_defaults
+ {
+ inline static const T& abs(const T& val) { return val; }
+ };
+ template <class T>
+ struct gcd_traits_abs_defaults<T, false>
+ {
+ inline static T abs(const T& val)
+ {
+ using std::abs;
+ return abs(val);
+ }
+ };
+
+ template <class T>
+ struct gcd_traits_defaults : public gcd_traits_abs_defaults<T>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(T& val)
+ {
+ unsigned r = 0;
+ while(!(val & 1u))
+ {
+ val >>= 1;
+ ++r;
+ }
+ return r;
+ }
+ inline static bool less(const T& a, const T& b)
+ {
+ return a < b;
+ }
+
+ enum method_type
+ {
+ method_euclid = 0,
+ method_binary = 1,
+ method_mixed = 2,
+ };
+
+ static const method_type method =
+ boost::has_right_shift_assign<T>::value && boost::has_left_shift_assign<T>::value && boost::has_less<T>::value && boost::has_modulus<T>::value
+ ? method_mixed :
+ boost::has_right_shift_assign<T>::value && boost::has_left_shift_assign<T>::value && boost::has_less<T>::value
+ ? method_binary : method_euclid;
+ };
+ //
+ // Default gcd_traits just inherits from defaults:
+ //
+ template <class T>
+ struct gcd_traits : public gcd_traits_defaults<T> {};
+ //
+ // Special handling for polynomials:
+ //
+ namespace tools {
+ template <class T>
+ class polynomial;
+ }
+
+ template <class T>
+ struct gcd_traits<boost::math::tools::polynomial<T> > : public gcd_traits_defaults<T>
+ {
+ static const boost::math::tools::polynomial<T>& abs(const boost::math::tools::polynomial<T>& val) { return val; }
+ };
+ //
+ // Some platforms have fast bitscan operations, that allow us to implement
+ // make_odd much more efficiently:
+ //
+#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#pragma intrinsic(_BitScanForward,)
+ template <>
+ struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned long val)
+ {
+ unsigned long result;
+ _BitScanForward(&result, val);
+ return result;
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned long& val)
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+
+#ifdef _M_X64
+#pragma intrinsic(_BitScanForward64)
+ template <>
+ struct gcd_traits<unsigned __int64> : public gcd_traits_defaults<unsigned __int64>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned __int64 mask)
+ {
+ unsigned long result;
+ _BitScanForward64(&result, mask);
+ return result;
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned __int64& val)
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+#endif
+ //
+ // Other integer type are trivial adaptations of the above,
+ // this works for signed types too, as by the time these functions
+ // are called, all values are > 0.
+ //
+ template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
+ { BOOST_FORCEINLINE static unsigned make_odd(long& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned int> : public gcd_traits_defaults<unsigned int>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned int& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
+ { BOOST_FORCEINLINE static unsigned make_odd(int& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned short& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
+ { BOOST_FORCEINLINE static unsigned make_odd(short& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned char& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
+ { BOOST_FORCEINLINE static signed make_odd(signed char& val){ signed result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
+ { BOOST_FORCEINLINE static unsigned make_odd(char& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
+ { BOOST_FORCEINLINE static unsigned make_odd(wchar_t& val){ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+#ifdef _M_X64
+ template <> struct gcd_traits<__int64> : public gcd_traits_defaults<__int64>
+ { BOOST_FORCEINLINE static unsigned make_odd(__int64& val){ unsigned result = gcd_traits<unsigned __int64>::find_lsb(val); val >>= result; return result; } };
+#endif
-// Implementation details --------------------------------------------------//
+#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
+
+ template <>
+ struct gcd_traits<unsigned> : public gcd_traits_defaults<unsigned>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned mask)
+ {
+ return __builtin_ctz(mask);
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned& val)
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ template <>
+ struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned long mask)
+ {
+ return __builtin_ctzl(mask);
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned long& val)
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ template <>
+ struct gcd_traits<boost::ulong_long_type> : public gcd_traits_defaults<boost::ulong_long_type>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(boost::ulong_long_type mask)
+ {
+ return __builtin_ctzll(mask);
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(boost::ulong_long_type& val)
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ //
+ // Other integer type are trivial adaptations of the above,
+ // this works for signed types too, as by the time these functions
+ // are called, all values are > 0.
+ //
+ template <> struct gcd_traits<boost::long_long_type> : public gcd_traits_defaults<boost::long_long_type>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(boost::long_long_type& val) { unsigned result = gcd_traits<boost::ulong_long_type>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(long& val) { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(int& val) { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned short& val) { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(short& val) { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned char& val) { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
+ {
+ BOOST_FORCEINLINE static signed make_odd(signed char& val) { signed result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(char& val) { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
+ {
+ BOOST_FORCEINLINE static unsigned make_odd(wchar_t& val) { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+#endif
namespace detail
{
- // Greatest common divisor for rings (including unsigned integers)
- template < typename RingType >
- RingType
- gcd_euclidean
- (
- RingType a,
- RingType b
- )
+
+ //
+ // The Mixed Binary Euclid Algorithm
+ // Sidi Mohamed Sedjelmaci
+ // Electronic Notes in Discrete Mathematics 35 (2009) 169–176
+ //
+ template <class T>
+ T mixed_binary_gcd(T u, T v)
+ {
+ using std::swap;
+ if(gcd_traits<T>::less(u, v))
+ swap(u, v);
+
+ unsigned shifts = 0;
+
+ if(!u)
+ return v;
+ if(!v)
+ return u;
+
+ shifts = std::min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
+
+ while(gcd_traits<T>::less(1, v))
+ {
+ u %= v;
+ v -= u;
+ if(!u)
+ return v << shifts;
+ if(!v)
+ return u << shifts;
+ gcd_traits<T>::make_odd(u);
+ gcd_traits<T>::make_odd(v);
+ if(gcd_traits<T>::less(u, v))
+ swap(u, v);
+ }
+ return (v == 1 ? v : u) << shifts;
+ }
+
+ /** Stein gcd (aka 'binary gcd')
+ *
+ * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
+ */
+ template <typename SteinDomain>
+ SteinDomain Stein_gcd(SteinDomain m, SteinDomain n)
{
- // Avoid repeated construction
- #ifndef __BORLANDC__
- RingType const zero = static_cast<RingType>( 0 );
- #else
- RingType zero = static_cast<RingType>( 0 );
- #endif
-
- // Reduce by GCD-remainder property [GCD(a,b) == GCD(b,a MOD b)]
- while ( true )
+ using std::swap;
+ BOOST_ASSERT(m >= 0);
+ BOOST_ASSERT(n >= 0);
+ if (m == SteinDomain(0))
+ return n;
+ if (n == SteinDomain(0))
+ return m;
+ // m > 0 && n > 0
+ int d_m = gcd_traits<SteinDomain>::make_odd(m);
+ int d_n = gcd_traits<SteinDomain>::make_odd(n);
+ // odd(m) && odd(n)
+ while (m != n)
{
- if ( a == zero )
- return b;
- b %= a;
-
- if ( b == zero )
- return a;
- a %= b;
+ if (n > m)
+ swap(n, m);
+ m -= n;
+ gcd_traits<SteinDomain>::make_odd(m);
}
+ // m == n
+ m <<= std::min(d_m, d_n);
+ return m;
}
- // Greatest common divisor for (signed) integers
- template < typename IntegerType >
- inline
- IntegerType
- gcd_integer
- (
- IntegerType const & a,
- IntegerType const & b
- )
+
+ /** Euclidean algorithm
+ *
+ * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
+ *
+ */
+ template <typename EuclideanDomain>
+ inline EuclideanDomain Euclid_gcd(EuclideanDomain a, EuclideanDomain b)
{
- // Avoid repeated construction
- IntegerType const zero = static_cast<IntegerType>( 0 );
- IntegerType const result = gcd_euclidean( a, b );
-
- return ( result < zero ) ? static_cast<IntegerType>(-result) : result;
- }
-
- // Greatest common divisor for unsigned binary integers
- template < typename BuiltInUnsigned >
- BuiltInUnsigned
- gcd_binary
- (
- BuiltInUnsigned u,
- BuiltInUnsigned v
- )
- {
- if ( u && v )
- {
- // Shift out common factors of 2
- unsigned shifts = 0;
-
- while ( !(u & 1u) && !(v & 1u) )
- {
- ++shifts;
- u >>= 1;
- v >>= 1;
- }
-
- // Start with the still-even one, if any
- BuiltInUnsigned r[] = { u, v };
- unsigned which = static_cast<bool>( u & 1u );
-
- // Whittle down the values via their differences
- do
- {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- while ( !(r[ which ] & 1u) )
- {
- r[ which ] = (r[which] >> 1);
- }
-#else
- // Remove factors of two from the even one
- while ( !(r[ which ] & 1u) )
- {
- r[ which ] >>= 1;
- }
-#endif
-
- // Replace the larger of the two with their difference
- if ( r[!which] > r[which] )
- {
- which ^= 1u;
- }
-
- r[ which ] -= r[ !which ];
- }
- while ( r[which] );
-
- // Shift-in the common factor of 2 to the residues' GCD
- return r[ !which ] << shifts;
- }
- else
+ using std::swap;
+ while (b != EuclideanDomain(0))
{
- // At least one input is zero, return the other
- // (adding since zero is the additive identity)
- // or zero if both are zero.
- return u + v;
+ a %= b;
+ swap(a, b);
}
+ return a;
}
- // Least common multiple for rings (including unsigned integers)
- template < typename RingType >
- inline
- RingType
- lcm_euclidean
- (
- RingType const & a,
- RingType const & b
- )
- {
- RingType const zero = static_cast<RingType>( 0 );
- RingType const temp = gcd_euclidean( a, b );
-
- return ( temp != zero ) ? ( a / temp * b ) : zero;
- }
- // Least common multiple for (signed) integers
- template < typename IntegerType >
- inline
- IntegerType
- lcm_integer
- (
- IntegerType const & a,
- IntegerType const & b
- )
+ template <typename T>
+ inline BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == gcd_traits<T>::method_mixed, T>::type
+ optimal_gcd_select(T const &a, T const &b)
{
- // Avoid repeated construction
- IntegerType const zero = static_cast<IntegerType>( 0 );
- IntegerType const result = lcm_euclidean( a, b );
-
- return ( result < zero ) ? static_cast<IntegerType>(-result) : result;
+ return detail::mixed_binary_gcd(a, b);
}
- // Function objects to find the best way of computing GCD or LCM
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- template < typename T, bool IsSpecialized, bool IsSigned >
- struct gcd_optimal_evaluator_helper_t
- {
- T operator ()( T const &a, T const &b )
- {
- return gcd_euclidean( a, b );
- }
- };
-
- template < typename T >
- struct gcd_optimal_evaluator_helper_t< T, true, true >
- {
- T operator ()( T const &a, T const &b )
- {
- return gcd_integer( a, b );
- }
- };
-
- template < typename T >
- struct gcd_optimal_evaluator
+ template <typename T>
+ inline BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == gcd_traits<T>::method_binary, T>::type
+ optimal_gcd_select(T const &a, T const &b)
{
- T operator ()( T const &a, T const &b )
- {
- typedef ::std::numeric_limits<T> limits_type;
-
- typedef gcd_optimal_evaluator_helper_t<T,
- limits_type::is_specialized, limits_type::is_signed> helper_type;
-
- helper_type solver;
-
- return solver( a, b );
- }
- };
-#else // BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- template < typename T >
- struct gcd_optimal_evaluator
- {
- T operator ()( T const &a, T const &b )
- {
- return gcd_integer( a, b );
- }
- };
-#endif
-
- // Specialize for the built-in integers
-#define BOOST_PRIVATE_GCD_UF( Ut ) \
- template < > struct gcd_optimal_evaluator<Ut> \
- { Ut operator ()( Ut a, Ut b ) const { return gcd_binary( a, b ); } }
-
- BOOST_PRIVATE_GCD_UF( unsigned char );
- BOOST_PRIVATE_GCD_UF( unsigned short );
- BOOST_PRIVATE_GCD_UF( unsigned );
- BOOST_PRIVATE_GCD_UF( unsigned long );
-
-#ifdef BOOST_HAS_LONG_LONG
- BOOST_PRIVATE_GCD_UF( boost::ulong_long_type );
-#elif defined(BOOST_HAS_MS_INT64)
- BOOST_PRIVATE_GCD_UF( unsigned __int64 );
-#endif
-
-#if CHAR_MIN == 0
- BOOST_PRIVATE_GCD_UF( char ); // char is unsigned
-#endif
-
-#undef BOOST_PRIVATE_GCD_UF
-
-#define BOOST_PRIVATE_GCD_SF( St, Ut ) \
- template < > struct gcd_optimal_evaluator<St> \
- { St operator ()( St a, St b ) const { Ut const a_abs = \
- static_cast<Ut>( a < 0 ? -a : +a ), b_abs = static_cast<Ut>( \
- b < 0 ? -b : +b ); return static_cast<St>( \
- gcd_optimal_evaluator<Ut>()(a_abs, b_abs) ); } }
-
- BOOST_PRIVATE_GCD_SF( signed char, unsigned char );
- BOOST_PRIVATE_GCD_SF( short, unsigned short );
- BOOST_PRIVATE_GCD_SF( int, unsigned );
- BOOST_PRIVATE_GCD_SF( long, unsigned long );
-
-#if CHAR_MIN < 0
- BOOST_PRIVATE_GCD_SF( char, unsigned char ); // char is signed
-#endif
-
-#ifdef BOOST_HAS_LONG_LONG
- BOOST_PRIVATE_GCD_SF( boost::long_long_type, boost::ulong_long_type );
-#elif defined(BOOST_HAS_MS_INT64)
- BOOST_PRIVATE_GCD_SF( __int64, unsigned __int64 );
-#endif
-
-#undef BOOST_PRIVATE_GCD_SF
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- template < typename T, bool IsSpecialized, bool IsSigned >
- struct lcm_optimal_evaluator_helper_t
- {
- T operator ()( T const &a, T const &b )
- {
- return lcm_euclidean( a, b );
- }
- };
-
- template < typename T >
- struct lcm_optimal_evaluator_helper_t< T, true, true >
- {
- T operator ()( T const &a, T const &b )
- {
- return lcm_integer( a, b );
- }
- };
-
- template < typename T >
- struct lcm_optimal_evaluator
- {
- T operator ()( T const &a, T const &b )
- {
- typedef ::std::numeric_limits<T> limits_type;
-
- typedef lcm_optimal_evaluator_helper_t<T,
- limits_type::is_specialized, limits_type::is_signed> helper_type;
-
- helper_type solver;
-
- return solver( a, b );
- }
- };
-#else // BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- template < typename T >
- struct lcm_optimal_evaluator
- {
- T operator ()( T const &a, T const &b )
- {
- return lcm_integer( a, b );
- }
- };
-#endif
+ return detail::Stein_gcd(a, b);
+ }
- // Functions to find the GCD or LCM in the best way
- template < typename T >
- inline
- T
- gcd_optimal
- (
- T const & a,
- T const & b
- )
+ template <typename T>
+ inline BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == gcd_traits<T>::method_euclid, T>::type
+ optimal_gcd_select(T const &a, T const &b)
{
- gcd_optimal_evaluator<T> solver;
-
- return solver( a, b );
+ return detail::Euclid_gcd(a, b);
}
- template < typename T >
- inline
- T
- lcm_optimal
- (
- T const & a,
- T const & b
- )
+ template <class T>
+ inline T lcm_imp(const T& a, const T& b)
{
- lcm_optimal_evaluator<T> solver;
-
- return solver( a, b );
+ T temp = boost::math::detail::optimal_gcd_select(a, b);
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
+ return (temp != T(0)) ? T(a / temp * b) : T(0);
+#else
+ return temp ? T(a / temp * b) : T(0);
+#endif
}
-} // namespace detail
+} // namespace detail
-// Greatest common divisor evaluator member function definition ------------//
-
-template < typename IntegerType >
-inline
-typename gcd_evaluator<IntegerType>::result_type
-gcd_evaluator<IntegerType>::operator ()
-(
- first_argument_type const & a,
- second_argument_type const & b
-) const
+template <typename Integer>
+inline Integer gcd(Integer const &a, Integer const &b)
{
- return detail::gcd_optimal( a, b );
+ return detail::optimal_gcd_select(static_cast<Integer>(gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_traits<Integer>::abs(b)));
}
-
-// Least common multiple evaluator member function definition --------------//
-
-template < typename IntegerType >
-inline
-typename lcm_evaluator<IntegerType>::result_type
-lcm_evaluator<IntegerType>::operator ()
-(
- first_argument_type const & a,
- second_argument_type const & b
-) const
+template <typename Integer>
+inline Integer lcm(Integer const &a, Integer const &b)
{
- return detail::lcm_optimal( a, b );
+ return detail::lcm_imp(static_cast<Integer>(gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_traits<Integer>::abs(b)));
}
-
-// Greatest common divisor and least common multiple function definitions --//
-
-template < typename IntegerType >
-inline
-IntegerType
-gcd
-(
- IntegerType const & a,
- IntegerType const & b
-)
+/**
+ * Knuth, The Art of Computer Programming: Volume 2, Third edition, 1998
+ * Chapter 4.5.2, Algorithm C: Greatest common divisor of n integers.
+ *
+ * Knuth counts down from n to zero but we naturally go from first to last.
+ * We also return the termination position because it might be useful to know.
+ *
+ * Partly by quirk, partly by design, this algorithm is defined for n = 1,
+ * because the gcd of {x} is x. It is not defined for n = 0.
+ *
+ * @tparam I Input iterator.
+ * @return The gcd of the range and the iterator position at termination.
+ */
+template <typename I>
+std::pair<typename std::iterator_traits<I>::value_type, I>
+gcd_range(I first, I last)
{
- gcd_evaluator<IntegerType> solver;
-
- return solver( a, b );
-}
-
-template < typename IntegerType >
-inline
-IntegerType
-lcm
-(
- IntegerType const & a,
- IntegerType const & b
-)
-{
- lcm_evaluator<IntegerType> solver;
-
- return solver( a, b );
+ BOOST_ASSERT(first != last);
+ typedef typename std::iterator_traits<I>::value_type T;
+
+ T d = *first++;
+ while (d != T(1) && first != last)
+ {
+ d = gcd(d, *first);
+ first++;
+ }
+ return std::make_pair(d, first);
}
-
} // namespace math
} // namespace boost
diff --git a/boost/math/constants/constants.hpp b/boost/math/constants/constants.hpp
index 2a28f98f9e..b5db9cedf7 100644
--- a/boost/math/constants/constants.hpp
+++ b/boost/math/constants/constants.hpp
@@ -10,6 +10,7 @@
#include <boost/math/tools/config.hpp>
#include <boost/math/policies/policy.hpp>
#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/convert_from_string.hpp>
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable: 4127 4701)
@@ -63,22 +64,6 @@ namespace boost{ namespace math
template <int N>
struct dummy_size{};
- template <class T>
- struct is_explicitly_convertible_from_string
- {
-#ifndef BOOST_NO_SFINAE_EXPR
- template<typename S1, typename T1>
- static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
-
- template<typename S1, typename T1>
- static type_traits::no_type selector(...);
-
- static const bool value = sizeof(selector<const char*, T>(0)) == sizeof(type_traits::yes_type);
-#else
- static const bool value = false;
-#endif
- };
-
//
// Max number of binary digits in the string representations
// of our constants:
@@ -147,22 +132,6 @@ namespace boost{ namespace math
const Real&, Real>::type type;
};
- template <class Real>
- Real convert_from_string(const char* p, const mpl::false_&)
- {
-#ifdef BOOST_MATH_NO_LEXICAL_CAST
- // This function should not compile, we don't have the necesary functionality to support it:
- BOOST_STATIC_ASSERT(sizeof(Real) == 0);
-#else
- return boost::lexical_cast<Real>(p);
-#endif
- }
- template <class Real>
- BOOST_CONSTEXPR const char* convert_from_string(const char* p, const mpl::true_&) BOOST_NOEXCEPT
- {
- return p;
- }
-
template <class T, const T& (*F)()>
struct constant_initializer
{
@@ -217,6 +186,12 @@ namespace boost{ namespace math
# define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x)
#endif
+#ifdef BOOST_NO_CXX11_THREAD_LOCAL
+# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name) constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_variable_precision>::force_instantiate();
+#else
+# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)
+#endif
+
#define BOOST_DEFINE_MATH_CONSTANT(name, x, y)\
namespace detail{\
template <class T> struct BOOST_JOIN(constant_, name){\
@@ -224,8 +199,7 @@ namespace boost{ namespace math
/* The default implementations come next: */ \
static inline const T& get_from_string()\
{\
- typedef mpl::bool_<boost::is_convertible<const char*, T>::value || boost::math::constants::is_explicitly_convertible_from_string<T>::value> tag_type;\
- static const T result(convert_from_string<T>(y, tag_type()));\
+ static const T result(boost::math::tools::convert_from_string<T>(y));\
return result;\
}\
/* This one is for very high precision that is none the less known at compile time: */ \
@@ -235,6 +209,18 @@ namespace boost{ namespace math
static const T result = compute<N>();\
return result;\
}\
+ static inline const T& get_from_variable_precision()\
+ {\
+ static BOOST_MATH_THREAD_LOCAL int digits = 0;\
+ static BOOST_MATH_THREAD_LOCAL T value;\
+ int current_digits = boost::math::tools::digits<T>();\
+ if(digits != current_digits)\
+ {\
+ value = current_digits > max_string_digits ? compute<0>() : T(boost::math::tools::convert_from_string<T>(y));\
+ digits = current_digits; \
+ }\
+ return value;\
+ }\
/* public getters come next */\
public:\
static inline const T& get(const mpl::int_<construct_from_string>&)\
@@ -256,7 +242,9 @@ namespace boost{ namespace math
}\
/* This one is for true arbitary precision, which may well vary at runtime: */ \
static inline T get(const mpl::int_<0>&)\
- { return tools::digits<T>() > max_string_digits ? compute<0>() : get(mpl::int_<construct_from_string>()); }\
+ {\
+ BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)\
+ return get_from_variable_precision(); }\
}; /* end of struct */\
} /* namespace detail */ \
\
diff --git a/boost/math/cstdfloat/cstdfloat_types.hpp b/boost/math/cstdfloat/cstdfloat_types.hpp
index 9e0d00bf99..9b788cb485 100644
--- a/boost/math/cstdfloat/cstdfloat_types.hpp
+++ b/boost/math/cstdfloat/cstdfloat_types.hpp
@@ -211,10 +211,10 @@
// Specify the underlying name of the internal 128-bit floating-point type definition.
namespace boost { namespace math { namespace cstdfloat { namespace detail {
- #if defined(BOOST_INTEL)
- typedef _Quad float_internal128_t;
- #elif defined(__GNUC__)
- typedef __float128 float_internal128_t;
+ #if defined(__GNUC__)
+ typedef __float128 float_internal128_t;
+ #elif defined(BOOST_INTEL)
+ typedef _Quad float_internal128_t;
#else
#error "Sorry, the compiler is neither GCC, nor Intel, I don't know how to configure <boost/cstdfloat.hpp>."
#endif
diff --git a/boost/math/distributions/non_central_chi_squared.hpp b/boost/math/distributions/non_central_chi_squared.hpp
index 97f87ed4c0..038d951b02 100644
--- a/boost/math/distributions/non_central_chi_squared.hpp
+++ b/boost/math/distributions/non_central_chi_squared.hpp
@@ -438,7 +438,7 @@ namespace boost
return comp ? 0 : policies::raise_overflow_error<RealType>(function, 0, Policy());
//
// This is Pearson's approximation to the quantile, see
- // Pearson, E. S. (1959) "Note on an approximation to the distribution of
+ // Pearson, E. S. (1959) "Note on an approximation to the distribution of
// noncentral chi squared", Biometrika 46: 364.
// See also:
// "A comparison of approximations to percentiles of the noncentral chi2-distribution",
@@ -460,10 +460,13 @@ namespace boost
//
// Sometimes guess goes very small or negative, in that case we have
// to do something else for the initial guess, this approximation
- // was provided in a private communication from Thomas Luu, PhD candidate,
+ // was provided in a private communication from Thomas Luu, PhD candidate,
// University College London. It's an asymptotic expansion for the
// quantile which usually gets us within an order of magnitude of the
// correct answer.
+ // Fast and accurate parallel computation of quantile functions for random number generation,
+ // Thomas LuuDoctorial Thesis 2016
+ // http://discovery.ucl.ac.uk/1482128/
//
if(guess < 0.005)
{
diff --git a/boost/math/policies/error_handling.hpp b/boost/math/policies/error_handling.hpp
index 285fbea7c4..124337ee87 100644
--- a/boost/math/policies/error_handling.hpp
+++ b/boost/math/policies/error_handling.hpp
@@ -11,6 +11,8 @@
#include <stdexcept>
#include <iomanip>
#include <string>
+#include <cstring>
+#include <typeinfo>
#include <cerrno>
#include <boost/config/no_tr1/complex.hpp>
#include <boost/config/no_tr1/cmath.hpp>
@@ -18,17 +20,19 @@
#include <boost/math/tools/config.hpp>
#include <boost/math/policies/policy.hpp>
#include <boost/math/tools/precision.hpp>
+#include <boost/throw_exception.hpp>
#include <boost/cstdint.hpp>
#ifdef BOOST_MSVC
# pragma warning(push) // Quiet warnings in boost/format.hpp
# pragma warning(disable: 4996) // _SCL_SECURE_NO_DEPRECATE
# pragma warning(disable: 4512) // assignment operator could not be generated.
+# pragma warning(disable: 4127) // conditional expression is constant
// And warnings in error handling:
# pragma warning(disable: 4702) // unreachable code.
// Note that this only occurs when the compiler can deduce code is unreachable,
// for example when policy macros are used to ignore errors rather than throw.
#endif
-#include <boost/format.hpp>
+#include <sstream>
namespace boost{ namespace math{
@@ -68,14 +72,31 @@ T user_indeterminate_result_error(const char* function, const char* message, con
namespace detail
{
-//
-// Helper function to avoid binding rvalue to non-const-reference,
-// in other words a warning suppression mechanism:
-//
-template <class Formatter, class Group>
-inline std::string do_format(Formatter f, const Group& g)
+
+template <class T>
+std::string prec_format(const T& val)
{
- return (f % g).str();
+ typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type prec_type;
+ std::stringstream ss;
+ if(prec_type::value)
+ {
+ int prec = 2 + (prec_type::value * 30103UL) / 100000UL;
+ ss << std::setprecision(prec);
+ }
+ ss << val;
+ return ss.str();
+}
+
+inline void replace_all_in_string(std::string& result, const char* what, const char* with)
+{
+ std::string::size_type pos = 0;
+ std::string::size_type slen = std::strlen(what);
+ std::string::size_type rlen = std::strlen(with);
+ while((pos = result.find(what, pos)) != std::string::npos)
+ {
+ result.replace(pos, slen, with);
+ pos += rlen;
+ }
}
template <class T>
@@ -100,19 +121,21 @@ inline const char* name_of<BOOST_MATH_FLOAT128_TYPE>()
#endif
template <class E, class T>
-void raise_error(const char* function, const char* message)
+void raise_error(const char* pfunction, const char* message)
{
- if(function == 0)
- function = "Unknown function operating on type %1%";
+ if(pfunction == 0)
+ pfunction = "Unknown function operating on type %1%";
if(message == 0)
- message = "Cause unknown";
+ message = "Cause unknown";
+ std::string function(pfunction);
std::string msg("Error in function ");
#ifndef BOOST_NO_RTTI
- msg += (boost::format(function) % boost::math::policies::detail::name_of<T>()).str();
+ replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>());
#else
- msg += function;
+ replace_all_in_string(function, "%1%", "Unknown");
#endif
+ msg += function;
msg += ": ";
msg += message;
@@ -121,24 +144,27 @@ void raise_error(const char* function, const char* message)
}
template <class E, class T>
-void raise_error(const char* function, const char* message, const T& val)
+void raise_error(const char* pfunction, const char* pmessage, const T& val)
{
- if(function == 0)
- function = "Unknown function operating on type %1%";
- if(message == 0)
- message = "Cause unknown: error caused by bad argument with value %1%";
+ if(pfunction == 0)
+ pfunction = "Unknown function operating on type %1%";
+ if(pmessage == 0)
+ pmessage = "Cause unknown: error caused by bad argument with value %1%";
+ std::string function(pfunction);
+ std::string message(pmessage);
std::string msg("Error in function ");
#ifndef BOOST_NO_RTTI
- msg += (boost::format(function) % boost::math::policies::detail::name_of<T>()).str();
+ replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>());
#else
- msg += function;
+ replace_all_in_string(function, "%1%", "Unknown");
#endif
+ msg += function;
msg += ": ";
- msg += message;
- int prec = 2 + (boost::math::policies::digits<T, boost::math::policies::policy<> >() * 30103UL) / 100000UL;
- msg = do_format(boost::format(msg), boost::io::group(std::setprecision(prec), val));
+ std::string sval = prec_format(val);
+ replace_all_in_string(message, "%1%", sval.c_str());
+ msg += message;
E e(msg);
boost::throw_exception(e);
@@ -319,15 +345,11 @@ inline T raise_overflow_error(
const T& val,
const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&)
{
- std::string fmsg("Error in function ");
-#ifndef BOOST_NO_RTTI
- fmsg += (boost::format(function) % boost::math::policies::detail::name_of<T>()).str();
-#else
- fmsg += function;
-#endif
- int prec = 2 + (boost::math::policies::digits<T, boost::math::policies::policy<> >() * 30103UL) / 100000UL;
- std::string msg = do_format(boost::format(message), boost::io::group(std::setprecision(prec), val));
- return user_overflow_error(fmsg.c_str(), msg.c_str(), std::numeric_limits<T>::infinity());
+ std::string m(message ? message : "");
+ std::string sval = prec_format(val);
+ replace_all_in_string(m, "%1%", sval.c_str());
+
+ return user_overflow_error(function, m.c_str(), std::numeric_limits<T>::infinity());
}
template <class T>
diff --git a/boost/math/policies/policy.hpp b/boost/math/policies/policy.hpp
index de813fb8aa..c1e1a7be4a 100644
--- a/boost/math/policies/policy.hpp
+++ b/boost/math/policies/policy.hpp
@@ -914,11 +914,9 @@ struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
template <class T, class Digits>
struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
{
- BOOST_STATIC_CONSTANT(boost::uintmax_t, v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1));
-
static BOOST_MATH_CONSTEXPR T get() BOOST_MATH_NOEXCEPT(T)
{
- return 1 / static_cast<T>(v);
+ return 1 / static_cast<T>(static_cast<boost::uintmax_t>(1u) << (Digits::value - 1));
}
};
template <class T, class Digits>
diff --git a/boost/math/special_functions/detail/bernoulli_details.hpp b/boost/math/special_functions/detail/bernoulli_details.hpp
index c12a172b60..ce95034439 100644
--- a/boost/math/special_functions/detail/bernoulli_details.hpp
+++ b/boost/math/special_functions/detail/bernoulli_details.hpp
@@ -11,6 +11,7 @@
#include <boost/detail/lightweight_mutex.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/math/tools/toms748_solve.hpp>
+#include <vector>
#ifdef BOOST_HAS_THREADS
@@ -271,6 +272,7 @@ struct fixed_vector : private std::allocator<T>
T* begin()const { return m_data; }
T* end()const { return m_data + m_used; }
unsigned capacity()const { return m_capacity; }
+ void clear() { m_used = 0; }
private:
T* m_data;
unsigned m_used, m_capacity;
@@ -284,6 +286,7 @@ public:
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_MATH_NO_ATOMIC_INT)
, m_counter(0)
#endif
+ , m_current_precision(boost::math::tools::digits<T>())
{}
typedef fixed_vector<T> container_type;
@@ -436,6 +439,13 @@ public:
//
// Single threaded code, very simple:
//
+ if(m_current_precision < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -452,6 +462,13 @@ public:
// We need to grab a mutex every time we get here, for both readers and writers:
//
boost::detail::lightweight_mutex::scoped_lock l(m_mutex);
+ if(m_current_precision < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -471,12 +488,22 @@ public:
//
// Get the counter and see if we need to calculate more constants:
//
- if(static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ || (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
{
boost::detail::lightweight_mutex::scoped_lock l(m_mutex);
- if(static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ || (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
{
+ if(static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release);
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -539,6 +566,13 @@ public:
//
// Single threaded code, very simple:
//
+ if(m_current_precision < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -563,6 +597,13 @@ public:
// We need to grab a mutex every time we get here, for both readers and writers:
//
boost::detail::lightweight_mutex::scoped_lock l(m_mutex);
+ if(m_current_precision < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -590,12 +631,22 @@ public:
//
// Get the counter and see if we need to calculate more constants:
//
- if(static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ || (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
{
boost::detail::lightweight_mutex::scoped_lock l(m_mutex);
- if(static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ if((static_cast<std::size_t>(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n)
+ || (static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>()))
{
+ if(static_cast<int>(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits<T>())
+ {
+ bn.clear();
+ tn.clear();
+ m_intermediates.clear();
+ m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release);
+ m_current_precision = boost::math::tools::digits<T>();
+ }
if(start + n >= bn.size())
{
std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity()));
@@ -627,18 +678,20 @@ private:
//
// The caches for Bernoulli and tangent numbers, once allocated,
// these must NEVER EVER reallocate as it breaks our thread
- // safety guarentees:
+ // safety guarantees:
//
fixed_vector<T> bn, tn;
std::vector<T> m_intermediates;
// The value at which we know overflow has already occurred for the Bn:
std::size_t m_overflow_limit;
#if !defined(BOOST_HAS_THREADS)
+ int m_current_precision;
#elif defined(BOOST_MATH_NO_ATOMIC_INT)
boost::detail::lightweight_mutex m_mutex;
+ int m_current_precision;
#else
boost::detail::lightweight_mutex m_mutex;
- atomic_counter_type m_counter;
+ atomic_counter_type m_counter, m_current_precision;
#endif
};
diff --git a/boost/math/special_functions/detail/bessel_k0.hpp b/boost/math/special_functions/detail/bessel_k0.hpp
index e209168e87..42041dc673 100644
--- a/boost/math/special_functions/detail/bessel_k0.hpp
+++ b/boost/math/special_functions/detail/bessel_k0.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/tools/rational.hpp>
@@ -148,5 +150,9 @@ T bessel_k0(T x, const Policy& pol)
}}} // namespaces
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_BESSEL_K0_HPP
diff --git a/boost/math/special_functions/detail/bessel_k1.hpp b/boost/math/special_functions/detail/bessel_k1.hpp
index 0d17cd3057..c0c5478520 100644
--- a/boost/math/special_functions/detail/bessel_k1.hpp
+++ b/boost/math/special_functions/detail/bessel_k1.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/tools/rational.hpp>
@@ -144,5 +146,9 @@ T bessel_k1(T x, const Policy& pol)
}}} // namespaces
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_BESSEL_K1_HPP
diff --git a/boost/math/special_functions/detail/bessel_y0.hpp b/boost/math/special_functions/detail/bessel_y0.hpp
index 533ab7c8a0..84b64aaa73 100644
--- a/boost/math/special_functions/detail/bessel_y0.hpp
+++ b/boost/math/special_functions/detail/bessel_y0.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/special_functions/detail/bessel_j0.hpp>
@@ -220,5 +222,9 @@ T bessel_y0(T x, const Policy& pol)
}}} // namespaces
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_BESSEL_Y0_HPP
diff --git a/boost/math/special_functions/detail/bessel_y1.hpp b/boost/math/special_functions/detail/bessel_y1.hpp
index 8396f8fe11..7dc99c42cd 100644
--- a/boost/math/special_functions/detail/bessel_y1.hpp
+++ b/boost/math/special_functions/detail/bessel_y1.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/special_functions/detail/bessel_j1.hpp>
@@ -192,5 +194,9 @@ T bessel_y1(T x, const Policy& pol)
}}} // namespaces
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_BESSEL_Y1_HPP
diff --git a/boost/math/special_functions/detail/erf_inv.hpp b/boost/math/special_functions/detail/erf_inv.hpp
index 35072d5155..4e48300521 100644
--- a/boost/math/special_functions/detail/erf_inv.hpp
+++ b/boost/math/special_functions/detail/erf_inv.hpp
@@ -8,6 +8,9 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4127) // Conditional expression is constant
+#pragma warning(disable:4702) // Unreachable code: optimization warning
#endif
namespace boost{ namespace math{
@@ -334,31 +337,37 @@ struct erf_inv_initializer
static bool is_value_non_zero(T);
static void do_init()
{
- boost::math::erf_inv(static_cast<T>(0.25), Policy());
- boost::math::erf_inv(static_cast<T>(0.55), Policy());
- boost::math::erf_inv(static_cast<T>(0.95), Policy());
- boost::math::erfc_inv(static_cast<T>(1e-15), Policy());
- // These following initializations must not be called if
- // type T can not hold the relevant values without
- // underflow to zero. We check this at runtime because
- // some tools such as valgrind silently change the precision
- // of T at runtime, and numeric_limits basically lies!
- if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-130))))
- boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-130)), Policy());
+ // If std::numeric_limits<T>::digits is zero, we must not call
+ // our inituialization code here as the precision presumably
+ // varies at runtime, and will not have been set yet.
+ if(std::numeric_limits<T>::digits)
+ {
+ boost::math::erf_inv(static_cast<T>(0.25), Policy());
+ boost::math::erf_inv(static_cast<T>(0.55), Policy());
+ boost::math::erf_inv(static_cast<T>(0.95), Policy());
+ boost::math::erfc_inv(static_cast<T>(1e-15), Policy());
+ // These following initializations must not be called if
+ // type T can not hold the relevant values without
+ // underflow to zero. We check this at runtime because
+ // some tools such as valgrind silently change the precision
+ // of T at runtime, and numeric_limits basically lies!
+ if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-130))))
+ boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-130)), Policy());
- // Some compilers choke on constants that would underflow, even in code that isn't instantiated
- // so try and filter these cases out in the preprocessor:
+ // Some compilers choke on constants that would underflow, even in code that isn't instantiated
+ // so try and filter these cases out in the preprocessor:
#if LDBL_MAX_10_EXP >= 800
- if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800))))
- boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800)), Policy());
- if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-900))))
- boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-900)), Policy());
+ if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800))))
+ boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-800)), Policy());
+ if(is_value_non_zero(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-900))))
+ boost::math::erfc_inv(static_cast<T>(BOOST_MATH_BIG_CONSTANT(T, 64, 1e-900)), Policy());
#else
- if(is_value_non_zero(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-800))))
- boost::math::erfc_inv(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-800)), Policy());
- if(is_value_non_zero(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-900))))
- boost::math::erfc_inv(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-900)), Policy());
+ if(is_value_non_zero(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-800))))
+ boost::math::erfc_inv(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-800)), Policy());
+ if(is_value_non_zero(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-900))))
+ boost::math::erfc_inv(static_cast<T>(BOOST_MATH_HUGE_CONSTANT(T, 64, 1e-900)), Policy());
#endif
+ }
}
void force_instantiate()const{}
};
@@ -532,5 +541,9 @@ inline typename tools::promote_args<T>::type erf_inv(T z)
} // namespace math
} // namespace boost
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_SF_ERF_INV_HPP
diff --git a/boost/math/special_functions/detail/lanczos_sse2.hpp b/boost/math/special_functions/detail/lanczos_sse2.hpp
index b2dd7ea292..df1a047435 100644
--- a/boost/math/special_functions/detail/lanczos_sse2.hpp
+++ b/boost/math/special_functions/detail/lanczos_sse2.hpp
@@ -190,6 +190,22 @@ inline double lanczos13m53::lanczos_sum_expG_scaled<double>(const double& x)
return t[0] / t[1];
}
+#ifdef _MSC_VER
+
+BOOST_STATIC_ASSERT(sizeof(double) == sizeof(long double));
+
+template <>
+inline long double lanczos13m53::lanczos_sum<long double>(const long double& x)
+{
+ return lanczos_sum<double>(static_cast<double>(x));
+}
+template <>
+inline long double lanczos13m53::lanczos_sum_expG_scaled<long double>(const long double& x)
+{
+ return lanczos_sum_expG_scaled<double>(static_cast<double>(x));
+}
+#endif
+
} // namespace lanczos
} // namespace math
} // namespace boost
diff --git a/boost/math/special_functions/detail/polygamma.hpp b/boost/math/special_functions/detail/polygamma.hpp
index 20a0292fb4..c0e4932907 100644
--- a/boost/math/special_functions/detail/polygamma.hpp
+++ b/boost/math/special_functions/detail/polygamma.hpp
@@ -11,7 +11,7 @@
#ifndef _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_
#define _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_
- #include <cmath>
+#include <cmath>
#include <limits>
#include <boost/cstdint.hpp>
#include <boost/math/policies/policy.hpp>
@@ -27,7 +27,13 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_convertible.hpp>
- namespace boost { namespace math { namespace detail{
+#ifdef _MSC_VER
+#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
+#endif
+
+namespace boost { namespace math { namespace detail{
template<class T, class Policy>
T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol, const char* function) // for large values of x such as for x> 400
@@ -402,8 +408,18 @@
static boost::detail::lightweight_mutex m;
boost::detail::lightweight_mutex::scoped_lock l(m);
#endif
+ static int digits = tools::digits<T>();
static std::vector<std::vector<T> > table(1, std::vector<T>(1, T(-1)));
+ int current_digits = tools::digits<T>();
+
+ if(digits != current_digits)
+ {
+ // Oh my... our precision has changed!
+ table = std::vector<std::vector<T> >(1, std::vector<T>(1, T(-1)));
+ digits = current_digits;
+ }
+
int index = n - 1;
if(index >= (int)table.size())
@@ -534,5 +550,9 @@
} } } // namespace boost::math::detail
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_
diff --git a/boost/math/special_functions/detail/unchecked_factorial.hpp b/boost/math/special_functions/detail/unchecked_factorial.hpp
index 3c23d6e15a..ca9a752291 100644
--- a/boost/math/special_functions/detail/unchecked_factorial.hpp
+++ b/boost/math/special_functions/detail/unchecked_factorial.hpp
@@ -474,7 +474,29 @@ struct max_factorial<double>
#ifndef BOOST_MATH_NO_LEXICAL_CAST
template <class T>
-inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
+struct unchecked_factorial_initializer
+{
+ struct init
+ {
+ init()
+ {
+ boost::math::unchecked_factorial<T>(3);
+ }
+ void force_instantiate()const {}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T>
+const typename unchecked_factorial_initializer<T>::init unchecked_factorial_initializer<T>::initializer;
+
+
+template <class T, int N>
+inline T unchecked_factorial_imp(unsigned i, const mpl::int_<N>&)
{
BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
// factorial<unsigned int>(n) is not implemented
@@ -484,114 +506,255 @@ inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE
// unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
// See factorial documentation for more detail.
+ unchecked_factorial_initializer<T>::force_instantiate();
+
static const boost::array<T, 101> factorials = {{
- boost::lexical_cast<T>("1"),
- boost::lexical_cast<T>("1"),
- boost::lexical_cast<T>("2"),
- boost::lexical_cast<T>("6"),
- boost::lexical_cast<T>("24"),
- boost::lexical_cast<T>("120"),
- boost::lexical_cast<T>("720"),
- boost::lexical_cast<T>("5040"),
- boost::lexical_cast<T>("40320"),
- boost::lexical_cast<T>("362880"),
- boost::lexical_cast<T>("3628800"),
- boost::lexical_cast<T>("39916800"),
- boost::lexical_cast<T>("479001600"),
- boost::lexical_cast<T>("6227020800"),
- boost::lexical_cast<T>("87178291200"),
- boost::lexical_cast<T>("1307674368000"),
- boost::lexical_cast<T>("20922789888000"),
- boost::lexical_cast<T>("355687428096000"),
- boost::lexical_cast<T>("6402373705728000"),
- boost::lexical_cast<T>("121645100408832000"),
- boost::lexical_cast<T>("2432902008176640000"),
- boost::lexical_cast<T>("51090942171709440000"),
- boost::lexical_cast<T>("1124000727777607680000"),
- boost::lexical_cast<T>("25852016738884976640000"),
- boost::lexical_cast<T>("620448401733239439360000"),
- boost::lexical_cast<T>("15511210043330985984000000"),
- boost::lexical_cast<T>("403291461126605635584000000"),
- boost::lexical_cast<T>("10888869450418352160768000000"),
- boost::lexical_cast<T>("304888344611713860501504000000"),
- boost::lexical_cast<T>("8841761993739701954543616000000"),
- boost::lexical_cast<T>("265252859812191058636308480000000"),
- boost::lexical_cast<T>("8222838654177922817725562880000000"),
- boost::lexical_cast<T>("263130836933693530167218012160000000"),
- boost::lexical_cast<T>("8683317618811886495518194401280000000"),
- boost::lexical_cast<T>("295232799039604140847618609643520000000"),
- boost::lexical_cast<T>("10333147966386144929666651337523200000000"),
- boost::lexical_cast<T>("371993326789901217467999448150835200000000"),
- boost::lexical_cast<T>("13763753091226345046315979581580902400000000"),
- boost::lexical_cast<T>("523022617466601111760007224100074291200000000"),
- boost::lexical_cast<T>("20397882081197443358640281739902897356800000000"),
- boost::lexical_cast<T>("815915283247897734345611269596115894272000000000"),
- boost::lexical_cast<T>("33452526613163807108170062053440751665152000000000"),
- boost::lexical_cast<T>("1405006117752879898543142606244511569936384000000000"),
- boost::lexical_cast<T>("60415263063373835637355132068513997507264512000000000"),
- boost::lexical_cast<T>("2658271574788448768043625811014615890319638528000000000"),
- boost::lexical_cast<T>("119622220865480194561963161495657715064383733760000000000"),
- boost::lexical_cast<T>("5502622159812088949850305428800254892961651752960000000000"),
- boost::lexical_cast<T>("258623241511168180642964355153611979969197632389120000000000"),
- boost::lexical_cast<T>("12413915592536072670862289047373375038521486354677760000000000"),
- boost::lexical_cast<T>("608281864034267560872252163321295376887552831379210240000000000"),
- boost::lexical_cast<T>("30414093201713378043612608166064768844377641568960512000000000000"),
- boost::lexical_cast<T>("1551118753287382280224243016469303211063259720016986112000000000000"),
- boost::lexical_cast<T>("80658175170943878571660636856403766975289505440883277824000000000000"),
- boost::lexical_cast<T>("4274883284060025564298013753389399649690343788366813724672000000000000"),
- boost::lexical_cast<T>("230843697339241380472092742683027581083278564571807941132288000000000000"),
- boost::lexical_cast<T>("12696403353658275925965100847566516959580321051449436762275840000000000000"),
- boost::lexical_cast<T>("710998587804863451854045647463724949736497978881168458687447040000000000000"),
- boost::lexical_cast<T>("40526919504877216755680601905432322134980384796226602145184481280000000000000"),
- boost::lexical_cast<T>("2350561331282878571829474910515074683828862318181142924420699914240000000000000"),
- boost::lexical_cast<T>("138683118545689835737939019720389406345902876772687432540821294940160000000000000"),
- boost::lexical_cast<T>("8320987112741390144276341183223364380754172606361245952449277696409600000000000000"),
- boost::lexical_cast<T>("507580213877224798800856812176625227226004528988036003099405939480985600000000000000"),
- boost::lexical_cast<T>("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000"),
- boost::lexical_cast<T>("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000"),
- boost::lexical_cast<T>("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000"),
- boost::lexical_cast<T>("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000"),
- boost::lexical_cast<T>("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000"),
- boost::lexical_cast<T>("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000"),
- boost::lexical_cast<T>("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000"),
- boost::lexical_cast<T>("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000"),
- boost::lexical_cast<T>("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000"),
- boost::lexical_cast<T>("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000"),
- boost::lexical_cast<T>("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000"),
- boost::lexical_cast<T>("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000"),
- boost::lexical_cast<T>("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000"),
- boost::lexical_cast<T>("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000"),
- boost::lexical_cast<T>("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000"),
- boost::lexical_cast<T>("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000"),
- boost::lexical_cast<T>("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000"),
- boost::lexical_cast<T>("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000"),
- boost::lexical_cast<T>("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000"),
- boost::lexical_cast<T>("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000"),
- boost::lexical_cast<T>("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000"),
- boost::lexical_cast<T>("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000"),
- boost::lexical_cast<T>("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000"),
- boost::lexical_cast<T>("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000"),
- boost::lexical_cast<T>("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000"),
- boost::lexical_cast<T>("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000"),
- boost::lexical_cast<T>("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000"),
- boost::lexical_cast<T>("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000"),
- boost::lexical_cast<T>("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000"),
- boost::lexical_cast<T>("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000"),
- boost::lexical_cast<T>("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000"),
- boost::lexical_cast<T>("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000"),
- boost::lexical_cast<T>("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000"),
- boost::lexical_cast<T>("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000"),
- boost::lexical_cast<T>("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000"),
- boost::lexical_cast<T>("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000"),
- boost::lexical_cast<T>("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000"),
- boost::lexical_cast<T>("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000"),
- boost::lexical_cast<T>("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000"),
+ T(boost::math::tools::convert_from_string<T>("1")),
+ T(boost::math::tools::convert_from_string<T>("1")),
+ T(boost::math::tools::convert_from_string<T>("2")),
+ T(boost::math::tools::convert_from_string<T>("6")),
+ T(boost::math::tools::convert_from_string<T>("24")),
+ T(boost::math::tools::convert_from_string<T>("120")),
+ T(boost::math::tools::convert_from_string<T>("720")),
+ T(boost::math::tools::convert_from_string<T>("5040")),
+ T(boost::math::tools::convert_from_string<T>("40320")),
+ T(boost::math::tools::convert_from_string<T>("362880")),
+ T(boost::math::tools::convert_from_string<T>("3628800")),
+ T(boost::math::tools::convert_from_string<T>("39916800")),
+ T(boost::math::tools::convert_from_string<T>("479001600")),
+ T(boost::math::tools::convert_from_string<T>("6227020800")),
+ T(boost::math::tools::convert_from_string<T>("87178291200")),
+ T(boost::math::tools::convert_from_string<T>("1307674368000")),
+ T(boost::math::tools::convert_from_string<T>("20922789888000")),
+ T(boost::math::tools::convert_from_string<T>("355687428096000")),
+ T(boost::math::tools::convert_from_string<T>("6402373705728000")),
+ T(boost::math::tools::convert_from_string<T>("121645100408832000")),
+ T(boost::math::tools::convert_from_string<T>("2432902008176640000")),
+ T(boost::math::tools::convert_from_string<T>("51090942171709440000")),
+ T(boost::math::tools::convert_from_string<T>("1124000727777607680000")),
+ T(boost::math::tools::convert_from_string<T>("25852016738884976640000")),
+ T(boost::math::tools::convert_from_string<T>("620448401733239439360000")),
+ T(boost::math::tools::convert_from_string<T>("15511210043330985984000000")),
+ T(boost::math::tools::convert_from_string<T>("403291461126605635584000000")),
+ T(boost::math::tools::convert_from_string<T>("10888869450418352160768000000")),
+ T(boost::math::tools::convert_from_string<T>("304888344611713860501504000000")),
+ T(boost::math::tools::convert_from_string<T>("8841761993739701954543616000000")),
+ T(boost::math::tools::convert_from_string<T>("265252859812191058636308480000000")),
+ T(boost::math::tools::convert_from_string<T>("8222838654177922817725562880000000")),
+ T(boost::math::tools::convert_from_string<T>("263130836933693530167218012160000000")),
+ T(boost::math::tools::convert_from_string<T>("8683317618811886495518194401280000000")),
+ T(boost::math::tools::convert_from_string<T>("295232799039604140847618609643520000000")),
+ T(boost::math::tools::convert_from_string<T>("10333147966386144929666651337523200000000")),
+ T(boost::math::tools::convert_from_string<T>("371993326789901217467999448150835200000000")),
+ T(boost::math::tools::convert_from_string<T>("13763753091226345046315979581580902400000000")),
+ T(boost::math::tools::convert_from_string<T>("523022617466601111760007224100074291200000000")),
+ T(boost::math::tools::convert_from_string<T>("20397882081197443358640281739902897356800000000")),
+ T(boost::math::tools::convert_from_string<T>("815915283247897734345611269596115894272000000000")),
+ T(boost::math::tools::convert_from_string<T>("33452526613163807108170062053440751665152000000000")),
+ T(boost::math::tools::convert_from_string<T>("1405006117752879898543142606244511569936384000000000")),
+ T(boost::math::tools::convert_from_string<T>("60415263063373835637355132068513997507264512000000000")),
+ T(boost::math::tools::convert_from_string<T>("2658271574788448768043625811014615890319638528000000000")),
+ T(boost::math::tools::convert_from_string<T>("119622220865480194561963161495657715064383733760000000000")),
+ T(boost::math::tools::convert_from_string<T>("5502622159812088949850305428800254892961651752960000000000")),
+ T(boost::math::tools::convert_from_string<T>("258623241511168180642964355153611979969197632389120000000000")),
+ T(boost::math::tools::convert_from_string<T>("12413915592536072670862289047373375038521486354677760000000000")),
+ T(boost::math::tools::convert_from_string<T>("608281864034267560872252163321295376887552831379210240000000000")),
+ T(boost::math::tools::convert_from_string<T>("30414093201713378043612608166064768844377641568960512000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1551118753287382280224243016469303211063259720016986112000000000000")),
+ T(boost::math::tools::convert_from_string<T>("80658175170943878571660636856403766975289505440883277824000000000000")),
+ T(boost::math::tools::convert_from_string<T>("4274883284060025564298013753389399649690343788366813724672000000000000")),
+ T(boost::math::tools::convert_from_string<T>("230843697339241380472092742683027581083278564571807941132288000000000000")),
+ T(boost::math::tools::convert_from_string<T>("12696403353658275925965100847566516959580321051449436762275840000000000000")),
+ T(boost::math::tools::convert_from_string<T>("710998587804863451854045647463724949736497978881168458687447040000000000000")),
+ T(boost::math::tools::convert_from_string<T>("40526919504877216755680601905432322134980384796226602145184481280000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2350561331282878571829474910515074683828862318181142924420699914240000000000000")),
+ T(boost::math::tools::convert_from_string<T>("138683118545689835737939019720389406345902876772687432540821294940160000000000000")),
+ T(boost::math::tools::convert_from_string<T>("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")),
+ T(boost::math::tools::convert_from_string<T>("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")),
+ T(boost::math::tools::convert_from_string<T>("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")),
+ T(boost::math::tools::convert_from_string<T>("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")),
}};
return factorials[i];
}
template <class T>
+inline T unchecked_factorial_imp(unsigned i, const mpl::int_<0>&)
+{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
+ // factorial<unsigned int>(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<unsigned int>(factorial<double>(n));
+ // See factorial documentation for more detail.
+#ifdef BOOST_NO_CXX11_THREAD_LOCAL
+ unchecked_factorial_initializer<T>::force_instantiate();
+#endif
+ static const char* const factorial_strings[] = {
+ "1",
+ "1",
+ "2",
+ "6",
+ "24",
+ "120",
+ "720",
+ "5040",
+ "40320",
+ "362880",
+ "3628800",
+ "39916800",
+ "479001600",
+ "6227020800",
+ "87178291200",
+ "1307674368000",
+ "20922789888000",
+ "355687428096000",
+ "6402373705728000",
+ "121645100408832000",
+ "2432902008176640000",
+ "51090942171709440000",
+ "1124000727777607680000",
+ "25852016738884976640000",
+ "620448401733239439360000",
+ "15511210043330985984000000",
+ "403291461126605635584000000",
+ "10888869450418352160768000000",
+ "304888344611713860501504000000",
+ "8841761993739701954543616000000",
+ "265252859812191058636308480000000",
+ "8222838654177922817725562880000000",
+ "263130836933693530167218012160000000",
+ "8683317618811886495518194401280000000",
+ "295232799039604140847618609643520000000",
+ "10333147966386144929666651337523200000000",
+ "371993326789901217467999448150835200000000",
+ "13763753091226345046315979581580902400000000",
+ "523022617466601111760007224100074291200000000",
+ "20397882081197443358640281739902897356800000000",
+ "815915283247897734345611269596115894272000000000",
+ "33452526613163807108170062053440751665152000000000",
+ "1405006117752879898543142606244511569936384000000000",
+ "60415263063373835637355132068513997507264512000000000",
+ "2658271574788448768043625811014615890319638528000000000",
+ "119622220865480194561963161495657715064383733760000000000",
+ "5502622159812088949850305428800254892961651752960000000000",
+ "258623241511168180642964355153611979969197632389120000000000",
+ "12413915592536072670862289047373375038521486354677760000000000",
+ "608281864034267560872252163321295376887552831379210240000000000",
+ "30414093201713378043612608166064768844377641568960512000000000000",
+ "1551118753287382280224243016469303211063259720016986112000000000000",
+ "80658175170943878571660636856403766975289505440883277824000000000000",
+ "4274883284060025564298013753389399649690343788366813724672000000000000",
+ "230843697339241380472092742683027581083278564571807941132288000000000000",
+ "12696403353658275925965100847566516959580321051449436762275840000000000000",
+ "710998587804863451854045647463724949736497978881168458687447040000000000000",
+ "40526919504877216755680601905432322134980384796226602145184481280000000000000",
+ "2350561331282878571829474910515074683828862318181142924420699914240000000000000",
+ "138683118545689835737939019720389406345902876772687432540821294940160000000000000",
+ "8320987112741390144276341183223364380754172606361245952449277696409600000000000000",
+ "507580213877224798800856812176625227226004528988036003099405939480985600000000000000",
+ "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000",
+ "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000",
+ "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000",
+ "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000",
+ "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000",
+ "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000",
+ "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000",
+ "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000",
+ "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000",
+ "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000",
+ "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000",
+ "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000",
+ "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000",
+ "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000",
+ "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000",
+ "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000",
+ "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000",
+ "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000",
+ "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000",
+ "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000",
+ "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000",
+ "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000",
+ "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000",
+ "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000",
+ "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000",
+ "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000",
+ "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000",
+ "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000",
+ "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000",
+ "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000",
+ "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000",
+ "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000",
+ "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000",
+ "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000",
+ "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000",
+ "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000",
+ "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000",
+ "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000",
+ "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000",
+ };
+
+ static BOOST_MATH_THREAD_LOCAL T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])];
+ static BOOST_MATH_THREAD_LOCAL int digits = 0;
+
+ int current_digits = boost::math::tools::digits<T>();
+
+ if(digits != current_digits)
+ {
+ digits = current_digits;
+ for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k)
+ factorials[k] = static_cast<T>(boost::math::tools::convert_from_string<T>(factorial_strings[k]));
+ }
+
+ return factorials[i];
+}
+
+template <class T>
+inline T unchecked_factorial(unsigned i)
+{
+ typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type tag_type;
+ return unchecked_factorial_imp<T>(i, tag_type());
+}
+
+template <class T>
struct max_factorial
{
BOOST_STATIC_CONSTANT(unsigned, value = 100);
diff --git a/boost/math/special_functions/digamma.hpp b/boost/math/special_functions/digamma.hpp
index 718eaf9278..f6431c67a6 100644
--- a/boost/math/special_functions/digamma.hpp
+++ b/boost/math/special_functions/digamma.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/special_functions/math_fwd.hpp>
@@ -489,7 +491,7 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol)
// limit = 10 at 50 bit precision and
// limit = 250 at 1000 bit precision.
//
- T lim = 10 + (tools::digits<T>() - 50) * 240 / 950;
+ int lim = 10 + ((tools::digits<T>() - 50) * 240L) / 950;
T two_x = ldexp(x, 1);
if(x >= lim)
{
@@ -624,5 +626,10 @@ inline typename tools::promote_args<T>::type
} // namespace math
} // namespace boost
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif
diff --git a/boost/math/special_functions/ellint_1.hpp b/boost/math/special_functions/ellint_1.hpp
index 62a0bf3fde..d1d9d72e30 100644
--- a/boost/math/special_functions/ellint_1.hpp
+++ b/boost/math/special_functions/ellint_1.hpp
@@ -106,7 +106,6 @@ T ellint_f_imp(T phi, T k, const Policy& pol)
sinp *= sinp;
T cosp = cos(rphi);
cosp *= cosp;
- T c = 1 / sinp;
BOOST_MATH_INSTRUMENT_VARIABLE(sinp);
BOOST_MATH_INSTRUMENT_VARIABLE(cosp);
if(sinp > tools::min_value<T>())
@@ -115,6 +114,7 @@ T ellint_f_imp(T phi, T k, const Policy& pol)
// Use http://dlmf.nist.gov/19.25#E5, note that
// c-1 simplifies to cot^2(rphi) which avoid cancellation:
//
+ T c = 1 / sinp;
result = rphi == 0 ? static_cast<T>(0) : static_cast<T>(s * ellint_rf_imp(T(cosp / sinp), T(c - k * k), c, pol));
}
else
diff --git a/boost/math/special_functions/ellint_2.hpp b/boost/math/special_functions/ellint_2.hpp
index 7c1eab45c2..9ee6b63821 100644
--- a/boost/math/special_functions/ellint_2.hpp
+++ b/boost/math/special_functions/ellint_2.hpp
@@ -94,10 +94,6 @@ T ellint_e_imp(T phi, T k, const Policy& pol)
s = -1;
rphi = constants::half_pi<T>() - rphi;
}
- T sinp = sin(rphi);
- T cosp = cos(rphi);
- T c = 1 / (sinp * sinp);
- T cm1 = cosp * cosp / (sinp * sinp); // c - 1
T k2 = k * k;
if(k2 > 1)
{
@@ -111,6 +107,10 @@ T ellint_e_imp(T phi, T k, const Policy& pol)
else
{
// http://dlmf.nist.gov/19.25#E10
+ T sinp = sin(rphi);
+ T cosp = cos(rphi);
+ T c = 1 / (sinp * sinp);
+ T cm1 = cosp * cosp / (sinp * sinp); // c - 1
result = s * ((1 - k2) * ellint_rf_imp(cm1, T(c - k2), c, pol) + k2 * (1 - k2) * ellint_rd(cm1, c, T(c - k2), pol) / 3 + k2 * sqrt(cm1 / (c * (c - k2))));
}
if(m != 0)
diff --git a/boost/math/special_functions/ellint_3.hpp b/boost/math/special_functions/ellint_3.hpp
index b6670a196f..b8b36729cf 100644
--- a/boost/math/special_functions/ellint_3.hpp
+++ b/boost/math/special_functions/ellint_3.hpp
@@ -58,19 +58,19 @@ T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol)
T sphi = sin(fabs(phi));
T result = 0;
- if(v > 1 / (sphi * sphi))
- {
- // Complex result is a domain error:
- return policies::raise_domain_error<T>(function,
- "Got v = %1%, but result is complex for v > 1 / sin^2(phi)", v, pol);
- }
-
// Special cases first:
if(v == 0)
{
// A&S 17.7.18 & 19
return (k == 0) ? phi : ellint_f_imp(phi, k, pol);
}
+ if((v > 0) && (1 / v < (sphi * sphi)))
+ {
+ // Complex result is a domain error:
+ return policies::raise_domain_error<T>(function,
+ "Got v = %1%, but result is complex for v > 1 / sin^2(phi)", v, pol);
+ }
+
if(v == 1)
{
// http://functions.wolfram.com/08.06.03.0008.01
diff --git a/boost/math/special_functions/expint.hpp b/boost/math/special_functions/expint.hpp
index c26420db9e..fc656f3355 100644
--- a/boost/math/special_functions/expint.hpp
+++ b/boost/math/special_functions/expint.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/tools/precision.hpp>
@@ -1667,6 +1669,10 @@ inline typename tools::promote_args<T>::type
}} // namespaces
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_EXPINT_HPP
diff --git a/boost/math/special_functions/gamma.hpp b/boost/math/special_functions/gamma.hpp
index 3a3191a807..a2b30f8551 100644
--- a/boost/math/special_functions/gamma.hpp
+++ b/boost/math/special_functions/gamma.hpp
@@ -33,6 +33,7 @@
#include <boost/math/special_functions/detail/unchecked_factorial.hpp>
#include <boost/math/special_functions/detail/lgamma_small.hpp>
#include <boost/math/special_functions/bernoulli.hpp>
+#include <boost/math/special_functions/zeta.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/assert.hpp>
#include <boost/mpl/greater.hpp>
@@ -495,6 +496,37 @@ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&)
}
template <class T, class Policy>
+inline T log_gamma_near_1(const T& z, Policy const& pol)
+{
+ //
+ // This is for the multiprecision case where there is
+ // no lanczos support...
+ //
+ BOOST_MATH_STD_USING // ADL of std names
+
+ BOOST_ASSERT(fabs(z) < 1);
+
+ T result = -constants::euler<T>() * z;
+
+ T power_term = z * z;
+ T term;
+ unsigned j = 0;
+
+ do
+ {
+ term = boost::math::zeta<T>(j + 2, pol) * power_term / (j + 2);
+ if(j & 1)
+ result -= term;
+ else
+ result += term;
+ power_term *= z;
+ ++j;
+ } while(fabs(result) * tools::epsilon<T>() < fabs(term));
+
+ return result;
+}
+
+template <class T, class Policy>
T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign)
{
BOOST_MATH_STD_USING
@@ -529,7 +561,15 @@ T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sig
// Here we simply take the logarithm of tgamma(). This is somewhat
// inefficient, but simple. The rationale is that the argument here
// is relatively small and overflow is not expected to be likely.
- if (z > -tools::root_epsilon<T>())
+ if(fabs(z - 1) < 0.25)
+ {
+ return log_gamma_near_1(T(zz - 1), pol);
+ }
+ else if(fabs(z - 2) < 0.25)
+ {
+ return log_gamma_near_1(T(zz - 2), pol) + log(zz - 1);
+ }
+ else if (z > -tools::root_epsilon<T>())
{
// Reflection formula may fail if z is very close to zero, let the series
// expansion for tgamma close to zero do the work:
@@ -634,7 +674,7 @@ T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l)
mpl::greater<precision_type, mpl::int_<113> >
>,
typename mpl::if_<
- is_same<Lanczos, lanczos::lanczos24m113>,
+ mpl::and_<is_same<Lanczos, lanczos::lanczos24m113>, mpl::greater<precision_type, mpl::int_<0> > >,
mpl::int_<113>,
mpl::int_<0>
>::type,
@@ -680,32 +720,16 @@ T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l)
}
template <class T, class Policy>
-inline T tgammap1m1_imp(T dz, Policy const& pol,
- const ::boost::math::lanczos::undefined_lanczos& l)
+inline T tgammap1m1_imp(T z, Policy const& pol,
+ const ::boost::math::lanczos::undefined_lanczos&)
{
BOOST_MATH_STD_USING // ADL of std names
- //
- // There should be a better solution than this, but the
- // algebra isn't easy for the general case....
- // Start by subracting 1 from tgamma:
- //
- T result = gamma_imp(T(1 + dz), pol, l) - 1;
- BOOST_MATH_INSTRUMENT_CODE(result);
- //
- // Test the level of cancellation error observed: we loose one bit
- // for each power of 2 the result is less than 1. If we would get
- // more bits from our most precise lgamma rational approximation,
- // then use that instead:
- //
- BOOST_MATH_INSTRUMENT_CODE((dz > -0.5));
- BOOST_MATH_INSTRUMENT_CODE((dz < 2));
- BOOST_MATH_INSTRUMENT_CODE((ldexp(1.0, boost::math::policies::digits<T, Policy>()) * fabs(result) < 1e34));
- if((dz > -0.5) && (dz < 2) && (ldexp(1.0, boost::math::policies::digits<T, Policy>()) * fabs(result) < 1e34))
+
+ if(fabs(z) < 0.55)
{
- result = tgammap1m1_imp(dz, pol, boost::math::lanczos::lanczos24m113());
- BOOST_MATH_INSTRUMENT_CODE(result);
+ return boost::math::expm1(log_gamma_near_1(z, pol));
}
- return result;
+ return boost::math::expm1(boost::math::lgamma(1 + z, pol));
}
//
@@ -1396,16 +1420,26 @@ T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos&
}
T zgh = static_cast<T>(z + Lanczos::g() - constants::half<T>());
T result;
- if(fabs(delta) < 10)
+ if(z + delta == z)
{
- result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
+ if(fabs(delta) < 10)
+ result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
+ else
+ result = 1;
}
else
{
- result = pow(zgh / (zgh + delta), z - constants::half<T>());
+ if(fabs(delta) < 10)
+ {
+ result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
+ }
+ else
+ {
+ result = pow(zgh / (zgh + delta), z - constants::half<T>());
+ }
+ // Split the calculation up to avoid spurious overflow:
+ result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta));
}
- // Split the calculation up to avoid spurious overflow:
- result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta));
result *= pow(constants::e<T>() / (zgh + delta), delta);
return result;
}
@@ -1663,7 +1697,14 @@ struct igamma_initializer
template <int N>
static void do_init(const mpl::int_<N>&)
{
- boost::math::gamma_p(static_cast<T>(400), static_cast<T>(400), Policy());
+ // If std::numeric_limits<T>::digits is zero, we must not call
+ // our inituialization code here as the precision presumably
+ // varies at runtime, and will not have been set yet. Plus the
+ // code requiring initialization isn't called when digits == 0.
+ if(std::numeric_limits<T>::digits)
+ {
+ boost::math::gamma_p(static_cast<T>(400), static_cast<T>(400), Policy());
+ }
}
static void do_init(const mpl::int_<53>&){}
void force_instantiate()const{}
diff --git a/boost/math/special_functions/lanczos.hpp b/boost/math/special_functions/lanczos.hpp
index 0db21d3d16..c9f4f90dcf 100644
--- a/boost/math/special_functions/lanczos.hpp
+++ b/boost/math/special_functions/lanczos.hpp
@@ -1284,7 +1284,7 @@ struct lanczos
} // namespace boost
#if !defined(_CRAYC) && !defined(__CUDACC__) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
-#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__)
+#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64)
#include <boost/math/special_functions/detail/lanczos_sse2.hpp>
#endif
#endif
diff --git a/boost/math/special_functions/log1p.hpp b/boost/math/special_functions/log1p.hpp
index 62f5b8027c..50bdaeb385 100644
--- a/boost/math/special_functions/log1p.hpp
+++ b/boost/math/special_functions/log1p.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/config/no_tr1/cmath.hpp>
@@ -497,6 +499,10 @@ inline typename tools::promote_args<T>::type log1pmx(T x)
} // namespace math
} // namespace boost
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_LOG1P_INCLUDED
diff --git a/boost/math/special_functions/powm1.hpp b/boost/math/special_functions/powm1.hpp
index fe2fce35d8..37db8746c8 100644
--- a/boost/math/special_functions/powm1.hpp
+++ b/boost/math/special_functions/powm1.hpp
@@ -8,6 +8,8 @@
#ifdef _MSC_VER
#pragma once
+#pragma warning(push)
+#pragma warning(disable:4702) // Unreachable code (release mode only warning)
#endif
#include <boost/math/special_functions/math_fwd.hpp>
@@ -70,6 +72,10 @@ inline typename tools::promote_args<T1, T2>::type
} // namespace math
} // namespace boost
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
#endif // BOOST_MATH_POWM1
diff --git a/boost/math/special_functions/zeta.hpp b/boost/math/special_functions/zeta.hpp
index 616bb0cccc..91b83c1b2e 100644
--- a/boost/math/special_functions/zeta.hpp
+++ b/boost/math/special_functions/zeta.hpp
@@ -878,11 +878,19 @@ T zeta_imp_odd_integer(int s, const T&, const Policy&, const mpl::true_&)
template <class T, class Policy>
T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const mpl::false_&)
{
- static bool is_init = false;
- static T results[50] = {};
+ static BOOST_MATH_THREAD_LOCAL bool is_init = false;
+ static BOOST_MATH_THREAD_LOCAL T results[50] = {};
+ static BOOST_MATH_THREAD_LOCAL int digits = tools::digits<T>();
+ int current_digits = tools::digits<T>();
+ if(digits != current_digits)
+ {
+ // Oh my precision has changed...
+ is_init = false;
+ }
if(!is_init)
{
is_init = true;
+ digits = current_digits;
for(unsigned k = 0; k < sizeof(results) / sizeof(results[0]); ++k)
{
T arg = k * 2 + 3;
diff --git a/boost/math/tools/config.hpp b/boost/math/tools/config.hpp
index 75d29b646e..32375e6a6e 100644
--- a/boost/math/tools/config.hpp
+++ b/boost/math/tools/config.hpp
@@ -442,8 +442,16 @@ namespace boost{ namespace math{
#endif
-#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+//
+// Thread local storage:
+//
+#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL)
+# define BOOST_MATH_THREAD_LOCAL thread_local
+#else
+# define BOOST_MATH_THREAD_LOCAL
+#endif
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
diff --git a/boost/math/tools/convert_from_string.hpp b/boost/math/tools/convert_from_string.hpp
new file mode 100644
index 0000000000..cce61ccbd9
--- /dev/null
+++ b/boost/math/tools/convert_from_string.hpp
@@ -0,0 +1,51 @@
+// Copyright John Maddock 2016.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_CONVERT_FROM_STRING_INCLUDED
+#define BOOST_MATH_TOOLS_CONVERT_FROM_STRING_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/lexical_cast.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+ template <class T>
+ struct convert_from_string_result
+ {
+ typedef typename boost::conditional<boost::is_constructible<T, const char*>::value, const char*, T>::type type;
+ };
+
+ template <class Real>
+ Real convert_from_string(const char* p, const mpl::false_&)
+ {
+#ifdef BOOST_MATH_NO_LEXICAL_CAST
+ // This function should not compile, we don't have the necesary functionality to support it:
+ BOOST_STATIC_ASSERT(sizeof(Real) == 0);
+#else
+ return boost::lexical_cast<Real>(p);
+#endif
+ }
+ template <class Real>
+ BOOST_CONSTEXPR const char* convert_from_string(const char* p, const mpl::true_&) BOOST_NOEXCEPT
+ {
+ return p;
+ }
+ template <class Real>
+ BOOST_CONSTEXPR typename convert_from_string_result<Real>::type convert_from_string(const char* p) BOOST_NOEXCEPT_IF((boost::is_constructible<Real, const char*>::value))
+ {
+ return convert_from_string<Real>(p, boost::is_constructible<Real, const char*>());
+ }
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_CONVERT_FROM_STRING_INCLUDED
+
diff --git a/boost/math/tools/polynomial.hpp b/boost/math/tools/polynomial.hpp
index 73980d6aa8..c81a05caa4 100644
--- a/boost/math/tools/polynomial.hpp
+++ b/boost/math/tools/polynomial.hpp
@@ -15,10 +15,12 @@
#include <boost/assert.hpp>
#include <boost/config.hpp>
+#include <boost/config/suffix.hpp>
#include <boost/function.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/math/tools/rational.hpp>
#include <boost/math/tools/real_cast.hpp>
+#include <boost/math/policies/error_handling.hpp>
#include <boost/math/special_functions/binomial.hpp>
#include <boost/operators.hpp>
@@ -191,8 +193,8 @@ std::pair< polynomial<T>, polynomial<T> >
division(polynomial<T> u, const polynomial<T>& v)
{
BOOST_ASSERT(v.size() <= u.size());
- BOOST_ASSERT(v != zero_element(std::multiplies< polynomial<T> >()));
- BOOST_ASSERT(u != zero_element(std::multiplies< polynomial<T> >()));
+ BOOST_ASSERT(v);
+ BOOST_ASSERT(u);
typedef typename polynomial<T>::size_type N;
@@ -245,9 +247,9 @@ template <typename T>
std::pair< polynomial<T>, polynomial<T> >
quotient_remainder(const polynomial<T>& dividend, const polynomial<T>& divisor)
{
- BOOST_ASSERT(divisor != zero_element(std::multiplies< polynomial<T> >()));
+ BOOST_ASSERT(divisor);
if (dividend.size() < divisor.size())
- return std::make_pair(zero_element(std::multiplies< polynomial<T> >()), dividend);
+ return std::make_pair(polynomial<T>(), dividend);
return detail::division(dividend, divisor);
}
@@ -302,7 +304,7 @@ public:
}
}
-#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
polynomial(std::initializer_list<T> l) : polynomial(std::begin(l), std::end(l))
{
}
@@ -311,6 +313,7 @@ public:
operator=(std::initializer_list<T> l)
{
m_data.assign(std::begin(l), std::end(l));
+ normalize();
return *this;
}
#endif
@@ -388,7 +391,7 @@ public:
polynomial& operator %=(const U& /*value*/)
{
// We can always divide by a scalar, so there is no remainder:
- *this = zero_element(std::multiplies<polynomial>());
+ this->set_zero();
return *this;
}
@@ -411,26 +414,16 @@ public:
polynomial& operator *=(const polynomial<U>& value)
{
// TODO: FIXME: use O(N log(N)) algorithm!!!
- polynomial const zero = zero_element(std::multiplies<polynomial>());
- if (value == zero)
+ if (!value)
{
- *this = zero;
+ this->set_zero();
return *this;
}
- polynomial base(*this);
- this->multiplication(value[0]);
- for(size_type i = 1; i < value.size(); ++i)
- {
- polynomial t(base);
- t.multiplication(value[i]);
- size_type s = size() - i;
- for(size_type j = 0; j < s; ++j)
- {
- m_data[i+j] += t[j];
- }
- for(size_type j = s; j < t.size(); ++j)
- m_data.push_back(t[j]);
- }
+ std::vector<T> prod(size() + value.size() - 1, T(0));
+ for (size_type i = 0; i < value.size(); ++i)
+ for (size_type j = 0; j < size(); ++j)
+ prod[i+j] += m_data[j] * value[i];
+ m_data.swap(prod);
return *this;
}
@@ -448,7 +441,50 @@ public:
return *this;
}
- /** Remove zero coefficients 'from the top', that is for which there are no
+ template <typename U>
+ polynomial& operator >>=(U const &n)
+ {
+ BOOST_ASSERT(n <= m_data.size());
+ m_data.erase(m_data.begin(), m_data.begin() + n);
+ return *this;
+ }
+
+ template <typename U>
+ polynomial& operator <<=(U const &n)
+ {
+ m_data.insert(m_data.begin(), n, static_cast<T>(0));
+ normalize();
+ return *this;
+ }
+
+ // Convenient and efficient query for zero.
+ bool is_zero() const
+ {
+ return m_data.empty();
+ }
+
+ // Conversion to bool.
+#ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+ typedef bool (polynomial::*unmentionable_type)() const;
+
+ BOOST_FORCEINLINE operator unmentionable_type() const
+ {
+ return is_zero() ? false : &polynomial::is_zero;
+ }
+#else
+ BOOST_FORCEINLINE explicit operator bool() const
+ {
+ return !m_data.empty();
+ }
+#endif
+
+ // Fast way to set a polynomial to zero.
+ void set_zero()
+ {
+ m_data.clear();
+ }
+
+ /** Remove zero coefficients 'from the top', that is for which there are no
* non-zero coefficients of higher degree. */
void normalize()
{
@@ -600,6 +636,22 @@ bool operator == (const polynomial<T> &a, const polynomial<T> &b)
return a.data() == b.data();
}
+template <typename T, typename U>
+polynomial<T> operator >> (const polynomial<T>& a, const U& b)
+{
+ polynomial<T> result(a);
+ result >>= b;
+ return result;
+}
+
+template <typename T, typename U>
+polynomial<T> operator << (const polynomial<T>& a, const U& b)
+{
+ polynomial<T> result(a);
+ result <<= b;
+ return result;
+}
+
// Unary minus (negate).
template <class T>
polynomial<T> operator - (polynomial<T> a)
@@ -608,6 +660,42 @@ polynomial<T> operator - (polynomial<T> a)
return a;
}
+template <class T>
+bool odd(polynomial<T> const &a)
+{
+ return a.size() > 0 && a[0] != static_cast<T>(0);
+}
+
+template <class T>
+bool even(polynomial<T> const &a)
+{
+ return !odd(a);
+}
+
+template <class T>
+polynomial<T> pow(polynomial<T> base, int exp)
+{
+ if (exp < 0)
+ return policies::raise_domain_error(
+ "boost::math::tools::pow<%1%>",
+ "Negative powers are not supported for polynomials.",
+ base, policies::policy<>());
+ // if the policy is ignore_error or errno_on_error, raise_domain_error
+ // will return std::numeric_limits<polynomial<T>>::quiet_NaN(), which
+ // defaults to polynomial<T>(), which is the zero polynomial
+ polynomial<T> result(T(1));
+ if (exp & 1)
+ result = base;
+ /* "Exponentiation by squaring" */
+ while (exp >>= 1)
+ {
+ base *= base;
+ if (exp & 1)
+ result *= base;
+ }
+ return result;
+}
+
template <class charT, class traits, class T>
inline std::basic_ostream<charT, traits>& operator << (std::basic_ostream<charT, traits>& os, const polynomial<T>& poly)
{
diff --git a/boost/math/tools/precision.hpp b/boost/math/tools/precision.hpp
index 9631fc2eb6..6538083b99 100644
--- a/boost/math/tools/precision.hpp
+++ b/boost/math/tools/precision.hpp
@@ -180,9 +180,9 @@ inline BOOST_MATH_CONSTEXPR long double epsilon<long double>(const mpl::true_& B
template <class T>
inline T epsilon(const mpl::false_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
{
+ // Note: don't cache result as precision may vary at runtime:
BOOST_MATH_STD_USING // for ADL of std names
- static const T eps = ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
- return eps;
+ return ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
}
template <class T>
@@ -290,6 +290,13 @@ inline T root_epsilon_imp(const T*, const Tag&)
}
template <class T>
+inline T root_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING
+ return sqrt(tools::epsilon<T>());
+}
+
+template <class T>
inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
{
return static_cast<T>(0.0049215666011518482998719164346805794944150447839903L);
@@ -322,6 +329,13 @@ inline T cbrt_epsilon_imp(const T*, const Tag&)
}
template <class T>
+inline T cbrt_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING;
+ return pow(tools::epsilon<T>(), T(1) / 3);
+}
+
+template <class T>
inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
{
return static_cast<T>(0.018581361171917516667460937040007436176452688944747L);
@@ -354,6 +368,13 @@ inline T forth_root_epsilon_imp(const T*, const Tag&)
}
template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING
+ return sqrt(sqrt(tools::epsilon<T>()));
+}
+
+template <class T>
struct root_epsilon_traits
{
typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) ? std::numeric_limits<T>::digits : 0> tag_type;
diff --git a/boost/math/tools/toms748_solve.hpp b/boost/math/tools/toms748_solve.hpp
index dca6bf0218..aee6258e11 100644
--- a/boost/math/tools/toms748_solve.hpp
+++ b/boost/math/tools/toms748_solve.hpp
@@ -199,7 +199,7 @@ T quadratic_interpolate(const T& a, const T& b, T const& d,
// Point d must lie outside of the interval [a,b], it is the third
// best approximation to the root, after a and b.
//
- // Note: this does not guarentee to find a root
+ // Note: this does not guarantee to find a root
// inside [a, b], so we fall back to a secant step should
// the result be out of range.
//
@@ -254,7 +254,7 @@ T cubic_interpolate(const T& a, const T& b, const T& d,
// and are the third and forth best approximations
// to the root that we have found so far.
//
- // Note: this does not guarentee to find a root
+ // Note: this does not guarantee to find a root
// inside [a, b], so we fall back to quadratic
// interpolation in case of an erroneous result.
//
diff --git a/boost/math/tools/tuple.hpp b/boost/math/tools/tuple.hpp
index 0ae778cbef..5723f81338 100644
--- a/boost/math/tools/tuple.hpp
+++ b/boost/math/tools/tuple.hpp
@@ -7,7 +7,7 @@
# define BOOST_MATH_TUPLE_HPP_INCLUDED
# include <boost/config.hpp>
-#ifndef BOOST_NO_CXX11_HDR_TUPLE
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
#include <tuple>
diff --git a/boost/math_fwd.hpp b/boost/math_fwd.hpp
index f9b79151a5..9c9147ae12 100644
--- a/boost/math_fwd.hpp
+++ b/boost/math_fwd.hpp
@@ -90,17 +90,6 @@ template < static_gcd_type Value1, static_gcd_type Value2 >
template < static_gcd_type Value1, static_gcd_type Value2 >
struct static_lcm;
-
-// From <boost/math/common_factor_rt.hpp> ----------------------------------//
-
-template < typename IntegerType >
- class gcd_evaluator;
-template < typename IntegerType >
- class lcm_evaluator;
-
-// Also has a couple of function templates
-
-
} // namespace math
} // namespace boost
diff --git a/boost/move/adl_move_swap.hpp b/boost/move/adl_move_swap.hpp
index 930320108d..d6906a483f 100644
--- a/boost/move/adl_move_swap.hpp
+++ b/boost/move/adl_move_swap.hpp
@@ -231,8 +231,8 @@ BOOST_MOVE_FORCEINLINE void adl_move_swap(T& x, T& y)
//! using boost::adl_move_swap.
//!
//! Parameters:
-//! first1, last1 - the first range of elements to swap
-//! first2 - beginning of the second range of elements to swap
+//! first1, last1 - the first range of elements to swap
+//! first2 - beginning of the second range of elements to swap
//!
//! Type requirements:
//! - ForwardIt1, ForwardIt2 must meet the requirements of ForwardIterator.
diff --git a/boost/move/algo/adaptive_merge.hpp b/boost/move/algo/adaptive_merge.hpp
index ef20651bbf..0233b232e3 100644
--- a/boost/move/algo/adaptive_merge.hpp
+++ b/boost/move/algo/adaptive_merge.hpp
@@ -56,7 +56,7 @@ void adaptive_merge( RandIt first, RandIt middle, RandIt last, Compare comp
typedef typename iterator_traits<RandIt>::value_type value_type;
::boost::movelib::detail_adaptive::adaptive_xbuf<value_type> xbuf(uninitialized, uninitialized_len);
- ::boost::movelib::detail_adaptive::adaptive_merge_impl(first, size_type(middle - first), size_type(last - middle), comp, xbuf);
+ ::boost::movelib::detail_adaptive::adaptive_merge_impl(first, size_type(middle - first), size_type(last - middle), comp, xbuf);
}
} //namespace movelib {
diff --git a/boost/move/algo/detail/adaptive_sort_merge.hpp b/boost/move/algo/detail/adaptive_sort_merge.hpp
index 46dba187c5..3d97212a29 100644
--- a/boost/move/algo/detail/adaptive_sort_merge.hpp
+++ b/boost/move/algo/detail/adaptive_sort_merge.hpp
@@ -37,14 +37,15 @@
// elements twice.
//
// The adaptive_merge algorithm was developed by Ion Gaztanaga reusing some parts
-// from the sorting algorithm and implementing a block merge algorithm
-// without moving elements left or right, which is used when external memory
+// from the sorting algorithm and implementing an additional block merge algorithm
+// without moving elements to left or right, which is used when external memory
// is available.
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
#define BOOST_MOVE_ADAPTIVE_SORT_MERGE_HPP
#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/reverse_iterator.hpp>
#include <boost/move/algo/move.hpp>
#include <boost/move/algo/detail/merge.hpp>
#include <boost/move/adl_move_swap.hpp>
@@ -161,6 +162,29 @@ class adaptive_xbuf
m_size = size;
}
+ void shrink_to_fit(std::size_t const size)
+ {
+ if(m_size > size){
+ for(std::size_t szt_i = size; szt_i != m_size; ++szt_i){
+ m_ptr[szt_i].~T();
+ }
+ m_size = size;
+ }
+ }
+
+ void initialize_until(std::size_t const size, T &t)
+ {
+ BOOST_ASSERT(m_size < m_capacity);
+ if(m_size < size){
+ ::new((void*)&m_ptr[m_size]) T(::boost::move(t));
+ ++m_size;
+ for(; m_size != size; ++m_size){
+ ::new((void*)&m_ptr[m_size]) T(::boost::move(m_ptr[m_size-1]));
+ }
+ t = ::boost::move(m_ptr[m_size-1]);
+ }
+ }
+
template<class U>
bool supports_aligned_trailing(std::size_t size, std::size_t trail_count) const
{
@@ -210,11 +234,7 @@ class adaptive_xbuf
void clear()
{
- std::size_t size = m_size;
- while(size--){
- m_ptr[size].~T();
- }
- m_size = 0u;
+ this->shrink_to_fit(0u);
}
private:
@@ -288,41 +308,75 @@ class range_xbuf
Iterator const m_cap;
};
-template<class RandIt, class Buf>
-bool three_way_init( RandIt first1, RandIt last1, Buf &buf
- , typename Buf::iterator &buf_first, typename Buf::iterator &buf_last, move_op)
-{
- buf.move_assign(first1, last1-first1);
- buf_first = buf.data();
- buf_last = buf.end();
- return true;
-}
-template<class RandIt, class Buf>
-bool three_way_init( RandIt first, RandIt last, Buf &buf
- , typename Buf::iterator &buf_first, typename Buf::iterator &buf_last, swap_op)
+template<class RandIt, class Compare>
+RandIt skip_until_merge
+ ( RandIt first1, RandIt const last1
+ , const typename iterator_traits<RandIt>::value_type &next_key, Compare comp)
{
- typedef typename iterator_traits<RandIt>::size_type size_type;
- buf.clear();
- buf_first = buf.data();
- buf_last = buf_first + size_type(last-first);
- return false;
+ while(first1 != last1 && !comp(next_key, *first1)){
+ ++first1;
+ }
+ return first1;
}
-template<class T, class Buf>
-void three_way_move(T &a, T &b, Buf &buf, move_op)
+template<class InputIt1, class InputIt2, class OutputIt, class Compare, class Op>
+OutputIt op_partial_merge
+ (InputIt1 &r_first1, InputIt1 const last1, InputIt2 &r_first2, InputIt2 const last2, OutputIt d_first, Compare comp, Op op)
{
- buf.add(&b);
- b = boost::move(a);
+ InputIt1 first1(r_first1);
+ InputIt2 first2(r_first2);
+ if(first2 != last2 && last1 != first1)
+ while(1){
+ if(comp(*first2, *first1)) {
+ op(first2++, d_first++);
+ if(first2 == last2){
+ break;
+ }
+ }
+ else{
+ op(first1++, d_first++);
+ if(first1 == last1){
+ break;
+ }
+ }
+ }
+ r_first1 = first1;
+ r_first2 = first2;
+ return d_first;
}
-template<class T, class Buf>
-void three_way_move(T &a, T &b, Buf &buf, swap_op)
+template<class RandIt1, class RandIt2, class RandItB, class Compare, class Op>
+RandItB op_buffered_partial_merge_to_left_placed
+ ( RandIt1 first1, RandIt1 const last1
+ , RandIt2 &rfirst2, RandIt2 const last2
+ , RandItB &rfirstb, Compare comp, Op op )
{
- T tmp(boost::move(*buf.end()));
- buf.add(&b);
- b = boost::move(a);
- a = boost::move(tmp);
+ RandItB firstb = rfirstb;
+ RandItB lastb = firstb;
+ RandIt2 first2 = rfirst2;
+
+ //Move to buffer while merging
+ //Three way moves need less moves when op is swap_op so use it
+ //when merging elements from range2 to the destination occupied by range1
+ if(first1 != last1 && first2 != last2){
+ op(three_way_t(), first2++, first1++, lastb++);
+
+ while(true){
+ if(first1 == last1){
+ break;
+ }
+ if(first2 == last2){
+ lastb = op(forward_t(), first1, last1, firstb);
+ break;
+ }
+ op(three_way_t(), comp(*first2, *firstb) ? first2++ : firstb++, first1++, lastb++);
+ }
+ }
+
+ rfirst2 = first2;
+ rfirstb = firstb;
+ return lastb;
}
///////////////////////////////////////////////////////////////////////////////
@@ -331,7 +385,6 @@ void three_way_move(T &a, T &b, Buf &buf, swap_op)
//
///////////////////////////////////////////////////////////////////////////////
-
template<class Buf, class RandIt, class Compare, class Op>
RandIt op_partial_merge_with_buf_impl
( RandIt first1, RandIt const last1, RandIt first2, RandIt last2
@@ -340,7 +393,6 @@ RandIt op_partial_merge_with_buf_impl
)
{
typedef typename Buf::iterator buf_iterator;
- typedef typename iterator_traits<RandIt>::value_type value_type;
BOOST_ASSERT(first1 != last1);
BOOST_ASSERT(first2 != last2);
@@ -349,40 +401,21 @@ RandIt op_partial_merge_with_buf_impl
if(buf_first1 == buf_last1){
//Skip any element that does not need to be moved
- while(!comp(*last1, *first1)){
- ++first1;
- if(first1 == last1){
- return first1;
- }
- }
-
- //If initialization is successful, move to buffer while merging
- //Three way moves need less moves when op is swap_op so use it
- //when merging elements from range2 to the destination occupied by range1
- if(!three_way_init(first1, last1, buf, buf_first1, buf_last1, op)){
- three_way_move(*first2, *first1, buf, op);
- for(++first1, ++first2; first1 != last1; ++first1){
- value_type &v = comp(*first2, *buf_first1) ? *first2++ : *buf_first1++;
- three_way_move(v, *first1, buf, op);
- }
+ first1 = skip_until_merge(first1, last1, *last1, comp);
+ if(first1 == last1){
+ return first1;
}
+ buf_first1 = buf.data();
+ buf_last1 = op_buffered_partial_merge_to_left_placed(first1, last1, first2, last2, buf_first1, comp, op);
+ BOOST_ASSERT(buf_last1 == (buf.data() + (last1-first1)));
+ first1 = last1;
}
-
- //Now merge from buffer
- if(first2 != last2)
- while(1){
- if(comp(*first2, *buf_first1)) {
- op(first2++, first1++);
- if(first2 == last2)
- break;
- }
- else{
- op(buf_first1++, first1++);
- if(buf_first1 == buf_last1)
- break;
- }
+ else{
+ BOOST_ASSERT((last1-first1) == (buf_last1 - buf_first1));
}
+ //Now merge from buffer
+ first1 = op_partial_merge(buf_first1, buf_last1, first2, last2, first1, comp, op);
buf_first1_in_out = buf_first1;
buf_last1_in_out = buf_last1;
return first1;
@@ -429,72 +462,53 @@ void op_merge_blocks_with_buf
, Op op
, Buf & xbuf)
{
- if(n_bef_irreg2 == 0){
- RandIt const last_reg(first+l_irreg1+n_aft_irreg2*l_block);
- op_buffered_merge(first, last_reg, last_reg+l_irreg2, comp, op, xbuf);
+ typedef typename Buf::iterator buf_iterator;
+ buf_iterator buffer = xbuf.data();
+ buf_iterator buffer_end = buffer;
+ RandIt first1 = first;
+ RandIt last1 = first1 + l_irreg1;
+ RandItKeys const key_end (key_first+n_bef_irreg2);
+
+ bool is_range1_A = true; //first l_irreg1 elements are always from range A
+
+ for( ; key_first != key_end; ++key_first, last1 += l_block){
+ //If the trailing block is empty, we'll make it equal to the previous if empty
+ bool const is_range2_A = key_comp(*key_first, midkey);
+
+ if(is_range1_A == is_range2_A){
+ //If buffered, put those elements in place
+ RandIt res = op(forward_t(), buffer, buffer_end, first1);
+ BOOST_ASSERT(buffer == buffer_end || res == last1); (void)res;
+ buffer_end = buffer;
+ first1 = last1;
+ }
+ else {
+ first1 = op_partial_merge_with_buf(first1, last1, last1, last1 + l_block, xbuf, buffer, buffer_end, comp, op, is_range1_A);
+ BOOST_ASSERT(buffer == buffer_end || (buffer_end-buffer) == (last1+l_block-first1));
+ is_range1_A ^= buffer == buffer_end;
+ }
}
- else {
- typedef typename Buf::iterator buf_iterator;
- buf_iterator buffer = xbuf.data();
- buf_iterator buffer_end = buffer;
- RandIt first1 = first;
- RandIt last1 = l_irreg1 ? first1 + l_irreg1 : first1 + l_block;
- RandIt first2 = last1;
- RandItKeys const key_end (key_first+n_bef_irreg2);
- for( bool is_range1_A = l_irreg1 ? true : key_comp(*key_first, midkey), skip_first_it = l_irreg1 != 0
- ; key_first != key_end; ){
- if(!skip_first_it){
- ++key_first;
- }
- skip_first_it = false;
- bool const last_it = key_first == key_end;
- //If the trailing block is empty, we'll make it equal to the previous if empty
- bool const is_range2_A = last_it ? (!l_irreg2 && is_range1_A) : key_comp(*key_first, midkey);
+ //Now the trailing irregular block, first put buffered elements in place
+ RandIt res = op(forward_t(), buffer, buffer_end, first1);
+ BOOST_ASSERT(buffer == buffer_end || res == last1); (void)res;
- if(is_range1_A == is_range2_A){
- if(buffer != buffer_end){
- first1 = op(forward_t(), buffer, buffer_end, first1);
- BOOST_ASSERT(first1 == first2);
- buffer_end = buffer;
- }
- first1 = first2;
- if(last_it){
- xbuf.clear();
- last1 = first2+l_block*n_aft_irreg2;
- op_buffered_merge(first1, last1, last1+l_irreg2, comp, op, xbuf);
- break;
- }
- else{
- last1 = first2 + l_block;
- }
- first2 += l_block;
- }
- else {
- BOOST_ASSERT(!last_it || (l_irreg2 || n_aft_irreg2));
- if(last_it){
- RandIt res = op(forward_t(), buffer, buffer_end, first1);
- BOOST_ASSERT(buffer == buffer_end || res == last1); (void)res;
- last1 += l_block*n_aft_irreg2;
- xbuf.clear();
- op_buffered_merge(first1, last1, last1+l_irreg2, comp, op, xbuf);
- break;
- }
- else{
- RandIt const last2 = first2 + l_block;
- first1 = op_partial_merge_with_buf(first1, last1, first2, last2, xbuf, buffer, buffer_end, comp, op, is_range1_A);
- if(buffer == buffer_end){
- is_range1_A = is_range2_A;
- }
- last1 = last2;
- first2 = last1;
- BOOST_ASSERT((buffer == buffer_end) || (buffer_end-buffer) == (last1-first1));
- }
- }
+ BOOST_ASSERT(l_irreg2 || n_aft_irreg2);
+ if(l_irreg2){
+ bool const is_range2_A = false; //last l_irreg2 elements always from range B
+ if(is_range1_A == is_range2_A){
+ first1 = last1;
+ last1 = last1+l_block*n_aft_irreg2;
+ }
+ else {
+ last1 += l_block*n_aft_irreg2;
}
+ xbuf.clear();
+ op_buffered_merge(first1, last1, last1+l_irreg2, comp, op, xbuf);
}
}
+
template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Buf>
void merge_blocks_with_buf
( RandItKeys key_first
@@ -532,9 +546,8 @@ RandIt op_partial_merge_left_middle_buffer_impl
, const typename iterator_traits<RandIt>::value_type &next_key, Compare comp
, Op op)
{
- while(first1 != last1 && !comp(next_key, *first1)){
- ++first1;
- }
+ first1 = skip_until_merge(first1, last1, next_key, comp);
+
//Even if we copy backward, no overlapping occurs so use forward copy
//that can be faster specially with trivial types
RandIt const new_first1 = first2 - (last1 - first1);
@@ -558,108 +571,20 @@ RandIt op_partial_merge_left_middle_buffer
// [first1, last1) merge [last1,last2) -> [buf_first, buf_first+M)
// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs.
template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_left_impl
- ( RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp, Op op)
-{
- RandIt first2 = last1;
- while(first1 != last1){
- if(first2 == last2){
- return first1;
- }
- if(comp(*first2, *first1)) {
- op(first2, buf_first);
- ++first2;
- }
- else{
- op(first1, buf_first);
- ++first1;
- }
- ++buf_first;
- }
- return first2;
-}
-
-
-template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_left
- ( RandIt buf_first, RandIt first1, RandIt const last1, RandIt const last2, Compare comp, Op op, bool is_stable)
-{
- return is_stable ? op_partial_merge_left_impl(buf_first, first1, last1, last2, comp, op)
- : op_partial_merge_left_impl(buf_first, first1, last1, last2, antistable<Compare>(comp), op);
-}
-
-template<class RandIt>
-bool three_way_side_init( RandIt first1, RandIt last1, RandIt buf_first1, move_op)
-{
- boost::move(first1, last1, buf_first1);
- return true;
-}
-
-template<class RandIt>
-bool three_way_side_init( RandIt, RandIt, RandIt, swap_op)
-{
- return false;
-}
-
-template<class T>
-void three_way_side_move(T &a, T &b, T&c, move_op)
-{
- c = boost::move(b);
- b = boost::move(a);
-}
-
-template<class T>
-void three_way_side_move(T &a, T &b, T &c, swap_op)
-{
- T tmp(boost::move(c));
- c = boost::move(b);
- b = boost::move(a);
- a = boost::move(tmp);
-}
-
-
-// Partially merges two ordered ranges. Partially means that elements are merged
-// until one of two ranges is exhausted (M elements from ranges 1 y 2).
-// [buf_first, ...) -> buffer that can be overwritten
-// [first1, last1) merge [last1,last2) -> [buf_first, buf_first+M)
-// Note: distance(buf_first, first1) >= distance(last1, last2), so no overlapping occurs.
-template<class RandIt, class Compare, class Op>
RandIt op_partial_merge_left_smart_impl
( RandIt first1, RandIt last1, RandIt first2, RandIt const last2, Compare comp, Op op)
{
- typedef typename iterator_traits<RandIt>::value_type value_type;
-
RandIt dest;
if(last1 != first2){
+ BOOST_ASSERT(0 != (last1-first1));
BOOST_ASSERT((first2-last1)==(last2-first2));
//Skip any element that does not need to be moved
- while(!comp(*first2, *first1)){
- ++first1;
- if(first1 == last1)
- return first2;
- }
-
+ first1 = skip_until_merge(first1, last1, *first2, comp);
+ if(first1 == last1)
+ return first2;
RandIt buf_first1 = first2 - (last1-first1);
-
- //If initialization is successful, move to buffer while merging
- //Three way moves need less moves when op is swap_op so use it
- //when merging elements from range2 to the destination occupied by range1
- if(!three_way_side_init(first1, last1, buf_first1, op)){
- RandIt buf_last1 = buf_first1;
- three_way_side_move(*first2, *first1, *buf_last1++, op);
-
- RandIt const orig_first2 = first2;(void)(orig_first2);
- for(++first1, ++first2; first1 != last1; ++first1, ++buf_last1){
- value_type &v = comp(*first2, *buf_first1) ? *first2++ : *buf_first1++;
- three_way_side_move(v, *first1, *buf_last1, op);
- }
- BOOST_ASSERT(buf_last1 == orig_first2);
- last1 = buf_last1;
- }
- else{
- last1 = first2;
- }
- dest = first1;
+ dest = last1;
+ last1 = op_buffered_partial_merge_to_left_placed(first1, last1, first2, last2, buf_first1, comp, op);
first1 = buf_first1;
BOOST_ASSERT((first1-dest) == (last2-first2));
}
@@ -667,27 +592,10 @@ RandIt op_partial_merge_left_smart_impl
dest = first1-(last2-first2);
}
- BOOST_ASSERT(0 != (last1-first1));
- if(first2 != last2)
- while(1){
- if(comp(*first2, *first1)) {
- op(first2++, dest++);
- if(first2 == last2){
- return first1;
- }
- }
- else{
- op(first1++, dest++);
- if(first1 == last1){
- return first2;
- }
- }
- }
- return first1;
+ op_partial_merge(first1, last1, first2, last2, dest, comp, op);
+ return first1 == last1 ? first2 : first1;
}
-
-
template<class RandIt, class Compare, class Op>
RandIt op_partial_merge_left_smart
(RandIt first1, RandIt const last1, RandIt first2, RandIt const last2, Compare comp, Op op, bool is_stable)
@@ -696,7 +604,6 @@ RandIt op_partial_merge_left_smart
: op_partial_merge_left_smart_impl(first1, last1, first2, last2, antistable<Compare>(comp), op);
}
-
// first - first element to merge.
// first[-l_block, 0) - buffer
// l_block - length of regular blocks. Blocks are stable sorted by 1st elements and key-coded
@@ -717,209 +624,58 @@ void op_merge_blocks_left
, typename iterator_traits<RandIt>::size_type const l_irreg2
, Compare comp, Op op)
{
- if(n_bef_irreg2 == 0){
- RandIt const last_reg(first+l_irreg1+n_aft_irreg2*l_block);
- op_merge_left(first-l_block, first, last_reg, last_reg+l_irreg2, comp, op);
- }
- else {
- RandIt buffer = first - l_block;
- RandIt first1 = first;
- RandIt last1 = l_irreg1 ? first1 + l_irreg1 : first1 + l_block;
- RandIt first2 = last1;
- RandItKeys const key_end (key_first+n_bef_irreg2);
- bool skip_first_it = l_irreg1 != 0;
- for( bool is_range1_A = l_irreg1 ? true : key_comp(*key_first, midkey)
- ; key_first != key_end; first2 += l_block){
- if(!skip_first_it){
- ++key_first;
- }
- skip_first_it = false;
- bool const last_it = key_first == key_end;
- //If the trailing block is empty, we'll make it equal to the previous if empty
- bool const is_range2_A = last_it ? (!l_irreg2 && is_range1_A) : key_comp(*key_first, midkey);
- bool const is_buffer_middle = last1 == buffer;
-
- if(is_range1_A == is_range2_A){
- //If range1 is buffered, write it to its final position
- if(!is_buffer_middle){
- buffer = op(forward_t(), first1, last1, buffer);
- }
-
- first1 = first2;
- if(last_it){
- last1 = first2+l_block*n_aft_irreg2;
- op_merge_left(buffer, first1, last1, last1+l_irreg2, comp, op);
- break;
- }
- else{
- last1 = first2 + l_block;
- }
- }
- else {
- BOOST_ASSERT(!last_it || (l_irreg2 || n_aft_irreg2));
- if(last_it){
- if(is_buffer_middle){
- //See comment below marked with (*)
- first1 = op_partial_merge_left_middle_buffer(first1, last1, first2, first2[l_block*n_aft_irreg2], comp, op, is_range1_A);
- last1 = first2;
- buffer = first1 - l_block;
- }
- last1 += l_block*n_aft_irreg2;
- op_merge_left(buffer, first1, last1, last1+l_irreg2, comp, op);
- break;
- }
- else{
- RandIt const last2 = first2 + l_block;
- first1 = op_partial_merge_left_smart(first1, last1, first2, last2, comp, op, is_range1_A);
-
- if(first1 < first2){ //is_buffer_middle == true for the next iteration
- last1 = first2;
- buffer = last1;
- }
- else{ //is_buffer_middle == false for the next iteration
- is_range1_A = is_range2_A;
- buffer = first1 - l_block;
- last1 = last2;
- }
- }
- }
- }
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// PARTIAL MERGE RIGHT
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_right_middle_buffer_impl
- ( RandIt const last1, RandIt const first2, RandIt last2, Compare comp, Op op)
-{
- while(first2 != last2 && !comp(last2[-1], last1[-1])){
- --last2;
- }
- return op(forward_t(), first2, last2, last1);
-}
-
-template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_right_middle_buffer
- ( RandIt const last1, RandIt first2, RandIt const last2
- , Compare comp, Op op, bool is_stable)
-{
- return is_stable ? op_partial_merge_right_middle_buffer_impl(last1, first2, last2, comp, op)
- : op_partial_merge_right_middle_buffer_impl(last1, first2, last2, antistable<Compare>(comp), op);
-}
-
-// Partially merges two ordered ranges. Partially means that elements are merged
-// until one of two ranges is exhausted (M elements from ranges 1 y 2).
-// [last2, buf_last) -> buffer that can be overwritten
-// [first1, last1) merge [last1,last2) -> [buf_last - M, buf_last)
-// Note: distance(last2, buf_last) >= distance(first1, last1), so no overlapping occurs.
-template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_right_impl
- ( RandIt const first1, RandIt last1, RandIt last2, RandIt buf_last, Compare comp, Op op)
-{
- RandIt const first2 = last1;
- while(first2 != last2){
- if(last1 == first1){
- return last2;
- }
- --last2;
- --last1;
- --buf_last;
- if(comp(*last2, *last1)){
- op(last1, buf_last);
- ++last2;
- }
- else{
- op(last2, buf_last);
- ++last1;
- }
- }
- return last1;
-}
-
-template<class RandIt, class Compare, class Op>
-RandIt op_partial_merge_right
- ( RandIt first1, RandIt const last1, RandIt const last2, RandIt buf_last, Compare comp, Op op, bool is_stable)
-{
- return is_stable ? op_partial_merge_right_impl(first1, last1, last2, buf_last, comp, op)
- : op_partial_merge_right_impl(first1, last1, last2, buf_last, antistable<Compare>(comp), op);
-}
-
-
-// first - first element to merge.
-// last iterator is (first+l_block*(n_bef_irreg2+n_aft_irreg2)+l_irreg2)
-// [last, last+l_block) - buffer
-// l_block - length of regular blocks. Blocks are stable sorted by 1st elements and key-coded
-// key_first - sequence of keys, in same order as blocks. key<midkey means stream A
-// n_bef_irreg2/n_aft_irreg2 are regular blocks
-// l_irreg2 is a irregular block, that is to be merged after n_bef_irreg2 blocks and before n_aft_irreg2 blocks
-// If l_irreg2==0 then n_aft_irreg2==0 (no irregular blocks).
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class Op>
-void op_merge_blocks_right
- ( RandItKeys const key_first
- , const typename iterator_traits<RandItKeys>::value_type &midkey
- , KeyCompare key_comp
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_block
- , typename iterator_traits<RandIt>::size_type const n_bef_irreg2
- , typename iterator_traits<RandIt>::size_type const n_aft_irreg2
- , typename iterator_traits<RandIt>::size_type const l_irreg2
- , Compare comp, Op op)
-{
- RandIt last1 = first + (n_bef_irreg2+n_aft_irreg2)*l_block;
- RandIt first1 = last1-l_block;
+ RandIt buffer = first - l_block;
+ RandIt first1 = first;
+ RandIt last1 = first1 + l_irreg1;
RandIt first2 = last1;
- RandIt last2 = first2 + l_irreg2;
- RandIt buffer_end = last2 + l_block;
- RandItKeys key_end (key_first+(n_bef_irreg2+n_aft_irreg2));
-
- for(bool is_range2_A = false; key_first != key_end; last1 = first1, first1 -= l_block){
- --key_end;
- bool const is_range1_A = key_comp(*key_end, midkey);
- bool const is_buffer_middle = first2 == buffer_end;
+ RandItKeys const key_end (key_first+n_bef_irreg2);
+ bool is_range1_A = true;
+ for( ; key_first != key_end; first2 += l_block, ++key_first){
+ //If the trailing block is empty, we'll make it equal to the previous if empty
+ bool const is_range2_A = key_comp(*key_first, midkey);
if(is_range1_A == is_range2_A){
- if(!is_buffer_middle){
- buffer_end = op(backward_t(), first2, last2, buffer_end);
+ if(last1 != buffer){ //equiv. to if(!is_buffer_middle)
+ buffer = op(forward_t(), first1, last1, buffer);
}
- //else //op forward already done on previous op_partial_merge_right
-
- first2 = first1;
- last2 = last1;
+ first1 = first2;
+ last1 = first2 + l_block;
}
else {
- if(is_buffer_middle){
- //A previous op_partial_merge_right has right range2 elements after the buffer.
- //In order to merge it with the next block, move them to the start of the buffer so that
- //buffer is placed to the right. Move only the minimum elements as some range1 elements
- //won't be moved in the merge.
- last2 = op_partial_merge_right_middle_buffer(last1, first2, last2, comp, op, !is_range2_A);
- first2 = last1;
- buffer_end = last2 + l_block;
- }
+ RandIt const last2 = first2 + l_block;
+ first1 = op_partial_merge_left_smart(first1, last1, first2, last2, comp, op, is_range1_A);
- //op_partial_merge_right merges two ranges, but stops moving elements
- //once one range is emptied to avoid moving data twice in the next iteration
- last2 = op_partial_merge_right(first1, last1, last2, buffer_end, comp, op, !is_range2_A);
- if(last2 > first2){ //is_buffer_middle == true for the next iteration
- buffer_end = first2;
+ if(first1 < first2){ //is_buffer_middle for the next iteration
+ last1 = first2;
+ buffer = last1;
}
- else{ //is_buffer_middle == false for the next iteration
- is_range2_A = is_range1_A;
- buffer_end = last2 + l_block;
- first2 = first1;
+ else{ //!is_buffer_middle for the next iteration
+ is_range1_A = is_range2_A;
+ buffer = first1 - l_block;
+ last1 = last2;
}
}
}
- if(first2 != buffer_end){
- op(backward_t(), first2, last2, buffer_end);
+ //Now the trailing irregular block
+ bool const is_range2_A = false; //Trailing l_irreg2 is always from Range B
+ bool const is_buffer_middle = last1 == buffer;
+
+ if(!l_irreg2 || is_range1_A == is_range2_A){ //trailing is always B type
+ //If range1 is buffered, write it to its final position
+ if(!is_buffer_middle){
+ buffer = op(forward_t(), first1, last1, buffer);
+ }
+ first1 = first2;
+ }
+ else {
+ if(is_buffer_middle){
+ first1 = op_partial_merge_left_middle_buffer(first1, last1, first2, first2[l_block*n_aft_irreg2], comp, op, is_range1_A);
+ buffer = first1 - l_block;
+ }
}
+ last1 = first2 + l_block*n_aft_irreg2;
+ op_merge_left(buffer, first1, last1, last1+l_irreg2, comp, op);
}
///////////////////////////////////////////////////////////////////////////////
@@ -937,17 +693,17 @@ RandIt partial_merge_bufferless_impl
return first1;
}
bool const is_range1_A = *pis_range1_A;
- if(first1 != last1 && comp(*last1, last1[-1])){
+ if(first1 != last1 && comp(*last1, last1[-1])){
do{
RandIt const old_last1 = last1;
- last1 = lower_bound(last1, last2, *first1, comp);
+ last1 = lower_bound(last1, last2, *first1, comp);
first1 = rotate_gcd(first1, old_last1, last1);//old_last1 == last1 supported
if(last1 == last2){
return first1;
}
do{
++first1;
- } while(last1 != first1 && !comp(*last1, *first1) );
+ } while(last1 != first1 && !comp(*last1, *first1) );
} while(first1 != last1);
}
*pis_range1_A = !is_range1_A;
@@ -993,7 +749,7 @@ void merge_blocks_bufferless
bool is_range1_A = l_irreg1 ? true : key_comp(*key_first++, midkey);
for( ; key_first != key_end; ++key_first){
- bool is_range2_A = key_comp(*key_first, midkey);
+ bool is_range2_A = key_comp(*key_first, midkey);
if(is_range1_A == is_range2_A){
first1 = last1;
}
@@ -1077,9 +833,9 @@ typename iterator_traits<RandIt>::size_type
if(xbuf.capacity() >= max_collected){
value_type *const ph0 = xbuf.add(first);
while(u != last && h < max_collected){
- value_type * const r = lower_bound(ph0, xbuf.end(), *u, comp);
+ value_type * const r = lower_bound(ph0, xbuf.end(), *u, comp);
//If key not found add it to [h, h+h0)
- if(r == xbuf.end() || comp(*u, *r) ){
+ if(r == xbuf.end() || comp(*u, *r) ){
RandIt const new_h0 = boost::move(search_end, u, h0);
search_end = u;
++search_end;
@@ -1094,9 +850,9 @@ typename iterator_traits<RandIt>::size_type
}
else{
while(u != last && h < max_collected){
- RandIt const r = lower_bound(h0, search_end, *u, comp);
+ RandIt const r = lower_bound(h0, search_end, *u, comp);
//If key not found add it to [h, h+h0)
- if(r == search_end || comp(*u, *r) ){
+ if(r == search_end || comp(*u, *r) ){
RandIt const new_h0 = rotate_gcd(h0, search_end, u);
search_end = u;
++search_end;
@@ -1200,6 +956,18 @@ struct less
//
///////////////////////////////////////////////////////////////////////////////
+//#define ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
+#if defined ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+template<class RandIt, class Compare>
+void slow_stable_sort
+ ( RandIt const first, RandIt const last, Compare comp)
+{
+ boost::movelib::inplace_stable_sort(first, last, comp);
+}
+
+#else //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
template<class RandIt, class Compare>
void slow_stable_sort
( RandIt const first, RandIt const last, Compare comp)
@@ -1222,16 +990,18 @@ void slow_stable_sort
if(do_merge){
size_type const h_2 = 2*h;
while((L-p0) > h_2){
- merge_bufferless(first+p0, first+p0+h, first+p0+h_2, comp);
+ merge_bufferless(first+p0, first+p0+h, first+p0+h_2, comp);
p0 += h_2;
}
}
- if((L-p0) > h){
+ if((L-p0) > h){
merge_bufferless(first+p0, first+p0+h, last, comp);
}
}
}
+#endif //ADAPTIVE_SORT_MERGE_SLOW_STABLE_SORT_IS_NLOGN
+
//Returns new l_block and updates use_buf
template<class Unsigned>
Unsigned lblock_for_combine
@@ -1271,7 +1041,7 @@ Unsigned lblock_for_combine
//Although "cycle" sort is known to have the minimum number of writes to target
//selection sort is more appropriate here as we want to minimize swaps.
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class XBuf>
void selection_sort_blocks
( RandItKeys keys
, typename iterator_traits<RandIt>::size_type &midkey_idx //inout
@@ -1280,7 +1050,9 @@ void selection_sort_blocks
, typename iterator_traits<RandIt>::size_type const l_block
, typename iterator_traits<RandIt>::size_type const n_blocks
, Compare comp
- , bool use_first_element)
+ , bool use_first_element
+ , XBuf & xbuf
+)
{
typedef typename iterator_traits<RandIt>::size_type size_type ;
size_type const back_midkey_idx = midkey_idx;
@@ -1294,6 +1066,10 @@ void selection_sort_blocks
//One-past the position of the first untouched element of the second half
size_type high_watermark = back_midkey_idx+1;
BOOST_ASSERT(high_watermark <= n_blocks);
+ const bool b_cache_on = xbuf.capacity() >= l_block;
+ //const bool b_cache_on = false;
+ const size_type cached_none = size_type(-1);
+ size_type cached_block = cached_none;
//Sort by first element if left merging, last element otherwise
size_type const reg_off = use_first_element ? 0u: l_block-1;
@@ -1303,35 +1079,89 @@ void selection_sort_blocks
//Since we are searching for the minimum value in two sorted halves:
//Optimization 1: If block belongs to first half, don't waste time comparing elements of the first half.
//Optimization 2: It is enough to compare until the first untouched element of the second half.
+ //Optimization 3: If cache memory is available, instead of swapping blocks (3 writes per element),
+ // play with the cache to aproximate it to 2 writes per element.
high_watermark = size_type(max_value(block+2, high_watermark));
BOOST_ASSERT(high_watermark <= n_blocks);
for(size_type next_block = size_type(max_value(block+1, back_midkey_idx)); next_block < high_watermark; ++next_block){
- const value_type &v = first_block[next_block*l_block+reg_off];
- const value_type &min = first_block[min_block*l_block+reg_off];
- if( comp(v, min) || (!comp(min, v) && key_comp(keys[next_block], keys[min_block])) ){
- min_block=next_block;
+ const value_type &min_v = (b_cache_on && (cached_block == min_block) ? xbuf.data()[reg_off] : first_block[min_block*l_block+reg_off]);
+ const value_type &v = (b_cache_on && (cached_block == next_block) ? xbuf.data()[reg_off] : first_block[next_block*l_block+reg_off]);
+
+ if( comp(v, min_v) || (!comp(min_v, v) && key_comp(keys[next_block], keys[min_block])) ){
+ min_block = next_block;
}
}
if(min_block != block){
BOOST_ASSERT(block >= back_midkey_idx || min_block >= back_midkey_idx);
BOOST_ASSERT(min_block < high_watermark);
- //Update high watermark if n_blocks is not surpassed
+ //Increase high watermark if not the maximum and min_block is just before the high watermark
high_watermark += size_type((min_block + 1) != n_blocks && (min_block + 1) == high_watermark);
BOOST_ASSERT(high_watermark <= n_blocks);
- boost::adl_move_swap_ranges(first_block+block*l_block, first_block+(block+1)*l_block, first_block+min_block*l_block);
+ if(!b_cache_on){
+ boost::adl_move_swap_ranges(first_block+block*l_block, first_block+(block+1)*l_block, first_block+min_block*l_block);
+ }
+ else if(cached_block == cached_none){
+ //Cache the biggest block and put the minimum into its final position
+ xbuf.move_assign(first_block+block*l_block, l_block);
+ boost::move(first_block+min_block*l_block, first_block+(min_block+1)*l_block, first_block+block*l_block);
+ cached_block = min_block;
+ }
+ else if(cached_block == block){
+ //Since block is cached and is not the minimum, just put the minimum directly into its final position and update the cache index
+ boost::move(first_block+min_block*l_block, first_block+(min_block+1)*l_block, first_block+block*l_block);
+ cached_block = min_block;
+ }
+ else if(cached_block == min_block){
+ //Since the minimum is cached, move the block to the back position and flush the cache to its final position
+ boost::move(first_block+block*l_block, first_block+(block+1)*l_block, first_block+min_block*l_block);
+ boost::move(xbuf.data(), xbuf.end(), first_block+block*l_block);
+ cached_block = cached_none;
+ }
+ else{
+ //Cached block is not any of two blocks to be exchanged, a smarter operation must be performed
+ BOOST_ASSERT(cached_block != min_block);
+ BOOST_ASSERT(cached_block != block);
+ BOOST_ASSERT(cached_block > block);
+ BOOST_ASSERT(cached_block < high_watermark);
+ //Instead of moving block to the slot of the minimum (which is typical selection sort), before copying
+ //data from the minimum slot to its final position:
+ // -> move it to free slot pointed by cached index, and
+ // -> move cached index into slot of the minimum.
+ //Since both cached_block and min_block belong to the still unordered range of blocks, the change
+ //does not break selection sort and saves one copy.
+ boost::move(first_block+block*l_block, first_block+(block+1)*l_block, first_block+cached_block*l_block);
+ boost::move(first_block+min_block*l_block, first_block+(min_block+1)*l_block, first_block+block*l_block);
+ //Note that this trick requires an additionl fix for keys and midkey index
+ boost::adl_move_swap(keys[cached_block], keys[min_block]);
+ if(midkey_idx == cached_block)
+ midkey_idx = min_block;
+ else if(midkey_idx == min_block)
+ midkey_idx = cached_block;
+ boost::adl_move_swap(cached_block, min_block);
+ }
+ //Once min_block and block are exchanged, fix the movement imitation key buffer and midkey index.
boost::adl_move_swap(keys[block], keys[min_block]);
if(midkey_idx == block)
midkey_idx = min_block;
else if(midkey_idx == min_block)
midkey_idx = block;
}
+ else if(b_cache_on && cached_block == block){
+ //The selected block was the minimum, but since it was cached, move it to its final position
+ boost::move(xbuf.data(), xbuf.end(), first_block+block*l_block);
+ cached_block = cached_none;
+ }
+ } //main for loop
+
+ if(b_cache_on && cached_block != cached_none){
+ //The sort has ended with cached data, move it to its final position
+ boost::move(xbuf.data(), xbuf.end(), first_block+cached_block*l_block);
}
}
-template<class RandIt, class Compare>
-void stable_sort( RandIt first, RandIt last, Compare comp
- , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf)
+template<class RandIt, class Compare, class XBuf>
+void stable_sort( RandIt first, RandIt last, Compare comp, XBuf & xbuf)
{
typedef typename iterator_traits<RandIt>::size_type size_type;
size_type const len = size_type(last - first);
@@ -1344,10 +1174,10 @@ void stable_sort( RandIt first, RandIt last, Compare comp
}
}
-template<class RandIt, class Comp>
+template<class RandIt, class Comp, class XBuf>
void initialize_keys( RandIt first, RandIt last
, Comp comp
- , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf)
+ , XBuf & xbuf)
{
stable_sort(first, last, comp, xbuf);
}
@@ -1365,7 +1195,7 @@ void initialize_keys( RandIt first, RandIt last
}
}
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class XBuf>
void combine_params
( RandItKeys const keys
, KeyCompare key_comp
@@ -1373,7 +1203,7 @@ void combine_params
, typename iterator_traits<RandIt>::size_type l_combined
, typename iterator_traits<RandIt>::size_type const l_prev_merged
, typename iterator_traits<RandIt>::size_type const l_block
- , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
+ , XBuf & xbuf
, Compare comp
//Output
, typename iterator_traits<RandIt>::size_type &midkey_idx
@@ -1381,27 +1211,39 @@ void combine_params
, typename iterator_traits<RandIt>::size_type &n_bef_irreg2
, typename iterator_traits<RandIt>::size_type &n_aft_irreg2
, typename iterator_traits<RandIt>::size_type &l_irreg2
- , bool is_merge_left)
+ //Options
+ , bool is_merge_left_or_bufferless
+ , bool do_initialize_keys = true)
{
typedef typename iterator_traits<RandIt>::size_type size_type;
typedef typename iterator_traits<RandIt>::value_type value_type;
+ //Initial parameters for selection sort blocks
l_irreg1 = l_prev_merged%l_block;
l_irreg2 = (l_combined-l_irreg1)%l_block;
BOOST_ASSERT(((l_combined-l_irreg1-l_irreg2)%l_block) == 0);
size_type const n_reg_block = (l_combined-l_irreg1-l_irreg2)/l_block;
midkey_idx = l_prev_merged/l_block;
BOOST_ASSERT(n_reg_block>=midkey_idx);
- initialize_keys(keys, keys+n_reg_block+(midkey_idx==n_reg_block), key_comp, xbuf);
- selection_sort_blocks(keys, midkey_idx, key_comp, first+l_irreg1, l_block, n_reg_block, comp, is_merge_left);
+ //Key initialization
+ if (do_initialize_keys) {
+ initialize_keys(keys, keys+n_reg_block+(midkey_idx==n_reg_block), key_comp, xbuf);
+ }
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A initkey: ", l_combined + l_block);
+
+ //Selection sort blocks
+ selection_sort_blocks(keys, midkey_idx, key_comp, first+l_irreg1, l_block, n_reg_block, comp, is_merge_left_or_bufferless, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A selsort: ", l_combined + l_block);
+
+ //Special case for the last elements
n_aft_irreg2 = 0;
- if(l_irreg2!=0){
- size_type const reg_off = is_merge_left ? 0u: l_block-1;
- size_type const irreg_off = is_merge_left ? 0u: l_irreg2-1;
+ if(l_irreg2 != 0){
+ size_type const reg_off = is_merge_left_or_bufferless ? 0u: l_block-1;
+ size_type const irreg_off = is_merge_left_or_bufferless ? 0u: l_irreg2-1;
RandIt prev_block_first = first + l_combined - l_irreg2;
const value_type &incomplete_block_first = prev_block_first[irreg_off];
- while(n_aft_irreg2 != n_reg_block &&
+ while(n_aft_irreg2 != n_reg_block &&
comp(incomplete_block_first, (prev_block_first-= l_block)[reg_off]) ){
++n_aft_irreg2;
}
@@ -1461,14 +1303,17 @@ void merge_blocks_right
, Compare comp
, bool const xbuf_used)
{
- if(xbuf_used){
- op_merge_blocks_right
- (key_first, midkey, key_comp, first, l_block, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, move_op());
- }
- else{
- op_merge_blocks_right
- (key_first, midkey, key_comp, first, l_block, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, swap_op());
- }
+ merge_blocks_left
+ ( make_reverse_iterator(key_first+n_aft_irreg2 + n_bef_irreg2)
+ , midkey
+ , negate<KeyCompare>(key_comp)
+ , make_reverse_iterator(first+(n_bef_irreg2+n_aft_irreg2)*l_block+l_irreg2)
+ , l_block
+ , l_irreg2
+ , n_aft_irreg2 + n_bef_irreg2
+ , 0
+ , 0
+ , inverse<Compare>(comp), xbuf_used);
}
@@ -1530,8 +1375,8 @@ Unsigned calculate_total_combined(Unsigned const len, Unsigned const l_prev_merg
// Blocks of length l_prev_merged combined. We'll combine them in pairs
// l_prev_merged and n_keys are powers of 2. (2*l_prev_merged/l_block) keys are guaranteed
// Returns the number of combined elements (some trailing elements might be left uncombined)
-template<class RandItKeys, class KeyCompare, class RandIt, class Compare>
-void combine_blocks
+template<class RandItKeys, class KeyCompare, class RandIt, class Compare, class XBuf>
+void adaptive_sort_combine_blocks
( RandItKeys const keys
, KeyCompare key_comp
, RandIt const first
@@ -1540,16 +1385,17 @@ void combine_blocks
, typename iterator_traits<RandIt>::size_type const l_block
, bool const use_buf
, bool const xbuf_used
- , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
+ , XBuf & xbuf
, Compare comp
, bool merge_left)
{
+ (void)xbuf;
typedef typename iterator_traits<RandIt>::size_type size_type;
- size_type const l_combined = 2*l_prev_merged;
+ size_type const l_reg_combined = 2*l_prev_merged;
size_type l_irreg_combined = 0;
size_type const l_total_combined = calculate_total_combined(len, l_prev_merged, &l_irreg_combined);
- size_type const n_reg_combined = len/l_combined;
+ size_type const n_reg_combined = len/l_reg_combined;
RandIt combined_first = first;
(void)l_total_combined;
@@ -1558,32 +1404,37 @@ void combine_blocks
size_type n_bef_irreg2, n_aft_irreg2, midkey_idx, l_irreg1, l_irreg2;
size_type const max_i = n_reg_combined + (l_irreg_combined != 0);
- if(merge_left || !use_buf)
- for( size_type combined_i = 0; combined_i != max_i; ++combined_i, combined_first += l_combined) {
+ if(merge_left || !use_buf) {
+ for( size_type combined_i = 0; combined_i != max_i; ++combined_i, combined_first += l_reg_combined) {
bool const is_last = combined_i==n_reg_combined;
- combine_params( keys, key_comp, combined_first, is_last ? l_irreg_combined : l_combined
- , l_prev_merged, l_block, xbuf, comp
+ size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
+
+ range_xbuf<RandIt, move_op> rbuf( (use_buf && xbuf_used) ? (combined_first-l_block) : combined_first, combined_first);
+ combine_params( keys, key_comp, combined_first, l_cur_combined
+ , l_prev_merged, l_block, rbuf, comp
, midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, true); //Outputs
- //BOOST_MOVE_ADAPTIVE_SORT_PRINT(" After combine_params: ", len + l_block);
- BOOST_ASSERT(!l_irreg1);
- if(use_buf){
- merge_blocks_left
- (keys, keys[midkey_idx], key_comp, combined_first, l_block, 0u, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf_used);
- }
- else{
+ //Now merge blocks
+ if(!use_buf){
merge_blocks_bufferless
(keys, keys[midkey_idx], key_comp, combined_first, l_block, 0u, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp);
}
+ else{
+ merge_blocks_left
+ (keys, keys[midkey_idx], key_comp, combined_first, l_block, 0u, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf_used);
+ }
//BOOST_MOVE_ADAPTIVE_SORT_PRINT(" After merge_blocks_l: ", len + l_block);
}
+ }
else{
- combined_first += l_combined*(max_i-1);
- for( size_type combined_i = max_i; combined_i--; combined_first -= l_combined) {
+ combined_first += l_reg_combined*(max_i-1);
+ for( size_type combined_i = max_i; combined_i--; combined_first -= l_reg_combined) {
bool const is_last = combined_i==n_reg_combined;
- combine_params( keys, key_comp, combined_first, is_last ? l_irreg_combined : l_combined
- , l_prev_merged, l_block, xbuf, comp
- , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, false); //Outputs
- BOOST_ASSERT(!l_irreg1);
+ size_type const l_cur_combined = is_last ? l_irreg_combined : l_reg_combined;
+ RandIt const combined_last(combined_first+l_cur_combined);
+ range_xbuf<RandIt, move_op> rbuf(combined_last, xbuf_used ? (combined_last+l_block) : combined_last);
+ combine_params( keys, key_comp, combined_first, l_cur_combined
+ , l_prev_merged, l_block, rbuf, comp
+ , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, false); //Outputs
//BOOST_MOVE_ADAPTIVE_SORT_PRINT(" After combine_params: ", len + l_block);
merge_blocks_right
(keys, keys[midkey_idx], key_comp, combined_first, l_block, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf_used);
@@ -1709,12 +1560,12 @@ void op_merge_right_step
if(restk <= l_build_buf){
op(backward_t(),first_block+p, first_block+p+restk, first_block+p+restk+l_build_buf);
}
- else{
+ else{
op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+restk, first_block+p+restk+l_build_buf, comp, op);
}
while(p>0){
p -= 2*l_build_buf;
- op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+2*l_build_buf, first_block+p+3*l_build_buf, comp, op);
+ op_merge_right(first_block+p, first_block+p+l_build_buf, first_block+p+2*l_build_buf, first_block+p+3*l_build_buf, comp, op);
}
}
@@ -1741,7 +1592,7 @@ void op_merge_right_step
// until all is merged or auxiliary memory is not large enough.
template<class RandIt, class Compare>
typename iterator_traits<RandIt>::size_type
- build_blocks
+ adaptive_sort_build_blocks
( RandIt const first
, typename iterator_traits<RandIt>::size_type const len
, typename iterator_traits<RandIt>::size_type const l_base
@@ -1830,7 +1681,7 @@ typename iterator_traits<RandIt>::size_type
//[buffer+len-l_intbuf, buffer+len). Otherwise, buffer is
//[buffer,buffer+l_intbuf)
template<class RandIt, class Compare>
-bool combine_all_blocks
+bool adaptive_sort_combine_all_blocks
( RandIt keys
, typename iterator_traits<RandIt>::size_type &n_keys
, RandIt const buffer
@@ -1847,14 +1698,7 @@ bool combine_all_blocks
//Backup data to external buffer once if possible
bool const common_xbuf = l_data > l_merged && l_intbuf && l_intbuf <= xbuf.capacity();
if(common_xbuf){
- if(n_keys){
- xbuf.move_assign(buffer, l_intbuf);
- }
- else{
- xbuf.clear();
- merge_sort_uninitialized_copy(buffer, first, xbuf.data(), comp);
- xbuf.set_size(l_intbuf);
- }
+ xbuf.move_assign(buffer, l_intbuf);
}
bool prev_merge_left = true;
@@ -1877,8 +1721,7 @@ bool combine_all_blocks
bool const is_merge_left = (n&1) == 0;
size_type const l_total_combined = calculate_total_combined(l_data, l_merged);
-
- if(prev_use_internal_buf && prev_merge_left){
+ if(n && prev_use_internal_buf && prev_merge_left){
if(is_merge_left || !use_internal_buf){
move_data_backward(first-l_prev_block, l_prev_total_combined, first, common_xbuf);
}
@@ -1900,13 +1743,13 @@ bool combine_all_blocks
//Combine to form l_merged*2 segments
if(n_keys){
- combine_blocks
+ adaptive_sort_combine_blocks
( keys, comp, !use_internal_buf || is_merge_left ? first : first-l_block
, l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
}
else{
size_type *const uint_keys = xbuf.template aligned_trailing<size_type>();
- combine_blocks
+ adaptive_sort_combine_blocks
( uint_keys, less(), !use_internal_buf || is_merge_left ? first : first-l_block
, l_data, l_merged, l_block, use_internal_buf, common_xbuf, xbuf, comp, is_merge_left);
}
@@ -1918,6 +1761,7 @@ bool combine_all_blocks
}
BOOST_ASSERT(l_prev_total_combined == l_data);
bool const buffer_right = prev_use_internal_buf && prev_merge_left;
+
l_intbuf = prev_use_internal_buf ? l_prev_block : 0u;
n_keys = l_unique - l_intbuf;
//Restore data from to external common buffer if used
@@ -1954,15 +1798,15 @@ void stable_merge
template<class RandIt, class Compare>
-void final_merge( bool buffer_right
- , RandIt const first
- , typename iterator_traits<RandIt>::size_type const l_intbuf
- , typename iterator_traits<RandIt>::size_type const n_keys
- , typename iterator_traits<RandIt>::size_type const len
- , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
- , Compare comp)
-{
- BOOST_ASSERT(n_keys || xbuf.size() == l_intbuf);
+void adaptive_sort_final_merge( bool buffer_right
+ , RandIt const first
+ , typename iterator_traits<RandIt>::size_type const l_intbuf
+ , typename iterator_traits<RandIt>::size_type const n_keys
+ , typename iterator_traits<RandIt>::size_type const len
+ , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
+ , Compare comp)
+{
+ //BOOST_ASSERT(n_keys || xbuf.size() == l_intbuf);
xbuf.clear();
typedef typename iterator_traits<RandIt>::size_type size_type;
@@ -1990,7 +1834,7 @@ void final_merge( bool buffer_right
}
template<class RandIt, class Compare, class Unsigned, class T>
-bool build_params
+bool adaptive_sort_build_params
(RandIt first, Unsigned const len, Compare comp
, Unsigned &n_keys, Unsigned &l_intbuf, Unsigned &l_base, Unsigned &l_build_buf
, adaptive_xbuf<T> & xbuf
@@ -2009,7 +1853,7 @@ bool build_params
//segments of size l_build_buf*2, maximizing the classic merge phase.
l_intbuf = size_type(ceil_sqrt_multiple(len, &l_base));
- //This is the minimum number of case to implement the ideal algorithm
+ //This is the minimum number of keys to implement the ideal algorithm
//
//l_intbuf is used as buffer plus the key count
size_type n_min_ideal_keys = l_intbuf-1u;
@@ -2030,10 +1874,10 @@ bool build_params
//
//If available memory is 2*sqrt(l), then only sqrt(l) unique keys are needed,
//(to be used for keys in combine_all_blocks) as the whole l_build_buf
- //we'll be backuped in the buffer during build_blocks.
+ //will be backuped in the buffer during build_blocks.
bool const non_unique_buf = xbuf.capacity() >= 2*l_intbuf;
size_type const to_collect = non_unique_buf ? l_intbuf : l_intbuf*2;
- size_type collected = collect_unique(first, first+len, to_collect, comp, xbuf);
+ size_type collected = collect_unique(first, first+len, to_collect, comp, xbuf);
//If available memory is 2*sqrt(l), then for "build_params"
//the situation is the same as if 2*l_intbuf were collected.
@@ -2044,7 +1888,7 @@ bool build_params
//is possible (due to very low unique keys), then go to a slow sort based on rotations.
if(collected < (n_min_ideal_keys+l_intbuf)){
if(collected < 4){ //No combination possible with less that 4 keys
- return false;
+ return false;
}
n_keys = l_intbuf;
while(n_keys&(n_keys-1)){
@@ -2053,6 +1897,7 @@ bool build_params
while(n_keys > collected){
n_keys/=2;
}
+ //AdaptiveSortInsertionSortThreshold is always power of two so the minimum is power of two
l_base = min_value<Unsigned>(n_keys, AdaptiveSortInsertionSortThreshold);
l_intbuf = 0;
l_build_buf = n_keys;
@@ -2072,6 +1917,224 @@ bool build_params
return true;
}
+
+#define BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
+
+template<class RandIt, class Compare>
+inline void adaptive_merge_combine_blocks( RandIt first
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , typename iterator_traits<RandIt>::size_type collected
+ , typename iterator_traits<RandIt>::size_type n_keys
+ , typename iterator_traits<RandIt>::size_type l_block
+ , bool use_internal_buf
+ , bool xbuf_used
+ , Compare comp
+ , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ size_type const len = len1+len2;
+ size_type const l_combine = len-collected;
+ size_type const l_combine1 = len1-collected;
+ size_type n_bef_irreg2, n_aft_irreg2, l_irreg1, l_irreg2, midkey_idx;
+
+ if(n_keys){
+ RandIt const first_data = first+collected;
+ RandIt const keys = first;
+ combine_params( keys, comp, first_data, l_combine
+ , l_combine1, l_block, xbuf, comp
+ , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, true, false); //Outputs
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A combine: ", len);
+ if(xbuf_used){
+ BOOST_ASSERT(xbuf.size() >= l_block);
+ merge_blocks_with_buf
+ (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf, xbuf_used);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg xbf: ", len);
+ }
+ else if(use_internal_buf){
+ #ifdef BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
+ range_xbuf<RandIt, swap_op> rbuf(first_data-l_block, first_data);
+ merge_blocks_with_buf
+ (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, rbuf, xbuf_used);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg buf: ", len);
+ #else
+ merge_blocks_left
+ (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf_used);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg lft: ", len);
+ #endif
+ }
+ else{
+ merge_blocks_bufferless
+ (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg xbf: ", len);
+ }
+ }
+ else{
+ xbuf.shrink_to_fit(l_block);
+ if(xbuf.size() < l_block){
+ xbuf.initialize_until(l_block, *first);
+ }
+ size_type *const uint_keys = xbuf.template aligned_trailing<size_type>(l_block);
+ combine_params( uint_keys, less(), first, l_combine
+ , l_combine1, l_block, xbuf, comp
+ , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, true, true); //Outputs
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A combine: ", len);
+ BOOST_ASSERT(xbuf.size() >= l_block);
+ merge_blocks_with_buf
+ (uint_keys, uint_keys[midkey_idx], less(), first, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf, true);
+ xbuf.clear();
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg buf: ", len);
+ }
+
+}
+
+template<class RandIt, class Compare>
+inline void adaptive_merge_final_merge( RandIt first
+ , typename iterator_traits<RandIt>::size_type len1
+ , typename iterator_traits<RandIt>::size_type len2
+ , typename iterator_traits<RandIt>::size_type collected
+ , typename iterator_traits<RandIt>::size_type l_intbuf
+ , typename iterator_traits<RandIt>::size_type l_block
+ , bool use_internal_buf
+ , bool xbuf_used
+ , Compare comp
+ , adaptive_xbuf<typename iterator_traits<RandIt>::value_type> & xbuf
+ )
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ (void)l_block;
+ size_type n_keys = collected-l_intbuf;
+ size_type len = len1+len2;
+ if(use_internal_buf){
+ if(xbuf_used){
+ xbuf.clear();
+ //Nothing to do
+ if(n_keys){
+ stable_sort(first, first+n_keys, comp, xbuf);
+ stable_merge(first, first+n_keys, first+len, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A key mrg: ", len);
+ }
+ }
+ else{
+ #ifdef BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
+ xbuf.clear();
+ stable_sort(first, first+collected, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A k/b srt: ", len);
+ stable_merge(first, first+collected, first+len, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A k/b mrg: ", len);
+ #else
+ xbuf.clear();
+ stable_sort(first+len-l_block, first+len, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A buf srt: ", len);
+ RandIt const pos1 = lower_bound(first+n_keys, first+len-l_block, first[len-1], comp);
+ RandIt const pos2 = rotate_gcd(pos1, first+len-l_block, first+len);
+ stable_merge(first+n_keys, pos1, pos2, antistable<Compare>(comp), xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A buf mrg: ", len);
+ if(n_keys){
+ stable_sort(first, first+n_keys, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A key srt: ", len);
+ stable_merge(first, first+n_keys, first+len, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A key mrg: ", len);
+ }
+ #endif
+ }
+ }
+ else{
+ xbuf.clear();
+ stable_sort(first, first+collected, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A k/b srt: ", len);
+ stable_merge(first, first+collected, first+len1+len2, comp, xbuf);
+ BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A k/b mrg: ", len);
+ }
+}
+
+template<class SizeType, class Xbuf>
+inline SizeType adaptive_merge_n_keys_intbuf(SizeType l_block, SizeType len, Xbuf & xbuf, SizeType &l_intbuf_inout)
+{
+ typedef SizeType size_type;
+ size_type l_intbuf = xbuf.capacity() >= l_block ? 0u : l_block;
+
+ //This is the minimum number of keys to implement the ideal algorithm
+ //ceil(len/l_block) - 1 (as the first block is used as buffer)
+ size_type n_keys = len/l_block+1;
+ while(n_keys >= (len-l_intbuf-n_keys)/l_block){
+ --n_keys;
+ }
+ ++n_keys;
+ //BOOST_ASSERT(n_keys < l_block);
+
+ if(xbuf.template supports_aligned_trailing<size_type>(l_block, n_keys)){
+ n_keys = 0u;
+ }
+ l_intbuf_inout = l_intbuf;
+ return n_keys;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////
+
+// Main explanation of the sort algorithm.
+//
+// csqrtlen = ceil(sqrt(len));
+//
+// * First, 2*csqrtlen unique elements elements are extracted from elements to be
+// sorted and placed in the beginning of the range.
+//
+// * Step "build_blocks": In this nearly-classic merge step, 2*csqrtlen unique elements
+// will be used as auxiliary memory, so trailing len-2*csqrtlen elements are
+// are grouped in blocks of sorted 4*csqrtlen elements. At the end of the step
+// 2*csqrtlen unique elements are again the leading elements of the whole range.
+//
+// * Step "combine_blocks": pairs of previously formed blocks are merged with a different
+// ("smart") algorithm to form blocks of 8*csqrtlen elements. This step is slower than the
+// "build_blocks" step and repeated iteratively (forming blocks of 16*csqrtlen, 32*csqrtlen
+// elements, etc) of until all trailing (len-2*csqrtlen) elements are merged.
+//
+// In "combine_blocks" len/csqrtlen elements used are as "keys" (markers) to
+// know if elements belong to the first or second block to be merged and another
+// leading csqrtlen elements are used as buffer. Explanation of the "combine_blocks" step:
+//
+// Iteratively until all trailing (len-2*csqrtlen) elements are merged:
+// Iteratively for each pair of previously merged block:
+// * Blocks are divided groups of csqrtlen elements and
+// 2*merged_block/csqrtlen keys are sorted to be used as markers
+// * Groups are selection-sorted by first or last element (depending wheter they
+// merged to left or right) and keys are reordered accordingly as an imitation-buffer.
+// * Elements of each block pair is merged using the csqrtlen buffer taking into account
+// if they belong to the first half or second half (marked by the key).
+//
+// * In the final merge step leading elements (2*csqrtlen) are sorted and merged with
+// rotations with the rest of sorted elements in the "combine_blocks" step.
+//
+// Corner cases:
+//
+// * If no 2*csqrtlen elements can be extracted:
+//
+// * If csqrtlen+len/csqrtlen are extracted, then only csqrtlen elements are used
+// as buffer in the "build_blocks" step forming blocks of 2*csqrtlen elements. This
+// means that an additional "combine_blocks" step will be needed to merge all elements.
+//
+// * If no csqrtlen+len/csqrtlen elements can be extracted, but still more than a minimum,
+// then reduces the number of elements used as buffer and keys in the "build_blocks"
+// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
+// then uses a rotation based smart merge.
+//
+// * If the minimum number of keys can't be extracted, a rotation-based sorting is performed.
+//
+// * If auxiliary memory is more or equal than ceil(len/2), half-copying mergesort is used.
+//
+// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
+// then only csqrtlen elements need to be extracted and "combine_blocks" will use integral
+// keys to combine blocks.
+//
+// * If auxiliary memory is available, the "build_blocks" will be extended to build bigger blocks
+// using classic merge.
template<class RandIt, class Compare>
void adaptive_sort_impl
( RandIt first
@@ -2093,7 +2156,7 @@ void adaptive_sort_impl
return;
}
- //Make sure it is at least two
+ //Make sure it is at least four
BOOST_STATIC_ASSERT(AdaptiveSortInsertionSortThreshold >= 4);
size_type l_base = 0;
@@ -2101,30 +2164,74 @@ void adaptive_sort_impl
size_type n_keys = 0;
size_type l_build_buf = 0;
- if(!build_params(first, len, comp, n_keys, l_intbuf, l_base, l_build_buf, xbuf)){
+ //Calculate and extract needed unique elements. If a minimum is not achieved
+ //fallback to rotation-based merge
+ if(!adaptive_sort_build_params(first, len, comp, n_keys, l_intbuf, l_base, l_build_buf, xbuf)){
stable_sort(first, first+len, comp, xbuf);
return;
}
- //Otherwise, continue in adaptive_sort
+ //Otherwise, continue the adaptive_sort
BOOST_MOVE_ADAPTIVE_SORT_PRINT("\n After collect_unique: ", len);
size_type const n_key_plus_buf = l_intbuf+n_keys;
//l_build_buf is always power of two if l_intbuf is zero
BOOST_ASSERT(l_intbuf || (0 == (l_build_buf & (l_build_buf-1))));
//Classic merge sort until internal buffer and xbuf are exhausted
- size_type const l_merged = build_blocks
+ size_type const l_merged = adaptive_sort_build_blocks
(first+n_key_plus_buf-l_build_buf, len-n_key_plus_buf+l_build_buf, l_base, l_build_buf, xbuf, comp);
BOOST_MOVE_ADAPTIVE_SORT_PRINT(" After build_blocks: ", len);
//Non-trivial merge
- bool const buffer_right = combine_all_blocks
+ bool const buffer_right = adaptive_sort_combine_all_blocks
(first, n_keys, first+n_keys, len-n_keys, l_merged, l_intbuf, xbuf, comp);
//Sort keys and buffer and merge the whole sequence
- final_merge(buffer_right, first, l_intbuf, n_keys, len, xbuf, comp);
+ adaptive_sort_final_merge(buffer_right, first, l_intbuf, n_keys, len, xbuf, comp);
}
+// Main explanation of the merge algorithm.
+//
+// csqrtlen = ceil(sqrt(len));
+//
+// * First, csqrtlen [to be used as buffer] + (len/csqrtlen - 1) [to be used as keys] => to_collect
+// unique elements are extracted from elements to be sorted and placed in the beginning of the range.
+//
+// * Step "combine_blocks": the leading (len1-to_collect) elements plus trailing len2 elements
+// are merged with a non-trivial ("smart") algorithm to form an ordered range trailing "len-to_collect" elements.
+//
+// Explanation of the "combine_blocks" step:
+//
+// * Trailing [first+to_collect, first+len1) elements are divided in groups of cqrtlen elements.
+// Remaining elements that can't form a group are grouped in the front of those elements.
+// * Trailing [first+len1, first+len1+len2) elements are divided in groups of cqrtlen elements.
+// Remaining elements that can't form a group are grouped in the back of those elements.
+// * Groups are selection-sorted by first or last element (depending wheter they
+// merged to left or right) and keys are reordered accordingly as an imitation-buffer.
+// * Elements of each block pair is merged using the csqrtlen buffer taking into account
+// if they belong to the first half or second half (marked by the key).
+//
+// * In the final merge step leading "to_collect" elements are merged with rotations
+// with the rest of merged elements in the "combine_blocks" step.
+//
+// Corner cases:
+//
+// * If no "to_collect" elements can be extracted:
+//
+// * If more than a minimum number of elements is extracted
+// then reduces the number of elements used as buffer and keys in the
+// and "combine_blocks" steps. If "combine_blocks" has no enough keys due to this reduction
+// then uses a rotation based smart merge.
+//
+// * If the minimum number of keys can't be extracted, a rotation-based merge is performed.
+//
+// * If auxiliary memory is more or equal than min(len1, len2), a buffered merge is performed.
+//
+// * If the len1 or len2 are less than 2*csqrtlen then a rotation-based merge is performed.
+//
+// * If auxiliary memory is more than csqrtlen+n_keys*sizeof(std::size_t),
+// then no csqrtlen need to be extracted and "combine_blocks" will use integral
+// keys to combine blocks.
template<class RandIt, class Compare>
void adaptive_merge_impl
( RandIt first
@@ -2144,134 +2251,43 @@ void adaptive_merge_impl
//Calculate ideal parameters and try to collect needed unique keys
size_type l_block = size_type(ceil_sqrt(len));
+ //One range is not big enough to extract keys and the internal buffer so a
+ //rotation-based based merge will do just fine
if(len1 <= l_block*2 || len2 <= l_block*2){
merge_bufferless(first, first+len1, first+len1+len2, comp);
return;
}
- size_type l_intbuf = xbuf.capacity() >= l_block ? 0u : l_block;
-
- //This is the minimum number of case to implement the ideal algorithm
- //ceil(len/l_block) - 1 (as the first block is used as buffer)
- size_type n_keys = l_block;
- while(n_keys >= (len-l_intbuf-n_keys)/l_block){
- --n_keys;
- }
- ++n_keys;
- BOOST_ASSERT(n_keys < l_block);
-
- if(xbuf.template supports_aligned_trailing<size_type>(l_block, n_keys)){
- n_keys = 0u;
- }
-
+ //Detail the number of keys and internal buffer. If xbuf has enough memory, no
+ //internal buffer is needed so l_intbuf will remain 0.
+ size_type l_intbuf = 0;
+ size_type n_keys = adaptive_merge_n_keys_intbuf(l_block, len, xbuf, l_intbuf);
size_type const to_collect = l_intbuf+n_keys;
- size_type const collected = collect_unique(first, first+len1, to_collect, comp, xbuf);
-
+ //Try to extract needed unique values from the first range
+ size_type const collected = collect_unique(first, first+len1, to_collect, comp, xbuf);
BOOST_MOVE_ADAPTIVE_SORT_PRINT("\n A collect: ", len);
+
+ //Not the minimum number of keys is not available on the first range, so fallback to rotations
if(collected != to_collect && collected < 4){
merge_bufferless(first, first+len1, first+len1+len2, comp);
+ return;
}
- else{
- bool use_internal_buf = true;
- if (collected != to_collect){
- l_intbuf = 0u;
- n_keys = collected;
- use_internal_buf = false;
- l_block = lblock_for_combine(l_intbuf, n_keys, len, use_internal_buf);
- l_intbuf = use_internal_buf ? l_block : 0u;
- }
-
- bool xbuf_used = collected == to_collect && xbuf.capacity() >= l_block;
- size_type const l_combine = len-collected;
- size_type const l_combine1 = len1-collected;
- size_type n_bef_irreg2, n_aft_irreg2, l_irreg1, l_irreg2, midkey_idx;
- if(n_keys){
- RandIt const first_data = first+collected;
- RandIt const keys = first;
- combine_params( keys, comp, first_data, l_combine
- , l_combine1, l_block, xbuf, comp
- , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, true); //Outputs
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A combine: ", len);
- if(xbuf_used){
- merge_blocks_with_buf
- (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf, xbuf_used);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg xbf: ", len);
- }
- else if(use_internal_buf){
- #define BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
- #ifdef BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
- range_xbuf<RandIt, swap_op> rbuf(first_data-l_block, first_data);
- merge_blocks_with_buf
- (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, rbuf, xbuf_used);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg buf: ", len);
- #else
- merge_blocks_left
- (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf_used);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg lft: ", len);
- #endif
- }
- else{
- merge_blocks_bufferless
- (keys, keys[midkey_idx], comp, first_data, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp);
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg bfl: ", len);
- }
- }
- else{
- xbuf.clear();
- size_type *const uint_keys = xbuf.template aligned_trailing<size_type>(l_block);
- combine_params( uint_keys, less(), first, l_combine
- , l_combine1, l_block, xbuf, comp
- , midkey_idx, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, true); //Outputs
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A combine: ", len);
- merge_blocks_with_buf
- (uint_keys, uint_keys[midkey_idx], less(), first, l_block, l_irreg1, n_bef_irreg2, n_aft_irreg2, l_irreg2, comp, xbuf, true);
- xbuf.clear();
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A mrg lft: ", len);
- }
-
- n_keys = collected-l_intbuf;
- if(use_internal_buf){
- if(xbuf_used){
- xbuf.clear();
- //Nothing to do
- if(n_keys){
- stable_sort(first, first+n_keys, comp, xbuf);
- stable_merge(first, first+n_keys, first+len, comp, xbuf);
- }
- }
- else{
- #ifdef BOOST_MOVE_ADAPTIVE_MERGE_WITH_BUF
- xbuf.clear();
- stable_sort(first, first+collected, comp, xbuf);
- stable_merge(first, first+collected, first+len, comp, xbuf);
- #else
- xbuf.clear();
- stable_sort(first+len-l_block, first+len, comp, xbuf);
- RandIt const pos1 = lower_bound(first+n_keys, first+len-l_block, first[len-1], comp);
- RandIt const pos2 = rotate_gcd(pos1, first+len-l_block, first+len);
- stable_merge(first+n_keys, pos1, pos2, antistable<Compare>(comp), xbuf);
- if(n_keys){
- stable_sort(first, first+n_keys, comp, xbuf);
- stable_merge(first, first+n_keys, first+len, comp, xbuf);
- }
- #endif
- }
-
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A buf mrg: ", len);
- }
- else{
- stable_sort(first, first+collected, comp, xbuf);
- xbuf.clear();
- if(xbuf.capacity() >= collected){
- buffered_merge(first, first+collected, first+len1+len2, comp, xbuf);
- }
- else{
- merge_bufferless(first, first+collected, first+len1+len2, comp);
- }
- }
- BOOST_MOVE_ADAPTIVE_SORT_PRINT(" A key mrg: ", len);
+ //If not enough keys but more than minimum, adjust the internal buffer and key count
+ bool use_internal_buf = collected == to_collect;
+ if (!use_internal_buf){
+ l_intbuf = 0u;
+ n_keys = collected;
+ l_block = lblock_for_combine(l_intbuf, n_keys, len, use_internal_buf);
+ //If use_internal_buf is false, then then internal buffer will be zero and rotation-based combination will be used
+ l_intbuf = use_internal_buf ? l_block : 0u;
}
+
+ bool const xbuf_used = collected == to_collect && xbuf.capacity() >= l_block;
+ //Merge trailing elements using smart merges
+ adaptive_merge_combine_blocks(first, len1, len2, collected, n_keys, l_block, use_internal_buf, xbuf_used, comp, xbuf);
+ //Merge buffer and keys with the rest of the values
+ adaptive_merge_final_merge (first, len1, len2, collected, l_intbuf, l_block, use_internal_buf, xbuf_used, comp, xbuf);
}
}
diff --git a/boost/move/algo/detail/basic_op.hpp b/boost/move/algo/detail/basic_op.hpp
index 936f7a2a3d..ea0ce1b8e0 100644
--- a/boost/move/algo/detail/basic_op.hpp
+++ b/boost/move/algo/detail/basic_op.hpp
@@ -21,12 +21,14 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
namespace boost {
namespace movelib {
struct forward_t{};
struct backward_t{};
+struct three_way_t{};
struct move_op
{
@@ -41,6 +43,13 @@ struct move_op
template <class SourceIt, class DestinationIt>
DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_last)
{ return ::boost::move_backward(first, last, dest_last); }
+
+ template <class SourceIt, class DestinationIt1, class DestinationIt2>
+ void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
+ {
+ *dest2it = boost::move(*dest1it);
+ *dest1it = boost::move(*srcit);
+ }
};
struct swap_op
@@ -56,6 +65,15 @@ struct swap_op
template <class SourceIt, class DestinationIt>
DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
{ return boost::adl_move_swap_ranges_backward(first, last, dest_begin); }
+
+ template <class SourceIt, class DestinationIt1, class DestinationIt2>
+ void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
+ {
+ typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest2it));
+ *dest2it = boost::move(*dest1it);
+ *dest1it = boost::move(*srcit);
+ *srcit = boost::move(tmp);
+ }
};
}} //namespace boost::movelib
diff --git a/boost/move/algo/detail/merge.hpp b/boost/move/algo/detail/merge.hpp
index a0a5afa3e6..11d5740a6a 100644
--- a/boost/move/algo/detail/merge.hpp
+++ b/boost/move/algo/detail/merge.hpp
@@ -167,7 +167,7 @@ void op_merge_left( RandIt buf_first
op(forward_t(), first2, last2, buf_first);
return;
}
- else if(comp(*first2, *first1)){
+ else if(comp(*first2, *first1)){
op(first2, buf_first);
++first2;
}
@@ -214,7 +214,7 @@ void op_merge_right
{
RandIt const first2 = last1;
while(first1 != last1){
- if(last2 == first2){
+ if(last2 == first2){
op(backward_t(), first1, last1, buf_last);
return;
}
@@ -230,7 +230,7 @@ void op_merge_right
++last1;
}
}
- if(last2 != buf_last){ //In case all remaining elements are in the same place
+ if(last2 != buf_last){ //In case all remaining elements are in the same place
//(e.g. buffer is exactly the size of the first half
//and all elements from the second half are less)
op(backward_t(), first2, last2, buf_last);
@@ -257,9 +257,104 @@ void swap_merge_right
op_merge_right(first1, last1, last2, buf_last, comp, swap_op());
}
-// cost: min(L1,L2)^2+max(L1,L2)
+template <class BidirIt, class Distance, class Compare>
+void merge_bufferless_ONlogN_recursive
+ (BidirIt first, BidirIt middle, BidirIt last, Distance len1, Distance len2, Compare comp)
+{
+ typedef typename iterator_traits<BidirIt>::size_type size_type;
+ while(1) {
+ //#define MERGE_BUFFERLESS_RECURSIVE_OPT
+ #ifndef MERGE_BUFFERLESS_RECURSIVE_OPT
+ if (len2 == 0) {
+ return;
+ }
+
+ if (!len1) {
+ return;
+ }
+
+ if ((len1 | len2) == 1) {
+ if (comp(*middle, *first))
+ adl_move_swap(*first, *middle);
+ return;
+ }
+ #else
+ if (len2 == 0) {
+ return;
+ }
+
+ if (!len1) {
+ return;
+ }
+ BidirIt middle_prev = middle; --middle_prev;
+ if(!comp(*middle, *middle_prev))
+ return;
+
+ while(true) {
+ if (comp(*middle, *first))
+ break;
+ ++first;
+ if(--len1 == 1)
+ break;
+ }
+
+ if (len1 == 1 && len2 == 1) {
+ //comp(*middle, *first) == true already tested in the loop
+ adl_move_swap(*first, *middle);
+ return;
+ }
+ #endif
+
+ BidirIt first_cut = first;
+ BidirIt second_cut = middle;
+ Distance len11 = 0;
+ Distance len22 = 0;
+ if (len1 > len2) {
+ len11 = len1 / 2;
+ first_cut += len11;
+ second_cut = lower_bound(middle, last, *first_cut, comp);
+ len22 = size_type(second_cut - middle);
+ }
+ else {
+ len22 = len2 / 2;
+ second_cut += len22;
+ first_cut = upper_bound(first, middle, *second_cut, comp);
+ len11 = size_type(first_cut - first);
+ }
+ BidirIt new_middle = rotate_gcd(first_cut, middle, second_cut);
+
+ //Avoid one recursive call doing a manual tail call elimination on the biggest range
+ const Distance len_internal = len11+len22;
+ if( len_internal < (len1 + len2 - len_internal) ) {
+ merge_bufferless_ONlogN_recursive(first, first_cut, new_middle, len11, len22, comp);
+ //merge_bufferless_recursive(new_middle, second_cut, last, len1 - len11, len2 - len22, comp);
+ first = new_middle;
+ middle = second_cut;
+ len1 -= len11;
+ len2 -= len22;
+ }
+ else {
+ //merge_bufferless_recursive(first, first_cut, new_middle, len11, len22, comp);
+ merge_bufferless_ONlogN_recursive(new_middle, second_cut, last, len1 - len11, len2 - len22, comp);
+ middle = first_cut;
+ last = new_middle;
+ len1 = len11;
+ len2 = len22;
+ }
+ }
+}
+
+//Complexity: NlogN
+template<class BidirIt, class Compare>
+void merge_bufferless_ONlogN(BidirIt first, BidirIt middle, BidirIt last, Compare comp)
+{
+ merge_bufferless_ONlogN_recursive
+ (first, middle, last, middle - first, last - middle, comp);
+}
+
+//Complexity: min(len1,len2)^2 + max(len1,len2)
template<class RandIt, class Compare>
-void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
+void merge_bufferless_ON2(RandIt first, RandIt middle, RandIt last, Compare comp)
{
if((middle - first) < (last - middle)){
while(first != middle){
@@ -271,12 +366,12 @@ void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
}
do{
++first;
- } while(first != middle && !comp(*middle, *first));
+ } while(first != middle && !comp(*middle, *first));
}
}
else{
while(middle != last){
- RandIt p = upper_bound(first, middle, last[-1], comp);
+ RandIt p = upper_bound(first, middle, last[-1], comp);
last = rotate_gcd(p, middle, last);
middle = p;
if(middle == first){
@@ -290,10 +385,21 @@ void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
}
}
+template<class RandIt, class Compare>
+void merge_bufferless(RandIt first, RandIt middle, RandIt last, Compare comp)
+{
+ //#define BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+ #ifdef BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+ merge_bufferless_ONlogN(first, middle, last, comp);
+ #else
+ merge_bufferless_ON2(first, middle, last, comp);
+ #endif //BOOST_ADAPTIVE_MERGE_NLOGN_MERGE
+}
+
template<class Comp>
struct antistable
{
- antistable(Comp &comp)
+ explicit antistable(Comp &comp)
: m_comp(comp)
{}
@@ -306,6 +412,49 @@ struct antistable
Comp &m_comp;
};
+template <class Comp>
+class negate
+{
+ public:
+ negate()
+ {}
+
+ explicit negate(Comp comp)
+ : m_comp(comp)
+ {}
+
+ template <class T1, class T2>
+ bool operator()(const T1& l, const T2& r)
+ {
+ return !m_comp(l, r);
+ }
+
+ private:
+ Comp m_comp;
+};
+
+
+template <class Comp>
+class inverse
+{
+ public:
+ inverse()
+ {}
+
+ explicit inverse(Comp comp)
+ : m_comp(comp)
+ {}
+
+ template <class T1, class T2>
+ bool operator()(const T1& l, const T2& r)
+ {
+ return m_comp(r, l);
+ }
+
+ private:
+ Comp m_comp;
+};
+
// [r_first, r_last) are already in the right part of the destination range.
template <class Compare, class InputIterator, class InputOutIterator, class Op>
void op_merge_with_right_placed
diff --git a/boost/move/algo/detail/merge_sort.hpp b/boost/move/algo/detail/merge_sort.hpp
index 8101fce654..892639b05f 100644
--- a/boost/move/algo/detail/merge_sort.hpp
+++ b/boost/move/algo/detail/merge_sort.hpp
@@ -41,6 +41,21 @@ namespace movelib {
static const unsigned MergeSortInsertionSortThreshold = 16;
+template <class RandIt, class Compare>
+void inplace_stable_sort(RandIt first, RandIt last, Compare comp)
+{
+ typedef typename iterator_traits<RandIt>::size_type size_type;
+ if (size_type(last - first) <= size_type(MergeSortInsertionSortThreshold)) {
+ insertion_sort(first, last, comp);
+ return;
+ }
+ RandIt middle = first + (last - first) / 2;
+ inplace_stable_sort(first, middle, comp);
+ inplace_stable_sort(middle, last, comp);
+ merge_bufferless_ONlogN_recursive
+ (first, middle, last, size_type(middle - first), size_type(last - middle), comp);
+}
+
// @endcond
template<class RandIt, class RandIt2, class Compare>
diff --git a/boost/move/algo/move.hpp b/boost/move/algo/move.hpp
index 943f286c94..d35f04a399 100644
--- a/boost/move/algo/move.hpp
+++ b/boost/move/algo/move.hpp
@@ -125,10 +125,10 @@ F uninitialized_move(I f, I l, F r
}
}
BOOST_CATCH(...){
- for (; back != r; ++back){
+ for (; back != r; ++back){
back->~input_value_type();
}
- BOOST_RETHROW;
+ BOOST_RETHROW;
}
BOOST_CATCH_END
return r;
diff --git a/boost/move/core.hpp b/boost/move/core.hpp
index c9cbec23a1..1dd8a8c271 100644
--- a/boost/move/core.hpp
+++ b/boost/move/core.hpp
@@ -260,8 +260,8 @@
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
public:\
- TYPE& operator=(TYPE &t)\
- { this->operator=(const_cast<const TYPE &>(t)); return *this;}\
+ BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
+ { this->operator=(const_cast<const TYPE&>(t)); return *this;}\
public:\
BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
diff --git a/boost/move/detail/fwd_macros.hpp b/boost/move/detail/fwd_macros.hpp
index e091890dc5..7132436783 100644
--- a/boost/move/detail/fwd_macros.hpp
+++ b/boost/move/detail/fwd_macros.hpp
@@ -64,16 +64,22 @@ namespace move_detail {
#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
//BOOST_MOVE_REPEATN(MACRO)
+#define BOOST_MOVE_REPEAT(x, MACRO) BOOST_MOVE_REPEAT_I(x,MACRO)
+#define BOOST_MOVE_REPEAT_I(x, MACRO) BOOST_MOVE_REPEAT##x(MACRO)
#define BOOST_MOVE_REPEAT0(MACRO)
-#define BOOST_MOVE_REPEAT1(MACRO) MACRO
-#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
-#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
-#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
-#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
-#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
-#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
-#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
-#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
+#define BOOST_MOVE_REPEAT1(MACRO) MACRO
+#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
+#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
+#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
+#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
+#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
+#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
+#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
+#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
+#define BOOST_MOVE_REPEAT10(MACRO) BOOST_MOVE_REPEAT9(MACRO), MACRO
+#define BOOST_MOVE_REPEAT11(MACRO) BOOST_MOVE_REPEAT10(MACRO), MACRO
+#define BOOST_MOVE_REPEAT12(MACRO) BOOST_MOVE_REPEAT11(MACRO), MACRO
+#define BOOST_MOVE_REPEAT13(MACRO) BOOST_MOVE_REPEAT12(MACRO), MACRO
//BOOST_MOVE_FWDN
#define BOOST_MOVE_FWD0
@@ -99,6 +105,54 @@ namespace move_detail {
#define BOOST_MOVE_FWDQ8 BOOST_MOVE_FWDQ7, ::boost::forward<Q7>(q7)
#define BOOST_MOVE_FWDQ9 BOOST_MOVE_FWDQ8, ::boost::forward<Q8>(q8)
+//BOOST_MOVE_TMPL_GETN
+#define BOOST_MOVE_TMPL_GET0
+#define BOOST_MOVE_TMPL_GET1 p.template get<0>()
+#define BOOST_MOVE_TMPL_GET2 BOOST_MOVE_TMPL_GET1, p.template get<1>()
+#define BOOST_MOVE_TMPL_GET3 BOOST_MOVE_TMPL_GET2, p.template get<2>()
+#define BOOST_MOVE_TMPL_GET4 BOOST_MOVE_TMPL_GET3, p.template get<3>()
+#define BOOST_MOVE_TMPL_GET5 BOOST_MOVE_TMPL_GET4, p.template get<4>()
+#define BOOST_MOVE_TMPL_GET6 BOOST_MOVE_TMPL_GET5, p.template get<5>()
+#define BOOST_MOVE_TMPL_GET7 BOOST_MOVE_TMPL_GET6, p.template get<6>()
+#define BOOST_MOVE_TMPL_GET8 BOOST_MOVE_TMPL_GET7, p.template get<7>()
+#define BOOST_MOVE_TMPL_GET9 BOOST_MOVE_TMPL_GET8, p.template get<8>()
+
+//BOOST_MOVE_TMPL_GETQN
+#define BOOST_MOVE_TMPL_GETQ0
+#define BOOST_MOVE_TMPL_GETQ1 q.template get<0>()
+#define BOOST_MOVE_TMPL_GETQ2 BOOST_MOVE_TMPL_GETQ1, q.template get<1>()
+#define BOOST_MOVE_TMPL_GETQ3 BOOST_MOVE_TMPL_GETQ2, q.template get<2>()
+#define BOOST_MOVE_TMPL_GETQ4 BOOST_MOVE_TMPL_GETQ3, q.template get<3>()
+#define BOOST_MOVE_TMPL_GETQ5 BOOST_MOVE_TMPL_GETQ4, q.template get<4>()
+#define BOOST_MOVE_TMPL_GETQ6 BOOST_MOVE_TMPL_GETQ5, q.template get<5>()
+#define BOOST_MOVE_TMPL_GETQ7 BOOST_MOVE_TMPL_GETQ6, q.template get<6>()
+#define BOOST_MOVE_TMPL_GETQ8 BOOST_MOVE_TMPL_GETQ7, q.template get<7>()
+#define BOOST_MOVE_TMPL_GETQ9 BOOST_MOVE_TMPL_GETQ8, q.template get<8>()
+
+//BOOST_MOVE_GET_IDXN
+#define BOOST_MOVE_GET_IDX0
+#define BOOST_MOVE_GET_IDX1 get<0>(p)
+#define BOOST_MOVE_GET_IDX2 BOOST_MOVE_GET_IDX1, get<1>(p)
+#define BOOST_MOVE_GET_IDX3 BOOST_MOVE_GET_IDX2, get<2>(p)
+#define BOOST_MOVE_GET_IDX4 BOOST_MOVE_GET_IDX3, get<3>(p)
+#define BOOST_MOVE_GET_IDX5 BOOST_MOVE_GET_IDX4, get<4>(p)
+#define BOOST_MOVE_GET_IDX6 BOOST_MOVE_GET_IDX5, get<5>(p)
+#define BOOST_MOVE_GET_IDX7 BOOST_MOVE_GET_IDX6, get<6>(p)
+#define BOOST_MOVE_GET_IDX8 BOOST_MOVE_GET_IDX7, get<7>(p)
+#define BOOST_MOVE_GET_IDX9 BOOST_MOVE_GET_IDX8, get<8>(p)
+
+//BOOST_MOVE_GET_IDXQN
+#define BOOST_MOVE_GET_IDXQ0
+#define BOOST_MOVE_GET_IDXQ1 get<0>(q)
+#define BOOST_MOVE_GET_IDXQ2 BOOST_MOVE_GET_IDXQ1, get<1>(q)
+#define BOOST_MOVE_GET_IDXQ3 BOOST_MOVE_GET_IDXQ2, get<2>(q)
+#define BOOST_MOVE_GET_IDXQ4 BOOST_MOVE_GET_IDXQ3, get<3>(q)
+#define BOOST_MOVE_GET_IDXQ5 BOOST_MOVE_GET_IDXQ4, get<4>(q)
+#define BOOST_MOVE_GET_IDXQ6 BOOST_MOVE_GET_IDXQ5, get<5>(q)
+#define BOOST_MOVE_GET_IDXQ7 BOOST_MOVE_GET_IDXQ6, get<6>(q)
+#define BOOST_MOVE_GET_IDXQ8 BOOST_MOVE_GET_IDXQ7, get<7>(q)
+#define BOOST_MOVE_GET_IDXQ9 BOOST_MOVE_GET_IDXQ8, get<8>(q)
+
//BOOST_MOVE_ARGN
#define BOOST_MOVE_ARG0
#define BOOST_MOVE_ARG1 p0
@@ -572,6 +626,45 @@ namespace move_detail {
#define BOOST_MOVE_I8 BOOST_MOVE_I1
#define BOOST_MOVE_I9 BOOST_MOVE_I1
+//BOOST_MOVE_BOOL
+# define BOOST_MOVE_BOOL(x) BOOST_MOVE_BOOL_I(x)
+# define BOOST_MOVE_BOOL_I(x) BOOST_MOVE_BOOL##x
+# define BOOST_MOVE_BOOL0 0
+# define BOOST_MOVE_BOOL1 1
+# define BOOST_MOVE_BOOL2 1
+# define BOOST_MOVE_BOOL3 1
+# define BOOST_MOVE_BOOL4 1
+# define BOOST_MOVE_BOOL5 1
+# define BOOST_MOVE_BOOL6 1
+# define BOOST_MOVE_BOOL7 1
+# define BOOST_MOVE_BOOL8 1
+# define BOOST_MOVE_BOOL9 1
+
+//BOOST_MOVE_I_IF
+#define BOOST_MOVE_I_IF(x) BOOST_MOVE_I_IF_I (BOOST_MOVE_BOOL(x))
+#define BOOST_MOVE_I_IF_I(x) BOOST_MOVE_I_IF_I2(x)
+#define BOOST_MOVE_I_IF_I2(x) BOOST_MOVE_IF_I_##x
+#define BOOST_MOVE_IF_I_0
+#define BOOST_MOVE_IF_I_1 ,
+
+//BOOST_MOVE_IF
+#define BOOST_MOVE_IF(cond, t, f) BOOST_MOVE_IF_I(cond, t, f)
+#define BOOST_MOVE_IF_I(cond, t, f) BOOST_MOVE_IIF(BOOST_MOVE_BOOL(cond), t, f)
+
+#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_I(bit, t, f)
+#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_##bit(t, f)
+#define BOOST_MOVE_IIF_0(t, f) f
+#define BOOST_MOVE_IIF_1(t, f) t
+
+/*
+#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_OO((bit, t, f))
+#define BOOST_MOVE_IIF_OO(par) BOOST_MOVE_IIF_I ## par
+#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_II(BOOST_MOVE_IIF_ ## bit(t, f))
+#define BOOST_MOVE_IIF_II(id) id
+#define BOOST_MOVE_IIF_0(t, f) f
+#define BOOST_MOVE_IIF_1(t, f) t
+*/
+
//BOOST_MOVE_COLON
#define BOOST_MOVE_COLON0
#define BOOST_MOVE_COLON1 :
@@ -584,6 +677,103 @@ namespace move_detail {
#define BOOST_MOVE_COLON8 BOOST_MOVE_COLON1
#define BOOST_MOVE_COLON9 BOOST_MOVE_COLON1
+//BOOST_MOVE_BITOR
+#define BOOST_MOVE_BITOR(x,y) BOOST_MOVE_BITOR_I(x,y)
+#define BOOST_MOVE_BITOR_I(x,y) BOOST_MOVE_BITOR##x##y
+#define BOOST_MOVE_BITOR00 0
+#define BOOST_MOVE_BITOR01 1
+#define BOOST_MOVE_BITOR10 1
+#define BOOST_MOVE_BITOR11 1
+
+//BOOST_MOVE_OR
+#define BOOST_MOVE_OR(x, y) BOOST_MOVE_OR_I(x, y)
+#define BOOST_MOVE_OR_I(x, y) BOOST_MOVE_BITOR(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
+
+//BOOST_MOVE_BITAND
+#define BOOST_MOVE_BITAND(x,y) BOOST_MOVE_BITAND_I(x,y)
+#define BOOST_MOVE_BITAND_I(x,y) BOOST_MOVE_BITAND##x##y
+#define BOOST_MOVE_BITAND00 0
+#define BOOST_MOVE_BITAND01 0
+#define BOOST_MOVE_BITAND10 0
+#define BOOST_MOVE_BITAND11 1
+
+//BOOST_MOVE_AND
+#define BOOST_MOVE_AND(x, y) BOOST_MOVE_AND_I(x, y)
+#define BOOST_MOVE_AND_I(x, y) BOOST_MOVE_BITAND(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
+
+//BOOST_MOVE_DEC
+#define BOOST_MOVE_DEC(x) BOOST_MOVE_DEC_I(x)
+#define BOOST_MOVE_DEC_I(x) BOOST_MOVE_DEC##x
+#define BOOST_MOVE_DEC1 0
+#define BOOST_MOVE_DEC2 1
+#define BOOST_MOVE_DEC3 2
+#define BOOST_MOVE_DEC4 3
+#define BOOST_MOVE_DEC5 4
+#define BOOST_MOVE_DEC6 5
+#define BOOST_MOVE_DEC7 6
+#define BOOST_MOVE_DEC8 7
+#define BOOST_MOVE_DEC9 8
+#define BOOST_MOVE_DEC10 9
+#define BOOST_MOVE_DEC11 10
+#define BOOST_MOVE_DEC12 11
+#define BOOST_MOVE_DEC13 12
+#define BOOST_MOVE_DEC14 13
+
+//BOOST_MOVE_SUB
+#define BOOST_MOVE_SUB(x, y) BOOST_MOVE_SUB_I(x,y)
+#define BOOST_MOVE_SUB_I(x, y) BOOST_MOVE_SUB##y(x)
+#define BOOST_MOVE_SUB0(x) x
+#define BOOST_MOVE_SUB1(x) BOOST_MOVE_DEC(x)
+#define BOOST_MOVE_SUB2(x) BOOST_MOVE_SUB1(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB3(x) BOOST_MOVE_SUB2(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB4(x) BOOST_MOVE_SUB3(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB5(x) BOOST_MOVE_SUB4(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB6(x) BOOST_MOVE_SUB5(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB7(x) BOOST_MOVE_SUB6(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB8(x) BOOST_MOVE_SUB7(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB9(x) BOOST_MOVE_SUB8(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB10(x) BOOST_MOVE_SUB9(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB11(x) BOOST_MOVE_SUB10(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB12(x) BOOST_MOVE_SUB11(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB13(x) BOOST_MOVE_SUB12(BOOST_MOVE_DEC(x))
+#define BOOST_MOVE_SUB14(x) BOOST_MOVE_SUB13(BOOST_MOVE_DEC(x))
+
+//BOOST_MOVE_INC
+#define BOOST_MOVE_INC(x) BOOST_MOVE_INC_I(x)
+#define BOOST_MOVE_INC_I(x) BOOST_MOVE_INC##x
+#define BOOST_MOVE_INC0 1
+#define BOOST_MOVE_INC1 2
+#define BOOST_MOVE_INC2 3
+#define BOOST_MOVE_INC3 4
+#define BOOST_MOVE_INC4 5
+#define BOOST_MOVE_INC5 6
+#define BOOST_MOVE_INC6 7
+#define BOOST_MOVE_INC7 8
+#define BOOST_MOVE_INC8 9
+#define BOOST_MOVE_INC9 10
+#define BOOST_MOVE_INC10 11
+#define BOOST_MOVE_INC11 12
+#define BOOST_MOVE_INC12 13
+#define BOOST_MOVE_INC13 14
+
+//BOOST_MOVE_ADD
+#define BOOST_MOVE_ADD(x, y) BOOST_MOVE_ADD_I(x,y)
+#define BOOST_MOVE_ADD_I(x, y) BOOST_MOVE_ADD##y(x)
+#define BOOST_MOVE_ADD0(x) x
+#define BOOST_MOVE_ADD1(x) BOOST_MOVE_INC(x)
+#define BOOST_MOVE_ADD2(x) BOOST_MOVE_ADD1(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD3(x) BOOST_MOVE_ADD2(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD4(x) BOOST_MOVE_ADD3(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD5(x) BOOST_MOVE_ADD4(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD6(x) BOOST_MOVE_ADD5(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD7(x) BOOST_MOVE_ADD6(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD8(x) BOOST_MOVE_ADD7(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD9(x) BOOST_MOVE_ADD8(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD10(x) BOOST_MOVE_ADD9(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD11(x) BOOST_MOVE_ADD10(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD12(x) BOOST_MOVE_ADD11(BOOST_MOVE_INC(x))
+#define BOOST_MOVE_ADD13(x) BOOST_MOVE_ADD12(BOOST_MOVE_INC(x))
+
//BOOST_MOVE_ITERATE_2TON
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
#define BOOST_MOVE_ITERATE_2TO3(MACROFUNC) BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(3)
@@ -618,7 +808,6 @@ namespace move_detail {
#define BOOST_MOVE_ITERATE_0TO9(MACROFUNC) BOOST_MOVE_ITERATE_0TO8(MACROFUNC) MACROFUNC(9)
//BOOST_MOVE_ITERATE_NTON
-#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
#define BOOST_MOVE_ITERATE_3TO3(MACROFUNC) MACROFUNC(3)
@@ -629,28 +818,34 @@ namespace move_detail {
#define BOOST_MOVE_ITERATE_8TO8(MACROFUNC) MACROFUNC(8)
#define BOOST_MOVE_ITERATE_9TO9(MACROFUNC) MACROFUNC(9)
-//BOOST_MOVE_ITER2D_0TO9
-#define BOOST_MOVE_ITER2DLOW_0TO0(MACROFUNC2D, M) MACROFUNC2D(M, 0)
-#define BOOST_MOVE_ITER2DLOW_0TO1(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO0(MACROFUNC2D, M) MACROFUNC2D(M, 1)
-#define BOOST_MOVE_ITER2DLOW_0TO2(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO1(MACROFUNC2D, M) MACROFUNC2D(M, 2)
-#define BOOST_MOVE_ITER2DLOW_0TO3(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO2(MACROFUNC2D, M) MACROFUNC2D(M, 3)
-#define BOOST_MOVE_ITER2DLOW_0TO4(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO3(MACROFUNC2D, M) MACROFUNC2D(M, 4)
-#define BOOST_MOVE_ITER2DLOW_0TO5(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO4(MACROFUNC2D, M) MACROFUNC2D(M, 5)
-#define BOOST_MOVE_ITER2DLOW_0TO6(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO5(MACROFUNC2D, M) MACROFUNC2D(M, 6)
-#define BOOST_MOVE_ITER2DLOW_0TO7(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO6(MACROFUNC2D, M) MACROFUNC2D(M, 7)
-#define BOOST_MOVE_ITER2DLOW_0TO8(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO7(MACROFUNC2D, M) MACROFUNC2D(M, 8)
-#define BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TO8(MACROFUNC2D, M) MACROFUNC2D(M, 9)
-//
-#define BOOST_MOVE_ITER2D_0TO0(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 0)
-#define BOOST_MOVE_ITER2D_0TO1(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO0(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 1)
-#define BOOST_MOVE_ITER2D_0TO2(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO1(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 2)
-#define BOOST_MOVE_ITER2D_0TO3(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO2(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 3)
-#define BOOST_MOVE_ITER2D_0TO4(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO3(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 4)
-#define BOOST_MOVE_ITER2D_0TO5(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO4(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 5)
-#define BOOST_MOVE_ITER2D_0TO6(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO5(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 6)
-#define BOOST_MOVE_ITER2D_0TO7(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO6(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 7)
-#define BOOST_MOVE_ITER2D_0TO8(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO7(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 8)
-#define BOOST_MOVE_ITER2D_0TO9(MACROFUNC2D) BOOST_MOVE_ITER2D_0TO8(MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TO9(MACROFUNC2D, 9)
+//BOOST_MOVE_ITER2D_0TOMAX
+#define BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 0)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 1)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) MACROFUNC2D(M, 2)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) MACROFUNC2D(M, 3)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) MACROFUNC2D(M, 4)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) MACROFUNC2D(M, 5)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) MACROFUNC2D(M, 6)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) MACROFUNC2D(M, 7)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) MACROFUNC2D(M, 8)
+#define BOOST_MOVE_ITER2DLOW_0TOMAX9(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) MACROFUNC2D(M, 9)
+
+#define BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 0)
+#define BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 1)
+#define BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 2)
+#define BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 3)
+#define BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 4)
+#define BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 5)
+#define BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 6)
+#define BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 7)
+#define BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 8)
+#define BOOST_MOVE_ITER2D_0TOMAX9(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 9)
+
+#define BOOST_MOVE_ITER2D_0TOMAX(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX_I (MAX, MACROFUNC2D)
+#define BOOST_MOVE_ITER2D_0TOMAX_I(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX##MAX(MAX, MACROFUNC2D)
+
+
+
//BOOST_MOVE_CAT
#define BOOST_MOVE_CAT(a, b) BOOST_MOVE_CAT_I(a, b)
diff --git a/boost/move/detail/meta_utils_core.hpp b/boost/move/detail/meta_utils_core.hpp
index 4d715a060a..40dbb6efc3 100644
--- a/boost/move/detail/meta_utils_core.hpp
+++ b/boost/move/detail/meta_utils_core.hpp
@@ -114,6 +114,18 @@ struct is_same<T, T>
static const bool value = true;
};
+//////////////////////////////////////
+// enable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct enable_if_same : enable_if<is_same<T, U>, R> {};
+
+//////////////////////////////////////
+// disable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct disable_if_same : disable_if<is_same<T, U>, R> {};
+
} //namespace move_detail {
} //namespace boost {
diff --git a/boost/move/detail/reverse_iterator.hpp b/boost/move/detail/reverse_iterator.hpp
new file mode 100644
index 0000000000..73f59ce79f
--- /dev/null
+++ b/boost/move/detail/reverse_iterator.hpp
@@ -0,0 +1,171 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014
+//
+// Distributed under the 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/move for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_MOVE_DETAIL_REVERSE_ITERATOR_HPP
+#define BOOST_MOVE_DETAIL_REVERSE_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/meta_utils.hpp>
+
+namespace boost {
+namespace movelib {
+
+template<class It>
+class reverse_iterator
+{
+ public:
+ typedef typename boost::movelib::iterator_traits<It>::pointer pointer;
+ typedef typename boost::movelib::iterator_traits<It>::reference reference;
+ typedef typename boost::movelib::iterator_traits<It>::difference_type difference_type;
+ typedef typename boost::movelib::iterator_traits<It>::iterator_category iterator_category;
+ typedef typename boost::movelib::iterator_traits<It>::value_type value_type;
+
+
+ typedef It iterator_type;
+
+ reverse_iterator()
+ : m_current() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ explicit reverse_iterator(It r)
+ : m_current(r)
+ {}
+
+ reverse_iterator(const reverse_iterator& r)
+ : m_current(r.base())
+ {}
+
+ template<class OtherIt>
+ reverse_iterator( const reverse_iterator<OtherIt>& r
+ , typename boost::move_detail::enable_if_convertible<OtherIt, It>::type* =0
+ )
+ : m_current(r.base())
+ {}
+
+ reverse_iterator & operator=( const reverse_iterator& r)
+ { m_current = r.base(); return *this; }
+
+ template<class OtherIt>
+ typename boost::move_detail::enable_if_convertible<OtherIt, It, reverse_iterator &>::type
+ operator=( const reverse_iterator<OtherIt>& r)
+ { m_current = r.base(); return *this; }
+
+ It base() const
+ { return m_current; }
+
+ reference operator*() const
+ {
+ It temp(m_current);
+ --temp;
+ reference r = *temp;
+ return r;
+ }
+
+ pointer operator->() const
+ {
+ It temp(m_current);
+ --temp;
+ return iterator_arrow_result(temp);
+ }
+
+ reference operator[](difference_type off) const
+ {
+ return this->m_current[-off - 1];
+ }
+
+ reverse_iterator& operator++()
+ {
+ --m_current;
+ return *this;
+ }
+
+ reverse_iterator operator++(int)
+ {
+ reverse_iterator temp((*this));
+ --m_current;
+ return temp;
+ }
+
+ reverse_iterator& operator--()
+ {
+ ++m_current;
+ return *this;
+ }
+
+ reverse_iterator operator--(int)
+ {
+ reverse_iterator temp((*this));
+ ++m_current;
+ return temp;
+ }
+
+ friend bool operator==(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current == r.m_current; }
+
+ friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current != r.m_current; }
+
+ friend bool operator<(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current > r.m_current; }
+
+ friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current >= r.m_current; }
+
+ friend bool operator>(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current < r.m_current; }
+
+ friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r)
+ { return l.m_current <= r.m_current; }
+
+ reverse_iterator& operator+=(difference_type off)
+ { m_current -= off; return *this; }
+
+ reverse_iterator& operator-=(difference_type off)
+ { m_current += off; return *this; }
+
+ friend reverse_iterator operator+(reverse_iterator l, difference_type off)
+ { return (l += off); }
+
+ friend reverse_iterator operator+(difference_type off, reverse_iterator r)
+ { return (r += off); }
+
+ friend reverse_iterator operator-(reverse_iterator l, difference_type off)
+ { return (l-= off); }
+
+ friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r)
+ { return r.m_current - l.m_current; }
+
+ private:
+ It m_current; // the wrapped iterator
+};
+
+template< class Iterator >
+reverse_iterator<Iterator> make_reverse_iterator( Iterator i )
+{
+ return reverse_iterator<Iterator>(i);
+}
+
+} //namespace movelib {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //BOOST_MOVE_DETAIL_REVERSE_ITERATOR_HPP
diff --git a/boost/move/detail/type_traits.hpp b/boost/move/detail/type_traits.hpp
index 816fdca7b2..1b5d8388e4 100644
--- a/boost/move/detail/type_traits.hpp
+++ b/boost/move/detail/type_traits.hpp
@@ -55,8 +55,10 @@
// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
@@ -117,9 +119,7 @@
# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
# endif
# if __has_feature(has_trivial_copy)
-# //There are problems with deleted copy constructors detected as trivially copyable.
-# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible<T>::value)
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
# endif
# if __has_feature(has_trivial_assign)
# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
@@ -235,7 +235,9 @@
#endif
#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ (::boost::move_detail::is_copy_constructible<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_COPY(T))
#else
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
#endif
@@ -246,12 +248,6 @@
#define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
#endif
-#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
#define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
#else
@@ -259,7 +255,9 @@
#endif
#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T)
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ ( ::boost::move_detail::is_copy_assignable<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
#else
#define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
#endif
@@ -821,9 +819,7 @@ struct is_trivially_copy_constructible
{
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
//deleted copy constructors so make sure the type is copy constructible.
- static const bool value = ::boost::move_detail::is_pod<T>::value ||
- ( ::boost::move_detail::is_copy_constructible<T>::value &&
- BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) );
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
};
//////////////////////////////////////
@@ -831,7 +827,7 @@ struct is_trivially_copy_constructible
//////////////////////////////////////
template<class T>
struct is_trivially_move_constructible
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
//////////////////////////////////////
// is_trivially_copy_assignable
@@ -841,9 +837,7 @@ struct is_trivially_copy_assignable
{
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
//deleted copy constructors so make sure the type is copy constructible.
- static const bool value = ::boost::move_detail::is_pod<T>::value ||
- ( ::boost::move_detail::is_copy_assignable<T>::value &&
- BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) );
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
};
//////////////////////////////////////
@@ -1005,7 +999,7 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
template<class T, std::size_t Len>
union aligned_union
-{
+{
T aligner;
char dummy[Len];
};
@@ -1023,7 +1017,7 @@ struct aligned_next<Len, Align, T, true>
//End of search defaults to max_align_t
template<std::size_t Len, std::size_t Align>
struct aligned_next<Len, Align, max_align_t, false>
-{ typedef aligned_union<max_align_t, Len> type; };
+{ typedef aligned_union<max_align_t, Len> type; };
//Now define a search list through types
#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
diff --git a/boost/mpi/config.hpp b/boost/mpi/config.hpp
index ff91b17c35..c83277f66b 100644
--- a/boost/mpi/config.hpp
+++ b/boost/mpi/config.hpp
@@ -20,15 +20,15 @@
#include <mpi.h>
#include <boost/config.hpp>
-/** @brief Comment this macro is you are running in an heterogeneous environement.
+/** @brief Comment this macro is you are running in an heterogeneous environment.
*
- * When this flags is enabled, we assume some simple, POD like, type can be
- * transmited without paying the cost of portable serialization.
+ * When this flag is enabled, we assume some simple, POD-like, type can be
+ * transmitted without paying the cost of portable serialization.
*
* Comment this if your platform is not homogeneous and that portable
* serialization/deserialization must be performed.
*
- * It you do so, check that you MPI implementation supports thats kind of environement.
+ * It you do so, check that your MPI implementation supports thats kind of environment.
*/
#define BOOST_MPI_HOMOGENEOUS
@@ -57,7 +57,7 @@
# define BOOST_MPI_HAS_NOARG_INITIALIZATION
#else
// If this is an MPI-1.x implementation, no arg initialization for
-// mpi environement could still be available, but not mandatory.
+// mpi environment could still be available, but not mandatory.
// Undef this if no arg init is available:
//# define BOOST_MPI_HAS_NOARG_INITIALIZATION
#endif
diff --git a/boost/mpl/print.hpp b/boost/mpl/print.hpp
index e3b0d315ae..36e25cd3e7 100644
--- a/boost/mpl/print.hpp
+++ b/boost/mpl/print.hpp
@@ -47,7 +47,10 @@ struct print
#endif
{
#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wc++11-extensions"
const int m_x = 1 / (sizeof(T) - sizeof(T));
+# pragma clang diagnostic pop
#elif defined(BOOST_MSVC)
enum { n = sizeof(T) + -1 };
#elif defined(__MWERKS__)
diff --git a/boost/multiprecision/cpp_bin_float.hpp b/boost/multiprecision/cpp_bin_float.hpp
index 92b73c5715..453a406f28 100644
--- a/boost/multiprecision/cpp_bin_float.hpp
+++ b/boost/multiprecision/cpp_bin_float.hpp
@@ -122,7 +122,7 @@ public:
{
case FP_ZERO:
m_data = limb_type(0);
- m_sign = false;
+ m_sign = f.sign();
m_exponent = exponent_zero;
break;
case FP_NAN:
@@ -164,7 +164,7 @@ public:
{
case FP_ZERO:
m_data = limb_type(0);
- m_sign = false;
+ m_sign = ((boost::math::signbit)(f) > 0);
m_exponent = exponent_zero;
return *this;
case FP_NAN:
@@ -232,7 +232,7 @@ public:
{
case FP_ZERO:
m_data = limb_type(0);
- m_sign = false;
+ m_sign = ((boost::math::signbit)(f) > 0);
m_exponent = exponent_zero;
return *this;
case FP_NAN:
@@ -279,12 +279,12 @@ public:
{
m_data = limb_type(0u);
m_exponent = exponent_zero;
- m_sign = false;
+ m_sign = ((boost::math::signbit)(f) > 0);
}
else if(eval_get_sign(m_data) == 0)
{
m_exponent = exponent_zero;
- m_sign = false;
+ m_sign = ((boost::math::signbit)(f) > 0);
}
return *this;
}
@@ -335,14 +335,14 @@ public:
void negate()
{
- if((m_exponent != exponent_zero) && (m_exponent != exponent_nan))
+ if(m_exponent != exponent_nan)
m_sign = !m_sign;
}
int compare(const cpp_bin_float &o) const BOOST_NOEXCEPT
{
if(m_sign != o.m_sign)
- return m_sign ? -1 : 1;
+ return (m_exponent == exponent_zero) && (m_exponent == o.m_exponent) ? 0 : m_sign ? -1 : 1;
int result;
if(m_exponent == exponent_nan)
return -1;
@@ -476,26 +476,38 @@ inline void copy_and_round(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
// Underflow:
res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
res.bits() = static_cast<limb_type>(0u);
- res.sign() = false;
}
}
template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
inline void do_eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
{
+ if(a.exponent() < b.exponent())
+ {
+ bool s = a.sign();
+ do_eval_add(res, b, a);
+ if(res.sign() != s)
+ res.negate();
+ return;
+ }
+
using default_ops::eval_add;
using default_ops::eval_bit_test;
+ typedef typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type exponent_type;
+
typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
// Special cases first:
switch(a.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ bool s = a.sign();
res = b;
- if(res.sign())
- res.negate();
+ res.sign() = s;
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
res = b;
@@ -520,32 +532,22 @@ inline void do_eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
res = b;
return; // result is a NaN.
}
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
+
+ BOOST_STATIC_ASSERT(boost::integer_traits<exponent_type>::const_max - cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent);
+
bool s = a.sign();
- if(e_diff >= 0)
+ dt = a.bits();
+ if(a.exponent() > (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
{
- dt = a.bits();
- if(e_diff < (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
- {
- eval_left_shift(dt, e_diff);
- res.exponent() = a.exponent() - e_diff;
- eval_add(dt, b.bits());
- }
- else
- res.exponent() = a.exponent();
+ res.exponent() = a.exponent();
}
else
{
- dt= b.bits();
- if(-e_diff < (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
- {
- eval_left_shift(dt, -e_diff);
- res.exponent() = b.exponent() + e_diff;
- eval_add(dt, a.bits());
- }
- else
- res.exponent() = b.exponent();
+ exponent_type e_diff = a.exponent() - b.exponent();
+ BOOST_ASSERT(e_diff >= 0);
+ eval_left_shift(dt, e_diff);
+ res.exponent() = a.exponent() - e_diff;
+ eval_add(dt, b.bits());
}
copy_and_round(res, dt);
@@ -570,8 +572,9 @@ inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponen
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
else
{
+ bool s = a.sign();
res = b;
- if(!res.sign())
+ if(res.sign() == s)
res.negate();
}
return;
@@ -592,7 +595,7 @@ inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponen
return;
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.sign() = true;
+ res.sign() = !a.sign();
res.bits() = static_cast<limb_type>(0u);
return; // result is a NaN.
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
@@ -600,13 +603,13 @@ inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponen
return; // result is still a NaN.
}
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
bool s = a.sign();
- if((e_diff > 0) || ((e_diff == 0) && a.bits().compare(b.bits()) >= 0))
+ if((a.exponent() > b.exponent()) || ((a.exponent() == b.exponent()) && a.bits().compare(b.bits()) >= 0))
{
dt = a.bits();
- if(e_diff <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+ if(a.exponent() <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
{
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
eval_left_shift(dt, e_diff);
res.exponent() = a.exponent() - e_diff;
eval_subtract(dt, b.bits());
@@ -617,8 +620,9 @@ inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponen
else
{
dt = b.bits();
- if(-e_diff <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+ if(b.exponent() <= a.exponent() + (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
{
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
eval_left_shift(dt, -e_diff);
res.exponent() = b.exponent() + e_diff;
eval_subtract(dt, a.bits());
@@ -674,11 +678,19 @@ inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
switch(a.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
res = b;
+ else if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity)
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
else
+ {
+ bool s = a.sign() != b.sign();
res = a;
+ res.sign() = s;
+ }
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
switch(b.exponent())
{
@@ -689,7 +701,9 @@ inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
res = b;
break;
default:
+ bool s = a.sign() != b.sign();
res = a;
+ res.sign() = s;
break;
}
return;
@@ -699,7 +713,9 @@ inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
}
if(b.exponent() > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent)
{
+ bool s = a.sign() != b.sign();
res = b;
+ res.sign() = s;
return;
}
if((a.exponent() > 0) && (b.exponent() > 0))
@@ -707,8 +723,9 @@ inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + 2 - a.exponent() < b.exponent())
{
// We will certainly overflow:
+ bool s = a.sign() != b.sign();
res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.sign() = a.sign() != b.sign();
+ res.sign() = s;
res.bits() = static_cast<limb_type>(0u);
return;
}
@@ -719,7 +736,7 @@ inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent,
{
// We will certainly underflow:
res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.sign() = false;
+ res.sign() = a.sign() != b.sign();
res.bits() = static_cast<limb_type>(0u);
return;
}
@@ -749,8 +766,12 @@ inline typename enable_if_c<is_unsigned<U>::value>::type eval_multiply(cpp_bin_f
switch(a.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ bool s = a.sign();
res = a;
+ res.sign() = s;
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
if(b == 0)
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
@@ -811,6 +832,7 @@ inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
switch(u.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
switch(v.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
@@ -818,9 +840,13 @@ inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
return;
}
+ bool s = u.sign() != v.sign();
res = u;
+ res.sign() = s;
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ {
switch(v.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
@@ -828,8 +854,11 @@ inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
return;
}
+ bool s = u.sign() != v.sign();
res = u;
+ res.sign() = s;
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
return;
@@ -846,7 +875,7 @@ inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
res.bits() = limb_type(0);
- res.sign() = false;
+ res.sign() = u.sign() != v.sign();
return;
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
@@ -869,6 +898,29 @@ inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, Mi
//
// We can set the exponent and sign of the result up front:
//
+ if((v.exponent() < 0) && (u.exponent() > 0))
+ {
+ // Check for overflow:
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + v.exponent() < u.exponent() - 1)
+ {
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ res.sign() = u.sign() != v.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
+ else if((v.exponent() > 0) && (u.exponent() < 0))
+ {
+ // Check for underflow:
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent + v.exponent() > u.exponent())
+ {
+ // We will certainly underflow:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.sign() = u.sign() != v.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
res.exponent() = u.exponent() - v.exponent() - 1;
res.sign() = u.sign() != v.sign();
//
@@ -949,13 +1001,17 @@ inline typename enable_if_c<is_unsigned<U>::value>::type eval_divide(cpp_bin_flo
switch(u.exponent())
{
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
if(v == 0)
{
res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
return;
}
+ bool s = u.sign() != (v < 0);
res = u;
+ res.sign() = s;
return;
+ }
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
res = u;
return;
@@ -1074,10 +1130,15 @@ inline bool eval_is_zero(const cpp_bin_float<Digits, DigitBase, Allocator, Expon
template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
inline bool eval_eq(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
{
- return (a.exponent() == b.exponent())
- && (a.sign() == b.sign())
- && (a.bits().compare(b.bits()) == 0)
- && (a.exponent() != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan);
+ if(a.exponent() == b.exponent())
+ {
+ if(a.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
+ return true;
+ return (a.sign() == b.sign())
+ && (a.bits().compare(b.bits()) == 0)
+ && (a.exponent() != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan);
+ }
+ return false;
}
template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
@@ -1160,22 +1221,25 @@ inline typename boost::enable_if_c<boost::is_float<Float>::value>::type eval_con
//
// Perform rounding first, then afterwards extract the digits:
//
- cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, void, Exponent, MinE, MaxE> arg(original_arg);
+ typedef cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, void, Exponent, MinE, MaxE> conv_type;
+ conv_type arg(original_arg);
switch(arg.exponent())
{
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case conv_type::exponent_zero:
*res = 0;
+ if(arg.sign())
+ *res = -*res;
return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ case conv_type::exponent_nan:
*res = std::numeric_limits<Float>::quiet_NaN();
return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ case conv_type::exponent_infinity:
*res = (std::numeric_limits<Float>::infinity)();
if(arg.sign())
*res = -*res;
return;
}
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e = arg.exponent();
+ typename conv_type::exponent_type e = arg.exponent();
e -= cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, void, Exponent, MinE, MaxE>::bit_count - 1;
*res = std::ldexp(static_cast<Float>(*arg.bits().limbs()), e);
for(unsigned i = 1; i < arg.bits().size(); ++i)
@@ -1314,7 +1378,10 @@ inline void eval_sqrt(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE
res = arg;
return;
case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ if(arg.sign())
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ else
+ res = arg;
return;
}
if(arg.sign())
@@ -1423,6 +1490,16 @@ inline void eval_ceil(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE
eval_left_shift(res.bits(), shift);
}
+template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2>
+inline std::size_t hash_value(const cpp_bin_float<D1, B1, A1, E1, M1, M2>& val)
+{
+ std::size_t result = hash_value(val.bits());
+ boost::hash_combine(result, val.exponent());
+ boost::hash_combine(result, val.sign());
+ return result;
+}
+
+
} // namespace backends
#ifdef BOOST_NO_SFINAE_EXPR
@@ -1459,7 +1536,31 @@ typedef number<backends::cpp_bin_float<53, backends::digit_base_2, void, boost::
typedef number<backends::cpp_bin_float<64, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_double_extended;
typedef number<backends::cpp_bin_float<113, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_quad;
-}} // namespaces
+} // namespace multiprecision
+
+namespace math {
+
+ template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
+ inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& arg)
+ {
+ return arg.backend().sign();
+ }
+
+ template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
+ inline boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>
+ copysign BOOST_PREVENT_MACRO_SUBSTITUTION(
+ const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& a,
+ const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& b)
+ {
+ boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> res(a);
+ res.backend().sign() = b.backend().sign();
+ return res;
+ }
+
+
+} // namespace math
+
+} // namespace boost
#include <boost/multiprecision/cpp_bin_float/io.hpp>
#include <boost/multiprecision/cpp_bin_float/transcendental.hpp>
diff --git a/boost/multiprecision/cpp_bin_float/io.hpp b/boost/multiprecision/cpp_bin_float/io.hpp
index 88d5ddd053..630d651d9d 100644
--- a/boost/multiprecision/cpp_bin_float/io.hpp
+++ b/boost/multiprecision/cpp_bin_float/io.hpp
@@ -8,6 +8,12 @@
namespace boost{ namespace multiprecision{ namespace cpp_bf_io_detail{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+
//
// Multiplies a by b and shifts the result so it fits inside max_bits bits,
// returns by how much the result was shifted.
@@ -670,7 +676,7 @@ std::string cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::s
switch(exponent())
{
case exponent_zero:
- s = "0";
+ s = sign() ? "-0" : f & std::ios_base::showpos ? "+0" : "0";
boost::multiprecision::detail::format_float_string(s, 0, dig, f, true);
break;
case exponent_nan:
@@ -684,6 +690,10 @@ std::string cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::s
return s;
}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
}}} // namespaces
#endif
diff --git a/boost/multiprecision/cpp_dec_float.hpp b/boost/multiprecision/cpp_dec_float.hpp
index 057095e2b4..ee14becf5d 100644
--- a/boost/multiprecision/cpp_dec_float.hpp
+++ b/boost/multiprecision/cpp_dec_float.hpp
@@ -25,6 +25,7 @@
#include <boost/array.hpp>
#endif
#include <boost/cstdint.hpp>
+#include <boost/functional/hash_fwd.hpp>
#include <boost/multiprecision/number.hpp>
#include <boost/multiprecision/detail/big_lanczos.hpp>
#include <boost/multiprecision/detail/dynamic_array.hpp>
@@ -257,6 +258,17 @@ public:
cpp_dec_float(const double mantissa, const ExponentType exponent);
+ std::size_t hash()const
+ {
+ std::size_t result = 0;
+ for(int i = 0; i < prec_elem; ++i)
+ boost::hash_combine(result, data[i]);
+ boost::hash_combine(result, exp);
+ boost::hash_combine(result, neg);
+ boost::hash_combine(result, fpclass);
+ return result;
+ }
+
// Specific special values.
static const cpp_dec_float& nan()
{
@@ -948,6 +960,18 @@ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, Expone
template <unsigned Digits10, class ExponentType, class Allocator>
cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::operator/=(const cpp_dec_float<Digits10, ExponentType, Allocator>& v)
{
+ if(iszero())
+ {
+ if((v.isnan)())
+ {
+ return *this = v;
+ }
+ else if(v.iszero())
+ {
+ return *this = nan();
+ }
+ }
+
const bool u_and_v_are_finite_and_identical = ( (isfinite)()
&& (fpclass == v.fpclass)
&& (exp == v.exp)
@@ -966,14 +990,6 @@ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, Expone
}
else
{
- if(iszero())
- {
- if((v.isnan)() || v.iszero())
- {
- return *this = v;
- }
- return *this;
- }
cpp_dec_float t(v);
t.calculate_inv();
return operator*=(t);
@@ -2957,6 +2973,12 @@ inline int eval_get_sign(const cpp_dec_float<Digits10, ExponentType, Allocator>&
return val.iszero() ? 0 : val.isneg() ? -1 : 1;
}
+template <unsigned Digits10, class ExponentType, class Allocator>
+inline std::size_t hash_value(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
+{
+ return val.hash();
+}
+
} // namespace backends
using boost::multiprecision::backends::cpp_dec_float;
diff --git a/boost/multiprecision/cpp_int.hpp b/boost/multiprecision/cpp_int.hpp
index b8681677e2..c348020d40 100644
--- a/boost/multiprecision/cpp_int.hpp
+++ b/boost/multiprecision/cpp_int.hpp
@@ -34,9 +34,10 @@ namespace backends{
#ifdef BOOST_MSVC
-// warning C4127: conditional expression is constant
#pragma warning(push)
-#pragma warning(disable:4127 4351 4293 4996 4307 4702 6285)
+#pragma warning(disable:4307) // integral constant overflow (oveflow is in a branch not taken when it would overflow)
+#pragma warning(disable:4127) // conditional expression is constant
+#pragma warning(disable:4702) // Unreachable code (reachability depends on template params)
#endif
template <unsigned MinBits = 0, unsigned MaxBits = 0, boost::multiprecision::cpp_integer_type SignType = signed_magnitude, cpp_int_check_type Checked = unchecked, class Allocator = typename mpl::if_c<MinBits && (MinBits == MaxBits), void, std::allocator<limb_type> >::type >
@@ -226,7 +227,7 @@ public:
: m_data(i), m_limbs(1), m_sign(false), m_internal(true) { }
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
: m_data(i), m_limbs(1), m_sign(i < 0), m_internal(true) { }
-#if defined(BOOST_LITTLE_ENDIAN)
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
: m_data(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false), m_internal(true) { }
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
@@ -444,7 +445,7 @@ public:
: m_wrapper(i), m_limbs(1), m_sign(false) {}
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
: m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1), m_sign(i < 0) {}
-#if defined(BOOST_LITTLE_ENDIAN)
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
: m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false) {}
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
@@ -595,7 +596,7 @@ public:
: m_wrapper(i), m_limbs(1) {}
BOOST_MP_FORCEINLINE cpp_int_base(signed_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
: m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1) { if(i < 0) negate(); }
-#ifdef BOOST_LITTLE_ENDIAN
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
: m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1) {}
BOOST_MP_FORCEINLINE cpp_int_base(signed_double_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
@@ -773,10 +774,10 @@ public:
//
template <class SI>
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask) : static_cast<local_limb_type>(i)& limb_mask), m_sign(i < 0) {}
+ : m_data(i < 0 ? static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0) {}
template <class SI>
BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? (static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask)) : static_cast<local_limb_type>(i)& limb_mask), m_sign(i < 0)
+ : m_data(i < 0 ? (static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask)) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0)
{ check_in_range(i); }
template <class UI>
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked)>::type const* = 0) BOOST_NOEXCEPT
@@ -914,6 +915,20 @@ public:
//
// Direct construction:
//
+#ifdef __MSVC_RUNTIME_CHECKS
+ template <class SI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i & limb_mask)) & limb_mask : static_cast<local_limb_type>(i & limb_mask)) {}
+ template <class SI>
+ BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
+ : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i & limb_mask) : static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
+ template <class UI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(i & limb_mask)) {}
+ template <class UI>
+ BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
+ : m_data(static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
+#else
template <class SI>
BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
: m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i)) & limb_mask : static_cast<local_limb_type>(i) & limb_mask) {}
@@ -926,6 +941,7 @@ public:
template <class UI>
BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
: m_data(static_cast<local_limb_type>(i)) { check_in_range(i); }
+#endif
template <class F>
BOOST_MP_FORCEINLINE cpp_int_base(F i, typename boost::enable_if<is_floating_point<F> >::type const* = 0) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
: m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask)
@@ -999,7 +1015,7 @@ public:
template <class Arg, class Base>
struct is_allowed_cpp_int_base_conversion : public mpl::if_c<
is_same<Arg, limb_type>::value || is_same<Arg, signed_limb_type>::value
-#ifdef BOOST_LITTLE_ENDIAN
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
|| is_same<Arg, double_limb_type>::value || is_same<Arg, signed_double_limb_type>::value
#endif
#if defined(BOOST_MP_USER_DEFINED_LITERALS)
@@ -1207,7 +1223,11 @@ private:
BOOST_STATIC_ASSERT(sizeof(i) == 2 * sizeof(limb_type));
BOOST_STATIC_ASSERT(base_type::internal_limb_count >= 2);
typename base_type::limb_pointer p = this->limbs();
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(i & ~static_cast<limb_type>(0));
+#else
*p = static_cast<limb_type>(i);
+#endif
p[1] = static_cast<limb_type>(i >> base_type::limb_bits);
this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
this->sign(false);
@@ -1222,7 +1242,11 @@ private:
s = true;
ui = static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i));
typename base_type::limb_pointer p = this->limbs();
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(ui & ~static_cast<limb_type>(0));
+#else
*p = static_cast<limb_type>(ui);
+#endif
p[1] = static_cast<limb_type>(ui >> base_type::limb_bits);
this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
this->sign(s);
@@ -1368,7 +1392,7 @@ private:
}
}
//
- // Exception guarentee: create the result in stack variable "result"
+ // Exception guarantee: create the result in stack variable "result"
// then do a swap at the end. In the event of a throw, *this will
// be left unchanged.
//
@@ -1923,6 +1947,10 @@ struct is_explicitly_convertible<cpp_int_backend<MinBits, MaxBits, SignType, Che
}
#endif
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
}} // namespaces
//
diff --git a/boost/multiprecision/cpp_int/add.hpp b/boost/multiprecision/cpp_int/add.hpp
index 372998d672..22b8c186dc 100644
--- a/boost/multiprecision/cpp_int/add.hpp
+++ b/boost/multiprecision/cpp_int/add.hpp
@@ -10,6 +10,11 @@
namespace boost{ namespace multiprecision{ namespace backends{
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
//
// This is the key addition routine where all the argument types are non-trivial cpp_int's:
//
@@ -44,7 +49,11 @@ inline void add_unsigned(CppInt1& result, const CppInt2& a, const CppInt3& b) BO
while(pr != pr_end)
{
carry += static_cast<double_limb_type>(*pa) + static_cast<double_limb_type>(*pb);
+#ifdef __MSVC_RUNTIME_CHECKS
+ *pr = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
*pr = static_cast<limb_type>(carry);
+#endif
carry >>= CppInt1::limb_bits;
++pr, ++pa, ++pb;
}
@@ -63,7 +72,11 @@ inline void add_unsigned(CppInt1& result, const CppInt2& a, const CppInt3& b) BO
break;
}
carry += static_cast<double_limb_type>(*pa);
+#ifdef __MSVC_RUNTIME_CHECKS
+ *pr = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
*pr = static_cast<limb_type>(carry);
+#endif
carry >>= CppInt1::limb_bits;
++pr, ++pa;
}
@@ -95,7 +108,11 @@ inline void add_unsigned(CppInt1& result, const CppInt2& a, const limb_type& o)
for(; carry && (i < result.size()); ++i)
{
carry += static_cast<double_limb_type>(pa[i]);
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[i] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
pr[i] = static_cast<limb_type>(carry);
+#endif
carry >>= CppInt1::limb_bits;
}
// Just copy any remaining digits:
@@ -524,6 +541,10 @@ BOOST_MP_FORCEINLINE typename enable_if_c<
result.normalize();
}
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
}}} // namespaces
#endif
diff --git a/boost/multiprecision/cpp_int/bitwise.hpp b/boost/multiprecision/cpp_int/bitwise.hpp
index e39be3d12c..748d088056 100644
--- a/boost/multiprecision/cpp_int/bitwise.hpp
+++ b/boost/multiprecision/cpp_int/bitwise.hpp
@@ -351,7 +351,6 @@ inline void left_shift_limb(Int& result, double_limb_type s)
++rs; // Most significant limb will overflow when shifted
rs += offset;
result.resize(rs, rs);
- bool truncated = result.size() != rs;
typename Int::limb_pointer pr = result.limbs();
diff --git a/boost/multiprecision/cpp_int/divide.hpp b/boost/multiprecision/cpp_int/divide.hpp
index 5fe6ce6ad8..2f83d1ba71 100644
--- a/boost/multiprecision/cpp_int/divide.hpp
+++ b/boost/multiprecision/cpp_int/divide.hpp
@@ -227,12 +227,20 @@ void divide_unsigned_helper(
for(unsigned i = 0; i < y.size(); ++i)
{
carry += static_cast<double_limb_type>(py[i]) * static_cast<double_limb_type>(guess);
+#ifdef __MSVC_RUNTIME_CHECKS
+ pt[i + shift] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
pt[i + shift] = static_cast<limb_type>(carry);
+#endif
carry >>= CppInt1::limb_bits;
}
if(carry && !truncated_t)
{
+#ifdef __MSVC_RUNTIME_CHECKS
+ pt[t.size() - 1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
pt[t.size() - 1] = static_cast<limb_type>(carry);
+#endif
}
else if(!truncated_t)
{
diff --git a/boost/multiprecision/cpp_int/import_export.hpp b/boost/multiprecision/cpp_int/import_export.hpp
index 3a2473b0b2..0fe3249ddc 100644
--- a/boost/multiprecision/cpp_int/import_export.hpp
+++ b/boost/multiprecision/cpp_int/import_export.hpp
@@ -20,7 +20,7 @@ namespace boost {
limb_type mask = chunk_bits >= sizeof(limb_type) * CHAR_BIT ? ~static_cast<limb_type>(0u) : (static_cast<limb_type>(1u) << chunk_bits) - 1;
- limb_type value = (static_cast<limb_type>(bits) & mask) << shift;
+ limb_type value = static_cast<limb_type>(bits & mask) << shift;
if(value)
{
if(val.size() == limb)
@@ -132,7 +132,7 @@ namespace boost {
if(byte_len % sizeof(limb_type))
++limb_len;
cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend();
- result.resize(limb_len, limb_len); // checked types may throw here if they're not large enough to hold the data!
+ result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
result.limbs()[result.size() - 1] = 0u;
std::memcpy(result.limbs(), i, std::min(byte_len, result.size() * sizeof(limb_type)));
result.normalize(); // In case data has leading zeros.
@@ -149,7 +149,7 @@ namespace boost {
if(byte_len % sizeof(result.limbs()[0]))
++limb_len;
result.limbs()[0] = 0u;
- result.resize(limb_len, limb_len); // checked types may throw here if they're not large enough to hold the data!
+ result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
std::memcpy(result.limbs(), i, std::min(byte_len, result.size() * sizeof(result.limbs()[0])));
result.normalize(); // In case data has leading zeros.
return val;
@@ -221,7 +221,7 @@ namespace boost {
++out;
return out;
}
- unsigned bitcount = msb(val) + 1;
+ unsigned bitcount = boost::multiprecision::backends::eval_msb_imp(val.backend()) + 1;
unsigned chunks = bitcount / chunk_size;
if(bitcount % chunk_size)
++chunks;
diff --git a/boost/multiprecision/cpp_int/limits.hpp b/boost/multiprecision/cpp_int/limits.hpp
index 36a38d5a3b..518bb9f4e0 100644
--- a/boost/multiprecision/cpp_int/limits.hpp
+++ b/boost/multiprecision/cpp_int/limits.hpp
@@ -12,6 +12,11 @@ namespace std{
namespace detail{
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4307)
+#endif
+
template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, boost::multiprecision::cpp_int_check_type Checked, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
inline boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>
get_min(const boost::mpl::true_&, const boost::mpl::true_&)
@@ -210,6 +215,9 @@ template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer
BOOST_CONSTEXPR_OR_CONST float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates> >::round_style;
#endif
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
} // namespace std
diff --git a/boost/multiprecision/cpp_int/misc.hpp b/boost/multiprecision/cpp_int/misc.hpp
index a124710c28..0412ff144e 100644
--- a/boost/multiprecision/cpp_int/misc.hpp
+++ b/boost/multiprecision/cpp_int/misc.hpp
@@ -10,12 +10,15 @@
#include <boost/multiprecision/detail/bitscan.hpp> // lsb etc
#include <boost/integer/common_factor_rt.hpp> // gcd/lcm
+#include <boost/functional/hash_fwd.hpp>
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4702)
+#pragma warning(disable:4127) // conditional expression is constant
#endif
+
namespace boost{ namespace multiprecision{ namespace backends{
template <class R, class CppInt>
@@ -146,6 +149,16 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
//
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type
+eval_msb_imp(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a)
+{
+ //
+ // Find the index of the most significant bit that is non-zero:
+ //
+ return (a.size() - 1) * cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits + boost::multiprecision::detail::find_msb(a.limbs()[a.size() - 1]);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type
eval_msb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a)
{
using default_ops::eval_get_sign;
@@ -157,11 +170,7 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
{
BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
}
-
- //
- // Find the index of the most significant bit that is non-zero:
- //
- return (a.size() - 1) * cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits + boost::multiprecision::detail::find_msb(a.limbs()[a.size() - 1]);
+ return eval_msb_imp(a);
}
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
@@ -262,7 +271,8 @@ inline typename enable_if_c<is_integral<U>::value>::type eval_qr(
cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& r) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
{
using default_ops::eval_qr;
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(y);
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
+ t = y;
eval_qr(x, t, q, r);
}
@@ -317,7 +327,11 @@ inline double_limb_type integer_gcd_reduce(double_limb_type u, double_limb_type
break;
}
v -= u;
+#ifdef __MSVC_RUNTIME_CHECKS
+ while((v & 1u) == 0)
+#else
while((static_cast<unsigned>(v) & 1u) == 0)
+#endif
v >>= 1;
} while(true);
return u;
@@ -527,21 +541,33 @@ template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignTy
inline typename enable_if_c<
is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
&& is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && boost::is_convertible<typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type, R>::value
>::type
eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val)
{
typedef typename common_type<R, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type>::type common_type;
if(std::numeric_limits<R>::is_specialized && (static_cast<common_type>(*val.limbs()) > static_cast<common_type>((std::numeric_limits<R>::max)())))
{
- conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- *result = (std::numeric_limits<R>::max)();
+ if(val.isneg())
+ {
+ if(static_cast<common_type>(*val.limbs()) > -static_cast<common_type>((std::numeric_limits<R>::min)()))
+ conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ *result = (std::numeric_limits<R>::min)();
+ }
+ else
+ {
+ conversion_overflow(typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ *result = (std::numeric_limits<R>::max)();
+ }
}
else
- *result = static_cast<R>(*val.limbs());
- if(val.isneg())
{
- check_is_negative(mpl::bool_<boost::is_signed<R>::value || boost::is_floating_point<R>::value>());
- *result = negate_integer(*result, mpl::bool_<boost::is_signed<R>::value || boost::is_floating_point<R>::value>());
+ *result = static_cast<R>(*val.limbs());
+ if(val.isneg())
+ {
+ check_is_negative(mpl::bool_<is_signed_number<R>::value || (number_category<R>::value == number_kind_floating_point)>());
+ *result = negate_integer(*result, mpl::bool_<is_signed_number<R>::value || (number_category<R>::value == number_kind_floating_point)>());
+ }
}
}
@@ -549,6 +575,7 @@ template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignTy
inline typename enable_if_c<
is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
&& is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && boost::is_convertible<typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::local_limb_type, R>::value
>::type
eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val)
{
@@ -583,6 +610,16 @@ inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type
+eval_msb_imp(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a)
+{
+ //
+ // Find the index of the least significant bit within that limb:
+ //
+ return boost::multiprecision::detail::find_msb(*a.limbs());
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type
eval_msb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a)
{
using default_ops::eval_get_sign;
@@ -594,10 +631,19 @@ inline typename enable_if_c<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits
{
BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
}
- //
- // Find the index of the least significant bit within that limb:
- //
- return boost::multiprecision::detail::find_msb(*a.limbs());
+ return eval_msb_imp(a);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+inline std::size_t hash_value(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& val) BOOST_NOEXCEPT
+{
+ std::size_t result = 0;
+ for(unsigned i = 0; i < val.size(); ++i)
+ {
+ boost::hash_combine(result, val.limbs()[i]);
+ }
+ boost::hash_combine(result, val.sign());
+ return result;
}
#ifdef BOOST_MSVC
diff --git a/boost/multiprecision/cpp_int/multiply.hpp b/boost/multiprecision/cpp_int/multiply.hpp
index 226bc9d192..88264c47be 100644
--- a/boost/multiprecision/cpp_int/multiply.hpp
+++ b/boost/multiprecision/cpp_int/multiply.hpp
@@ -10,7 +10,12 @@
namespace boost{ namespace multiprecision{ namespace backends{
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+ template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
eval_multiply(
cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
@@ -31,7 +36,11 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
while(p != pe)
{
carry += static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(val);
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
*p = static_cast<limb_type>(carry);
+#endif
carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
++p, ++pa;
}
@@ -139,7 +148,11 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
carry += static_cast<double_limb_type>(pa[i]) * static_cast<double_limb_type>(pb[j]);
BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j]));
carry += pr[i + j];
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[i + j] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
pr[i + j] = static_cast<limb_type>(carry);
+#endif
carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
BOOST_ASSERT(carry <= (cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value));
}
@@ -184,7 +197,12 @@ BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<Mi
}
else
{
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
+#else
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
+ t = val;
+#endif
eval_multiply(result, a, t);
}
}
@@ -240,7 +258,12 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
result.negate();
return;
}
+#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
+#else
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
+ t = val;
+#endif
eval_multiply(result, a, t);
}
@@ -348,6 +371,16 @@ BOOST_MP_FORCEINLINE typename enable_if_c<
limb_type* pr = result.limbs();
double_limb_type carry = w * y;
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += w * z + x * y;
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += x * z;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#else
pr[0] = static_cast<limb_type>(carry);
carry >>= limb_bits;
carry += w * z + x * y;
@@ -356,7 +389,7 @@ BOOST_MP_FORCEINLINE typename enable_if_c<
carry += x * z;
pr[2] = static_cast<limb_type>(carry);
pr[3] = static_cast<limb_type>(carry >> limb_bits);
-
+#endif
result.sign(s);
result.normalize();
}
@@ -382,6 +415,20 @@ BOOST_MP_FORCEINLINE typename enable_if_c<
limb_type* pr = result.limbs();
double_limb_type carry = w * y;
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += w * z;
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry = x * y + pr[1];
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += pr[2] + x * z;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#else
pr[0] = static_cast<limb_type>(carry);
carry >>= limb_bits;
carry += w * z;
@@ -394,7 +441,7 @@ BOOST_MP_FORCEINLINE typename enable_if_c<
carry += pr[2] + x * z;
pr[2] = static_cast<limb_type>(carry);
pr[3] = static_cast<limb_type>(carry >> limb_bits);
-
+#endif
result.sign(false);
result.normalize();
}
@@ -434,6 +481,10 @@ BOOST_MP_FORCEINLINE typename enable_if_c<is_unsigned<UI>::value && (sizeof(UI)
result = static_cast<double_limb_type>(a) * static_cast<double_limb_type>(b);
}
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
}}} // namespaces
#endif
diff --git a/boost/multiprecision/debug_adaptor.hpp b/boost/multiprecision/debug_adaptor.hpp
index a6ed903c44..1b69ba4aa6 100644
--- a/boost/multiprecision/debug_adaptor.hpp
+++ b/boost/multiprecision/debug_adaptor.hpp
@@ -13,7 +13,12 @@ namespace boost{
namespace multiprecision{
namespace backends{
-template <class Backend>
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+ template <class Backend>
struct debug_adaptor
{
typedef typename Backend::signed_types signed_types;
@@ -120,6 +125,22 @@ public:
if(tag::value)
update_view();
}
+ static unsigned default_precision() BOOST_NOEXCEPT
+ {
+ return Backend::default_precision();
+ }
+ static void default_precision(unsigned v) BOOST_NOEXCEPT
+ {
+ Backend::default_precision(v);
+ }
+ unsigned precision()const BOOST_NOEXCEPT
+ {
+ return value().precision();
+ }
+ void precision(unsigned digits10) BOOST_NOEXCEPT
+ {
+ value().precision(digits10);
+ }
};
template <class Backend>
@@ -434,6 +455,13 @@ NON_MEMBER_OP3(fmod, "fmod");
NON_MEMBER_OP3(pow, "pow");
NON_MEMBER_OP3(atan2, "atan2");
+template <class Backend>
+std::size_t hash_value(const debug_adaptor<Backend>& val)
+{
+ return hash_value(val.value());
+}
+
+
} // namespace backends
using backends::debug_adaptor;
@@ -441,6 +469,9 @@ using backends::debug_adaptor;
template<class Backend>
struct number_category<backends::debug_adaptor<Backend> > : public number_category<Backend> {};
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
}} // namespaces
namespace std{
diff --git a/boost/multiprecision/detail/big_lanczos.hpp b/boost/multiprecision/detail/big_lanczos.hpp
index 03d3203ec8..0a5a154da1 100644
--- a/boost/multiprecision/detail/big_lanczos.hpp
+++ b/boost/multiprecision/detail/big_lanczos.hpp
@@ -21,10 +21,10 @@ struct lanczos<multiprecision::number<Backend, ExpressionTemplates>, Policy>
{
typedef typename boost::math::policies::precision<multiprecision::number<Backend, ExpressionTemplates>, Policy>::type precision_type;
typedef typename mpl::if_c<
- precision_type::value <= 73,
+ precision_type::value && (precision_type::value <= 73),
lanczos13UDT,
typename mpl::if_c<
- precision_type::value <= 122,
+ precision_type::value&& (precision_type::value <= 122),
lanczos22UDT,
undefined_lanczos
>::type
diff --git a/boost/multiprecision/detail/default_ops.hpp b/boost/multiprecision/detail/default_ops.hpp
index 59d098ba0d..d9fa19479b 100644
--- a/boost/multiprecision/detail/default_ops.hpp
+++ b/boost/multiprecision/detail/default_ops.hpp
@@ -25,7 +25,25 @@
#endif
-namespace boost{ namespace multiprecision{ namespace default_ops{
+namespace boost{ namespace multiprecision{
+
+ namespace detail {
+
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_floating_point>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+
+}
+
+
+namespace default_ops{
#ifdef BOOST_MSVC
// warning C4127: conditional expression is constant
@@ -309,7 +327,14 @@ inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_si
t.negate();
}
template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
+{
+ T temp;
+ temp = u;
+ eval_subtract(t, temp, v);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
{
T temp(u);
eval_subtract(t, temp, v);
@@ -351,6 +376,7 @@ inline void eval_multiply_default(T& t, const T& u, const T& v)
eval_multiply(t, v);
}
}
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
template <class T, class U>
inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v)
{
@@ -369,6 +395,7 @@ inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type e
{
eval_multiply(t, v, u);
}
+#endif
template <class T, class U, class V>
inline void eval_multiply_default(T& t, const U& u, const V& v)
{
@@ -449,6 +476,7 @@ inline void eval_divide_default(T& t, const T& u, const T& v)
eval_divide(t, v);
}
}
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
template <class T, class U>
inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v)
{
@@ -475,12 +503,14 @@ inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_co
T uu(u);
eval_divide(t, uu, v);
}
+#endif
template <class T, class U, class V>
inline void eval_divide_default(T& t, const U& u, const V& v)
{
if(is_same<T, V>::value && ((void*)&t == (void*)&v))
{
- T temp(u);
+ T temp;
+ temp = u;
eval_divide(temp, v);
t = temp;
}
@@ -882,6 +912,16 @@ inline void eval_convert_to(terminal<R>* result, const B& backend)
result->value = boost::lexical_cast<R>(backend.str(0, std::ios_base::fmtflags(0)));
}
+template <class B1, class B2, expression_template_option et>
+inline void eval_convert_to(terminal<number<B1, et> >* result, const B2& backend)
+{
+ //
+ // We ran out of types to try for the conversion, try
+ // a generic conversion and hope for the best:
+ //
+ boost::multiprecision::detail::generic_interconvert(result->value.backend(), backend, number_category<B1>(), number_category<B2>());
+}
+
template <class B>
inline void eval_convert_to(std::string* result, const B& backend)
{
@@ -974,6 +1014,38 @@ inline void eval_trunc(T& result, const T& a)
}
template <class T>
+inline void eval_modf(T& result, T const& arg, T* pipart)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ int c = eval_fpclassify(arg);
+ if(c == (int)FP_NAN)
+ {
+ if(pipart)
+ *pipart = arg;
+ result = arg;
+ return;
+ }
+ else if(c == (int)FP_INFINITE)
+ {
+ if(pipart)
+ *pipart = arg;
+ result = ui_type(0u);
+ return;
+ }
+ if(pipart)
+ {
+ eval_trunc(*pipart, arg);
+ eval_subtract(result, arg, *pipart);
+ }
+ else
+ {
+ T ipart;
+ eval_trunc(ipart, arg);
+ eval_subtract(result, arg, ipart);
+ }
+}
+
+template <class T>
inline void eval_round(T& result, const T& a)
{
BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The round function is only valid for floating point types.");
@@ -1212,6 +1284,15 @@ inline typename B::exponent_type eval_ilogb(const B& val)
{
BOOST_STATIC_ASSERT_MSG(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of ilogb requires a base 2 number type");
typename B::exponent_type e;
+ switch(eval_fpclassify(val))
+ {
+ case FP_NAN:
+ return (std::numeric_limits<typename B::exponent_type>::min)();
+ case FP_INFINITE:
+ return (std::numeric_limits<typename B::exponent_type>::max)();
+ case FP_ZERO:
+ return (std::numeric_limits<typename B::exponent_type>::min)();
+ }
B result;
eval_frexp(result, val, &e);
return e - 1;
@@ -1301,9 +1382,49 @@ inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::deta
return (isnormal)(value_type(arg));
}
+// Default versions of sign manipulation functions, if individual backends can do better than this
+// (for example with signed zero), then they should overload these functions further:
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return arg.sign();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return (sign)(value_type(arg));
+}
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return arg.sign() < 0;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return (signbit)(value_type(arg));
+}
+
} // namespace math
+
namespace multiprecision{
+ //
+ // Import Math functions here, so they can be found via ADL:
+ //
+ using boost::math::signbit;
+ using boost::math::sign;
+ using boost::math::copysign;
+ using boost::math::changesign;
+ using boost::math::fpclassify;
+ using boost::math::isinf;
+ using boost::math::isnan;
+ using boost::math::isnormal;
+
template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
inline number<B1, ET1>& add(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
{
@@ -1626,7 +1747,31 @@ frexp(const detail::expression<tag, A1, A2, A3, A4>& v, boost::long_long_type* p
typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
}
+//
+// modf does not return an expression template since we require the
+// second argument to be evaluated even if the returned value is
+// not assigned to anything...
+//
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const number<T, ExpressionTemplates>& v, number<T, ExpressionTemplates>* pipart)
+{
+ using default_ops::eval_modf;
+ number<T, ExpressionTemplates> result;
+ eval_modf(result.backend(), v.backend(), pipart ? &pipart->backend() : 0);
+ return BOOST_MP_MOVE(result);
+}
+template <class T, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const detail::expression<tag, A1, A2, A3, A4>& v, number<T, ExpressionTemplates>* pipart)
+{
+ using default_ops::eval_modf;
+ number<T, ExpressionTemplates> result, arg(v);
+ eval_modf(result.backend(), arg.backend(), pipart ? &pipart->backend() : 0);
+ return BOOST_MP_MOVE(result);
+}
+//
+// Integer square root:
+//
template <class B, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type
sqrt(const number<B, ExpressionTemplates>& x)
diff --git a/boost/multiprecision/detail/functions/constants.hpp b/boost/multiprecision/detail/functions/constants.hpp
index 3a283c5f2e..e0a2ff5fcf 100644
--- a/boost/multiprecision/detail/functions/constants.hpp
+++ b/boost/multiprecision/detail/functions/constants.hpp
@@ -241,28 +241,35 @@ typename constant_initializer<T, F>::initializer const constant_initializer<T, F
template <class T>
const T& get_constant_ln2()
{
- static T result;
- static bool b = false;
- if(!b)
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
{
- calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
b = true;
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
}
constant_initializer<T, &get_constant_ln2<T> >::do_nothing();
return result;
}
+#ifndef BOOST_MP_THREAD_LOCAL
+#error 1
+#endif
template <class T>
const T& get_constant_e()
{
- static T result;
- static bool b = false;
- if(!b)
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
{
- calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
b = true;
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
}
constant_initializer<T, &get_constant_e<T> >::do_nothing();
@@ -273,12 +280,14 @@ const T& get_constant_e()
template <class T>
const T& get_constant_pi()
{
- static T result;
- static bool b = false;
- if(!b)
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
{
- calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
b = true;
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
}
constant_initializer<T, &get_constant_pi<T> >::do_nothing();
diff --git a/boost/multiprecision/detail/functions/pow.hpp b/boost/multiprecision/detail/functions/pow.hpp
index e51df69d4a..d5ab032c2f 100644
--- a/boost/multiprecision/detail/functions/pow.hpp
+++ b/boost/multiprecision/detail/functions/pow.hpp
@@ -103,7 +103,7 @@ void hyp0F0(T& H0F0, const T& x)
typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
BOOST_ASSERT(&H0F0 != &x);
- long tol = boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ long tol = boost::multiprecision::detail::digits2<number<T, et_on> >::value();
T t;
T x_pow_n_div_n_fact(x);
@@ -117,9 +117,9 @@ void hyp0F0(T& H0F0, const T& x)
ui_type n;
- static const unsigned series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ const unsigned series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
// Series expansion of hyperg_0f0(; ; x).
for(n = 2; n < series_limit; ++n)
{
@@ -158,16 +158,16 @@ void hyp1F0(T& H1F0, const T& a, const T& x)
eval_multiply(H1F0, pochham_a, x_pow_n_div_n_fact);
eval_add(H1F0, si_type(1));
T lim;
- eval_ldexp(lim, H1F0, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ eval_ldexp(lim, H1F0, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
if(eval_get_sign(lim) < 0)
lim.negate();
si_type n;
T term, part;
- static const si_type series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ const si_type series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
// Series expansion of hyperg_1f0(a; ; x).
for(n = 2; n < series_limit; n++)
{
@@ -237,7 +237,14 @@ void eval_exp(T& result, const T& x)
//
// Use series for exp(x) - 1:
//
- T lim = std::numeric_limits<number<T, et_on> >::epsilon().backend();
+ T lim;
+ if(std::numeric_limits<number<T, et_on> >::is_specialized)
+ lim = std::numeric_limits<number<T, et_on> >::epsilon().backend();
+ else
+ {
+ result = ui_type(1);
+ eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ }
unsigned k = 2;
exp_series = xx;
result = si_type(1);
@@ -286,7 +293,7 @@ void eval_exp(T& result, const T& x)
eval_convert_to(&n, result);
// The scaling is 2^11 = 2048.
- static const si_type p2 = static_cast<si_type>(si_type(1) << 11);
+ const si_type p2 = static_cast<si_type>(si_type(1) << 11);
eval_multiply(exp_series, get_constant_ln2<T>(), static_cast<canonical_exp_type>(n));
eval_subtract(exp_series, xx);
@@ -346,7 +353,10 @@ void eval_log(T& result, const T& arg)
else
eval_subtract(result, t);
- eval_multiply(lim, result, std::numeric_limits<number<T, et_on> >::epsilon().backend());
+ if(std::numeric_limits<number<T, et_on> >::is_specialized)
+ eval_multiply(lim, result, std::numeric_limits<number<T, et_on> >::epsilon().backend());
+ else
+ eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
if(eval_get_sign(lim) < 0)
lim.negate();
INSTRUMENT_BACKEND(lim);
@@ -369,14 +379,17 @@ void eval_log(T& result, const T& arg)
template <class T>
const T& get_constant_log10()
{
- static T result;
- static bool b = false;
- if(!b)
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
{
typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
T ten;
ten = ui_type(10u);
eval_log(result, ten);
+ b = true;
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
}
constant_initializer<T, &get_constant_log10<T> >::do_nothing();
@@ -606,7 +619,7 @@ namespace detail{
ui_type k = 1;
T lim(x);
- eval_ldexp(lim, lim, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ eval_ldexp(lim, lim, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
do
{
diff --git a/boost/multiprecision/detail/functions/trig.hpp b/boost/multiprecision/detail/functions/trig.hpp
index be2a9deb77..c84a639418 100644
--- a/boost/multiprecision/detail/functions/trig.hpp
+++ b/boost/multiprecision/detail/functions/trig.hpp
@@ -38,15 +38,15 @@ void hyp0F1(T& result, const T& b, const T& x)
T tol;
tol = ui_type(1);
- eval_ldexp(tol, tol, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ eval_ldexp(tol, tol, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
eval_multiply(tol, result);
if(eval_get_sign(tol) < 0)
tol.negate();
T term;
- static const int series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ const int series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
// Series expansion of hyperg_0f1(; b; x).
for(n = 2; n < series_limit; ++n)
{
@@ -365,7 +365,7 @@ void hyp2F1(T& result, const T& a, const T& b, const T& c, const T& x)
eval_add(result, ui_type(1));
T lim;
- eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value);
+ eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
if(eval_get_sign(lim) < 0)
lim.negate();
@@ -373,9 +373,9 @@ void hyp2F1(T& result, const T& a, const T& b, const T& c, const T& x)
ui_type n;
T term;
- static const unsigned series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ const unsigned series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
// Series expansion of hyperg_2f1(a, b; c; x).
for(n = 2; n < series_limit; ++n)
{
@@ -497,11 +497,16 @@ void eval_asin(T& result, const T& x)
result = (guess_type)(std::asin(dd));
- unsigned current_digits = std::numeric_limits<guess_type>::digits - 5;
- unsigned target_precision = boost::multiprecision::detail::digits2<number<T, et_on> >::value;
+ // Newton-Raphson iteration, we should double our precision with each iteration,
+ // in practice this seems to not quite work in all cases... so terminate when we
+ // have at least 2/3 of the digits correct on the assumption that the correction
+ // we've just added will finish the job...
+
+ boost::intmax_t current_precision = eval_ilogb(result);
+ boost::intmax_t target_precision = current_precision - 1 - (std::numeric_limits<number<T> >::digits * 2) / 3;
// Newton-Raphson iteration
- while(current_digits < target_precision)
+ while(current_precision > target_precision)
{
T sine, cosine;
eval_sin(sine, result);
@@ -509,18 +514,11 @@ void eval_asin(T& result, const T& x)
eval_subtract(sine, xx);
eval_divide(sine, cosine);
eval_subtract(result, sine);
-
- current_digits *= 2;
- /*
- T lim;
- eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value);
- if(eval_get_sign(s) < 0)
- s.negate();
- if(eval_get_sign(lim) < 0)
- lim.negate();
- if(lim.compare(s) >= 0)
+ current_precision = eval_ilogb(sine);
+#ifdef FP_ILOGB0
+ if(current_precision == FP_ILOGB0)
break;
- */
+#endif
}
if(b_neg)
result.negate();
@@ -646,11 +644,16 @@ void eval_atan(T& result, const T& x)
eval_convert_to(&d, xx);
result = fp_type(std::atan(d));
- // Newton-Raphson iteration
- static const boost::int32_t double_digits10_minus_a_few = std::numeric_limits<double>::digits10 - 3;
+ // Newton-Raphson iteration, we should double our precision with each iteration,
+ // in practice this seems to not quite work in all cases... so terminate when we
+ // have at least 2/3 of the digits correct on the assumption that the correction
+ // we've just added will finish the job...
+
+ boost::intmax_t current_precision = eval_ilogb(result);
+ boost::intmax_t target_precision = current_precision - 1 - (std::numeric_limits<number<T> >::digits * 2) / 3;
T s, c, t;
- for(boost::int32_t digits = double_digits10_minus_a_few; digits <= std::numeric_limits<number<T, et_on> >::digits10; digits *= 2)
+ while(current_precision > target_precision)
{
eval_sin(s, result);
eval_cos(c, result);
@@ -658,6 +661,11 @@ void eval_atan(T& result, const T& x)
eval_subtract(t, s);
eval_multiply(s, t, c);
eval_add(result, s);
+ current_precision = eval_ilogb(s);
+#ifdef FP_ILOGB0
+ if(current_precision == FP_ILOGB0)
+ break;
+#endif
}
if(b_neg)
result.negate();
diff --git a/boost/multiprecision/detail/generic_interconvert.hpp b/boost/multiprecision/detail/generic_interconvert.hpp
index d1fa028d30..6a840f8544 100644
--- a/boost/multiprecision/detail/generic_interconvert.hpp
+++ b/boost/multiprecision/detail/generic_interconvert.hpp
@@ -35,36 +35,37 @@ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_
using default_ops::eval_right_shift;
using default_ops::eval_ldexp;
using default_ops::eval_add;
+ using default_ops::eval_is_zero;
// smallest unsigned type handled natively by "From" is likely to be it's limb_type:
- typedef typename canonical<unsigned char, From>::type limb_type;
+ typedef typename canonical<unsigned char, From>::type l_limb_type;
// get the corresponding type that we can assign to "To":
- typedef typename canonical<limb_type, To>::type to_type;
+ typedef typename canonical<l_limb_type, To>::type to_type;
From t(from);
bool is_neg = eval_get_sign(t) < 0;
if(is_neg)
t.negate();
// Pick off the first limb:
- limb_type limb;
- limb_type mask = ~static_cast<limb_type>(0);
+ l_limb_type limb;
+ l_limb_type mask = static_cast<l_limb_type>(~static_cast<l_limb_type>(0));
From fl;
eval_bitwise_and(fl, t, mask);
eval_convert_to(&limb, fl);
to = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<limb_type>::digits);
+ eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
//
// Then keep picking off more limbs until "t" is zero:
//
To l;
- unsigned shift = std::numeric_limits<limb_type>::digits;
+ unsigned shift = std::numeric_limits<l_limb_type>::digits;
while(!eval_is_zero(t))
{
eval_bitwise_and(fl, t, mask);
eval_convert_to(&limb, fl);
l = static_cast<to_type>(limb);
- eval_right_shift(t, std::numeric_limits<limb_type>::digits);
+ eval_right_shift(t, std::numeric_limits<l_limb_type>::digits);
eval_ldexp(l, l, shift);
eval_add(to, l);
- shift += std::numeric_limits<limb_type>::digits;
+ shift += std::numeric_limits<l_limb_type>::digits;
}
//
// Finish off by setting the sign:
@@ -310,7 +311,7 @@ typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
num = -num;
}
int denom_bits = msb(denom);
- int shift = std::numeric_limits<To>::digits + denom_bits - msb(num) + 1;
+ int shift = std::numeric_limits<To>::digits + denom_bits - msb(num);
if(shift > 0)
num <<= shift;
else if(shift < 0)
@@ -318,7 +319,7 @@ typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
Integer q, r;
divide_qr(num, denom, q, r);
int q_bits = msb(q);
- if(q_bits == std::numeric_limits<To>::digits)
+ if(q_bits == std::numeric_limits<To>::digits - 1)
{
//
// Round up if 2 * r > denom:
@@ -334,7 +335,7 @@ typename enable_if_c<is_number<To>::value || is_floating_point<To>::value>::type
}
else
{
- BOOST_ASSERT(q_bits == 1 + std::numeric_limits<To>::digits);
+ BOOST_ASSERT(q_bits == std::numeric_limits<To>::digits);
//
// We basically already have the rounding info:
//
diff --git a/boost/multiprecision/detail/number_base.hpp b/boost/multiprecision/detail/number_base.hpp
index f229914c79..5911b3a28b 100644
--- a/boost/multiprecision/detail/number_base.hpp
+++ b/boost/multiprecision/detail/number_base.hpp
@@ -26,16 +26,25 @@
# define BOOST_MP_FORCEINLINE inline
#endif
-#if (defined(BOOST_GCC) && (BOOST_GCC <= 40700)) || defined(__SUNPRO_CC)
+#if (defined(BOOST_GCC) && (BOOST_GCC <= 40700)) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)
# define BOOST_MP_NOEXCEPT_IF(x)
#else
# define BOOST_MP_NOEXCEPT_IF(x) BOOST_NOEXCEPT_IF(x)
#endif
-#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || defined(__SUNPRO_CC)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)
#define BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#endif
+//
+// Thread local storage:
+//
+#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL)
+# define BOOST_MP_THREAD_LOCAL thread_local
+#else
+# define BOOST_MP_THREAD_LOCAL
+#endif
+
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable:6326)
@@ -402,7 +411,11 @@ struct expression<tag, Arg1, void, void, void>
return static_cast<T>(static_cast<result_type>(*this));
}
# else
- template <class T, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0>
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
explicit operator T()const
{
return static_cast<T>(static_cast<result_type>(*this));
@@ -412,7 +425,9 @@ struct expression<tag, Arg1, void, void, void>
result_type r(*this);
return static_cast<bool>(r);
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
operator unmentionable_type()const
@@ -466,7 +481,11 @@ struct expression<terminal, Arg1, void, void, void>
return static_cast<T>(static_cast<result_type>(*this));
}
# else
- template <class T, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0>
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
explicit operator T()const
{
return static_cast<T>(static_cast<result_type>(*this));
@@ -476,7 +495,9 @@ struct expression<terminal, Arg1, void, void, void>
result_type r(*this);
return static_cast<bool>(r);
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
operator unmentionable_type()const
@@ -534,7 +555,11 @@ struct expression<tag, Arg1, Arg2, void, void>
return static_cast<T>(static_cast<result_type>(*this));
}
# else
- template <class T, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0>
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
explicit operator T()const
{
return static_cast<T>(static_cast<result_type>(*this));
@@ -544,7 +569,9 @@ struct expression<tag, Arg1, Arg2, void, void>
result_type r(*this);
return static_cast<bool>(r);
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
operator unmentionable_type()const
@@ -613,7 +640,11 @@ struct expression<tag, Arg1, Arg2, Arg3, void>
return static_cast<T>(static_cast<result_type>(*this));
}
# else
- template <class T, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0>
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
explicit operator T()const
{
return static_cast<T>(static_cast<result_type>(*this));
@@ -623,7 +654,9 @@ struct expression<tag, Arg1, Arg2, Arg3, void>
result_type r(*this);
return static_cast<bool>(r);
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
operator unmentionable_type()const
@@ -701,7 +734,11 @@ struct expression
return static_cast<T>(static_cast<result_type>(*this));
}
# else
- template <class T, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0>
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
explicit operator T()const
{
return static_cast<T>(static_cast<result_type>(*this));
@@ -711,7 +748,9 @@ struct expression
result_type r(*this);
return static_cast<bool>(r);
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
operator unmentionable_type()const
@@ -751,7 +790,8 @@ struct digits2
BOOST_STATIC_ASSERT((std::numeric_limits<T>::radix == 2) || (std::numeric_limits<T>::radix == 10));
// If we really have so many digits that this fails, then we're probably going to hit other problems anyway:
BOOST_STATIC_ASSERT(LONG_MAX / 1000 > (std::numeric_limits<T>::digits + 1));
- static const long value = std::numeric_limits<T>::radix == 10 ? (((std::numeric_limits<T>::digits + 1) * 1000L) / 301L) : std::numeric_limits<T>::digits;
+ static const long m_value = std::numeric_limits<T>::radix == 10 ? (((std::numeric_limits<T>::digits + 1) * 1000L) / 301L) : std::numeric_limits<T>::digits;
+ static inline BOOST_CONSTEXPR long value()BOOST_NOEXCEPT { return m_value; }
};
#ifndef BOOST_MP_MIN_EXPONENT_DIGITS
diff --git a/boost/multiprecision/detail/ublas_interop.hpp b/boost/multiprecision/detail/ublas_interop.hpp
index d1aae4dc6e..cf56dc9fb8 100644
--- a/boost/multiprecision/detail/ublas_interop.hpp
+++ b/boost/multiprecision/detail/ublas_interop.hpp
@@ -32,6 +32,18 @@ struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplate
>::type promote_type;
};
+template <class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1, class Arithmetic>
+struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplates1>, Arithmetic>
+{
+ typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> promote_type;
+};
+
+template <class Arithmetic, class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1>
+struct promote_traits<Arithmetic, boost::multiprecision::number<Backend1, ExpressionTemplates1> >
+{
+ typedef boost::multiprecision::number<Backend1, ExpressionTemplates1> promote_type;
+};
+
template <class Backend1, boost::multiprecision::expression_template_option ExpressionTemplates1, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
struct promote_traits<boost::multiprecision::number<Backend1, ExpressionTemplates1>, boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
{
diff --git a/boost/multiprecision/float128.hpp b/boost/multiprecision/float128.hpp
index 979666a393..035b670228 100644
--- a/boost/multiprecision/float128.hpp
+++ b/boost/multiprecision/float128.hpp
@@ -8,6 +8,7 @@
#include <boost/config.hpp>
#include <boost/scoped_array.hpp>
+#include <boost/functional/hash.hpp>
#include <boost/multiprecision/number.hpp>
#if defined(BOOST_INTEL) && !defined(BOOST_MP_USE_FLOAT128) && !defined(BOOST_MP_USE_QUAD)
@@ -489,6 +490,11 @@ inline void eval_atan2(float128_backend& result, const float128_backend& a, cons
result.value() = atan2q(a.value(), b.value());
}
+inline std::size_t hash_value(const float128_backend& val)
+{
+ return boost::hash_value(static_cast<double>(val.value()));
+}
+
} // namespace backends
}} // namespaces
@@ -547,7 +553,26 @@ void serialize(Archive& ar, boost::multiprecision::backends::float128_backend& v
float128_detail::do_serialize(ar, val, load_tag(), binary_tag());
}
-}}
+} // namepsace multiprecision
+
+namespace math{
+
+template <multiprecision::expression_template_option ExpressionTemplates>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates>& arg)
+{
+ return ::signbitq(arg.backend().value());
+}
+
+template <multiprecision::expression_template_option ExpressionTemplates>
+inline boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates>& a, const boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates>& b)
+{
+ return ::copysignq(a.backend().value(), b.backend().value());
+}
+
+
+} // namespace math
+
+} // namespace boost
namespace std{
diff --git a/boost/multiprecision/gmp.hpp b/boost/multiprecision/gmp.hpp
index f7d4e90961..7f01682a2a 100644
--- a/boost/multiprecision/gmp.hpp
+++ b/boost/multiprecision/gmp.hpp
@@ -7,11 +7,13 @@
#define BOOST_MATH_ER_GMP_BACKEND_HPP
#include <boost/multiprecision/number.hpp>
+#include <boost/multiprecision/debug_adaptor.hpp>
#include <boost/multiprecision/detail/integer_ops.hpp>
#include <boost/multiprecision/detail/big_lanczos.hpp>
#include <boost/multiprecision/detail/digits.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/cstdint.hpp>
+#include <boost/functional/hash_fwd.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable:4127)
@@ -20,6 +22,13 @@
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
+
+#if defined(__MPIR_VERSION) && defined(__MPIR_VERSION_MINOR) && defined(__MPIR_VERSION_PATCHLEVEL)
+# define BOOST_MP_MPIR_VERSION (__MPIR_VERSION * 10000 + __MPIR_VERSION_MINOR * 100 + __MPIR_VERSION_PATCHLEVEL)
+#else
+# define BOOST_MP_MPIR_VERSION 0
+#endif
+
#include <cmath>
#include <limits>
#include <climits>
@@ -564,7 +573,7 @@ struct gmp_float<0> : public detail::gmp_float_imp<0>
}
unsigned precision()const BOOST_NOEXCEPT
{
- return multiprecision::detail::digits2_2_10(mpf_get_prec(this->m_data));
+ return static_cast<unsigned>(multiprecision::detail::digits2_2_10(mpf_get_prec(this->m_data)));
}
void precision(unsigned digits10) BOOST_NOEXCEPT
{
@@ -971,16 +980,39 @@ inline void eval_ldexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& v
template <unsigned Digits10>
inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, int* e)
{
+#if BOOST_MP_MPIR_VERSION >= 20600
+ mpir_si v;
+ mpf_get_d_2exp(&v, val.data());
+#else
long v;
mpf_get_d_2exp(&v, val.data());
+#endif
*e = v;
eval_ldexp(result, val, -v);
}
template <unsigned Digits10>
inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, long* e)
{
+#if BOOST_MP_MPIR_VERSION >= 20600
+ mpir_si v;
+ mpf_get_d_2exp(&v, val.data());
+ *e = v;
+ eval_ldexp(result, val, -v);
+#else
mpf_get_d_2exp(e, val.data());
eval_ldexp(result, val, -*e);
+#endif
+}
+
+template <unsigned Digits10>
+inline std::size_t hash_value(const gmp_float<Digits10>& val)
+{
+ std::size_t result = 0;
+ for(int i = 0; i < std::abs(val.data()[0]._mp_size); ++i)
+ boost::hash_combine(result, val.data()[0]._mp_d[i]);
+ boost::hash_combine(result, val.data()[0]._mp_exp);
+ boost::hash_combine(result, val.data()[0]._mp_size);
+ return result;
}
struct gmp_int
@@ -1637,7 +1669,7 @@ inline unsigned eval_lsb(const gmp_int& val)
{
BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
}
- return mpz_scan1(val.data(), 0);
+ return static_cast<unsigned>(mpz_scan1(val.data(), 0));
}
inline unsigned eval_msb(const gmp_int& val)
@@ -1651,7 +1683,7 @@ inline unsigned eval_msb(const gmp_int& val)
{
BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
}
- return mpz_sizeinbase(val.data(), 2) - 1;
+ return static_cast<unsigned>(mpz_sizeinbase(val.data(), 2) - 1);
}
inline bool eval_bit_test(const gmp_int& val, unsigned index)
@@ -1731,6 +1763,16 @@ inline typename enable_if<
mpz_powm_ui(result.data(), base.data(), p, m.data());
}
+inline std::size_t hash_value(const gmp_int& val)
+{
+ // We should really use mpz_limbs_read here, but that's unsupported on older versions:
+ std::size_t result = 0;
+ for(int i = 0; i < std::abs(val.data()[0]._mp_size); ++i)
+ boost::hash_combine(result, val.data()[0]._mp_d[i]);
+ boost::hash_combine(result, val.data()[0]._mp_size);
+ return result;
+}
+
struct gmp_rational;
void eval_add(gmp_rational& t, const gmp_rational& o);
@@ -2094,6 +2136,17 @@ inline void assign_components(gmp_rational& result, gmp_int const& v1, gmp_int c
mpq_canonicalize(result.data());
}
+inline std::size_t hash_value(const gmp_rational& val)
+{
+ std::size_t result = 0;
+ for(int i = 0; i < std::abs(val.data()[0]._mp_num._mp_size); ++i)
+ boost::hash_combine(result, val.data()[0]._mp_num._mp_d[i]);
+ for(int i = 0; i < std::abs(val.data()[0]._mp_den._mp_size); ++i)
+ boost::hash_combine(result, val.data()[0]._mp_den._mp_d[i]);
+ boost::hash_combine(result, val.data()[0]._mp_num._mp_size);
+ return result;
+}
+
//
// Some member functions that are dependent upon previous code go here:
//
@@ -2212,10 +2265,10 @@ inline number<gmp_int, ET> denominator(const number<gmp_rational, ET>& val)
return result;
}
-#ifdef BOOST_NO_SFINAE_EXPR
-
namespace detail{
+#ifdef BOOST_NO_SFINAE_EXPR
+
template<>
struct is_explicitly_convertible<canonical<mpf_t, gmp_int>::type, gmp_int> : public mpl::true_ {};
template<>
@@ -2227,10 +2280,46 @@ struct is_explicitly_convertible<gmp_rational, gmp_int> : public mpl::true_ {};
template<unsigned D1, unsigned D2>
struct is_explicitly_convertible<gmp_float<D1>, gmp_float<D2> > : public mpl::true_ {};
-}
-
#endif
+template <>
+struct digits2<number<gmp_float<0>, et_on> >
+{
+ static long value()
+ {
+ return multiprecision::detail::digits10_2_2(gmp_float<0>::default_precision());
+ }
+};
+
+template <>
+struct digits2<number<gmp_float<0>, et_off> >
+{
+ static long value()
+ {
+ return multiprecision::detail::digits10_2_2(gmp_float<0>::default_precision());
+ }
+};
+
+template <>
+struct digits2<number<debug_adaptor<gmp_float<0> >, et_on> >
+{
+ static long value()
+ {
+ return multiprecision::detail::digits10_2_2(gmp_float<0>::default_precision());
+ }
+};
+
+template <>
+struct digits2<number<debug_adaptor<gmp_float<0> >, et_off> >
+{
+ static long value()
+ {
+ return multiprecision::detail::digits10_2_2(gmp_float<0>::default_precision());
+ }
+};
+
+}
+
template<>
struct number_category<detail::canonical<mpz_t, gmp_int>::type> : public mpl::int_<number_kind_integer>{};
template<>
@@ -2247,7 +2336,113 @@ typedef number<gmp_float<0> > mpf_float;
typedef number<gmp_int > mpz_int;
typedef number<gmp_rational > mpq_rational;
-}} // namespaces
+} // namespace multiprecision
+
+namespace math { namespace tools{
+
+ template <>
+ inline int digits<boost::multiprecision::mpf_float>()
+#ifdef BOOST_MATH_NOEXCEPT
+ BOOST_NOEXCEPT
+#endif
+ {
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpf_float::default_precision());
+ }
+ template <>
+ inline int digits<boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off> >()
+#ifdef BOOST_MATH_NOEXCEPT
+ BOOST_NOEXCEPT
+#endif
+ {
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpf_float::default_precision());
+ }
+
+ template <>
+ inline boost::multiprecision::mpf_float
+ max_value<boost::multiprecision::mpf_float>()
+ {
+ boost::multiprecision::mpf_float result(0.5);
+ mpf_mul_2exp(result.backend().data(), result.backend().data(), (std::numeric_limits<mp_exp_t>::max)() / 64 + 1);
+ return result;
+ }
+
+ template <>
+ inline boost::multiprecision::mpf_float
+ min_value<boost::multiprecision::mpf_float>()
+ {
+ boost::multiprecision::mpf_float result(0.5);
+ mpf_div_2exp(result.backend().data(), result.backend().data(), (std::numeric_limits<mp_exp_t>::min)() / 64 + 1);
+ return result;
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off>
+ max_value<boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off> >()
+ {
+ boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off> result(0.5);
+ mpf_mul_2exp(result.backend().data(), result.backend().data(), (std::numeric_limits<mp_exp_t>::max)() / 64 + 1);
+ return result;
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off>
+ min_value<boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off> >()
+ {
+ boost::multiprecision::number<boost::multiprecision::gmp_float<0>, boost::multiprecision::et_off> result(0.5);
+ mpf_div_2exp(result.backend().data(), result.backend().data(), (std::numeric_limits<mp_exp_t>::max)() / 64 + 1);
+ return result;
+ }
+
+ template <>
+ inline int digits<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> > >()
+#ifdef BOOST_MATH_NOEXCEPT
+ BOOST_NOEXCEPT
+#endif
+ {
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> >::default_precision());
+ }
+ template <>
+ inline int digits<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::gmp_float<0> >, boost::multiprecision::et_off> >()
+#ifdef BOOST_MATH_NOEXCEPT
+ BOOST_NOEXCEPT
+#endif
+ {
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> >::default_precision());
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> >
+ max_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> > >()
+ {
+ return max_value<boost::multiprecision::mpf_float>().backend();
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> >
+ min_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpf_float::backend_type> > >()
+ {
+ return min_value<boost::multiprecision::mpf_float>().backend();
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::gmp_float<0> >, boost::multiprecision::et_off>
+ max_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::gmp_float<0> >, boost::multiprecision::et_off> >()
+ {
+ return max_value<boost::multiprecision::mpf_float>().backend();
+ }
+
+ template <>
+ inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::gmp_float<0> >, boost::multiprecision::et_off>
+ min_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::gmp_float<0> >, boost::multiprecision::et_off> >()
+ {
+ return min_value<boost::multiprecision::mpf_float>().backend();
+ }
+
+
+}} // namespaces math::tools
+
+
+} // namespace boost
namespace std{
diff --git a/boost/multiprecision/logged_adaptor.hpp b/boost/multiprecision/logged_adaptor.hpp
index 8d430c7d20..2f916dd101 100644
--- a/boost/multiprecision/logged_adaptor.hpp
+++ b/boost/multiprecision/logged_adaptor.hpp
@@ -139,6 +139,22 @@ public:
ar & m_value;
log_postfix_event(m_value, "serialize");
}
+ static unsigned default_precision() BOOST_NOEXCEPT
+ {
+ return Backend::default_precision();
+ }
+ static void default_precision(unsigned v) BOOST_NOEXCEPT
+ {
+ Backend::default_precision(v);
+ }
+ unsigned precision()const BOOST_NOEXCEPT
+ {
+ return value().precision();
+ }
+ void precision(unsigned digits10) BOOST_NOEXCEPT
+ {
+ value().precision(digits10);
+ }
};
template <class T>
@@ -490,6 +506,12 @@ NON_MEMBER_OP3(fmod, "fmod");
NON_MEMBER_OP3(pow, "pow");
NON_MEMBER_OP3(atan2, "atan2");
+template <class Backend>
+std::size_t hash_value(const logged_adaptor<Backend>& val)
+{
+ return hash_value(val.value());
+}
+
} // namespace backends
using backends::logged_adaptor;
diff --git a/boost/multiprecision/miller_rabin.hpp b/boost/multiprecision/miller_rabin.hpp
index 96dac04df5..156f9b852b 100644
--- a/boost/multiprecision/miller_rabin.hpp
+++ b/boost/multiprecision/miller_rabin.hpp
@@ -6,7 +6,7 @@
#ifndef BOOST_MP_MR_HPP
#define BOOST_MP_MR_HPP
-#include <boost/multiprecision/random.hpp>
+#include <boost/random.hpp>
#include <boost/multiprecision/integer.hpp>
namespace boost{
diff --git a/boost/multiprecision/mpfi.hpp b/boost/multiprecision/mpfi.hpp
index 1ac7d1b5b9..00a692981c 100644
--- a/boost/multiprecision/mpfi.hpp
+++ b/boost/multiprecision/mpfi.hpp
@@ -12,11 +12,17 @@
#include <boost/multiprecision/detail/big_lanczos.hpp>
#include <boost/multiprecision/detail/digits.hpp>
#include <boost/multiprecision/mpfr.hpp>
+#include <boost/multiprecision/logged_adaptor.hpp>
#include <boost/math/constants/constants.hpp>
+#include <boost/functional/hash_fwd.hpp>
#include <mpfi.h>
#include <cmath>
#include <algorithm>
+#ifndef BOOST_MULTIPRECISION_MPFI_DEFAULT_PRECISION
+# define BOOST_MULTIPRECISION_MPFI_DEFAULT_PRECISION 20
+#endif
+
namespace boost{
namespace multiprecision{
namespace backends{
@@ -315,7 +321,7 @@ protected:
mpfi_t m_data;
static unsigned& get_default_precision() BOOST_NOEXCEPT
{
- static unsigned val = 50;
+ static unsigned val = BOOST_MULTIPRECISION_MPFI_DEFAULT_PRECISION;
return val;
}
};
@@ -1015,6 +1021,28 @@ inline void eval_tanh(mpfi_float_backend<Digits10>& result, const mpfi_float_bac
mpfi_tanh(result.data(), arg.data());
}
+template <unsigned Digits10>
+inline std::size_t hash_value(const mpfi_float_backend<Digits10>& val)
+{
+ std::size_t result = 0;
+ std::size_t len = val.left_data()[0]._mpfr_prec / mp_bits_per_limb;
+ if(val.left_data()[0]._mpfr_prec % mp_bits_per_limb)
+ ++len;
+ for(int i = 0; i < len; ++i)
+ boost::hash_combine(result, val.left_data()[0]._mpfr_d[i]);
+ boost::hash_combine(result, val.left_data()[0]._mpfr_exp);
+ boost::hash_combine(result, val.left_data()[0]._mpfr_sign);
+
+ len = val.right_data()[0]._mpfr_prec / mp_bits_per_limb;
+ if(val.right_data()[0]._mpfr_prec % mp_bits_per_limb)
+ ++len;
+ for(int i = 0; i < len; ++i)
+ boost::hash_combine(result, val.right_data()[0]._mpfr_d[i]);
+ boost::hash_combine(result, val.right_data()[0]._mpfr_exp);
+ boost::hash_combine(result, val.right_data()[0]._mpfr_sign);
+ return result;
+}
+
} // namespace backends
#ifdef BOOST_NO_SFINAE_EXPR
@@ -1153,7 +1181,7 @@ inline int digits<boost::multiprecision::mpfi_float>()
BOOST_NOEXCEPT
#endif
{
- return boost::multiprecision::backends::detail::get_default_precision();
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpfi_float::default_precision());
}
template <>
inline int digits<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off> >()
@@ -1161,9 +1189,109 @@ inline int digits<boost::multiprecision::number<boost::multiprecision::mpfi_floa
BOOST_NOEXCEPT
#endif
{
- return boost::multiprecision::backends::detail::get_default_precision();
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpfi_float::default_precision());
+}
+
+template <>
+inline boost::multiprecision::mpfi_float
+max_value<boost::multiprecision::mpfi_float>()
+{
+ boost::multiprecision::mpfi_float result(0.5);
+ mpfi_mul_2exp(result.backend().data(), result.backend().data(), mpfr_get_emax());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+template <>
+inline boost::multiprecision::mpfi_float
+min_value<boost::multiprecision::mpfi_float>()
+{
+ boost::multiprecision::mpfi_float result(0.5);
+ mpfi_div_2exp(result.backend().data(), result.backend().data(), -mpfr_get_emin());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off>
+max_value<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off> >()
+{
+ boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off> result(0.5);
+ mpfi_mul_2exp(result.backend().data(), result.backend().data(), mpfr_get_emax());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off>
+min_value<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off> >()
+{
+ boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<0>, boost::multiprecision::et_off> result(0.5);
+ mpfi_div_2exp(result.backend().data(), result.backend().data(), -mpfr_get_emin());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+// mpfi gets used with logged_adaptor fairly often, so specialize for that use case as well:
+typedef boost::multiprecision::number<boost::multiprecision::backends::logged_adaptor<boost::multiprecision::mpfi_float::backend_type>, boost::multiprecision::et_on> logged_type1;
+typedef boost::multiprecision::number<boost::multiprecision::backends::logged_adaptor<boost::multiprecision::mpfi_float::backend_type>, boost::multiprecision::et_off> logged_type2;
+
+template <>
+inline int digits<logged_type1>()
+#ifdef BOOST_MATH_NOEXCEPT
+BOOST_NOEXCEPT
+#endif
+{
+ return multiprecision::detail::digits10_2_2(logged_type1::default_precision());
+}
+template <>
+inline int digits<logged_type2 >()
+#ifdef BOOST_MATH_NOEXCEPT
+BOOST_NOEXCEPT
+#endif
+{
+ return multiprecision::detail::digits10_2_2(logged_type1::default_precision());
+}
+
+template <>
+inline logged_type1
+max_value<logged_type1>()
+{
+ logged_type1 result(0.5);
+ mpfi_mul_2exp(result.backend().value().data(), result.backend().value().data(), mpfr_get_emax());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+template <>
+inline logged_type1
+min_value<logged_type1>()
+{
+ logged_type1 result(0.5);
+ mpfi_div_2exp(result.backend().value().data(), result.backend().value().data(), -mpfr_get_emin());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
+
+template <>
+inline logged_type2
+max_value<logged_type2 >()
+{
+ logged_type2 result(0.5);
+ mpfi_mul_2exp(result.backend().value().data(), result.backend().value().data(), mpfr_get_emax());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
}
+template <>
+inline logged_type2
+min_value<logged_type2 >()
+{
+ logged_type2 result(0.5);
+ mpfi_div_2exp(result.backend().value().data(), result.backend().value().data(), -mpfr_get_emin());
+ //BOOST_ASSERT(mpfi_number_p(result.backend().data()));
+ return result;
+}
} // namespace tools
namespace constants{ namespace detail{
@@ -1217,13 +1345,19 @@ struct constant_pi<boost::multiprecision::number<boost::multiprecision::mpfi_flo
}
return result;
}
+ static inline result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfi_const_pi(result.backend().data());
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_ln_two<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<Digits10>, ExpressionTemplates> >
{
typedef boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<Digits10>, ExpressionTemplates> result_type;
template<int N>
- static inline result_type const& get(const mpl::int_<N>&)
+ static inline result_type get(const mpl::int_<N>&)
{
mpfi_initializer<result_type>::force_instantiate();
static result_type result;
@@ -1235,6 +1369,12 @@ struct constant_ln_two<boost::multiprecision::number<boost::multiprecision::mpfi
}
return result;
}
+ static inline result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfi_const_log2(result.backend().data());
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_euler<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<Digits10>, ExpressionTemplates> >
@@ -1253,6 +1393,12 @@ struct constant_euler<boost::multiprecision::number<boost::multiprecision::mpfi_
}
return result;
}
+ static inline result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfi_const_euler(result.backend().data());
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_catalan<boost::multiprecision::number<boost::multiprecision::mpfi_float_backend<Digits10>, ExpressionTemplates> >
@@ -1271,6 +1417,12 @@ struct constant_catalan<boost::multiprecision::number<boost::multiprecision::mpf
}
return result;
}
+ static inline result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfi_const_catalan(result.backend().data());
+ return result;
+ }
};
}} // namespaces
diff --git a/boost/multiprecision/mpfr.hpp b/boost/multiprecision/mpfr.hpp
index 299de4a587..e6ccc18abb 100644
--- a/boost/multiprecision/mpfr.hpp
+++ b/boost/multiprecision/mpfr.hpp
@@ -7,6 +7,7 @@
#define BOOST_MATH_BN_MPFR_HPP
#include <boost/multiprecision/number.hpp>
+#include <boost/multiprecision/debug_adaptor.hpp>
#include <boost/multiprecision/gmp.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/cstdint.hpp>
@@ -16,6 +17,10 @@
#include <cmath>
#include <algorithm>
+#ifndef BOOST_MULTIPRECISION_MPFR_DEFAULT_PRECISION
+# define BOOST_MULTIPRECISION_MPFR_DEFAULT_PRECISION 20
+#endif
+
namespace boost{
namespace multiprecision{
@@ -30,6 +35,9 @@ namespace backends{
template <unsigned digits10, mpfr_allocation_type AllocationType = allocate_dynamic>
struct mpfr_float_backend;
+template <>
+struct mpfr_float_backend<0, allocate_stack>;
+
} // namespace backends
template <unsigned digits10, mpfr_allocation_type AllocationType>
@@ -55,7 +63,6 @@ struct mpfr_cleanup
template <bool b>
typename mpfr_cleanup<b>::initializer const mpfr_cleanup<b>::init;
-inline long get_default_precision() { return 50; }
template <unsigned digits10, mpfr_allocation_type AllocationType>
struct mpfr_float_imp;
@@ -311,7 +318,7 @@ struct mpfr_float_imp<digits10, allocate_dynamic>
}
~mpfr_float_imp() BOOST_NOEXCEPT
{
- if(m_data[0]._mpfr_d)
+ if(m_data[0]._mpfr_d)
mpfr_clear(m_data);
detail::mpfr_cleanup<true>::force_instantiate();
}
@@ -357,7 +364,7 @@ protected:
mpfr_t m_data;
static unsigned& get_default_precision() BOOST_NOEXCEPT
{
- static unsigned val = 50;
+ static unsigned val = BOOST_MULTIPRECISION_MPFR_DEFAULT_PRECISION;
return val;
}
};
@@ -1425,6 +1432,40 @@ inline void eval_tanh(mpfr_float_backend<Digits10, AllocateType>& result, const
mpfr_tanh(result.data(), arg.data(), GMP_RNDN);
}
+template <unsigned Digits10, mpfr_allocation_type AllocateType>
+inline void eval_modf(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg, mpfr_float_backend<Digits10, AllocateType>* pipart)
+{
+ if(0 == pipart)
+ {
+ mpfr_float_backend<Digits10, AllocateType> ipart;
+ mpfr_modf(ipart.data(), result.data(), arg.data(), GMP_RNDN);
+ }
+ else
+ {
+ mpfr_modf(pipart->data(), result.data(), arg.data(), GMP_RNDN);
+ }
+}
+
+template <unsigned Digits10, mpfr_allocation_type AllocateType>
+inline void eval_fmod(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& a, const mpfr_float_backend<Digits10, AllocateType>& b)
+{
+ mpfr_fmod(result.data(), a.data(), b.data(), GMP_RNDN);
+}
+
+template <unsigned Digits10, mpfr_allocation_type AllocateType>
+inline std::size_t hash_value(const mpfr_float_backend<Digits10, AllocateType>& val)
+{
+ std::size_t result = 0;
+ std::size_t len = val.data()[0]._mpfr_prec / mp_bits_per_limb;
+ if(val.data()[0]._mpfr_prec % mp_bits_per_limb)
+ ++len;
+ for(int i = 0; i < len; ++i)
+ boost::hash_combine(result, val.data()[0]._mpfr_d[i]);
+ boost::hash_combine(result, val.data()[0]._mpfr_exp);
+ boost::hash_combine(result, val.data()[0]._mpfr_sign);
+ return result;
+}
+
} // namespace backends
#ifdef BOOST_NO_SFINAE_EXPR
@@ -1464,7 +1505,7 @@ inline int digits<boost::multiprecision::mpfr_float>()
BOOST_NOEXCEPT
#endif
{
- return boost::multiprecision::backends::detail::get_default_precision();
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpfr_float::default_precision());
}
template <>
inline int digits<boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<0>, boost::multiprecision::et_off> >()
@@ -1472,7 +1513,7 @@ inline int digits<boost::multiprecision::number<boost::multiprecision::mpfr_floa
BOOST_NOEXCEPT
#endif
{
- return boost::multiprecision::backends::detail::get_default_precision();
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::mpfr_float::default_precision());
}
template <>
@@ -1515,6 +1556,51 @@ inline boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<0
return result;
}
+template <>
+inline int digits<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> > >()
+#ifdef BOOST_MATH_NOEXCEPT
+BOOST_NOEXCEPT
+#endif
+{
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> >::default_precision());
+}
+template <>
+inline int digits<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<0> >, boost::multiprecision::et_off> >()
+#ifdef BOOST_MATH_NOEXCEPT
+BOOST_NOEXCEPT
+#endif
+{
+ return multiprecision::detail::digits10_2_2(boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> >::default_precision());
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> >
+max_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> > >()
+{
+ return max_value<boost::multiprecision::mpfr_float>().backend();
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> >
+min_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float::backend_type> > >()
+{
+ return min_value<boost::multiprecision::mpfr_float>().backend();
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<0> >, boost::multiprecision::et_off>
+max_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<0> >, boost::multiprecision::et_off> >()
+{
+ return max_value<boost::multiprecision::mpfr_float>().backend();
+}
+
+template <>
+inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<0> >, boost::multiprecision::et_off>
+min_value<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<0> >, boost::multiprecision::et_off> >()
+{
+ return min_value<boost::multiprecision::mpfr_float>().backend();
+}
+
} // namespace tools
namespace constants{ namespace detail{
@@ -1567,6 +1653,12 @@ struct constant_pi<boost::multiprecision::number<boost::multiprecision::mpfr_flo
}
return result;
}
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_pi(result.backend().data(), GMP_RNDN);
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_ln_two<boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates> >
@@ -1585,6 +1677,12 @@ struct constant_ln_two<boost::multiprecision::number<boost::multiprecision::mpfr
}
return result;
}
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_log2(result.backend().data(), GMP_RNDN);
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_euler<boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates> >
@@ -1603,6 +1701,12 @@ struct constant_euler<boost::multiprecision::number<boost::multiprecision::mpfr_
}
return result;
}
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_euler(result.backend().data(), GMP_RNDN);
+ return result;
+ }
};
template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
struct constant_catalan<boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates> >
@@ -1621,11 +1725,144 @@ struct constant_catalan<boost::multiprecision::number<boost::multiprecision::mpf
}
return result;
}
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_catalan(result.backend().data(), GMP_RNDN);
+ return result;
+ }
+};
+
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct constant_pi<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> result_type;
+ template<int N>
+ static inline const result_type& get(const mpl::int_<N>&)
+ {
+ detail::mpfr_constant_initializer<constant_pi<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >, N>::force_instantiate();
+ static result_type result;
+ static bool has_init = false;
+ if(!has_init)
+ {
+ mpfr_const_pi(result.backend().value().data(), GMP_RNDN);
+ has_init = true;
+ }
+ return result;
+ }
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_pi(result.backend().value().data(), GMP_RNDN);
+ return result;
+ }
+};
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct constant_ln_two<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> result_type;
+ template<int N>
+ static inline const result_type& get(const mpl::int_<N>&)
+ {
+ detail::mpfr_constant_initializer<constant_ln_two<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >, N>::force_instantiate();
+ static result_type result;
+ static bool init = false;
+ if(!init)
+ {
+ mpfr_const_log2(result.backend().value().data(), GMP_RNDN);
+ init = true;
+ }
+ return result;
+ }
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_log2(result.backend().value().data(), GMP_RNDN);
+ return result;
+ }
+};
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct constant_euler<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> result_type;
+ template<int N>
+ static inline const result_type& get(const mpl::int_<N>&)
+ {
+ detail::mpfr_constant_initializer<constant_euler<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >, N>::force_instantiate();
+ static result_type result;
+ static bool init = false;
+ if(!init)
+ {
+ mpfr_const_euler(result.backend().value().data(), GMP_RNDN);
+ init = true;
+ }
+ return result;
+ }
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_euler(result.backend().value().data(), GMP_RNDN);
+ return result;
+ }
+};
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+struct constant_catalan<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> result_type;
+ template<int N>
+ static inline const result_type& get(const mpl::int_<N>&)
+ {
+ detail::mpfr_constant_initializer<constant_catalan<boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> >, N>::force_instantiate();
+ static result_type result;
+ static bool init = false;
+ if(!init)
+ {
+ mpfr_const_catalan(result.backend().value().data(), GMP_RNDN);
+ init = true;
+ }
+ return result;
+ }
+ static inline const result_type get(const mpl::int_<0>&)
+ {
+ result_type result;
+ mpfr_const_catalan(result.backend().value().data(), GMP_RNDN);
+ return result;
+ }
};
}} // namespaces
-}} // namespaces
+} // namespace multiprecision
+
+namespace math{
+
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates>& arg)
+{
+ return (arg.backend().data()[0]._mpfr_sign < 0) ? 1 : 0;
+}
+
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+inline boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates>& a, const boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates>& b)
+{
+ return (boost::math::signbit)(a) != (boost::math::signbit)(b) ? boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates>(-a) : a;
+}
+
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates>& arg)
+{
+ return (arg.backend().value().data()[0]._mpfr_sign < 0) ? 1 : 0;
+}
+
+template<unsigned Digits10, boost::multiprecision::mpfr_allocation_type AllocateType, boost::multiprecision::expression_template_option ExpressionTemplates>
+inline boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates>& a, const boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates>& b)
+{
+ return (boost::math::signbit)(a) != (boost::math::signbit)(b) ? boost::multiprecision::number<boost::multiprecision::debug_adaptor<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType> >, ExpressionTemplates>(-a) : a;
+}
+
+} // namespace math
+
+} // namespace boost
namespace std{
diff --git a/boost/multiprecision/number.hpp b/boost/multiprecision/number.hpp
index fca63661e3..15af7ef846 100644
--- a/boost/multiprecision/number.hpp
+++ b/boost/multiprecision/number.hpp
@@ -632,7 +632,9 @@ public:
{
return !is_zero();
}
- explicit operator void()const {}
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
# endif
#else
typedef bool (self_type::*unmentionable_type)()const;
@@ -759,7 +761,12 @@ private:
bool bl = contains_self(e.left());
bool br = contains_self(e.right());
- if(bl && is_self(e.left()))
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
{
// Ignore the left node, it's *this, just add the right:
do_add(e.right(), typename right_type::tag_type());
@@ -769,11 +776,6 @@ private:
// Ignore the right node, it's *this, just add the left:
do_add(e.left(), typename left_type::tag_type());
}
- else if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
else if(!br && (bl || (left_depth >= right_depth)))
{ // br is always false, but if bl is true we must take the this branch:
do_assign(e.left(), typename left_type::tag_type());
@@ -797,7 +799,12 @@ private:
bool bl = contains_self(e.left());
bool br = contains_self(e.right());
- if(bl && is_self(e.left()))
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
{
// Ignore the left node, it's *this, just subtract the right:
do_subtract(e.right(), typename right_type::tag_type());
@@ -808,11 +815,6 @@ private:
do_subtract(e.left(), typename left_type::tag_type());
m_backend.negate();
}
- else if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
else if(!br && (bl || (left_depth >= right_depth)))
{ // br is always false, but if bl is true we must take the this branch:
do_assign(e.left(), typename left_type::tag_type());
@@ -837,7 +839,12 @@ private:
bool bl = contains_self(e.left());
bool br = contains_self(e.right());
- if(bl && is_self(e.left()))
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
{
// Ignore the left node, it's *this, just add the right:
do_multiplies(e.right(), typename right_type::tag_type());
@@ -847,11 +854,6 @@ private:
// Ignore the right node, it's *this, just add the left:
do_multiplies(e.left(), typename left_type::tag_type());
}
- else if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
else if(!br && (bl || (left_depth >= right_depth)))
{ // br is always false, but if bl is true we must take the this branch:
do_assign(e.left(), typename left_type::tag_type());
@@ -1793,6 +1795,14 @@ BOOST_MP_FORCEINLINE void swap(number<Backend, ExpressionTemplates>& a, number<B
{
a.swap(b);
}
+//
+// Boost.Hash support, just call hash_value for the backend, which may or may not be supported:
+//
+template <class Backend, expression_template_option ExpressionTemplates>
+inline std::size_t hash_value(const number<Backend, ExpressionTemplates>& val)
+{
+ return hash_value(val.backend());
+}
} // namespace multiprecision
@@ -1945,6 +1955,22 @@ struct component_type<boost::rational<I> >
} // namespaces
+#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
+
+#include <functional>
+
+namespace std {
+
+ template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
+ struct hash<boost::multiprecision::number<Backend, ExpressionTemplates> >
+ {
+ std::size_t operator()(const boost::multiprecision::number<Backend, ExpressionTemplates>& val)const { return hash_value(val); }
+ };
+
+}
+
+#endif
+
#include <boost/multiprecision/detail/ublas_interop.hpp>
#endif
diff --git a/boost/multiprecision/rational_adaptor.hpp b/boost/multiprecision/rational_adaptor.hpp
index e3cec0e482..334238c92f 100644
--- a/boost/multiprecision/rational_adaptor.hpp
+++ b/boost/multiprecision/rational_adaptor.hpp
@@ -10,6 +10,7 @@
#include <iomanip>
#include <sstream>
#include <boost/cstdint.hpp>
+#include <boost/functional/hash_fwd.hpp>
#include <boost/multiprecision/number.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
@@ -277,6 +278,15 @@ inline void assign_components(rational_adaptor<IntBackend>& result, const V& v1,
result.data().assign(v1, v2);
}
+template <class IntBackend>
+inline std::size_t hash_value(const rational_adaptor<IntBackend>& val)
+{
+ std::size_t result = hash_value(val.data().numerator());
+ boost::hash_combine(result, val.data().denominator());
+ return result;
+}
+
+
} // namespace backends
template<class IntBackend>
diff --git a/boost/multiprecision/tommath.hpp b/boost/multiprecision/tommath.hpp
index 3d576051ae..38a112fe9f 100644
--- a/boost/multiprecision/tommath.hpp
+++ b/boost/multiprecision/tommath.hpp
@@ -12,6 +12,7 @@
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/cstdint.hpp>
#include <boost/scoped_array.hpp>
+#include <boost/functional/hash_fwd.hpp>
#include <tommath.h>
#include <cmath>
#include <limits>
@@ -651,6 +652,16 @@ inline typename enable_if<is_signed<Integer>, Integer>::type eval_integer_modulu
return eval_integer_modulus(x, boost::multiprecision::detail::unsigned_abs(val));
}
+inline std::size_t hash_value(const tommath_int& val)
+{
+ std::size_t result = 0;
+ std::size_t len = val.data().used;
+ for(std::size_t i = 0; i < len; ++i)
+ boost::hash_combine(result, val.data().dp[i]);
+ boost::hash_combine(result, val.data().sign);
+ return result;
+}
+
} // namespace backends
using boost::multiprecision::backends::tommath_int;
diff --git a/boost/multiprecision/traits/explicit_conversion.hpp b/boost/multiprecision/traits/explicit_conversion.hpp
index b4cd8215e0..0a14f03442 100644
--- a/boost/multiprecision/traits/explicit_conversion.hpp
+++ b/boost/multiprecision/traits/explicit_conversion.hpp
@@ -11,69 +11,79 @@
#include <boost/utility/declval.hpp>
-namespace boost{ namespace multiprecision{ namespace detail{
+namespace boost {
+ namespace multiprecision {
+ namespace detail {
-template <int N>
-struct dummy_size{};
+ template <int N>
+ struct dummy_size {};
-template<typename S, typename T>
-struct has_generic_interconversion
-{
- typedef typename mpl::if_c<
- is_number<S>::value && is_number<T>::value,
- typename mpl::if_c<
- number_category<S>::value == number_kind_integer,
- typename mpl::if_c<
- number_category<T>::value == number_kind_integer
- || number_category<T>::value == number_kind_floating_point
- || number_category<T>::value == number_kind_rational
- || number_category<T>::value == number_kind_fixed_point,
- mpl::true_,
- mpl::false_
- >::type,
- typename mpl::if_c<
- number_category<S>::value == number_kind_rational,
- typename mpl::if_c<
+ template<typename S, typename T>
+ struct has_generic_interconversion
+ {
+ typedef typename mpl::if_c <
+ is_number<S>::value && is_number<T>::value,
+ typename mpl::if_c <
+ number_category<S>::value == number_kind_integer,
+ typename mpl::if_c<
+ number_category<T>::value == number_kind_integer
+ || number_category<T>::value == number_kind_floating_point
+ || number_category<T>::value == number_kind_rational
+ || number_category<T>::value == number_kind_fixed_point,
+ mpl::true_,
+ mpl::false_
+ >::type,
+ typename mpl::if_c<
+ number_category<S>::value == number_kind_rational,
+ typename mpl::if_c<
number_category<T>::value == number_kind_rational
|| number_category<T>::value == number_kind_rational,
mpl::true_,
mpl::false_
- >::type,
- typename mpl::if_c<
+ >::type,
+ typename mpl::if_c<
number_category<T>::value == number_kind_floating_point,
mpl::true_,
mpl::false_
- >::type
- >::type
- >::type,
- mpl::false_
- >::type type;
-};
+ >::type
+ >::type
+ > ::type,
+ mpl::false_
+ > ::type type;
+ };
-template<typename S, typename T>
-struct is_explicitly_convertible_imp
-{
+ template<typename S, typename T>
+ struct is_explicitly_convertible_imp
+ {
#ifndef BOOST_NO_SFINAE_EXPR
- template<typename S1, typename T1>
- static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
+ template<typename S1, typename T1>
+ static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
- template<typename S1, typename T1>
- static type_traits::no_type selector(...);
+ template<typename S1, typename T1>
+ static type_traits::no_type selector(...);
- static const bool value = sizeof(selector<S,T>(0)) == sizeof(type_traits::yes_type);
+ static const bool value = sizeof(selector<S, T>(0)) == sizeof(type_traits::yes_type);
- typedef boost::integral_constant<bool,value> type;
+ typedef boost::integral_constant<bool, value> type;
#else
- typedef typename has_generic_interconversion<S, T>::type gen_type;
- typedef mpl::bool_<boost::is_convertible<S, T>::value || gen_type::value> type;
+ typedef typename has_generic_interconversion<S, T>::type gen_type;
+ typedef mpl::bool_<boost::is_convertible<S, T>::value || gen_type::value> type;
#endif
-};
+ };
template<typename From, typename To>
struct is_explicitly_convertible : public is_explicitly_convertible_imp<From, To>::type
{
};
+#ifdef BOOST_NO_SFINAE_EXPR
+template<class Backend1, expression_template_option ExpressionTemplates1, class Backend2, expression_template_option ExpressionTemplates2>
+struct is_explicitly_convertible<number<Backend1, ExpressionTemplates1>, number<Backend2, ExpressionTemplates2> >
+ : public is_explicitly_convertible<Backend1, Backend2>
+{
+};
+#endif
+
}}} // namespaces
#endif
diff --git a/boost/optional/optional_fwd.hpp b/boost/optional/optional_fwd.hpp
index c41a34d398..faee253e55 100644
--- a/boost/optional/optional_fwd.hpp
+++ b/boost/optional/optional_fwd.hpp
@@ -16,7 +16,7 @@
#ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
#define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
-#include <boost/config/suffix.hpp>
+#include <boost/config.hpp>
namespace boost {
diff --git a/boost/phoenix/config.hpp b/boost/phoenix/config.hpp
index 9f2138c894..ad81c01919 100644
--- a/boost/phoenix/config.hpp
+++ b/boost/phoenix/config.hpp
@@ -2,6 +2,7 @@
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2010 Eric Niebler
Copyright (c) 2014-2015 John Fletcher
+ Copyright (c) 2016 Kohei Takahashi
Distributed under the 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,50 +28,43 @@
// #endif
//
// #ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
-// #define BOOST_PHOENIX_UNORDERED_SET_HEADER <unordered_set>
-// #define BOOST_PHOENIX_UNORDERED_MAP_HEADER <unordered_map>
+// #include BOOST_PHOENIX_UNORDERED_SET_HEADER
+// #include BOOST_PHOENIX_UNORDERED_MAP_HEADER
// #endif
//
// The client code can then chose the implementation provided.
// See the example in test/stl/querying_find2.cpp
-//
-//////////////////////////////////////////////////////////////////////////
-//
+
// There is no specific thing in Boost Config for libc++
#ifdef _LIBCPP_VERSION
#define BOOST_PHOENIX_USING_LIBCPP
+#endif
+
// This may not be true for some very old version of libc++
// Current libc++ supports unordered_set and unordered_map without C++11.
-#undef BOOST_NO_CXX11_HDR_UNORDERED_MAP
-#undef BOOST_NO_CXX11_HDR_UNORDERED_SET
+#if defined(BOOST_PHOENIX_USING_LIBCPP) \
+ && !(defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined(BOOST_NO_CXX11_HDR_UNORDERED_SET))
+// This is either libc++ or C++11 or later
+#define BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
+#define BOOST_PHOENIX_UNORDERED_SET_HEADER <unordered_set>
+#define BOOST_PHOENIX_UNORDERED_MAP_HEADER <unordered_map>
+#define BOOST_PHOENIX_UNORDERED_NAMESPACE std
#endif
-#if (!defined(BOOST_PHOENIX_USING_LIBCPP) \
- && (defined (BOOST_NO_CXX11_HDR_UNORDERED_MAP) || \
- defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) ) )
-#ifdef BOOST_HAS_HASH
+#if defined(BOOST_HAS_HASH)
// This is to sort out case of Clang when using stdlib from gcc
// as Clang thinks it is gcc 4.2.1
// This prevents the failure to include a header with a warning.
#define _GLIBCXX_PERMIT_BACKWARD_HASH
-#define BOOST_PHOENIX_PERMIT_BACKWARD_HASH
#define BOOST_PHOENIX_HASH_SET_HEADER BOOST_HASH_SET_HEADER
#define BOOST_PHOENIX_HASH_MAP_HEADER BOOST_HASH_MAP_HEADER
#define BOOST_PHOENIX_HAS_HASH
#define BOOST_PHOENIX_HASH_NAMESPACE BOOST_STD_EXTENSION_NAMESPACE
-
#elif defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB < 610)
#define BOOST_PHOENIX_HASH_SET_HEADER <hash_set>
#define BOOST_PHOENIX_HASH_MAP_HEADER <hash_map>
#define BOOST_PHOENIX_HAS_HASH
#define BOOST_PHOENIX_HASH_NAMESPACE stdext
#endif
-#else
-// This is either libc++ or C++11 or later
-#define BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
-#define BOOST_PHOENIX_UNORDERED_SET_HEADER <unordered_set>
-#define BOOST_PHOENIX_UNORDERED_MAP_HEADER <unordered_map>
-#define BOOST_PHOENIX_UNORDERED_NAMESPACE std
-#endif
#endif
diff --git a/boost/phoenix/core/detail/argument.hpp b/boost/phoenix/core/detail/argument.hpp
index a3fb4b223e..5ed754dfcd 100644
--- a/boost/phoenix/core/detail/argument.hpp
+++ b/boost/phoenix/core/detail/argument.hpp
@@ -10,11 +10,13 @@
#define BOOST_PHOENIX_ARGUMENT_N_TYPE(_, N, name) \
typedef \
expression::argument<BOOST_PP_INC(N)>::type \
- BOOST_PP_CAT(BOOST_PP_CAT(name, BOOST_PP_INC(N)), _type); \
+ BOOST_PP_CAT(BOOST_PP_CAT(name, BOOST_PP_INC(N)), _type) \
+ BOOST_ATTRIBUTE_UNUSED; \
/**/
#define BOOST_PHOENIX_ARGUMENT_N_INSTANCE(_, N, name) \
expression::argument<BOOST_PP_INC(N)>::type const \
+ BOOST_ATTRIBUTE_UNUSED \
BOOST_PP_CAT(name, BOOST_PP_INC(N)) = {{{}}}; \
/**/
diff --git a/boost/phoenix/core/nothing.hpp b/boost/phoenix/core/nothing.hpp
index ecf2a6fabe..b8294de040 100644
--- a/boost/phoenix/core/nothing.hpp
+++ b/boost/phoenix/core/nothing.hpp
@@ -51,9 +51,9 @@ namespace boost { namespace phoenix
}
};
- typedef expression::null::type nothing_type;
+ typedef expression::null::type nothing_type BOOST_ATTRIBUTE_UNUSED;
#ifndef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS
- nothing_type const nothing = {{{}}};
+ nothing_type const BOOST_ATTRIBUTE_UNUSED nothing = {{{}}};
#endif
}}
diff --git a/boost/phoenix/core/preprocessed/argument_10.hpp b/boost/phoenix/core/preprocessed/argument_10.hpp
deleted file mode 100644
index 0d50cfc6a0..0000000000
--- a/boost/phoenix/core/preprocessed/argument_10.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*==============================================================================
- Copyright (c) 2001-2010 Joel de Guzman
- Copyright (c) 2010-2011 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
- namespace placeholders
- {
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}};
- }
- namespace arg_names
- {
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}};
- }
diff --git a/boost/phoenix/core/preprocessed/argument_no_predefined_10.hpp b/boost/phoenix/core/preprocessed/argument_no_predefined_10.hpp
index 06c7845211..4609cc2d12 100644
--- a/boost/phoenix/core/preprocessed/argument_no_predefined_10.hpp
+++ b/boost/phoenix/core/preprocessed/argument_no_predefined_10.hpp
@@ -8,11 +8,11 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
}
diff --git a/boost/phoenix/core/preprocessed/argument_no_predefined_20.hpp b/boost/phoenix/core/preprocessed/argument_no_predefined_20.hpp
index 8971c0535e..af1cc17ae7 100644
--- a/boost/phoenix/core/preprocessed/argument_no_predefined_20.hpp
+++ b/boost/phoenix/core/preprocessed/argument_no_predefined_20.hpp
@@ -8,11 +8,11 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED;
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED;
}
diff --git a/boost/phoenix/core/preprocessed/argument_no_predefined_30.hpp b/boost/phoenix/core/preprocessed/argument_no_predefined_30.hpp
index 9d58100a40..33b1b3a068 100644
--- a/boost/phoenix/core/preprocessed/argument_no_predefined_30.hpp
+++ b/boost/phoenix/core/preprocessed/argument_no_predefined_30.hpp
@@ -8,11 +8,11 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED;
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED;
}
diff --git a/boost/phoenix/core/preprocessed/argument_no_predefined_40.hpp b/boost/phoenix/core/preprocessed/argument_no_predefined_40.hpp
index 67a33d6967..29aafa9204 100644
--- a/boost/phoenix/core/preprocessed/argument_no_predefined_40.hpp
+++ b/boost/phoenix/core/preprocessed/argument_no_predefined_40.hpp
@@ -8,11 +8,11 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED;
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED;
}
diff --git a/boost/phoenix/core/preprocessed/argument_no_predefined_50.hpp b/boost/phoenix/core/preprocessed/argument_no_predefined_50.hpp
index 59867a50ad..344ff47df6 100644
--- a/boost/phoenix/core/preprocessed/argument_no_predefined_50.hpp
+++ b/boost/phoenix/core/preprocessed/argument_no_predefined_50.hpp
@@ -8,11 +8,11 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type; typedef expression::argument<41>::type arg41_type; typedef expression::argument<42>::type arg42_type; typedef expression::argument<43>::type arg43_type; typedef expression::argument<44>::type arg44_type; typedef expression::argument<45>::type arg45_type; typedef expression::argument<46>::type arg46_type; typedef expression::argument<47>::type arg47_type; typedef expression::argument<48>::type arg48_type; typedef expression::argument<49>::type arg49_type; typedef expression::argument<50>::type arg50_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type; typedef expression::argument<41>::type _41_type; typedef expression::argument<42>::type _42_type; typedef expression::argument<43>::type _43_type; typedef expression::argument<44>::type _44_type; typedef expression::argument<45>::type _45_type; typedef expression::argument<46>::type _46_type; typedef expression::argument<47>::type _47_type; typedef expression::argument<48>::type _48_type; typedef expression::argument<49>::type _49_type; typedef expression::argument<50>::type _50_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type arg41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type arg42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type arg43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type arg44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type arg45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type arg46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type arg47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type arg48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type arg49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type arg50_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type _41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type _42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type _43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type _44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type _45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type _46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type _47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type _48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type _49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type _50_type BOOST_ATTRIBUTE_UNUSED;
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type; typedef expression::argument<41>::type arg41_type; typedef expression::argument<42>::type arg42_type; typedef expression::argument<43>::type arg43_type; typedef expression::argument<44>::type arg44_type; typedef expression::argument<45>::type arg45_type; typedef expression::argument<46>::type arg46_type; typedef expression::argument<47>::type arg47_type; typedef expression::argument<48>::type arg48_type; typedef expression::argument<49>::type arg49_type; typedef expression::argument<50>::type arg50_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type; typedef expression::argument<41>::type _41_type; typedef expression::argument<42>::type _42_type; typedef expression::argument<43>::type _43_type; typedef expression::argument<44>::type _44_type; typedef expression::argument<45>::type _45_type; typedef expression::argument<46>::type _46_type; typedef expression::argument<47>::type _47_type; typedef expression::argument<48>::type _48_type; typedef expression::argument<49>::type _49_type; typedef expression::argument<50>::type _50_type;
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type arg41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type arg42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type arg43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type arg44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type arg45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type arg46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type arg47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type arg48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type arg49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type arg50_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type _41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type _42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type _43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type _44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type _45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type _46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type _47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type _48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type _49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type _50_type BOOST_ATTRIBUTE_UNUSED;
}
diff --git a/boost/phoenix/core/preprocessed/argument_predefined_10.hpp b/boost/phoenix/core/preprocessed/argument_predefined_10.hpp
index 3a167fff32..ae79a0060e 100644
--- a/boost/phoenix/core/preprocessed/argument_predefined_10.hpp
+++ b/boost/phoenix/core/preprocessed/argument_predefined_10.hpp
@@ -8,15 +8,15 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}};
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}};
}
diff --git a/boost/phoenix/core/preprocessed/argument_predefined_20.hpp b/boost/phoenix/core/preprocessed/argument_predefined_20.hpp
index 6b86efbe3b..3507ee701b 100644
--- a/boost/phoenix/core/preprocessed/argument_predefined_20.hpp
+++ b/boost/phoenix/core/preprocessed/argument_predefined_20.hpp
@@ -8,15 +8,15 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}};
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}};
}
diff --git a/boost/phoenix/core/preprocessed/argument_predefined_30.hpp b/boost/phoenix/core/preprocessed/argument_predefined_30.hpp
index 536ebe4a4c..493627f036 100644
--- a/boost/phoenix/core/preprocessed/argument_predefined_30.hpp
+++ b/boost/phoenix/core/preprocessed/argument_predefined_30.hpp
@@ -8,15 +8,15 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}};
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}};
}
diff --git a/boost/phoenix/core/preprocessed/argument_predefined_40.hpp b/boost/phoenix/core/preprocessed/argument_predefined_40.hpp
index 1280c10ec5..e8c68df88e 100644
--- a/boost/phoenix/core/preprocessed/argument_predefined_40.hpp
+++ b/boost/phoenix/core/preprocessed/argument_predefined_40.hpp
@@ -8,15 +8,15 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}}; expression::argument<31>::type const arg31 = {{{}}}; expression::argument<32>::type const arg32 = {{{}}}; expression::argument<33>::type const arg33 = {{{}}}; expression::argument<34>::type const arg34 = {{{}}}; expression::argument<35>::type const arg35 = {{{}}}; expression::argument<36>::type const arg36 = {{{}}}; expression::argument<37>::type const arg37 = {{{}}}; expression::argument<38>::type const arg38 = {{{}}}; expression::argument<39>::type const arg39 = {{{}}}; expression::argument<40>::type const arg40 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}}; expression::argument<31>::type const _31 = {{{}}}; expression::argument<32>::type const _32 = {{{}}}; expression::argument<33>::type const _33 = {{{}}}; expression::argument<34>::type const _34 = {{{}}}; expression::argument<35>::type const _35 = {{{}}}; expression::argument<36>::type const _36 = {{{}}}; expression::argument<37>::type const _37 = {{{}}}; expression::argument<38>::type const _38 = {{{}}}; expression::argument<39>::type const _39 = {{{}}}; expression::argument<40>::type const _40 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED arg31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED arg32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED arg33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED arg34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED arg35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED arg36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED arg37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED arg38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED arg39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED arg40 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED _31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED _32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED _33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED _34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED _35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED _36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED _37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED _38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED _39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED _40 = {{{}}};
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}}; expression::argument<31>::type const arg31 = {{{}}}; expression::argument<32>::type const arg32 = {{{}}}; expression::argument<33>::type const arg33 = {{{}}}; expression::argument<34>::type const arg34 = {{{}}}; expression::argument<35>::type const arg35 = {{{}}}; expression::argument<36>::type const arg36 = {{{}}}; expression::argument<37>::type const arg37 = {{{}}}; expression::argument<38>::type const arg38 = {{{}}}; expression::argument<39>::type const arg39 = {{{}}}; expression::argument<40>::type const arg40 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}}; expression::argument<31>::type const _31 = {{{}}}; expression::argument<32>::type const _32 = {{{}}}; expression::argument<33>::type const _33 = {{{}}}; expression::argument<34>::type const _34 = {{{}}}; expression::argument<35>::type const _35 = {{{}}}; expression::argument<36>::type const _36 = {{{}}}; expression::argument<37>::type const _37 = {{{}}}; expression::argument<38>::type const _38 = {{{}}}; expression::argument<39>::type const _39 = {{{}}}; expression::argument<40>::type const _40 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED arg31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED arg32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED arg33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED arg34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED arg35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED arg36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED arg37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED arg38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED arg39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED arg40 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED _31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED _32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED _33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED _34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED _35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED _36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED _37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED _38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED _39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED _40 = {{{}}};
}
diff --git a/boost/phoenix/core/preprocessed/argument_predefined_50.hpp b/boost/phoenix/core/preprocessed/argument_predefined_50.hpp
index 129f03e7ca..91a1208e4c 100644
--- a/boost/phoenix/core/preprocessed/argument_predefined_50.hpp
+++ b/boost/phoenix/core/preprocessed/argument_predefined_50.hpp
@@ -8,15 +8,15 @@
namespace placeholders
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type; typedef expression::argument<41>::type arg41_type; typedef expression::argument<42>::type arg42_type; typedef expression::argument<43>::type arg43_type; typedef expression::argument<44>::type arg44_type; typedef expression::argument<45>::type arg45_type; typedef expression::argument<46>::type arg46_type; typedef expression::argument<47>::type arg47_type; typedef expression::argument<48>::type arg48_type; typedef expression::argument<49>::type arg49_type; typedef expression::argument<50>::type arg50_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type; typedef expression::argument<41>::type _41_type; typedef expression::argument<42>::type _42_type; typedef expression::argument<43>::type _43_type; typedef expression::argument<44>::type _44_type; typedef expression::argument<45>::type _45_type; typedef expression::argument<46>::type _46_type; typedef expression::argument<47>::type _47_type; typedef expression::argument<48>::type _48_type; typedef expression::argument<49>::type _49_type; typedef expression::argument<50>::type _50_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}}; expression::argument<31>::type const arg31 = {{{}}}; expression::argument<32>::type const arg32 = {{{}}}; expression::argument<33>::type const arg33 = {{{}}}; expression::argument<34>::type const arg34 = {{{}}}; expression::argument<35>::type const arg35 = {{{}}}; expression::argument<36>::type const arg36 = {{{}}}; expression::argument<37>::type const arg37 = {{{}}}; expression::argument<38>::type const arg38 = {{{}}}; expression::argument<39>::type const arg39 = {{{}}}; expression::argument<40>::type const arg40 = {{{}}}; expression::argument<41>::type const arg41 = {{{}}}; expression::argument<42>::type const arg42 = {{{}}}; expression::argument<43>::type const arg43 = {{{}}}; expression::argument<44>::type const arg44 = {{{}}}; expression::argument<45>::type const arg45 = {{{}}}; expression::argument<46>::type const arg46 = {{{}}}; expression::argument<47>::type const arg47 = {{{}}}; expression::argument<48>::type const arg48 = {{{}}}; expression::argument<49>::type const arg49 = {{{}}}; expression::argument<50>::type const arg50 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}}; expression::argument<31>::type const _31 = {{{}}}; expression::argument<32>::type const _32 = {{{}}}; expression::argument<33>::type const _33 = {{{}}}; expression::argument<34>::type const _34 = {{{}}}; expression::argument<35>::type const _35 = {{{}}}; expression::argument<36>::type const _36 = {{{}}}; expression::argument<37>::type const _37 = {{{}}}; expression::argument<38>::type const _38 = {{{}}}; expression::argument<39>::type const _39 = {{{}}}; expression::argument<40>::type const _40 = {{{}}}; expression::argument<41>::type const _41 = {{{}}}; expression::argument<42>::type const _42 = {{{}}}; expression::argument<43>::type const _43 = {{{}}}; expression::argument<44>::type const _44 = {{{}}}; expression::argument<45>::type const _45 = {{{}}}; expression::argument<46>::type const _46 = {{{}}}; expression::argument<47>::type const _47 = {{{}}}; expression::argument<48>::type const _48 = {{{}}}; expression::argument<49>::type const _49 = {{{}}}; expression::argument<50>::type const _50 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type arg41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type arg42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type arg43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type arg44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type arg45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type arg46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type arg47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type arg48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type arg49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type arg50_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type _41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type _42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type _43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type _44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type _45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type _46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type _47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type _48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type _49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type _50_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED arg31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED arg32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED arg33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED arg34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED arg35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED arg36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED arg37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED arg38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED arg39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED arg40 = {{{}}}; expression::argument<41>::type const BOOST_ATTRIBUTE_UNUSED arg41 = {{{}}}; expression::argument<42>::type const BOOST_ATTRIBUTE_UNUSED arg42 = {{{}}}; expression::argument<43>::type const BOOST_ATTRIBUTE_UNUSED arg43 = {{{}}}; expression::argument<44>::type const BOOST_ATTRIBUTE_UNUSED arg44 = {{{}}}; expression::argument<45>::type const BOOST_ATTRIBUTE_UNUSED arg45 = {{{}}}; expression::argument<46>::type const BOOST_ATTRIBUTE_UNUSED arg46 = {{{}}}; expression::argument<47>::type const BOOST_ATTRIBUTE_UNUSED arg47 = {{{}}}; expression::argument<48>::type const BOOST_ATTRIBUTE_UNUSED arg48 = {{{}}}; expression::argument<49>::type const BOOST_ATTRIBUTE_UNUSED arg49 = {{{}}}; expression::argument<50>::type const BOOST_ATTRIBUTE_UNUSED arg50 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED _31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED _32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED _33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED _34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED _35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED _36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED _37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED _38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED _39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED _40 = {{{}}}; expression::argument<41>::type const BOOST_ATTRIBUTE_UNUSED _41 = {{{}}}; expression::argument<42>::type const BOOST_ATTRIBUTE_UNUSED _42 = {{{}}}; expression::argument<43>::type const BOOST_ATTRIBUTE_UNUSED _43 = {{{}}}; expression::argument<44>::type const BOOST_ATTRIBUTE_UNUSED _44 = {{{}}}; expression::argument<45>::type const BOOST_ATTRIBUTE_UNUSED _45 = {{{}}}; expression::argument<46>::type const BOOST_ATTRIBUTE_UNUSED _46 = {{{}}}; expression::argument<47>::type const BOOST_ATTRIBUTE_UNUSED _47 = {{{}}}; expression::argument<48>::type const BOOST_ATTRIBUTE_UNUSED _48 = {{{}}}; expression::argument<49>::type const BOOST_ATTRIBUTE_UNUSED _49 = {{{}}}; expression::argument<50>::type const BOOST_ATTRIBUTE_UNUSED _50 = {{{}}};
}
namespace arg_names
{
- typedef expression::argument<1>::type arg1_type; typedef expression::argument<2>::type arg2_type; typedef expression::argument<3>::type arg3_type; typedef expression::argument<4>::type arg4_type; typedef expression::argument<5>::type arg5_type; typedef expression::argument<6>::type arg6_type; typedef expression::argument<7>::type arg7_type; typedef expression::argument<8>::type arg8_type; typedef expression::argument<9>::type arg9_type; typedef expression::argument<10>::type arg10_type; typedef expression::argument<11>::type arg11_type; typedef expression::argument<12>::type arg12_type; typedef expression::argument<13>::type arg13_type; typedef expression::argument<14>::type arg14_type; typedef expression::argument<15>::type arg15_type; typedef expression::argument<16>::type arg16_type; typedef expression::argument<17>::type arg17_type; typedef expression::argument<18>::type arg18_type; typedef expression::argument<19>::type arg19_type; typedef expression::argument<20>::type arg20_type; typedef expression::argument<21>::type arg21_type; typedef expression::argument<22>::type arg22_type; typedef expression::argument<23>::type arg23_type; typedef expression::argument<24>::type arg24_type; typedef expression::argument<25>::type arg25_type; typedef expression::argument<26>::type arg26_type; typedef expression::argument<27>::type arg27_type; typedef expression::argument<28>::type arg28_type; typedef expression::argument<29>::type arg29_type; typedef expression::argument<30>::type arg30_type; typedef expression::argument<31>::type arg31_type; typedef expression::argument<32>::type arg32_type; typedef expression::argument<33>::type arg33_type; typedef expression::argument<34>::type arg34_type; typedef expression::argument<35>::type arg35_type; typedef expression::argument<36>::type arg36_type; typedef expression::argument<37>::type arg37_type; typedef expression::argument<38>::type arg38_type; typedef expression::argument<39>::type arg39_type; typedef expression::argument<40>::type arg40_type; typedef expression::argument<41>::type arg41_type; typedef expression::argument<42>::type arg42_type; typedef expression::argument<43>::type arg43_type; typedef expression::argument<44>::type arg44_type; typedef expression::argument<45>::type arg45_type; typedef expression::argument<46>::type arg46_type; typedef expression::argument<47>::type arg47_type; typedef expression::argument<48>::type arg48_type; typedef expression::argument<49>::type arg49_type; typedef expression::argument<50>::type arg50_type;
- typedef expression::argument<1>::type _1_type; typedef expression::argument<2>::type _2_type; typedef expression::argument<3>::type _3_type; typedef expression::argument<4>::type _4_type; typedef expression::argument<5>::type _5_type; typedef expression::argument<6>::type _6_type; typedef expression::argument<7>::type _7_type; typedef expression::argument<8>::type _8_type; typedef expression::argument<9>::type _9_type; typedef expression::argument<10>::type _10_type; typedef expression::argument<11>::type _11_type; typedef expression::argument<12>::type _12_type; typedef expression::argument<13>::type _13_type; typedef expression::argument<14>::type _14_type; typedef expression::argument<15>::type _15_type; typedef expression::argument<16>::type _16_type; typedef expression::argument<17>::type _17_type; typedef expression::argument<18>::type _18_type; typedef expression::argument<19>::type _19_type; typedef expression::argument<20>::type _20_type; typedef expression::argument<21>::type _21_type; typedef expression::argument<22>::type _22_type; typedef expression::argument<23>::type _23_type; typedef expression::argument<24>::type _24_type; typedef expression::argument<25>::type _25_type; typedef expression::argument<26>::type _26_type; typedef expression::argument<27>::type _27_type; typedef expression::argument<28>::type _28_type; typedef expression::argument<29>::type _29_type; typedef expression::argument<30>::type _30_type; typedef expression::argument<31>::type _31_type; typedef expression::argument<32>::type _32_type; typedef expression::argument<33>::type _33_type; typedef expression::argument<34>::type _34_type; typedef expression::argument<35>::type _35_type; typedef expression::argument<36>::type _36_type; typedef expression::argument<37>::type _37_type; typedef expression::argument<38>::type _38_type; typedef expression::argument<39>::type _39_type; typedef expression::argument<40>::type _40_type; typedef expression::argument<41>::type _41_type; typedef expression::argument<42>::type _42_type; typedef expression::argument<43>::type _43_type; typedef expression::argument<44>::type _44_type; typedef expression::argument<45>::type _45_type; typedef expression::argument<46>::type _46_type; typedef expression::argument<47>::type _47_type; typedef expression::argument<48>::type _48_type; typedef expression::argument<49>::type _49_type; typedef expression::argument<50>::type _50_type;
- expression::argument<1>::type const arg1 = {{{}}}; expression::argument<2>::type const arg2 = {{{}}}; expression::argument<3>::type const arg3 = {{{}}}; expression::argument<4>::type const arg4 = {{{}}}; expression::argument<5>::type const arg5 = {{{}}}; expression::argument<6>::type const arg6 = {{{}}}; expression::argument<7>::type const arg7 = {{{}}}; expression::argument<8>::type const arg8 = {{{}}}; expression::argument<9>::type const arg9 = {{{}}}; expression::argument<10>::type const arg10 = {{{}}}; expression::argument<11>::type const arg11 = {{{}}}; expression::argument<12>::type const arg12 = {{{}}}; expression::argument<13>::type const arg13 = {{{}}}; expression::argument<14>::type const arg14 = {{{}}}; expression::argument<15>::type const arg15 = {{{}}}; expression::argument<16>::type const arg16 = {{{}}}; expression::argument<17>::type const arg17 = {{{}}}; expression::argument<18>::type const arg18 = {{{}}}; expression::argument<19>::type const arg19 = {{{}}}; expression::argument<20>::type const arg20 = {{{}}}; expression::argument<21>::type const arg21 = {{{}}}; expression::argument<22>::type const arg22 = {{{}}}; expression::argument<23>::type const arg23 = {{{}}}; expression::argument<24>::type const arg24 = {{{}}}; expression::argument<25>::type const arg25 = {{{}}}; expression::argument<26>::type const arg26 = {{{}}}; expression::argument<27>::type const arg27 = {{{}}}; expression::argument<28>::type const arg28 = {{{}}}; expression::argument<29>::type const arg29 = {{{}}}; expression::argument<30>::type const arg30 = {{{}}}; expression::argument<31>::type const arg31 = {{{}}}; expression::argument<32>::type const arg32 = {{{}}}; expression::argument<33>::type const arg33 = {{{}}}; expression::argument<34>::type const arg34 = {{{}}}; expression::argument<35>::type const arg35 = {{{}}}; expression::argument<36>::type const arg36 = {{{}}}; expression::argument<37>::type const arg37 = {{{}}}; expression::argument<38>::type const arg38 = {{{}}}; expression::argument<39>::type const arg39 = {{{}}}; expression::argument<40>::type const arg40 = {{{}}}; expression::argument<41>::type const arg41 = {{{}}}; expression::argument<42>::type const arg42 = {{{}}}; expression::argument<43>::type const arg43 = {{{}}}; expression::argument<44>::type const arg44 = {{{}}}; expression::argument<45>::type const arg45 = {{{}}}; expression::argument<46>::type const arg46 = {{{}}}; expression::argument<47>::type const arg47 = {{{}}}; expression::argument<48>::type const arg48 = {{{}}}; expression::argument<49>::type const arg49 = {{{}}}; expression::argument<50>::type const arg50 = {{{}}};
- expression::argument<1>::type const _1 = {{{}}}; expression::argument<2>::type const _2 = {{{}}}; expression::argument<3>::type const _3 = {{{}}}; expression::argument<4>::type const _4 = {{{}}}; expression::argument<5>::type const _5 = {{{}}}; expression::argument<6>::type const _6 = {{{}}}; expression::argument<7>::type const _7 = {{{}}}; expression::argument<8>::type const _8 = {{{}}}; expression::argument<9>::type const _9 = {{{}}}; expression::argument<10>::type const _10 = {{{}}}; expression::argument<11>::type const _11 = {{{}}}; expression::argument<12>::type const _12 = {{{}}}; expression::argument<13>::type const _13 = {{{}}}; expression::argument<14>::type const _14 = {{{}}}; expression::argument<15>::type const _15 = {{{}}}; expression::argument<16>::type const _16 = {{{}}}; expression::argument<17>::type const _17 = {{{}}}; expression::argument<18>::type const _18 = {{{}}}; expression::argument<19>::type const _19 = {{{}}}; expression::argument<20>::type const _20 = {{{}}}; expression::argument<21>::type const _21 = {{{}}}; expression::argument<22>::type const _22 = {{{}}}; expression::argument<23>::type const _23 = {{{}}}; expression::argument<24>::type const _24 = {{{}}}; expression::argument<25>::type const _25 = {{{}}}; expression::argument<26>::type const _26 = {{{}}}; expression::argument<27>::type const _27 = {{{}}}; expression::argument<28>::type const _28 = {{{}}}; expression::argument<29>::type const _29 = {{{}}}; expression::argument<30>::type const _30 = {{{}}}; expression::argument<31>::type const _31 = {{{}}}; expression::argument<32>::type const _32 = {{{}}}; expression::argument<33>::type const _33 = {{{}}}; expression::argument<34>::type const _34 = {{{}}}; expression::argument<35>::type const _35 = {{{}}}; expression::argument<36>::type const _36 = {{{}}}; expression::argument<37>::type const _37 = {{{}}}; expression::argument<38>::type const _38 = {{{}}}; expression::argument<39>::type const _39 = {{{}}}; expression::argument<40>::type const _40 = {{{}}}; expression::argument<41>::type const _41 = {{{}}}; expression::argument<42>::type const _42 = {{{}}}; expression::argument<43>::type const _43 = {{{}}}; expression::argument<44>::type const _44 = {{{}}}; expression::argument<45>::type const _45 = {{{}}}; expression::argument<46>::type const _46 = {{{}}}; expression::argument<47>::type const _47 = {{{}}}; expression::argument<48>::type const _48 = {{{}}}; expression::argument<49>::type const _49 = {{{}}}; expression::argument<50>::type const _50 = {{{}}};
+ typedef expression::argument<1>::type arg1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type arg2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type arg3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type arg4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type arg5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type arg6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type arg7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type arg8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type arg9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type arg10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type arg11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type arg12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type arg13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type arg14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type arg15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type arg16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type arg17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type arg18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type arg19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type arg20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type arg21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type arg22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type arg23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type arg24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type arg25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type arg26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type arg27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type arg28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type arg29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type arg30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type arg31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type arg32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type arg33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type arg34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type arg35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type arg36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type arg37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type arg38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type arg39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type arg40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type arg41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type arg42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type arg43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type arg44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type arg45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type arg46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type arg47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type arg48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type arg49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type arg50_type BOOST_ATTRIBUTE_UNUSED;
+ typedef expression::argument<1>::type _1_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<2>::type _2_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<3>::type _3_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<4>::type _4_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<5>::type _5_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<6>::type _6_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<7>::type _7_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<8>::type _8_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<9>::type _9_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<10>::type _10_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<11>::type _11_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<12>::type _12_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<13>::type _13_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<14>::type _14_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<15>::type _15_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<16>::type _16_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<17>::type _17_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<18>::type _18_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<19>::type _19_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<20>::type _20_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<21>::type _21_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<22>::type _22_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<23>::type _23_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<24>::type _24_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<25>::type _25_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<26>::type _26_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<27>::type _27_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<28>::type _28_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<29>::type _29_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<30>::type _30_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<31>::type _31_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<32>::type _32_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<33>::type _33_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<34>::type _34_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<35>::type _35_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<36>::type _36_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<37>::type _37_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<38>::type _38_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<39>::type _39_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<40>::type _40_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<41>::type _41_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<42>::type _42_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<43>::type _43_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<44>::type _44_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<45>::type _45_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<46>::type _46_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<47>::type _47_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<48>::type _48_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<49>::type _49_type BOOST_ATTRIBUTE_UNUSED; typedef expression::argument<50>::type _50_type BOOST_ATTRIBUTE_UNUSED;
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED arg1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED arg2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED arg3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED arg4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED arg5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED arg6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED arg7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED arg8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED arg9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED arg10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED arg11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED arg12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED arg13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED arg14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED arg15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED arg16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED arg17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED arg18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED arg19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED arg20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED arg21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED arg22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED arg23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED arg24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED arg25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED arg26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED arg27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED arg28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED arg29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED arg30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED arg31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED arg32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED arg33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED arg34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED arg35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED arg36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED arg37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED arg38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED arg39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED arg40 = {{{}}}; expression::argument<41>::type const BOOST_ATTRIBUTE_UNUSED arg41 = {{{}}}; expression::argument<42>::type const BOOST_ATTRIBUTE_UNUSED arg42 = {{{}}}; expression::argument<43>::type const BOOST_ATTRIBUTE_UNUSED arg43 = {{{}}}; expression::argument<44>::type const BOOST_ATTRIBUTE_UNUSED arg44 = {{{}}}; expression::argument<45>::type const BOOST_ATTRIBUTE_UNUSED arg45 = {{{}}}; expression::argument<46>::type const BOOST_ATTRIBUTE_UNUSED arg46 = {{{}}}; expression::argument<47>::type const BOOST_ATTRIBUTE_UNUSED arg47 = {{{}}}; expression::argument<48>::type const BOOST_ATTRIBUTE_UNUSED arg48 = {{{}}}; expression::argument<49>::type const BOOST_ATTRIBUTE_UNUSED arg49 = {{{}}}; expression::argument<50>::type const BOOST_ATTRIBUTE_UNUSED arg50 = {{{}}};
+ expression::argument<1>::type const BOOST_ATTRIBUTE_UNUSED _1 = {{{}}}; expression::argument<2>::type const BOOST_ATTRIBUTE_UNUSED _2 = {{{}}}; expression::argument<3>::type const BOOST_ATTRIBUTE_UNUSED _3 = {{{}}}; expression::argument<4>::type const BOOST_ATTRIBUTE_UNUSED _4 = {{{}}}; expression::argument<5>::type const BOOST_ATTRIBUTE_UNUSED _5 = {{{}}}; expression::argument<6>::type const BOOST_ATTRIBUTE_UNUSED _6 = {{{}}}; expression::argument<7>::type const BOOST_ATTRIBUTE_UNUSED _7 = {{{}}}; expression::argument<8>::type const BOOST_ATTRIBUTE_UNUSED _8 = {{{}}}; expression::argument<9>::type const BOOST_ATTRIBUTE_UNUSED _9 = {{{}}}; expression::argument<10>::type const BOOST_ATTRIBUTE_UNUSED _10 = {{{}}}; expression::argument<11>::type const BOOST_ATTRIBUTE_UNUSED _11 = {{{}}}; expression::argument<12>::type const BOOST_ATTRIBUTE_UNUSED _12 = {{{}}}; expression::argument<13>::type const BOOST_ATTRIBUTE_UNUSED _13 = {{{}}}; expression::argument<14>::type const BOOST_ATTRIBUTE_UNUSED _14 = {{{}}}; expression::argument<15>::type const BOOST_ATTRIBUTE_UNUSED _15 = {{{}}}; expression::argument<16>::type const BOOST_ATTRIBUTE_UNUSED _16 = {{{}}}; expression::argument<17>::type const BOOST_ATTRIBUTE_UNUSED _17 = {{{}}}; expression::argument<18>::type const BOOST_ATTRIBUTE_UNUSED _18 = {{{}}}; expression::argument<19>::type const BOOST_ATTRIBUTE_UNUSED _19 = {{{}}}; expression::argument<20>::type const BOOST_ATTRIBUTE_UNUSED _20 = {{{}}}; expression::argument<21>::type const BOOST_ATTRIBUTE_UNUSED _21 = {{{}}}; expression::argument<22>::type const BOOST_ATTRIBUTE_UNUSED _22 = {{{}}}; expression::argument<23>::type const BOOST_ATTRIBUTE_UNUSED _23 = {{{}}}; expression::argument<24>::type const BOOST_ATTRIBUTE_UNUSED _24 = {{{}}}; expression::argument<25>::type const BOOST_ATTRIBUTE_UNUSED _25 = {{{}}}; expression::argument<26>::type const BOOST_ATTRIBUTE_UNUSED _26 = {{{}}}; expression::argument<27>::type const BOOST_ATTRIBUTE_UNUSED _27 = {{{}}}; expression::argument<28>::type const BOOST_ATTRIBUTE_UNUSED _28 = {{{}}}; expression::argument<29>::type const BOOST_ATTRIBUTE_UNUSED _29 = {{{}}}; expression::argument<30>::type const BOOST_ATTRIBUTE_UNUSED _30 = {{{}}}; expression::argument<31>::type const BOOST_ATTRIBUTE_UNUSED _31 = {{{}}}; expression::argument<32>::type const BOOST_ATTRIBUTE_UNUSED _32 = {{{}}}; expression::argument<33>::type const BOOST_ATTRIBUTE_UNUSED _33 = {{{}}}; expression::argument<34>::type const BOOST_ATTRIBUTE_UNUSED _34 = {{{}}}; expression::argument<35>::type const BOOST_ATTRIBUTE_UNUSED _35 = {{{}}}; expression::argument<36>::type const BOOST_ATTRIBUTE_UNUSED _36 = {{{}}}; expression::argument<37>::type const BOOST_ATTRIBUTE_UNUSED _37 = {{{}}}; expression::argument<38>::type const BOOST_ATTRIBUTE_UNUSED _38 = {{{}}}; expression::argument<39>::type const BOOST_ATTRIBUTE_UNUSED _39 = {{{}}}; expression::argument<40>::type const BOOST_ATTRIBUTE_UNUSED _40 = {{{}}}; expression::argument<41>::type const BOOST_ATTRIBUTE_UNUSED _41 = {{{}}}; expression::argument<42>::type const BOOST_ATTRIBUTE_UNUSED _42 = {{{}}}; expression::argument<43>::type const BOOST_ATTRIBUTE_UNUSED _43 = {{{}}}; expression::argument<44>::type const BOOST_ATTRIBUTE_UNUSED _44 = {{{}}}; expression::argument<45>::type const BOOST_ATTRIBUTE_UNUSED _45 = {{{}}}; expression::argument<46>::type const BOOST_ATTRIBUTE_UNUSED _46 = {{{}}}; expression::argument<47>::type const BOOST_ATTRIBUTE_UNUSED _47 = {{{}}}; expression::argument<48>::type const BOOST_ATTRIBUTE_UNUSED _48 = {{{}}}; expression::argument<49>::type const BOOST_ATTRIBUTE_UNUSED _49 = {{{}}}; expression::argument<50>::type const BOOST_ATTRIBUTE_UNUSED _50 = {{{}}};
}
diff --git a/boost/phoenix/function/detail/function_result_of.hpp b/boost/phoenix/function/detail/function_result_of.hpp
deleted file mode 100644
index ee9d1c219e..0000000000
--- a/boost/phoenix/function/detail/function_result_of.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-
-#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
-#ifndef BOOST_PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
-#define BOOST_PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
-
-#include <boost/phoenix/function/detail/preprocessed/function_result_of.hpp>
-
-#endif
-#else
-
-#if !BOOST_PHOENIX_IS_ITERATING
-
-#ifndef BOOST_PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
-#define BOOST_PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
-
-#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
-#pragma wave option(preserve: 2, line: 0, output: "preprocessed/function_result_of_" BOOST_PHOENIX_LIMIT_STR ".hpp")
-#endif
-
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the 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(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
-#pragma wave option(preserve: 1)
-#endif
-
-#define BOOST_PHOENIX_ITERATION_PARAMS \
- (3, (1, BOOST_PHOENIX_ACTOR_LIMIT, \
- <boost/phoenix/function/detail/function_result_of.hpp>))
-#include PHOENIX_ITERATE()
-
-#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
-#pragma wave option(output: null)
-#endif
-
-#endif
-
-#else
-
- template <typename F, BOOST_PHOENIX_typename_A>
- struct function<F, BOOST_PHOENIX_A>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , BOOST_PHOENIX_A
- >
- {};
-
-#endif
-
-#endif // PHOENIX_DONT_USE_PREPROCESSED_FILES
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of.hpp
deleted file mode 100644
index 2f6441bdd9..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*==============================================================================
- Copyright (c) 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_PHOENIX_PREPROCESSED_FUNCTION_RESULT_OF)
-#define BOOST_PHOENIX_PREPROCESSED_FUNCTION_RESULT_OF
-
-#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/function/detail/preprocessed/function_result_of_10.hpp>
-#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/function/detail/preprocessed/function_result_of_20.hpp>
-#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/function/detail/preprocessed/function_result_of_30.hpp>
-#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/function/detail/preprocessed/function_result_of_40.hpp>
-#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/function/detail/preprocessed/function_result_of_50.hpp>
-#else
-#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
-#endif
-
-#endif
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of_10.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of_10.hpp
deleted file mode 100644
index e0ed153e9d..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of_10.hpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
-
-
-
-
-
- template <typename F, typename A0>
- struct function<F, A0>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1>
- struct function<F, A0 , A1>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2>
- struct function<F, A0 , A1 , A2>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
- struct function<F, A0 , A1 , A2 , A3>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
- struct function<F, A0 , A1 , A2 , A3 , A4>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
- >
- {};
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of_20.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of_20.hpp
deleted file mode 100644
index c9169aba0c..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of_20.hpp
+++ /dev/null
@@ -1,327 +0,0 @@
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
-
-
-
-
-
- template <typename F, typename A0>
- struct function<F, A0>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1>
- struct function<F, A0 , A1>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2>
- struct function<F, A0 , A1 , A2>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
- struct function<F, A0 , A1 , A2 , A3>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
- struct function<F, A0 , A1 , A2 , A3 , A4>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19
- >
- {};
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of_30.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of_30.hpp
deleted file mode 100644
index a4cc8e526b..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of_30.hpp
+++ /dev/null
@@ -1,487 +0,0 @@
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
-
-
-
-
-
- template <typename F, typename A0>
- struct function<F, A0>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1>
- struct function<F, A0 , A1>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2>
- struct function<F, A0 , A1 , A2>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
- struct function<F, A0 , A1 , A2 , A3>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
- struct function<F, A0 , A1 , A2 , A3 , A4>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29
- >
- {};
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of_40.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of_40.hpp
deleted file mode 100644
index d0d5ac6cbb..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of_40.hpp
+++ /dev/null
@@ -1,647 +0,0 @@
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
-
-
-
-
-
- template <typename F, typename A0>
- struct function<F, A0>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1>
- struct function<F, A0 , A1>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2>
- struct function<F, A0 , A1 , A2>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
- struct function<F, A0 , A1 , A2 , A3>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
- struct function<F, A0 , A1 , A2 , A3 , A4>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39
- >
- {};
diff --git a/boost/phoenix/function/detail/preprocessed/function_result_of_50.hpp b/boost/phoenix/function/detail/preprocessed/function_result_of_50.hpp
deleted file mode 100644
index ba88bec584..0000000000
--- a/boost/phoenix/function/detail/preprocessed/function_result_of_50.hpp
+++ /dev/null
@@ -1,807 +0,0 @@
-/*==============================================================================
- Copyright (c) 2005-2010 Joel de Guzman
- Copyright (c) 2010 Thomas Heller
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-
-
-
-
-
-
- template <typename F, typename A0>
- struct function<F, A0>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1>
- struct function<F, A0 , A1>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2>
- struct function<F, A0 , A1 , A2>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
- struct function<F, A0 , A1 , A2 , A3>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
- struct function<F, A0 , A1 , A2 , A3 , A4>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44 , typename A45>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44 , typename A45 , typename A46>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44 , typename A45 , typename A46 , typename A47>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44 , typename A45 , typename A46 , typename A47 , typename A48>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48
- >
- {};
-
-
-
-
-
-
-
- template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20 , typename A21 , typename A22 , typename A23 , typename A24 , typename A25 , typename A26 , typename A27 , typename A28 , typename A29 , typename A30 , typename A31 , typename A32 , typename A33 , typename A34 , typename A35 , typename A36 , typename A37 , typename A38 , typename A39 , typename A40 , typename A41 , typename A42 , typename A43 , typename A44 , typename A45 , typename A46 , typename A47 , typename A48 , typename A49>
- struct function<F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48 , A49>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48 , A49
- >
- {};
diff --git a/boost/phoenix/function/lazy_list.hpp b/boost/phoenix/function/lazy_list.hpp
index 8653125c9b..3510b02e70 100644
--- a/boost/phoenix/function/lazy_list.hpp
+++ b/boost/phoenix/function/lazy_list.hpp
@@ -1277,7 +1277,6 @@ bool operator<( a_unique_type_for_nil, const list<T>& b ) {
template <typename T, typename L>
typename result<Cons(T,L)>::type
operator()( const T& x, const L& l ) const {
- typedef typename result<Cons(T,L)>::type LL;
typedef typename result_of::ListType<L>::LType LType;
typedef ConsHelp1<T,LType,
boost::is_base_and_derived<ListLike,LType>::value> help;
diff --git a/boost/phoenix/scope/local_variable.hpp b/boost/phoenix/scope/local_variable.hpp
index eefb6a7149..bd5511bd00 100644
--- a/boost/phoenix/scope/local_variable.hpp
+++ b/boost/phoenix/scope/local_variable.hpp
@@ -19,10 +19,6 @@
namespace boost { namespace phoenix
{
- namespace detail
- {
- }
-
namespace expression
{
template <typename Key>
@@ -165,32 +161,32 @@ namespace boost { namespace phoenix
typedef expression::local_variable<struct _z_key>::type _z_type;
#ifndef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS
- _a_type const _a = {{{}}};
- _b_type const _b = {{{}}};
- _c_type const _c = {{{}}};
- _d_type const _d = {{{}}};
- _e_type const _e = {{{}}};
- _f_type const _f = {{{}}};
- _g_type const _g = {{{}}};
- _h_type const _h = {{{}}};
- _i_type const _i = {{{}}};
- _j_type const _j = {{{}}};
- _k_type const _k = {{{}}};
- _l_type const _l = {{{}}};
- _m_type const _m = {{{}}};
- _n_type const _n = {{{}}};
- _o_type const _o = {{{}}};
- _p_type const _p = {{{}}};
- _q_type const _q = {{{}}};
- _r_type const _r = {{{}}};
- _s_type const _s = {{{}}};
- _t_type const _t = {{{}}};
- _u_type const _u = {{{}}};
- _v_type const _v = {{{}}};
- _w_type const _w = {{{}}};
- _x_type const _x = {{{}}};
- _y_type const _y = {{{}}};
- _z_type const _z = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _a_type const _a = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _b_type const _b = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _c_type const _c = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _d_type const _d = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _e_type const _e = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _f_type const _f = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _g_type const _g = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _h_type const _h = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _i_type const _i = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _j_type const _j = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _k_type const _k = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _l_type const _l = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _m_type const _m = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _n_type const _n = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _o_type const _o = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _p_type const _p = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _q_type const _q = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _r_type const _r = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _s_type const _s = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _t_type const _t = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _u_type const _u = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _v_type const _v = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _w_type const _w = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _x_type const _x = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _y_type const _y = {{{}}};
+ BOOST_ATTRIBUTE_UNUSED _z_type const _z = {{{}}};
#endif
}
}}
diff --git a/boost/phoenix/scope/scoped_environment.hpp b/boost/phoenix/scope/scoped_environment.hpp
index 5fcb24583e..470220ed3b 100644
--- a/boost/phoenix/scope/scoped_environment.hpp
+++ b/boost/phoenix/scope/scoped_environment.hpp
@@ -48,7 +48,7 @@ namespace boost { namespace phoenix
: env(o.env)
, outer_env(o.outer_env)
, locals(o.locals)
- {};
+ {}
Env const & env;
OuterEnv const & outer_env;
diff --git a/boost/phoenix/stl/algorithm/detail/std_unordered_set_or_map_fwd.hpp b/boost/phoenix/stl/algorithm/detail/std_unordered_set_or_map_fwd.hpp
index 251309a435..e650328d15 100644
--- a/boost/phoenix/stl/algorithm/detail/std_unordered_set_or_map_fwd.hpp
+++ b/boost/phoenix/stl/algorithm/detail/std_unordered_set_or_map_fwd.hpp
@@ -20,10 +20,11 @@
#include <boost/phoenix/config.hpp>
#ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
-#ifdef BOOST_PHOENIX_USING_LIBCPP
-// Advance declaration not working for libc++
-#include <unordered_set>
-#include <unordered_map>
+#if defined(BOOST_PHOENIX_USING_LIBCPP) \
+ || (defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB < 540))
+// Advance declaration not working for libc++ and MSVC 10
+#include BOOST_PHOENIX_UNORDERED_SET_HEADER
+#include BOOST_PHOENIX_UNORDERED_MAP_HEADER
#else
diff --git a/boost/phoenix/stl/algorithm/querying.hpp b/boost/phoenix/stl/algorithm/querying.hpp
index 12a3bb72dc..36d1a14a55 100644
--- a/boost/phoenix/stl/algorithm/querying.hpp
+++ b/boost/phoenix/stl/algorithm/querying.hpp
@@ -40,7 +40,7 @@ namespace boost { namespace phoenix {
struct result;
template <typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: range_iterator<R>
{};
@@ -202,7 +202,7 @@ namespace boost { namespace phoenix {
struct result;
template <typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: range_difference<R>
{};
@@ -314,12 +314,12 @@ namespace boost { namespace phoenix {
struct result;
template <typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: range_iterator<R>
{};
template <typename This, class R, class T, class C>
- struct result<This(R&, T const&, C)>
+ struct result<This(R&, T&, C)>
: range_iterator<R>
{};
@@ -358,12 +358,12 @@ namespace boost { namespace phoenix {
struct result;
template <typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: range_iterator<R>
{};
template <typename This, class R, class T, class C>
- struct result<This(R&, T const&, C)>
+ struct result<This(R&, T&, C)>
: range_iterator<R>
{};
@@ -414,12 +414,12 @@ namespace boost { namespace phoenix {
struct result;
template <typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: result_of::equal_range<R,T>
{};
template <typename This, class R, class T, class C>
- struct result<This(R&, T const&, C)>
+ struct result<This(R&, T&, C)>
: result_of::equal_range<R,T, C>
{};
diff --git a/boost/phoenix/stl/algorithm/transformation.hpp b/boost/phoenix/stl/algorithm/transformation.hpp
index ee232327d2..37fd967af1 100644
--- a/boost/phoenix/stl/algorithm/transformation.hpp
+++ b/boost/phoenix/stl/algorithm/transformation.hpp
@@ -158,7 +158,7 @@ namespace boost { namespace phoenix { namespace impl
struct result;
template<typename This, class R, class O, class T, class T2>
- struct result<This(R&, O, T const&, T2 const&)>
+ struct result<This(R&, O, T&, T2&)>
: detail::decay_array<O>
{};
@@ -176,7 +176,7 @@ namespace boost { namespace phoenix { namespace impl
struct result;
template<typename This, class R, class O, class P, class T>
- struct result<This(R&, O, P, T const&)>
+ struct result<This(R&, O, P, T&)>
: detail::decay_array<O>
{};
@@ -238,7 +238,7 @@ namespace boost { namespace phoenix { namespace impl
struct result;
template<typename This, class R, class T>
- struct result<This(R&, T const&)>
+ struct result<This(R&, T&)>
: range_iterator<R>
{
};
diff --git a/boost/phoenix/stl/cmath.hpp b/boost/phoenix/stl/cmath.hpp
index 7db25c493c..c68a57a94a 100644
--- a/boost/phoenix/stl/cmath.hpp
+++ b/boost/phoenix/stl/cmath.hpp
@@ -11,37 +11,23 @@
#include <boost/phoenix/core/limits.hpp>
#include <cmath>
#include <boost/phoenix/function/adapt_callable.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/phoenix/support/iterate.hpp>
namespace boost {
#if (defined (BOOST_NO_CXX11_DECLTYPE) || \
defined (BOOST_INTEL_CXX_VERSION) || \
(BOOST_GCC_VERSION < 40500) )
-#define BOOST_PHOENIX_MATH_FUNCTION(name, n) \
- namespace phoenix_impl { \
- struct name ## _impl { \
- template<class Sig> \
- struct result; \
- template<class This, BOOST_PHOENIX_typename_A(n)> \
- struct result<This(BOOST_PHOENIX_A(n))> \
- { \
- typedef \
- typename proto::detail::uncvref<A0>::type \
- type; \
- }; \
- template<BOOST_PHOENIX_typename_A(n)> \
- A0 operator()(BOOST_PHOENIX_A_const_ref_a(n)) const { \
- using namespace std; \
- return name(BOOST_PHOENIX_a(n)); \
- } \
- }; \
- } \
- namespace phoenix { \
- BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \
- }
+#define BOOST_PHOENIX_MATH_FUNCTION_RESULT_TYPE(name, n) \
+ typename proto::detail::uncvref<A0>::type
#else
+#define BOOST_PHOENIX_MATH_FUNCTION_RESULT_TYPE(name, n) \
+ decltype(name(BOOST_PP_ENUM_BINARY_PARAMS( \
+ n \
+ , boost::declval<typename proto::detail::uncvref<A \
+ , >::type>() BOOST_PP_INTERCEPT)))
+#endif
#define BOOST_PHOENIX_MATH_FUNCTION(name, n) \
namespace phoenix_impl { \
struct name ## _impl { \
@@ -51,11 +37,12 @@ namespace boost {
struct result<This(BOOST_PHOENIX_A(n))> \
{ \
typedef \
- decltype( name(typename proto::detail::uncvref<A0>::type()) ) \
+ BOOST_PHOENIX_MATH_FUNCTION_RESULT_TYPE(name, n) \
type; \
}; \
template<BOOST_PHOENIX_typename_A(n)> \
- auto operator()(BOOST_PHOENIX_A_const_ref_a(n)) const -> decltype( name(BOOST_PHOENIX_a(n)) ) { \
+ typename result<name ## _impl(BOOST_PHOENIX_A(n))>::type \
+ operator()(BOOST_PHOENIX_A_const_ref_a(n)) const { \
using namespace std; \
return name(BOOST_PHOENIX_a(n)); \
} \
@@ -64,7 +51,6 @@ namespace boost {
namespace phoenix { \
BOOST_PHOENIX_ADAPT_CALLABLE(name, phoenix_impl::name ## _impl, n) \
}
-#endif
BOOST_PHOENIX_MATH_FUNCTION(acos, 1)
BOOST_PHOENIX_MATH_FUNCTION(asin, 1)
diff --git a/boost/phoenix/stl/container/container.hpp b/boost/phoenix/stl/container/container.hpp
index 941d449e0f..f9dbbdb048 100644
--- a/boost/phoenix/stl/container/container.hpp
+++ b/boost/phoenix/stl/container/container.hpp
@@ -94,7 +94,7 @@ namespace boost { namespace phoenix
, typename C
, typename Arg1
>
- struct result<This(C&, Arg1 const &)>
+ struct result<This(C&, Arg1&)>
{
typedef typename add_reference<C>::type type;
};
diff --git a/boost/predef/hardware/simd/x86_amd/versions.h b/boost/predef/hardware/simd/x86_amd/versions.h
index 11157167c6..1f9e96c500 100644
--- a/boost/predef/hardware/simd/x86_amd/versions.h
+++ b/boost/predef/hardware/simd/x86_amd/versions.h
@@ -21,7 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt)
// ---------------------------------
/*`
- [heading `BOOST_HW_SIMD_X86_SSE4A_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
@@ -30,7 +30,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION BOOST_VERSION_NUMBER(4, 0, 0)
/*`
- [heading `BOOST_HW_SIMD_X86_FMA4_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_FMA4_VERSION`]
[@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
@@ -39,7 +39,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_HW_SIMD_X86_AMD_FMA4_VERSION BOOST_VERSION_NUMBER(5, 1, 0)
/*`
- [heading `BOOST_HW_SIMD_X86_XOP_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_XOP_VERSION`]
[@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
diff --git a/boost/python/cast.hpp b/boost/python/cast.hpp
index 31c61dbf82..bad7e28240 100755
--- a/boost/python/cast.hpp
+++ b/boost/python/cast.hpp
@@ -70,7 +70,7 @@ namespace detail
template <class T>
inline void assert_castable(boost::type<T>* = 0)
{
- typedef char must_be_a_complete_type[sizeof(T)];
+ typedef char must_be_a_complete_type[sizeof(T)] BOOST_ATTRIBUTE_UNUSED;
}
template <class Source, class Target>
diff --git a/boost/python/class.hpp b/boost/python/class.hpp
index f43b615ace..70ca6d01b3 100644
--- a/boost/python/class.hpp
+++ b/boost/python/class.hpp
@@ -140,9 +140,9 @@ namespace detail
// https://svn.boost.org/trac/boost/ticket/5803
//typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
- typedef typename assertion<is_polymorphic<T> >::failed test1;
+ typedef typename assertion<is_polymorphic<T> >::failed test1 BOOST_ATTRIBUTE_UNUSED;
# endif
- typedef typename assertion<is_member_function_pointer<Fn> >::failed test2;
+ typedef typename assertion<is_member_function_pointer<Fn> >::failed test2 BOOST_ATTRIBUTE_UNUSED;
not_a_derived_class_member<Default>(Fn());
}
};
diff --git a/boost/python/def.hpp b/boost/python/def.hpp
index 76829b0855..fe2c65f938 100644
--- a/boost/python/def.hpp
+++ b/boost/python/def.hpp
@@ -37,7 +37,7 @@ namespace detail
// Must not try to use default implementations except with method definitions.
typedef typename error::multiple_functions_passed_to_def<
Helper::has_default_implementation
- >::type assertion;
+ >::type assertion BOOST_ATTRIBUTE_UNUSED;
detail::scope_setattr_doc(
name, boost::python::make_function(
diff --git a/boost/python/detail/config.hpp b/boost/python/detail/config.hpp
index 1857d39a40..11c16308fb 100644
--- a/boost/python/detail/config.hpp
+++ b/boost/python/detail/config.hpp
@@ -135,4 +135,8 @@
#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
#endif
+#if !defined(BOOST_ATTRIBUTE_UNUSED) && defined(__GNUC__) && (__GNUC__ >= 4)
+# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+
#endif // CONFIG_DWA052200_H_
diff --git a/boost/python/detail/defaults_gen.hpp b/boost/python/detail/defaults_gen.hpp
index 0b3e0e2604..88beeedb02 100644
--- a/boost/python/detail/defaults_gen.hpp
+++ b/boost/python/detail/defaults_gen.hpp
@@ -213,7 +213,7 @@ namespace detail
{ \
typedef typename ::boost::python::detail:: \
error::more_keywords_than_function_arguments< \
- N,n_args>::too_many_keywords assertion; \
+ N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
} \
template <std::size_t N> \
fstubs_name(::boost::python::detail::keywords<N> const& keywords, char const* doc = 0) \
@@ -222,7 +222,7 @@ namespace detail
{ \
typedef typename ::boost::python::detail:: \
error::more_keywords_than_function_arguments< \
- N,n_args>::too_many_keywords assertion; \
+ N,n_args>::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED; \
}
# if defined(BOOST_NO_VOID_RETURNS)
diff --git a/boost/python/init.hpp b/boost/python/init.hpp
index b82ab01e15..792de58e80 100644
--- a/boost/python/init.hpp
+++ b/boost/python/init.hpp
@@ -68,7 +68,7 @@ namespace detail
template <int keywords, int init_args>
struct more_keywords_than_init_arguments
{
- typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1];
+ typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1] BOOST_ATTRIBUTE_UNUSED;
};
}
@@ -224,7 +224,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
{
typedef typename detail::error::more_keywords_than_init_arguments<
N, n_arguments::value + 1
- >::too_many_keywords assertion;
+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
}
template <std::size_t N>
@@ -233,7 +233,7 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
{
typedef typename detail::error::more_keywords_than_init_arguments<
N, n_arguments::value + 1
- >::too_many_keywords assertion;
+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
}
template <class CallPoliciesT>
diff --git a/boost/python/make_constructor.hpp b/boost/python/make_constructor.hpp
index 47cdf469c7..093703bb84 100644
--- a/boost/python/make_constructor.hpp
+++ b/boost/python/make_constructor.hpp
@@ -174,7 +174,7 @@ namespace detail
typedef typename detail::error::more_keywords_than_function_arguments<
NumKeywords::value, arity
- >::too_many_keywords assertion;
+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
typedef typename outer_constructor_signature<Sig>::type outer_signature;
diff --git a/boost/python/make_function.hpp b/boost/python/make_function.hpp
index f2f2a9e545..7dd7c316b3 100644
--- a/boost/python/make_function.hpp
+++ b/boost/python/make_function.hpp
@@ -55,7 +55,7 @@ namespace detail
typedef typename detail::error::more_keywords_than_function_arguments<
NumKeywords::value, arity
- >::too_many_keywords assertion;
+ >::too_many_keywords assertion BOOST_ATTRIBUTE_UNUSED;
return objects::function_object(
detail::caller<F,CallPolicies,Sig>(f, p)
diff --git a/boost/python/object/pickle_support.hpp b/boost/python/object/pickle_support.hpp
index cbdbcbb9d6..aa96d655ee 100644
--- a/boost/python/object/pickle_support.hpp
+++ b/boost/python/object/pickle_support.hpp
@@ -107,7 +107,7 @@ namespace detail {
{
typedef typename
error_messages::missing_pickle_suite_function_or_incorrect_signature<
- Class_>::error_type error_type;
+ Class_>::error_type error_type BOOST_ATTRIBUTE_UNUSED;
}
};
diff --git a/boost/python/signature.hpp b/boost/python/signature.hpp
index f1143e3abe..de4c512614 100644
--- a/boost/python/signature.hpp
+++ b/boost/python/signature.hpp
@@ -111,6 +111,7 @@ struct most_derived
// 'default' calling convention
# define BOOST_PYTHON_FN_CC
+# define BOOST_PYTHON_FN_CC_IS_DEFAULT
# define BOOST_PP_ITERATION_PARAMS_1 \
(3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
@@ -118,6 +119,7 @@ struct most_derived
# include BOOST_PP_ITERATE()
# undef BOOST_PYTHON_FN_CC
+# undef BOOST_PYTHON_FN_CC_IS_DEFAULT
// __cdecl calling convention
@@ -141,6 +143,7 @@ struct most_derived
# if defined(BOOST_PYTHON_ENABLE_STDCALL)
# define BOOST_PYTHON_FN_CC __stdcall
+# define BOOST_PYTHON_FN_CC_IS_STDCALL
# define BOOST_PP_ITERATION_PARAMS_1 \
(3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
@@ -148,6 +151,7 @@ struct most_derived
# include BOOST_PP_ITERATE()
# undef BOOST_PYTHON_FN_CC
+# undef BOOST_PYTHON_FN_CC_IS_STDCALL
# endif // defined(BOOST_PYTHON_ENABLE_STDCALL)
@@ -156,12 +160,14 @@ struct most_derived
# if defined(BOOST_PYTHON_ENABLE_FASTCALL)
# define BOOST_PYTHON_FN_CC __fastcall
+# define BOOST_PYTHON_FN_CC_IS_FASTCALL
# define BOOST_PP_ITERATION_PARAMS_1 \
(3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
# include BOOST_PP_ITERATE()
+# undef BOOST_PYTHON_FN_CC_IS_FASTCALL
# undef BOOST_PYTHON_FN_CC
# endif // defined(BOOST_PYTHON_ENABLE_FASTCALL)
@@ -184,8 +190,8 @@ struct most_derived
// as 'get_signature(RT(*)(T0...TN), void* = 0)' is the same
// function as 'get_signature(RT(__cdecl *)(T0...TN), void* = 0)',
- // we don't define it twice
-# if !defined(BOOST_PYTHON_FN_CC_IS_CDECL)
+ // we don't define it multiple times (i.e. for __cdecl, __stdcall ...)
+# if defined(BOOST_PYTHON_FN_CC_IS_DEFAULT)
template <
class RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
@@ -198,7 +204,7 @@ get_signature(RT(BOOST_PYTHON_FN_CC *)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* =
>();
}
-# endif // !defined(BOOST_PYTHON_FN_CC_IS_CDECL)
+# endif // BOOST_PYTHON_FN_CC_IS_DEFAULT
# undef N
@@ -206,11 +212,13 @@ get_signature(RT(BOOST_PYTHON_FN_CC *)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* =
(3, (0, 3, <boost/python/signature.hpp>))
# include BOOST_PP_ITERATE()
-#else
+#else // BOOST_PP_ITERATION_DEPTH() != 1
# define N BOOST_PP_RELATIVE_ITERATION(1)
# define Q BOOST_PYTHON_CV_QUALIFIER(BOOST_PP_ITERATION())
+# if defined(BOOST_PYTHON_FN_CC_IS_DEFAULT)
+
template <
class RT, class ClassT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))<
@@ -245,6 +253,8 @@ get_signature(
>();
}
+# endif // BOOST_PYTHON_FN_CC_IS_DEFAULT
+
# undef Q
# undef N
diff --git a/boost/python/slice.hpp b/boost/python/slice.hpp
index 19f316a1e7..80660fab77 100644
--- a/boost/python/slice.hpp
+++ b/boost/python/slice.hpp
@@ -119,7 +119,7 @@ class slice : public detail::slice_base
slice::range<RandomAccessIterator> ret;
typedef typename iterator_difference<RandomAccessIterator>::type difference_type;
- difference_type max_dist = boost::detail::distance(begin, end);
+ difference_type max_dist = std::distance(begin, end);
object slice_start = this->start();
object slice_stop = this->stop();
@@ -212,7 +212,7 @@ class slice : public detail::slice_base
// (inclusive), and final_dist is the maximum distance covered by the
// slice.
typename iterator_difference<RandomAccessIterator>::type final_dist =
- boost::detail::distance( ret.start, ret.stop);
+ std::distance( ret.start, ret.stop);
// First case, if both ret.start and ret.stop are equal, then step
// is irrelevant and we can return here.
diff --git a/boost/qvm/all.hpp b/boost/qvm/all.hpp
new file mode 100644
index 0000000000..b52a3339ba
--- /dev/null
+++ b/boost/qvm/all.hpp
@@ -0,0 +1,31 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_BE94EA1A31B211E0BBF943CFDFD72085
+#define UUID_BE94EA1A31B211E0BBF943CFDFD72085
+
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/mat_operations.hpp>
+#include <boost/qvm/mat_access.hpp>
+#include <boost/qvm/mat_index.hpp>
+#include <boost/qvm/mat_traits_array.hpp>
+#include <boost/qvm/map.hpp>
+#include <boost/qvm/mat.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/quat_operations.hpp>
+#include <boost/qvm/quat_access.hpp>
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/quat.hpp>
+#include <boost/qvm/quat_vec_operations.hpp>
+#include <boost/qvm/swizzle.hpp>
+#include <boost/qvm/vec_operations.hpp>
+#include <boost/qvm/vec_access.hpp>
+#include <boost/qvm/vec_index.hpp>
+#include <boost/qvm/vec_traits_array.hpp>
+#include <boost/qvm/vec.hpp>
+#include <boost/qvm/vec_mat_operations.hpp>
+#include <boost/qvm/to_string.hpp>
+
+#endif
diff --git a/boost/qvm/assert.hpp b/boost/qvm/assert.hpp
new file mode 100644
index 0000000000..ef7826fbeb
--- /dev/null
+++ b/boost/qvm/assert.hpp
@@ -0,0 +1,9 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_ASSERT
+#include <boost/assert.hpp>
+#define BOOST_QVM_ASSERT BOOST_ASSERT
+#endif
diff --git a/boost/qvm/deduce_mat.hpp b/boost/qvm/deduce_mat.hpp
new file mode 100644
index 0000000000..e2fb7a2127
--- /dev/null
+++ b/boost/qvm/deduce_mat.hpp
@@ -0,0 +1,90 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_C5DC682E196211E0A4C1686BDFD72085
+#define UUID_C5DC682E196211E0A4C1686BDFD72085
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int Rows,int Cols>
+ struct mat;
+
+ namespace
+ qvm_detail
+ {
+ template <class M,int R,int C,
+ int MR=mat_traits<M>::rows,
+ int MC=mat_traits<M>::cols>
+ struct
+ deduce_mat_default
+ {
+ BOOST_QVM_STATIC_ASSERT(is_mat<M>::value);
+ typedef mat<typename mat_traits<M>::scalar_type,R,C> type;
+ };
+
+ template <class M,int R,int C>
+ struct
+ deduce_mat_default<M,R,C,R,C>
+ {
+ BOOST_QVM_STATIC_ASSERT(is_mat<M>::value);
+ typedef M type;
+ };
+ }
+
+ template <class Type,int Rows=mat_traits<Type>::rows,int Cols=mat_traits<Type>::cols>
+ struct
+ deduce_mat
+ {
+ BOOST_QVM_STATIC_ASSERT(is_mat<Type>::value);
+ typedef typename qvm_detail::deduce_mat_default<Type,Rows,Cols>::type type;
+ };
+
+ namespace
+ qvm_detail
+ {
+ template <class A,class B,int R,int C,
+ bool VA=is_mat<A>::value,
+ bool VB=is_mat<B>::value,
+ int AR=mat_traits<A>::rows,
+ int AC=mat_traits<A>::cols,
+ int BR=mat_traits<B>::rows,
+ int BC=mat_traits<B>::cols>
+ struct
+ deduce_m2_default
+ {
+ typedef mat<
+ typename deduce_scalar<
+ typename scalar<A>::type,
+ typename scalar<B>::type>::type,
+ R,C> type;
+ };
+
+ template <class M,int R,int C>
+ struct
+ deduce_m2_default<M,M,R,C,true,true,R,C,R,C>
+ {
+ typedef M type;
+ };
+ }
+
+ template <class A,class B,int R,int C>
+ struct
+ deduce_mat2
+ {
+ BOOST_QVM_STATIC_ASSERT(is_mat<A>::value || is_mat<B>::value);
+ typedef typename qvm_detail::deduce_m2_default<A,B,R,C>::type type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/deduce_quat.hpp b/boost/qvm/deduce_quat.hpp
new file mode 100644
index 0000000000..6235f1f517
--- /dev/null
+++ b/boost/qvm/deduce_quat.hpp
@@ -0,0 +1,63 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_435FA7E8196311E0A176DE6BDFD72085
+#define UUID_435FA7E8196311E0A176DE6BDFD72085
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T>
+ struct quat;
+
+ template <class Q>
+ struct
+ deduce_quat
+ {
+ BOOST_QVM_STATIC_ASSERT(is_quat<Q>::value);
+ typedef Q type;
+ };
+
+ namespace
+ qvm_detail
+ {
+ template <class A,class B,
+ bool QA=is_quat<A>::value,
+ bool QB=is_quat<B>::value>
+ struct
+ deduce_quat2_default
+ {
+ typedef quat<
+ typename deduce_scalar<
+ typename scalar<A>::type,
+ typename scalar<B>::type>::type> type;
+ };
+
+ template <class Q>
+ struct
+ deduce_quat2_default<Q,Q,true,true>
+ {
+ typedef Q type;
+ };
+ }
+
+ template <class A,class B>
+ struct
+ deduce_quat2
+ {
+ BOOST_QVM_STATIC_ASSERT(is_quat<A>::value || is_quat<B>::value);
+ typedef typename qvm_detail::deduce_quat2_default<A,B>::type type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/deduce_scalar.hpp b/boost/qvm/deduce_scalar.hpp
new file mode 100644
index 0000000000..010af34043
--- /dev/null
+++ b/boost/qvm/deduce_scalar.hpp
@@ -0,0 +1,131 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_F20566FC196311E0B99D606CDFD72085
+#define UUID_F20566FC196311E0B99D606CDFD72085
+
+#include <boost/qvm/scalar_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ deduce_scalar_detail
+ {
+ template <class A,class B> struct deduce_scalar_impl { };
+
+ template <class T>
+ struct
+ deduce_scalar_impl<T,T>
+ {
+ typedef T type;
+ };
+
+ template <> struct deduce_scalar_impl<signed char,unsigned char> { typedef unsigned char type; };
+ template <> struct deduce_scalar_impl<signed char,unsigned short> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<signed char,unsigned int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<signed char,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed char,signed short> { typedef signed short type; };
+ template <> struct deduce_scalar_impl<signed char,signed int> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed char,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<signed char,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<signed char,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned char,unsigned short> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<unsigned char,unsigned int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned char,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<unsigned char,signed short> { typedef signed short type; };
+ template <> struct deduce_scalar_impl<unsigned char,signed int> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<unsigned char,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<unsigned char,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<unsigned char,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<signed short,unsigned short> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<signed short,unsigned int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<signed short,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed short,signed int> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed short,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<signed short,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<signed short,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned short,unsigned int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned short,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<unsigned short,signed int> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<unsigned short,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<unsigned short,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<unsigned short,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<signed int,unsigned int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<signed int,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed int,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<signed int,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<signed int,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned int,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<unsigned int,signed long> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<unsigned int,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<unsigned int,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<signed long,unsigned long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed long,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<signed long,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned long,float> { typedef float type; };
+ template <> struct deduce_scalar_impl<unsigned long,double> { typedef double type; };
+ template <> struct deduce_scalar_impl<float,double> { typedef double type; };
+
+ template <> struct deduce_scalar_impl<unsigned char,signed char> { typedef unsigned char type; };
+ template <> struct deduce_scalar_impl<unsigned short,signed char> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<unsigned int,signed char> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned long,signed char> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed short,signed char> { typedef signed short type; };
+ template <> struct deduce_scalar_impl<signed int,signed char> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed long,signed char> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,signed char> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,signed char> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned short,unsigned char> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<unsigned int,unsigned char> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned long,unsigned char> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed short,unsigned char> { typedef signed short type; };
+ template <> struct deduce_scalar_impl<signed int,unsigned char> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed long,unsigned char> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,unsigned char> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,unsigned char> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned short,signed short> { typedef unsigned short type; };
+ template <> struct deduce_scalar_impl<unsigned int,signed short> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned long,signed short> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed int,signed short> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed long,signed short> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,signed short> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,signed short> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned int,unsigned short> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned long,unsigned short> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed int,unsigned short> { typedef signed int type; };
+ template <> struct deduce_scalar_impl<signed long,unsigned short> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,unsigned short> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,unsigned short> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned int,signed int> { typedef unsigned int type; };
+ template <> struct deduce_scalar_impl<unsigned long,signed int> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed long,signed int> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,signed int> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,signed int> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned long,unsigned int> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<signed long,unsigned int> { typedef signed long type; };
+ template <> struct deduce_scalar_impl<float,unsigned int> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,unsigned int> { typedef double type; };
+ template <> struct deduce_scalar_impl<unsigned long,signed long> { typedef unsigned long type; };
+ template <> struct deduce_scalar_impl<float,signed long> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,signed long> { typedef double type; };
+ template <> struct deduce_scalar_impl<float,unsigned long> { typedef float type; };
+ template <> struct deduce_scalar_impl<double,unsigned long> { typedef double type; };
+ template <> struct deduce_scalar_impl<double,float> { typedef double type; };
+ }
+
+ template <class A,class B>
+ struct
+ deduce_scalar
+ {
+ typedef typename deduce_scalar_detail::deduce_scalar_impl<A,B>::type type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/deduce_vec.hpp b/boost/qvm/deduce_vec.hpp
new file mode 100644
index 0000000000..e15cf0eec3
--- /dev/null
+++ b/boost/qvm/deduce_vec.hpp
@@ -0,0 +1,85 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_7E7AB138196311E0907B246CDFD72085
+#define UUID_7E7AB138196311E0907B246CDFD72085
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/vec_traits.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int D>
+ struct vec;
+
+ namespace
+ qvm_detail
+ {
+ template <class V,int D,
+ int VD=vec_traits<V>::dim>
+ struct
+ deduce_vec_default
+ {
+ typedef vec<typename vec_traits<V>::scalar_type,D> type;
+ };
+
+ template <class V,int D>
+ struct
+ deduce_vec_default<V,D,D>
+ {
+ typedef V type;
+ };
+ }
+
+ template <class V,int Dim=vec_traits<V>::dim>
+ struct
+ deduce_vec
+ {
+ BOOST_QVM_STATIC_ASSERT(is_vec<V>::value);
+ typedef typename qvm_detail::deduce_vec_default<V,Dim>::type type;
+ };
+
+ namespace
+ qvm_detail
+ {
+ template <class A,class B,int D,
+ bool VA=is_vec<A>::value,
+ bool VB=is_vec<B>::value,
+ int AD=vec_traits<A>::dim,
+ int BD=vec_traits<B>::dim>
+ struct
+ deduce_v2_default
+ {
+ typedef vec<
+ typename deduce_scalar<
+ typename scalar<A>::type,
+ typename scalar<B>::type>::type,
+ D> type;
+ };
+
+ template <class V,int D>
+ struct
+ deduce_v2_default<V,V,D,true,true,D,D>
+ {
+ typedef V type;
+ };
+ }
+
+ template <class A,class B,int D>
+ struct
+ deduce_vec2
+ {
+ BOOST_QVM_STATIC_ASSERT(is_vec<A>::value || is_vec<B>::value);
+ typedef typename qvm_detail::deduce_v2_default<A,B,D>::type type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/detail/cofactor_impl.hpp b/boost/qvm/detail/cofactor_impl.hpp
new file mode 100644
index 0000000000..b4ccd5b2f7
--- /dev/null
+++ b/boost/qvm/detail/cofactor_impl.hpp
@@ -0,0 +1,64 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_995547FAAE0E11DE8CF511E755D89593
+#define UUID_995547FAAE0E11DE8CF511E755D89593
+
+#include <boost/qvm/detail/determinant_impl.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename deduce_mat<A>::type
+ cofactor_impl( A const & a )
+ {
+ BOOST_QVM_STATIC_ASSERT(mat_traits<A>::rows==mat_traits<A>::cols);
+ int const N=mat_traits<A>::rows;
+ typedef typename mat_traits<A>::scalar_type T;
+ T c[N-1][N-1];
+ typedef typename deduce_mat<A>::type R;
+ R b;
+ for( int j=0; j!=N; ++j )
+ {
+ for( int i=0; i!=N; ++i )
+ {
+ int i1=0;
+ for( int ii=0; ii!=N; ++ii )
+ {
+ if( ii==i )
+ continue;
+ int j1=0;
+ for( int jj=0; jj!=N; ++jj )
+ {
+ if( jj==j )
+ continue;
+ c[i1][j1] = mat_traits<A>::read_element_idx(ii,jj,a);
+ ++j1;
+ }
+ ++i1;
+ }
+ T det = determinant_impl(c);
+ if( (i+j)&1 )
+ det=-det;
+ mat_traits<R>::write_element_idx(i,j,b) = det;
+ }
+ }
+ return b;
+ }
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/detail/determinant_impl.hpp b/boost/qvm/detail/determinant_impl.hpp
new file mode 100644
index 0000000000..6886c4ee83
--- /dev/null
+++ b/boost/qvm/detail/determinant_impl.hpp
@@ -0,0 +1,79 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_3DCF6B90AE0E11DE9A315BE555D89593
+#define UUID_3DCF6B90AE0E11DE9A315BE555D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits_array.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ template <int N>
+ struct
+ det_size
+ {
+ };
+
+ template <class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename mat_traits<M>::scalar_type
+ determinant_impl_( M const & a, det_size<2> )
+ {
+ return
+ mat_traits<M>::template read_element<0,0>(a) * mat_traits<M>::template read_element<1,1>(a) -
+ mat_traits<M>::template read_element<1,0>(a) * mat_traits<M>::template read_element<0,1>(a);
+ }
+
+ template <class M,int N>
+ BOOST_QVM_INLINE_RECURSION
+ typename mat_traits<M>::scalar_type
+ determinant_impl_( M const & a, det_size<N> )
+ {
+ typedef typename mat_traits<M>::scalar_type T;
+ T m[N-1][N-1];
+ T det=T(0);
+ for( int j1=0; j1!=N; ++j1 )
+ {
+ for( int i=1; i!=N; ++i )
+ {
+ int j2 = 0;
+ for( int j=0; j!=N; ++j )
+ {
+ if( j==j1 )
+ continue;
+ m[i-1][j2] = mat_traits<M>::read_element_idx(i,j,a);
+ ++j2;
+ }
+ }
+ T d=determinant_impl_(m,det_size<N-1>());
+ if( j1&1 )
+ d=-d;
+ det += mat_traits<M>::read_element_idx(0,j1,a) * d;
+ }
+ return det;
+ }
+
+ template <class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename mat_traits<M>::scalar_type
+ determinant_impl( M const & a )
+ {
+ BOOST_QVM_STATIC_ASSERT(mat_traits<M>::rows==mat_traits<M>::cols);
+ return determinant_impl_(a,det_size<mat_traits<M>::rows>());
+ }
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/detail/remove_const.hpp b/boost/qvm/detail/remove_const.hpp
new file mode 100644
index 0000000000..82f1d1cef5
--- /dev/null
+++ b/boost/qvm/detail/remove_const.hpp
@@ -0,0 +1,35 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_4E340430AE4C11DEBA56149755D89593
+#define UUID_4E340430AE4C11DEBA56149755D89593
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ struct
+ remove_const
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct
+ remove_const<T const>
+ {
+ typedef T type;
+ };
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/detail/swizzle_traits.hpp b/boost/qvm/detail/swizzle_traits.hpp
new file mode 100644
index 0000000000..4b304fa68c
--- /dev/null
+++ b/boost/qvm/detail/swizzle_traits.hpp
@@ -0,0 +1,265 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_E831FAD6B38F11DE8CECBF0D56D89593
+#define UUID_E831FAD6B38F11DE8CECBF0D56D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ BOOST_QVM_INLINE_CRITICAL
+ void const *
+ get_null()
+ {
+ static int const obj=0;
+ return &obj;
+ }
+
+ template <int A,class Next=void> struct swizzle_idx { static int const value=A; typedef Next next; };
+
+ template <class V,int Idx>
+ struct
+ const_value
+ {
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename vec_traits<V>::scalar_type
+ value()
+ {
+ BOOST_QVM_ASSERT(0);
+ return typename vec_traits<V>::scalar_type();
+ }
+ };
+
+ template <class V>
+ struct
+ const_value<V,-1>
+ {
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename vec_traits<V>::scalar_type
+ value()
+ {
+ return scalar_traits<typename vec_traits<V>::scalar_type>::value(0);
+ }
+ };
+
+ template <class V>
+ struct
+ const_value<V,-2>
+ {
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename vec_traits<V>::scalar_type
+ value()
+ {
+ return scalar_traits<typename vec_traits<V>::scalar_type>::value(1);
+ }
+ };
+
+ template <int Index,bool Neg=(Index<0)>
+ struct neg_zero;
+
+ template <int Index>
+ struct
+ neg_zero<Index,true>
+ {
+ static int const value=0;
+ };
+
+ template <int Index>
+ struct
+ neg_zero<Index,false>
+ {
+ static int const value=Index;
+ };
+
+ template <class SwizzleList,int Index,int C=0>
+ struct
+ swizzle
+ {
+ static int const value=swizzle<typename SwizzleList::next,Index,C+1>::value;
+ };
+
+ template <class SwizzleList,int Match>
+ struct
+ swizzle<SwizzleList,Match,Match>
+ {
+ static int const value=SwizzleList::value;
+ };
+
+ template <int Index,int C>
+ struct swizzle<void,Index,C>;
+
+ template <class SwizzleList,int C=0>
+ struct
+ swizzle_list_length
+ {
+ static int const value=swizzle_list_length<typename SwizzleList::next,C+1>::value;
+ };
+
+ template <int C>
+ struct
+ swizzle_list_length<void,C>
+ {
+ static int const value=C;
+ };
+
+ template <class SwizzleList,int D>
+ struct
+ validate_swizzle_list
+ {
+ static bool const value =
+ ((SwizzleList::value)<D) && //don't touch extra (), MSVC parsing bug.
+ validate_swizzle_list<typename SwizzleList::next,D>::value;
+ };
+
+ template <int D>
+ struct
+ validate_swizzle_list<void,D>
+ {
+ static bool const value=true;
+ };
+
+ template <class OriginalType,class SwizzleList>
+ class
+ sw_
+ {
+ sw_( sw_ const & );
+ sw_ & operator=( sw_ const & );
+ ~sw_();
+
+ BOOST_QVM_STATIC_ASSERT((validate_swizzle_list<SwizzleList,vec_traits<OriginalType>::dim>::value));
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ sw_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <class SwizzleList>
+ class
+ sw01_
+ {
+ sw01_( sw01_ const & );
+ sw01_ & operator=( sw01_ const & );
+ ~sw01_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalVector,class SwizzleList>
+ struct
+ vec_traits<qvm_detail::sw_<OriginalVector,SwizzleList> >
+ {
+ typedef qvm_detail::sw_<OriginalVector,SwizzleList> this_vector;
+ typedef typename vec_traits<OriginalVector>::scalar_type scalar_type;
+ static int const dim=qvm_detail::swizzle_list_length<SwizzleList>::value;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ int const idx=qvm_detail::swizzle<SwizzleList,I>::value;
+ BOOST_QVM_STATIC_ASSERT(idx<vec_traits<OriginalVector>::dim);
+ return idx>=0?
+ vec_traits<OriginalVector>::template read_element<qvm_detail::neg_zero<idx>::value>(reinterpret_cast<OriginalVector const &>(x)) :
+ qvm_detail::const_value<this_vector,idx>::value();
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ int const idx=qvm_detail::swizzle<SwizzleList,I>::value;
+ BOOST_QVM_STATIC_ASSERT(idx>=0);
+ BOOST_QVM_STATIC_ASSERT(idx<vec_traits<OriginalVector>::dim);
+ return vec_traits<OriginalVector>::template write_element<idx>(reinterpret_cast<OriginalVector &>(x));
+ }
+ };
+
+ template <class SwizzleList>
+ struct
+ vec_traits<qvm_detail::sw01_<SwizzleList> >
+ {
+ typedef qvm_detail::sw01_<SwizzleList> this_vector;
+ typedef int scalar_type;
+ static int const dim=qvm_detail::swizzle_list_length<SwizzleList>::value;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ int const idx=qvm_detail::swizzle<SwizzleList,I>::value;
+ BOOST_QVM_STATIC_ASSERT(idx<0);
+ return qvm_detail::const_value<this_vector,idx>::value();
+ }
+ };
+
+ template <class OriginalVector,class SwizzleList,int D>
+ struct
+ deduce_vec<qvm_detail::sw_<OriginalVector,SwizzleList>,D>
+ {
+ typedef vec<typename vec_traits<OriginalVector>::scalar_type,D> type;
+ };
+
+ template <class OriginalVector,class SwizzleList,int D>
+ struct
+ deduce_vec2<qvm_detail::sw_<OriginalVector,SwizzleList>,qvm_detail::sw_<OriginalVector,SwizzleList>,D>
+ {
+ typedef vec<typename vec_traits<OriginalVector>::scalar_type,D> type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/detail/transp_impl.hpp b/boost/qvm/detail/transp_impl.hpp
new file mode 100644
index 0000000000..8ead1da9fc
--- /dev/null
+++ b/boost/qvm/detail/transp_impl.hpp
@@ -0,0 +1,128 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_B3B8081A277711E09E007F2DDFD72085
+#define UUID_B3B8081A277711E09E007F2DDFD72085
+
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ template <class OriginalMatrix>
+ class
+ transposed_
+ {
+ transposed_( transposed_ const & );
+ transposed_ & operator=( transposed_ const & );
+ ~transposed_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ transposed_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::transposed_<OriginalMatrix> >
+ {
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ typedef qvm_detail::transposed_<OriginalMatrix> this_matrix;
+ static int const rows=mat_traits<OriginalMatrix>::cols;
+ static int const cols=mat_traits<OriginalMatrix>::rows;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<Col,Row>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<Col,Row>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(col,row,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(col,row,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::transposed_<OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::transposed_<OriginalMatrix>,qvm_detail::transposed_<OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/enable_if.hpp b/boost/qvm/enable_if.hpp
new file mode 100644
index 0000000000..3ce0b4f9ea
--- /dev/null
+++ b/boost/qvm/enable_if.hpp
@@ -0,0 +1,24 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_A4FA0794391911DF85A6622B56D89593
+#define UUID_A4FA0794391911DF85A6622B56D89593
+
+#include <boost/utility/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ using boost::enable_if;
+ using boost::enable_if_c;
+ using boost::lazy_enable_if;
+ using boost::lazy_enable_if_c;
+ }
+ }
+
+#endif
diff --git a/boost/qvm/error.hpp b/boost/qvm/error.hpp
new file mode 100644
index 0000000000..cf0ebe6afd
--- /dev/null
+++ b/boost/qvm/error.hpp
@@ -0,0 +1,40 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_92B1247AAE1111DE9655F2FC55D89593
+#define UUID_92B1247AAE1111DE9655F2FC55D89593
+
+#include "boost/exception/exception.hpp"
+#include "boost/exception/error_info.hpp"
+#include <exception>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ struct
+ error:
+ virtual boost::exception,
+ virtual std::exception
+ {
+ char const *
+ what() const throw()
+ {
+ return "Boost QVM error";
+ }
+
+ ~error() throw()
+ {
+ }
+ };
+
+ struct zero_determinant_error: virtual error { };
+ struct zero_magnitude_error: virtual error { };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/mat_operations2.hpp b/boost/qvm/gen/mat_operations2.hpp
new file mode 100644
index 0000000000..105ebde2ea
--- /dev/null
+++ b/boost/qvm/gen/mat_operations2.hpp
@@ -0,0 +1,1649 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_2923BE84E16CD6AE529049F1F1BBE9EB
+#define BOOST_QVM_2923BE84E16CD6AE529049F1F1BBE9EB
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/throw_exception.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,2,2> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,2,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)+mat_traits<B>::template read_element<1,1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,2,1> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,2,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,1,2> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,2,2> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,2,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)-mat_traits<B>::template read_element<1,1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,2,1> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,2,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,1,2> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)+=mat_traits<B>::template read_element<1,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)-=mat_traits<B>::template read_element<1,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ mat_traits<A>::template write_element<1,1>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ mat_traits<A>::template write_element<1,1>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)=mat_traits<B>::template read_element<1,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==2 && mat_traits<A>::rows==2 &&
+ mat_traits<R>::cols==2 && mat_traits<A>::cols==2,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r) = mat_traits<A>::template read_element<1,1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==2 && mat_traits<A>::rows==2 &&
+ mat_traits<R>::cols==1 && mat_traits<A>::cols==1,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==1 && mat_traits<A>::rows==1 &&
+ mat_traits<R>::cols==2 && mat_traits<A>::cols==2,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b) &&
+ mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r)=-mat_traits<A>::template read_element<1,1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==1,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==2,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<1,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2,
+ typename mat_traits<A>::scalar_type>::type
+ determinant( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T det=(a00*a11-a01*a10);
+ return det;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::determinant;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct determinant_defined;
+
+ template <>
+ struct
+ determinant_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ inverse( A const & a, B det )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ BOOST_QVM_ASSERT(det!=scalar_traits<B>::value(0));
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T const f=scalar_traits<T>::value(1)/det;
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)= f*a11;
+ mat_traits<R>::template write_element<0,1>(r)=-f*a01;
+ mat_traits<R>::template write_element<1,0>(r)=-f*a10;
+ mat_traits<R>::template write_element<1,1>(r)= f*a00;
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2,
+ deduce_mat<A> >::type
+ inverse( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T det=determinant(a);
+ if( det==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_determinant_error());
+ return inverse(a,det);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::inverse;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct inverse_m_defined;
+
+ template <>
+ struct
+ inverse_m_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,2,2> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ typedef typename deduce_mat2<A,B,2,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10;
+ mat_traits<R>::template write_element<1,1>(r)=a10*b01+a11*b11;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<2,2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ A &>::type
+ operator*=( A & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<0,0>(a)=a00*b00+a01*b10;
+ mat_traits<A>::template write_element<0,1>(a)=a00*b01+a01*b11;
+ mat_traits<A>::template write_element<1,0>(a)=a10*b00+a11*b10;
+ mat_traits<A>::template write_element<1,1>(a)=a10*b01+a11*b11;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_mm_defined;
+
+ template <>
+ struct
+ mul_eq_mm_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,2,1> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ typedef typename deduce_mat2<A,B,2,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==2);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<2,2,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==2 &&
+ mat_traits<A>::cols==2 && mat_traits<B>::cols==2,
+ deduce_mat2<A,B,1,2> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ typedef typename deduce_mat2<A,B,1,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==2);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<1,2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/mat_operations3.hpp b/boost/qvm/gen/mat_operations3.hpp
new file mode 100644
index 0000000000..1458cf64d9
--- /dev/null
+++ b/boost/qvm/gen/mat_operations3.hpp
@@ -0,0 +1,1838 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_B3A6DB3C87C3E99245ED1C6B747DE
+#define BOOST_QVM_B3A6DB3C87C3E99245ED1C6B747DE
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/scalar_traits.hpp>
+#include <boost/qvm/throw_exception.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,3,3> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,3,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)+mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)+mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)+mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)+mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)+mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)+mat_traits<B>::template read_element<2,2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,3,1> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,3,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)+mat_traits<B>::template read_element<2,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,1,3> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)+mat_traits<B>::template read_element<0,2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,3,3> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,3,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)-mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)-mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)-mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)-mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)-mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)-mat_traits<B>::template read_element<2,2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,3,1> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,3,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)-mat_traits<B>::template read_element<2,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,1,3> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)-mat_traits<B>::template read_element<0,2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)+=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)+=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)+=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<2,0>(a)+=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)+=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)+=mat_traits<B>::template read_element<2,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)+=mat_traits<B>::template read_element<2,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)+=mat_traits<B>::template read_element<0,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)-=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)-=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)-=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<2,0>(a)-=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)-=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)-=mat_traits<B>::template read_element<2,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)-=mat_traits<B>::template read_element<2,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)-=mat_traits<B>::template read_element<0,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)*b;
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)*b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)*b;
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)*b;
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ mat_traits<A>::template write_element<0,2>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ mat_traits<A>::template write_element<1,1>(a)*=b;
+ mat_traits<A>::template write_element<1,2>(a)*=b;
+ mat_traits<A>::template write_element<2,0>(a)*=b;
+ mat_traits<A>::template write_element<2,1>(a)*=b;
+ mat_traits<A>::template write_element<2,2>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ mat_traits<A>::template write_element<2,0>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ mat_traits<A>::template write_element<0,2>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)/b;
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)/b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)/b;
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)/b;
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ mat_traits<A>::template write_element<0,2>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ mat_traits<A>::template write_element<1,1>(a)/=b;
+ mat_traits<A>::template write_element<1,2>(a)/=b;
+ mat_traits<A>::template write_element<2,0>(a)/=b;
+ mat_traits<A>::template write_element<2,1>(a)/=b;
+ mat_traits<A>::template write_element<2,2>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ mat_traits<A>::template write_element<2,0>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ mat_traits<A>::template write_element<0,2>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)=mat_traits<B>::template read_element<2,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==3 && mat_traits<A>::rows==3 &&
+ mat_traits<R>::cols==3 && mat_traits<A>::cols==3,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r) = mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r) = mat_traits<A>::template read_element<1,1>(a);
+ mat_traits<R>::template write_element<1,2>(r) = mat_traits<A>::template read_element<1,2>(a);
+ mat_traits<R>::template write_element<2,0>(r) = mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<2,1>(r) = mat_traits<A>::template read_element<2,1>(a);
+ mat_traits<R>::template write_element<2,2>(r) = mat_traits<A>::template read_element<2,2>(a);
+ return r;
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE
+ typename enable_if_c<
+ is_mat<R>::value && is_quat<A>::value &&
+ mat_traits<R>::rows==3 && mat_traits<R>::cols==3,
+ R>::type
+ convert_to( A const & q )
+ {
+ typedef typename mat_traits<R>::scalar_type T;
+ T const a=quat_traits<A>::template read_element<0>(q);
+ T const b=quat_traits<A>::template read_element<1>(q);
+ T const c=quat_traits<A>::template read_element<2>(q);
+ T const d=quat_traits<A>::template read_element<3>(q);
+ T const bb = b*b;
+ T const cc = c*c;
+ T const dd = d*d;
+ T const bc = b*c;
+ T const bd = b*d;
+ T const cd = c*d;
+ T const ab = a*b;
+ T const ac = a*c;
+ T const ad = a*d;
+ T const one = scalar_traits<T>::value(1);
+ T const two = one+one;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = one - two*(cc+dd);
+ mat_traits<R>::template write_element<0,1>(r) = two*(bc-ad);
+ mat_traits<R>::template write_element<0,2>(r) = two*(bd+ac);
+ mat_traits<R>::template write_element<1,0>(r) = two*(bc+ad);
+ mat_traits<R>::template write_element<1,1>(r) = one - two*(bb+dd);
+ mat_traits<R>::template write_element<1,2>(r) = two*(cd-ab);
+ mat_traits<R>::template write_element<2,0>(r) = two*(bd-ac);
+ mat_traits<R>::template write_element<2,1>(r) = two*(cd+ab);
+ mat_traits<R>::template write_element<2,2>(r) = one - two*(bb+cc);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==3 && mat_traits<A>::rows==3 &&
+ mat_traits<R>::cols==1 && mat_traits<A>::cols==1,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<2,0>(r) = mat_traits<A>::template read_element<2,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==1 && mat_traits<A>::rows==1 &&
+ mat_traits<R>::cols==3 && mat_traits<A>::cols==3,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r) = mat_traits<A>::template read_element<0,2>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b) &&
+ mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b) &&
+ mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b) &&
+ mat_traits<A>::template read_element<1,2>(a)==mat_traits<B>::template read_element<1,2>(b) &&
+ mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b) &&
+ mat_traits<A>::template read_element<2,1>(a)==mat_traits<B>::template read_element<2,1>(b) &&
+ mat_traits<A>::template read_element<2,2>(a)==mat_traits<B>::template read_element<2,2>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b) &&
+ mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b) &&
+ mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b)) ||
+ !(mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b)) ||
+ !(mat_traits<A>::template read_element<1,2>(a)==mat_traits<B>::template read_element<1,2>(b)) ||
+ !(mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b)) ||
+ !(mat_traits<A>::template read_element<2,1>(a)==mat_traits<B>::template read_element<2,1>(b)) ||
+ !(mat_traits<A>::template read_element<2,2>(a)==mat_traits<B>::template read_element<2,2>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b)) ||
+ !(mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b)) ||
+ !(mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r)=-mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r)=-mat_traits<A>::template read_element<1,1>(a);
+ mat_traits<R>::template write_element<1,2>(r)=-mat_traits<A>::template read_element<1,2>(a);
+ mat_traits<R>::template write_element<2,0>(r)=-mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<2,1>(r)=-mat_traits<A>::template read_element<2,1>(a);
+ mat_traits<R>::template write_element<2,2>(r)=-mat_traits<A>::template read_element<2,2>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==1,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<2,0>(r)=-mat_traits<A>::template read_element<2,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==3,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r)=-mat_traits<A>::template read_element<0,2>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<1,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3,
+ typename mat_traits<A>::scalar_type>::type
+ determinant( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a02=mat_traits<A>::template read_element<0,2>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T const a12=mat_traits<A>::template read_element<1,2>(a);
+ T const a20=mat_traits<A>::template read_element<2,0>(a);
+ T const a21=mat_traits<A>::template read_element<2,1>(a);
+ T const a22=mat_traits<A>::template read_element<2,2>(a);
+ T det=(a00*(a11*a22-a12*a21)-a01*(a10*a22-a12*a20)+a02*(a10*a21-a11*a20));
+ return det;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::determinant;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct determinant_defined;
+
+ template <>
+ struct
+ determinant_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ inverse( A const & a, B det )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ BOOST_QVM_ASSERT(det!=scalar_traits<B>::value(0));
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a02=mat_traits<A>::template read_element<0,2>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T const a12=mat_traits<A>::template read_element<1,2>(a);
+ T const a20=mat_traits<A>::template read_element<2,0>(a);
+ T const a21=mat_traits<A>::template read_element<2,1>(a);
+ T const a22=mat_traits<A>::template read_element<2,2>(a);
+ T const f=scalar_traits<T>::value(1)/det;
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)= f*(a11*a22-a12*a21);
+ mat_traits<R>::template write_element<0,1>(r)=-f*(a01*a22-a02*a21);
+ mat_traits<R>::template write_element<0,2>(r)= f*(a01*a12-a02*a11);
+ mat_traits<R>::template write_element<1,0>(r)=-f*(a10*a22-a12*a20);
+ mat_traits<R>::template write_element<1,1>(r)= f*(a00*a22-a02*a20);
+ mat_traits<R>::template write_element<1,2>(r)=-f*(a00*a12-a02*a10);
+ mat_traits<R>::template write_element<2,0>(r)= f*(a10*a21-a11*a20);
+ mat_traits<R>::template write_element<2,1>(r)=-f*(a00*a21-a01*a20);
+ mat_traits<R>::template write_element<2,2>(r)= f*(a00*a11-a01*a10);
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3,
+ deduce_mat<A> >::type
+ inverse( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T det=determinant(a);
+ if( det==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_determinant_error());
+ return inverse(a,det);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::inverse;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct inverse_m_defined;
+
+ template <>
+ struct
+ inverse_m_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,3,3> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ typedef typename deduce_mat2<A,B,3,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11+a02*b21;
+ mat_traits<R>::template write_element<0,2>(r)=a00*b02+a01*b12+a02*b22;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10+a12*b20;
+ mat_traits<R>::template write_element<1,1>(r)=a10*b01+a11*b11+a12*b21;
+ mat_traits<R>::template write_element<1,2>(r)=a10*b02+a11*b12+a12*b22;
+ mat_traits<R>::template write_element<2,0>(r)=a20*b00+a21*b10+a22*b20;
+ mat_traits<R>::template write_element<2,1>(r)=a20*b01+a21*b11+a22*b21;
+ mat_traits<R>::template write_element<2,2>(r)=a20*b02+a21*b12+a22*b22;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<3,3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ A &>::type
+ operator*=( A & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<A>::template write_element<0,0>(a)=a00*b00+a01*b10+a02*b20;
+ mat_traits<A>::template write_element<0,1>(a)=a00*b01+a01*b11+a02*b21;
+ mat_traits<A>::template write_element<0,2>(a)=a00*b02+a01*b12+a02*b22;
+ mat_traits<A>::template write_element<1,0>(a)=a10*b00+a11*b10+a12*b20;
+ mat_traits<A>::template write_element<1,1>(a)=a10*b01+a11*b11+a12*b21;
+ mat_traits<A>::template write_element<1,2>(a)=a10*b02+a11*b12+a12*b22;
+ mat_traits<A>::template write_element<2,0>(a)=a20*b00+a21*b10+a22*b20;
+ mat_traits<A>::template write_element<2,1>(a)=a20*b01+a21*b11+a22*b21;
+ mat_traits<A>::template write_element<2,2>(a)=a20*b02+a21*b12+a22*b22;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_mm_defined;
+
+ template <>
+ struct
+ mul_eq_mm_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,3,1> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ typedef typename deduce_mat2<A,B,3,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==3);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10+a12*b20;
+ mat_traits<R>::template write_element<2,0>(r)=a20*b00+a21*b10+a22*b20;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<3,3,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==3 &&
+ mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
+ deduce_mat2<A,B,1,3> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ typedef typename deduce_mat2<A,B,1,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==3);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11+a02*b21;
+ mat_traits<R>::template write_element<0,2>(r)=a00*b02+a01*b12+a02*b22;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<1,3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/mat_operations4.hpp b/boost/qvm/gen/mat_operations4.hpp
new file mode 100644
index 0000000000..0dab7fba9f
--- /dev/null
+++ b/boost/qvm/gen/mat_operations4.hpp
@@ -0,0 +1,2044 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_B3124DC843BB8BA61F35A7D938251F
+#define BOOST_QVM_B3124DC843BB8BA61F35A7D938251F
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/scalar_traits.hpp>
+#include <boost/qvm/throw_exception.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,4,4> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,4,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)+mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)+mat_traits<B>::template read_element<0,3>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)+mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)+mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<R>::template write_element<1,3>(r)=mat_traits<A>::template read_element<1,3>(a)+mat_traits<B>::template read_element<1,3>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)+mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)+mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)+mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<R>::template write_element<2,3>(r)=mat_traits<A>::template read_element<2,3>(a)+mat_traits<B>::template read_element<2,3>(b);
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)+mat_traits<B>::template read_element<3,0>(b);
+ mat_traits<R>::template write_element<3,1>(r)=mat_traits<A>::template read_element<3,1>(a)+mat_traits<B>::template read_element<3,1>(b);
+ mat_traits<R>::template write_element<3,2>(r)=mat_traits<A>::template read_element<3,2>(a)+mat_traits<B>::template read_element<3,2>(b);
+ mat_traits<R>::template write_element<3,3>(r)=mat_traits<A>::template read_element<3,3>(a)+mat_traits<B>::template read_element<3,3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,4,1> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,4,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)+mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)+mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)+mat_traits<B>::template read_element<3,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,1,4> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)+mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)+mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)+mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)+mat_traits<B>::template read_element<0,3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_mm_defined;
+
+ template <>
+ struct
+ plus_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,4,4> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,4,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)-mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)-mat_traits<B>::template read_element<0,3>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)-mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)-mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<R>::template write_element<1,3>(r)=mat_traits<A>::template read_element<1,3>(a)-mat_traits<B>::template read_element<1,3>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)-mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)-mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)-mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<R>::template write_element<2,3>(r)=mat_traits<A>::template read_element<2,3>(a)-mat_traits<B>::template read_element<2,3>(b);
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)-mat_traits<B>::template read_element<3,0>(b);
+ mat_traits<R>::template write_element<3,1>(r)=mat_traits<A>::template read_element<3,1>(a)-mat_traits<B>::template read_element<3,1>(b);
+ mat_traits<R>::template write_element<3,2>(r)=mat_traits<A>::template read_element<3,2>(a)-mat_traits<B>::template read_element<3,2>(b);
+ mat_traits<R>::template write_element<3,3>(r)=mat_traits<A>::template read_element<3,3>(a)-mat_traits<B>::template read_element<3,3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,4,1> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,4,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)-mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)-mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)-mat_traits<B>::template read_element<3,0>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,1,4> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,1,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)-mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)-mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)-mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)-mat_traits<B>::template read_element<0,3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_mm_defined;
+
+ template <>
+ struct
+ minus_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)+=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)+=mat_traits<B>::template read_element<0,3>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)+=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)+=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<1,3>(a)+=mat_traits<B>::template read_element<1,3>(b);
+ mat_traits<A>::template write_element<2,0>(a)+=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)+=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)+=mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<A>::template write_element<2,3>(a)+=mat_traits<B>::template read_element<2,3>(b);
+ mat_traits<A>::template write_element<3,0>(a)+=mat_traits<B>::template read_element<3,0>(b);
+ mat_traits<A>::template write_element<3,1>(a)+=mat_traits<B>::template read_element<3,1>(b);
+ mat_traits<A>::template write_element<3,2>(a)+=mat_traits<B>::template read_element<3,2>(b);
+ mat_traits<A>::template write_element<3,3>(a)+=mat_traits<B>::template read_element<3,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)+=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)+=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<3,0>(a)+=mat_traits<B>::template read_element<3,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)+=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)+=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)+=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)+=mat_traits<B>::template read_element<0,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct plus_eq_mm_defined;
+
+ template <>
+ struct
+ plus_eq_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)-=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)-=mat_traits<B>::template read_element<0,3>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)-=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)-=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<1,3>(a)-=mat_traits<B>::template read_element<1,3>(b);
+ mat_traits<A>::template write_element<2,0>(a)-=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)-=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)-=mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<A>::template write_element<2,3>(a)-=mat_traits<B>::template read_element<2,3>(b);
+ mat_traits<A>::template write_element<3,0>(a)-=mat_traits<B>::template read_element<3,0>(b);
+ mat_traits<A>::template write_element<3,1>(a)-=mat_traits<B>::template read_element<3,1>(b);
+ mat_traits<A>::template write_element<3,2>(a)-=mat_traits<B>::template read_element<3,2>(b);
+ mat_traits<A>::template write_element<3,3>(a)-=mat_traits<B>::template read_element<3,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)-=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)-=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<3,0>(a)-=mat_traits<B>::template read_element<3,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)-=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)-=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)-=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)-=mat_traits<B>::template read_element<0,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_eq_mm_defined;
+
+ template <>
+ struct
+ minus_eq_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)*b;
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)*b;
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)*b;
+ mat_traits<R>::template write_element<1,3>(r)=mat_traits<A>::template read_element<1,3>(a)*b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)*b;
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)*b;
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)*b;
+ mat_traits<R>::template write_element<2,3>(r)=mat_traits<A>::template read_element<2,3>(a)*b;
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)*b;
+ mat_traits<R>::template write_element<3,1>(r)=mat_traits<A>::template read_element<3,1>(a)*b;
+ mat_traits<R>::template write_element<3,2>(r)=mat_traits<A>::template read_element<3,2>(a)*b;
+ mat_traits<R>::template write_element<3,3>(r)=mat_traits<A>::template read_element<3,3>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)*b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)*b;
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)*b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)*b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)*b;
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_ms_defined;
+
+ template <>
+ struct
+ mul_ms_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ mat_traits<A>::template write_element<0,2>(a)*=b;
+ mat_traits<A>::template write_element<0,3>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ mat_traits<A>::template write_element<1,1>(a)*=b;
+ mat_traits<A>::template write_element<1,2>(a)*=b;
+ mat_traits<A>::template write_element<1,3>(a)*=b;
+ mat_traits<A>::template write_element<2,0>(a)*=b;
+ mat_traits<A>::template write_element<2,1>(a)*=b;
+ mat_traits<A>::template write_element<2,2>(a)*=b;
+ mat_traits<A>::template write_element<2,3>(a)*=b;
+ mat_traits<A>::template write_element<3,0>(a)*=b;
+ mat_traits<A>::template write_element<3,1>(a)*=b;
+ mat_traits<A>::template write_element<3,2>(a)*=b;
+ mat_traits<A>::template write_element<3,3>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<1,0>(a)*=b;
+ mat_traits<A>::template write_element<2,0>(a)*=b;
+ mat_traits<A>::template write_element<3,0>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)*=b;
+ mat_traits<A>::template write_element<0,1>(a)*=b;
+ mat_traits<A>::template write_element<0,2>(a)*=b;
+ mat_traits<A>::template write_element<0,3>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_eq_ms_defined;
+
+ template <>
+ struct
+ mul_eq_ms_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)/b;
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ mat_traits<R>::template write_element<1,1>(r)=mat_traits<A>::template read_element<1,1>(a)/b;
+ mat_traits<R>::template write_element<1,2>(r)=mat_traits<A>::template read_element<1,2>(a)/b;
+ mat_traits<R>::template write_element<1,3>(r)=mat_traits<A>::template read_element<1,3>(a)/b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)/b;
+ mat_traits<R>::template write_element<2,1>(r)=mat_traits<A>::template read_element<2,1>(a)/b;
+ mat_traits<R>::template write_element<2,2>(r)=mat_traits<A>::template read_element<2,2>(a)/b;
+ mat_traits<R>::template write_element<2,3>(r)=mat_traits<A>::template read_element<2,3>(a)/b;
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)/b;
+ mat_traits<R>::template write_element<3,1>(r)=mat_traits<A>::template read_element<3,1>(a)/b;
+ mat_traits<R>::template write_element<3,2>(r)=mat_traits<A>::template read_element<3,2>(a)/b;
+ mat_traits<R>::template write_element<3,3>(r)=mat_traits<A>::template read_element<3,3>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<1,0>(r)=mat_traits<A>::template read_element<1,0>(a)/b;
+ mat_traits<R>::template write_element<2,0>(r)=mat_traits<A>::template read_element<2,0>(a)/b;
+ mat_traits<R>::template write_element<3,0>(r)=mat_traits<A>::template read_element<3,0>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=mat_traits<A>::template read_element<0,0>(a)/b;
+ mat_traits<R>::template write_element<0,1>(r)=mat_traits<A>::template read_element<0,1>(a)/b;
+ mat_traits<R>::template write_element<0,2>(r)=mat_traits<A>::template read_element<0,2>(a)/b;
+ mat_traits<R>::template write_element<0,3>(r)=mat_traits<A>::template read_element<0,3>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_ms_defined;
+
+ template <>
+ struct
+ div_ms_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ mat_traits<A>::template write_element<0,2>(a)/=b;
+ mat_traits<A>::template write_element<0,3>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ mat_traits<A>::template write_element<1,1>(a)/=b;
+ mat_traits<A>::template write_element<1,2>(a)/=b;
+ mat_traits<A>::template write_element<1,3>(a)/=b;
+ mat_traits<A>::template write_element<2,0>(a)/=b;
+ mat_traits<A>::template write_element<2,1>(a)/=b;
+ mat_traits<A>::template write_element<2,2>(a)/=b;
+ mat_traits<A>::template write_element<2,3>(a)/=b;
+ mat_traits<A>::template write_element<3,0>(a)/=b;
+ mat_traits<A>::template write_element<3,1>(a)/=b;
+ mat_traits<A>::template write_element<3,2>(a)/=b;
+ mat_traits<A>::template write_element<3,3>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==1 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<1,0>(a)/=b;
+ mat_traits<A>::template write_element<2,0>(a)/=b;
+ mat_traits<A>::template write_element<3,0>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)/=b;
+ mat_traits<A>::template write_element<0,1>(a)/=b;
+ mat_traits<A>::template write_element<0,2>(a)/=b;
+ mat_traits<A>::template write_element<0,3>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct div_eq_ms_defined;
+
+ template <>
+ struct
+ div_eq_ms_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)=mat_traits<B>::template read_element<0,3>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<1,1>(a)=mat_traits<B>::template read_element<1,1>(b);
+ mat_traits<A>::template write_element<1,2>(a)=mat_traits<B>::template read_element<1,2>(b);
+ mat_traits<A>::template write_element<1,3>(a)=mat_traits<B>::template read_element<1,3>(b);
+ mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<2,1>(a)=mat_traits<B>::template read_element<2,1>(b);
+ mat_traits<A>::template write_element<2,2>(a)=mat_traits<B>::template read_element<2,2>(b);
+ mat_traits<A>::template write_element<2,3>(a)=mat_traits<B>::template read_element<2,3>(b);
+ mat_traits<A>::template write_element<3,0>(a)=mat_traits<B>::template read_element<3,0>(b);
+ mat_traits<A>::template write_element<3,1>(a)=mat_traits<B>::template read_element<3,1>(b);
+ mat_traits<A>::template write_element<3,2>(a)=mat_traits<B>::template read_element<3,2>(b);
+ mat_traits<A>::template write_element<3,3>(a)=mat_traits<B>::template read_element<3,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
+ mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
+ mat_traits<A>::template write_element<3,0>(a)=mat_traits<B>::template read_element<3,0>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
+ mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
+ mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
+ mat_traits<A>::template write_element<0,3>(a)=mat_traits<B>::template read_element<0,3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct assign_mm_defined;
+
+ template <>
+ struct
+ assign_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==4 && mat_traits<A>::rows==4 &&
+ mat_traits<R>::cols==4 && mat_traits<A>::cols==4,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r) = mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<0,3>(r) = mat_traits<A>::template read_element<0,3>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r) = mat_traits<A>::template read_element<1,1>(a);
+ mat_traits<R>::template write_element<1,2>(r) = mat_traits<A>::template read_element<1,2>(a);
+ mat_traits<R>::template write_element<1,3>(r) = mat_traits<A>::template read_element<1,3>(a);
+ mat_traits<R>::template write_element<2,0>(r) = mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<2,1>(r) = mat_traits<A>::template read_element<2,1>(a);
+ mat_traits<R>::template write_element<2,2>(r) = mat_traits<A>::template read_element<2,2>(a);
+ mat_traits<R>::template write_element<2,3>(r) = mat_traits<A>::template read_element<2,3>(a);
+ mat_traits<R>::template write_element<3,0>(r) = mat_traits<A>::template read_element<3,0>(a);
+ mat_traits<R>::template write_element<3,1>(r) = mat_traits<A>::template read_element<3,1>(a);
+ mat_traits<R>::template write_element<3,2>(r) = mat_traits<A>::template read_element<3,2>(a);
+ mat_traits<R>::template write_element<3,3>(r) = mat_traits<A>::template read_element<3,3>(a);
+ return r;
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE
+ typename enable_if_c<
+ is_mat<R>::value && is_quat<A>::value &&
+ mat_traits<R>::rows==4 && mat_traits<R>::cols==4,
+ R>::type
+ convert_to( A const & q )
+ {
+ typedef typename mat_traits<R>::scalar_type T;
+ T const a=quat_traits<A>::template read_element<0>(q);
+ T const b=quat_traits<A>::template read_element<1>(q);
+ T const c=quat_traits<A>::template read_element<2>(q);
+ T const d=quat_traits<A>::template read_element<3>(q);
+ T const bb = b*b;
+ T const cc = c*c;
+ T const dd = d*d;
+ T const bc = b*c;
+ T const bd = b*d;
+ T const cd = c*d;
+ T const ab = a*b;
+ T const ac = a*c;
+ T const ad = a*d;
+ T const zero = scalar_traits<T>::value(0);
+ T const one = scalar_traits<T>::value(1);
+ T const two = one+one;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = one - two*(cc+dd);
+ mat_traits<R>::template write_element<0,1>(r) = two*(bc-ad);
+ mat_traits<R>::template write_element<0,2>(r) = two*(bd+ac);
+ mat_traits<R>::template write_element<0,3>(r) = zero;
+ mat_traits<R>::template write_element<1,0>(r) = two*(bc+ad);
+ mat_traits<R>::template write_element<1,1>(r) = one - two*(bb+dd);
+ mat_traits<R>::template write_element<1,2>(r) = two*(cd-ab);
+ mat_traits<R>::template write_element<1,3>(r) = zero;
+ mat_traits<R>::template write_element<2,0>(r) = two*(bd-ac);
+ mat_traits<R>::template write_element<2,1>(r) = two*(cd+ab);
+ mat_traits<R>::template write_element<2,2>(r) = one - two*(bb+cc);
+ mat_traits<R>::template write_element<2,3>(r) = zero;
+ mat_traits<R>::template write_element<3,0>(r) = zero;
+ mat_traits<R>::template write_element<3,1>(r) = zero;
+ mat_traits<R>::template write_element<3,2>(r) = zero;
+ mat_traits<R>::template write_element<3,3>(r) = one;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==4 && mat_traits<A>::rows==4 &&
+ mat_traits<R>::cols==1 && mat_traits<A>::cols==1,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r) = mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<2,0>(r) = mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<3,0>(r) = mat_traits<A>::template read_element<3,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<R>::rows==1 && mat_traits<A>::rows==1 &&
+ mat_traits<R>::cols==4 && mat_traits<A>::cols==4,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ mat_traits<R>::template write_element<0,0>(r) = mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r) = mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r) = mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<0,3>(r) = mat_traits<A>::template read_element<0,3>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct convert_to_m_defined;
+
+ template <>
+ struct
+ convert_to_m_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b) &&
+ mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b) &&
+ mat_traits<A>::template read_element<0,3>(a)==mat_traits<B>::template read_element<0,3>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b) &&
+ mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b) &&
+ mat_traits<A>::template read_element<1,2>(a)==mat_traits<B>::template read_element<1,2>(b) &&
+ mat_traits<A>::template read_element<1,3>(a)==mat_traits<B>::template read_element<1,3>(b) &&
+ mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b) &&
+ mat_traits<A>::template read_element<2,1>(a)==mat_traits<B>::template read_element<2,1>(b) &&
+ mat_traits<A>::template read_element<2,2>(a)==mat_traits<B>::template read_element<2,2>(b) &&
+ mat_traits<A>::template read_element<2,3>(a)==mat_traits<B>::template read_element<2,3>(b) &&
+ mat_traits<A>::template read_element<3,0>(a)==mat_traits<B>::template read_element<3,0>(b) &&
+ mat_traits<A>::template read_element<3,1>(a)==mat_traits<B>::template read_element<3,1>(b) &&
+ mat_traits<A>::template read_element<3,2>(a)==mat_traits<B>::template read_element<3,2>(b) &&
+ mat_traits<A>::template read_element<3,3>(a)==mat_traits<B>::template read_element<3,3>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b) &&
+ mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b) &&
+ mat_traits<A>::template read_element<3,0>(a)==mat_traits<B>::template read_element<3,0>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b) &&
+ mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b) &&
+ mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b) &&
+ mat_traits<A>::template read_element<0,3>(a)==mat_traits<B>::template read_element<0,3>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct eq_mm_defined;
+
+ template <>
+ struct
+ eq_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b)) ||
+ !(mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b)) ||
+ !(mat_traits<A>::template read_element<0,3>(a)==mat_traits<B>::template read_element<0,3>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,1>(a)==mat_traits<B>::template read_element<1,1>(b)) ||
+ !(mat_traits<A>::template read_element<1,2>(a)==mat_traits<B>::template read_element<1,2>(b)) ||
+ !(mat_traits<A>::template read_element<1,3>(a)==mat_traits<B>::template read_element<1,3>(b)) ||
+ !(mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b)) ||
+ !(mat_traits<A>::template read_element<2,1>(a)==mat_traits<B>::template read_element<2,1>(b)) ||
+ !(mat_traits<A>::template read_element<2,2>(a)==mat_traits<B>::template read_element<2,2>(b)) ||
+ !(mat_traits<A>::template read_element<2,3>(a)==mat_traits<B>::template read_element<2,3>(b)) ||
+ !(mat_traits<A>::template read_element<3,0>(a)==mat_traits<B>::template read_element<3,0>(b)) ||
+ !(mat_traits<A>::template read_element<3,1>(a)==mat_traits<B>::template read_element<3,1>(b)) ||
+ !(mat_traits<A>::template read_element<3,2>(a)==mat_traits<B>::template read_element<3,2>(b)) ||
+ !(mat_traits<A>::template read_element<3,3>(a)==mat_traits<B>::template read_element<3,3>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<1,0>(a)==mat_traits<B>::template read_element<1,0>(b)) ||
+ !(mat_traits<A>::template read_element<2,0>(a)==mat_traits<B>::template read_element<2,0>(b)) ||
+ !(mat_traits<A>::template read_element<3,0>(a)==mat_traits<B>::template read_element<3,0>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(mat_traits<A>::template read_element<0,0>(a)==mat_traits<B>::template read_element<0,0>(b)) ||
+ !(mat_traits<A>::template read_element<0,1>(a)==mat_traits<B>::template read_element<0,1>(b)) ||
+ !(mat_traits<A>::template read_element<0,2>(a)==mat_traits<B>::template read_element<0,2>(b)) ||
+ !(mat_traits<A>::template read_element<0,3>(a)==mat_traits<B>::template read_element<0,3>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct neq_mm_defined;
+
+ template <>
+ struct
+ neq_mm_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r)=-mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<0,3>(r)=-mat_traits<A>::template read_element<0,3>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<1,1>(r)=-mat_traits<A>::template read_element<1,1>(a);
+ mat_traits<R>::template write_element<1,2>(r)=-mat_traits<A>::template read_element<1,2>(a);
+ mat_traits<R>::template write_element<1,3>(r)=-mat_traits<A>::template read_element<1,3>(a);
+ mat_traits<R>::template write_element<2,0>(r)=-mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<2,1>(r)=-mat_traits<A>::template read_element<2,1>(a);
+ mat_traits<R>::template write_element<2,2>(r)=-mat_traits<A>::template read_element<2,2>(a);
+ mat_traits<R>::template write_element<2,3>(r)=-mat_traits<A>::template read_element<2,3>(a);
+ mat_traits<R>::template write_element<3,0>(r)=-mat_traits<A>::template read_element<3,0>(a);
+ mat_traits<R>::template write_element<3,1>(r)=-mat_traits<A>::template read_element<3,1>(a);
+ mat_traits<R>::template write_element<3,2>(r)=-mat_traits<A>::template read_element<3,2>(a);
+ mat_traits<R>::template write_element<3,3>(r)=-mat_traits<A>::template read_element<3,3>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==1,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<1,0>(r)=-mat_traits<A>::template read_element<1,0>(a);
+ mat_traits<R>::template write_element<2,0>(r)=-mat_traits<A>::template read_element<2,0>(a);
+ mat_traits<R>::template write_element<3,0>(r)=-mat_traits<A>::template read_element<3,0>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<A>::cols==4,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=-mat_traits<A>::template read_element<0,0>(a);
+ mat_traits<R>::template write_element<0,1>(r)=-mat_traits<A>::template read_element<0,1>(a);
+ mat_traits<R>::template write_element<0,2>(r)=-mat_traits<A>::template read_element<0,2>(a);
+ mat_traits<R>::template write_element<0,3>(r)=-mat_traits<A>::template read_element<0,3>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct minus_m_defined;
+
+ template <>
+ struct
+ minus_m_defined<1,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4,
+ typename mat_traits<A>::scalar_type>::type
+ determinant( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a02=mat_traits<A>::template read_element<0,2>(a);
+ T const a03=mat_traits<A>::template read_element<0,3>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T const a12=mat_traits<A>::template read_element<1,2>(a);
+ T const a13=mat_traits<A>::template read_element<1,3>(a);
+ T const a20=mat_traits<A>::template read_element<2,0>(a);
+ T const a21=mat_traits<A>::template read_element<2,1>(a);
+ T const a22=mat_traits<A>::template read_element<2,2>(a);
+ T const a23=mat_traits<A>::template read_element<2,3>(a);
+ T const a30=mat_traits<A>::template read_element<3,0>(a);
+ T const a31=mat_traits<A>::template read_element<3,1>(a);
+ T const a32=mat_traits<A>::template read_element<3,2>(a);
+ T const a33=mat_traits<A>::template read_element<3,3>(a);
+ T det=(a00*(a11*(a22*a33-a23*a32)-a12*(a21*a33-a23*a31)+a13*(a21*a32-a22*a31))-a01*(a10*(a22*a33-a23*a32)-a12*(a20*a33-a23*a30)+a13*(a20*a32-a22*a30))+a02*(a10*(a21*a33-a23*a31)-a11*(a20*a33-a23*a30)+a13*(a20*a31-a21*a30))-a03*(a10*(a21*a32-a22*a31)-a11*(a20*a32-a22*a30)+a12*(a20*a31-a21*a30)));
+ return det;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::determinant;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct determinant_defined;
+
+ template <>
+ struct
+ determinant_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 && is_scalar<B>::value,
+ deduce_mat<A> >::type
+ inverse( A const & a, B det )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ BOOST_QVM_ASSERT(det!=scalar_traits<B>::value(0));
+ T const a00=mat_traits<A>::template read_element<0,0>(a);
+ T const a01=mat_traits<A>::template read_element<0,1>(a);
+ T const a02=mat_traits<A>::template read_element<0,2>(a);
+ T const a03=mat_traits<A>::template read_element<0,3>(a);
+ T const a10=mat_traits<A>::template read_element<1,0>(a);
+ T const a11=mat_traits<A>::template read_element<1,1>(a);
+ T const a12=mat_traits<A>::template read_element<1,2>(a);
+ T const a13=mat_traits<A>::template read_element<1,3>(a);
+ T const a20=mat_traits<A>::template read_element<2,0>(a);
+ T const a21=mat_traits<A>::template read_element<2,1>(a);
+ T const a22=mat_traits<A>::template read_element<2,2>(a);
+ T const a23=mat_traits<A>::template read_element<2,3>(a);
+ T const a30=mat_traits<A>::template read_element<3,0>(a);
+ T const a31=mat_traits<A>::template read_element<3,1>(a);
+ T const a32=mat_traits<A>::template read_element<3,2>(a);
+ T const a33=mat_traits<A>::template read_element<3,3>(a);
+ T const f=scalar_traits<T>::value(1)/det;
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)= f*(a11*(a22*a33-a23*a32)-a12*(a21*a33-a23*a31)+a13*(a21*a32-a22*a31));
+ mat_traits<R>::template write_element<0,1>(r)=-f*(a01*(a22*a33-a23*a32)-a02*(a21*a33-a23*a31)+a03*(a21*a32-a22*a31));
+ mat_traits<R>::template write_element<0,2>(r)= f*(a01*(a12*a33-a13*a32)-a02*(a11*a33-a13*a31)+a03*(a11*a32-a12*a31));
+ mat_traits<R>::template write_element<0,3>(r)=-f*(a01*(a12*a23-a13*a22)-a02*(a11*a23-a13*a21)+a03*(a11*a22-a12*a21));
+ mat_traits<R>::template write_element<1,0>(r)=-f*(a10*(a22*a33-a23*a32)-a12*(a20*a33-a23*a30)+a13*(a20*a32-a22*a30));
+ mat_traits<R>::template write_element<1,1>(r)= f*(a00*(a22*a33-a23*a32)-a02*(a20*a33-a23*a30)+a03*(a20*a32-a22*a30));
+ mat_traits<R>::template write_element<1,2>(r)=-f*(a00*(a12*a33-a13*a32)-a02*(a10*a33-a13*a30)+a03*(a10*a32-a12*a30));
+ mat_traits<R>::template write_element<1,3>(r)= f*(a00*(a12*a23-a13*a22)-a02*(a10*a23-a13*a20)+a03*(a10*a22-a12*a20));
+ mat_traits<R>::template write_element<2,0>(r)= f*(a10*(a21*a33-a23*a31)-a11*(a20*a33-a23*a30)+a13*(a20*a31-a21*a30));
+ mat_traits<R>::template write_element<2,1>(r)=-f*(a00*(a21*a33-a23*a31)-a01*(a20*a33-a23*a30)+a03*(a20*a31-a21*a30));
+ mat_traits<R>::template write_element<2,2>(r)= f*(a00*(a11*a33-a13*a31)-a01*(a10*a33-a13*a30)+a03*(a10*a31-a11*a30));
+ mat_traits<R>::template write_element<2,3>(r)=-f*(a00*(a11*a23-a13*a21)-a01*(a10*a23-a13*a20)+a03*(a10*a21-a11*a20));
+ mat_traits<R>::template write_element<3,0>(r)=-f*(a10*(a21*a32-a22*a31)-a11*(a20*a32-a22*a30)+a12*(a20*a31-a21*a30));
+ mat_traits<R>::template write_element<3,1>(r)= f*(a00*(a21*a32-a22*a31)-a01*(a20*a32-a22*a30)+a02*(a20*a31-a21*a30));
+ mat_traits<R>::template write_element<3,2>(r)=-f*(a00*(a11*a32-a12*a31)-a01*(a10*a32-a12*a30)+a02*(a10*a31-a11*a30));
+ mat_traits<R>::template write_element<3,3>(r)= f*(a00*(a11*a22-a12*a21)-a01*(a10*a22-a12*a20)+a02*(a10*a21-a11*a20));
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4,
+ deduce_mat<A> >::type
+ inverse( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T det=determinant(a);
+ if( det==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_determinant_error());
+ return inverse(a,det);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::inverse;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct inverse_m_defined;
+
+ template <>
+ struct
+ inverse_m_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,4,4> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
+ Ta const a30 = mat_traits<A>::template read_element<3,0>(a);
+ Ta const a31 = mat_traits<A>::template read_element<3,1>(a);
+ Ta const a32 = mat_traits<A>::template read_element<3,2>(a);
+ Ta const a33 = mat_traits<A>::template read_element<3,3>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b03 = mat_traits<B>::template read_element<0,3>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b13 = mat_traits<B>::template read_element<1,3>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ Tb const b23 = mat_traits<B>::template read_element<2,3>(b);
+ Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
+ Tb const b31 = mat_traits<B>::template read_element<3,1>(b);
+ Tb const b32 = mat_traits<B>::template read_element<3,2>(b);
+ Tb const b33 = mat_traits<B>::template read_element<3,3>(b);
+ typedef typename deduce_mat2<A,B,4,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20+a03*b30;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11+a02*b21+a03*b31;
+ mat_traits<R>::template write_element<0,2>(r)=a00*b02+a01*b12+a02*b22+a03*b32;
+ mat_traits<R>::template write_element<0,3>(r)=a00*b03+a01*b13+a02*b23+a03*b33;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10+a12*b20+a13*b30;
+ mat_traits<R>::template write_element<1,1>(r)=a10*b01+a11*b11+a12*b21+a13*b31;
+ mat_traits<R>::template write_element<1,2>(r)=a10*b02+a11*b12+a12*b22+a13*b32;
+ mat_traits<R>::template write_element<1,3>(r)=a10*b03+a11*b13+a12*b23+a13*b33;
+ mat_traits<R>::template write_element<2,0>(r)=a20*b00+a21*b10+a22*b20+a23*b30;
+ mat_traits<R>::template write_element<2,1>(r)=a20*b01+a21*b11+a22*b21+a23*b31;
+ mat_traits<R>::template write_element<2,2>(r)=a20*b02+a21*b12+a22*b22+a23*b32;
+ mat_traits<R>::template write_element<2,3>(r)=a20*b03+a21*b13+a22*b23+a23*b33;
+ mat_traits<R>::template write_element<3,0>(r)=a30*b00+a31*b10+a32*b20+a33*b30;
+ mat_traits<R>::template write_element<3,1>(r)=a30*b01+a31*b11+a32*b21+a33*b31;
+ mat_traits<R>::template write_element<3,2>(r)=a30*b02+a31*b12+a32*b22+a33*b32;
+ mat_traits<R>::template write_element<3,3>(r)=a30*b03+a31*b13+a32*b23+a33*b33;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<4,4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ A &>::type
+ operator*=( A & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
+ Ta const a30 = mat_traits<A>::template read_element<3,0>(a);
+ Ta const a31 = mat_traits<A>::template read_element<3,1>(a);
+ Ta const a32 = mat_traits<A>::template read_element<3,2>(a);
+ Ta const a33 = mat_traits<A>::template read_element<3,3>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b03 = mat_traits<B>::template read_element<0,3>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b13 = mat_traits<B>::template read_element<1,3>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ Tb const b23 = mat_traits<B>::template read_element<2,3>(b);
+ Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
+ Tb const b31 = mat_traits<B>::template read_element<3,1>(b);
+ Tb const b32 = mat_traits<B>::template read_element<3,2>(b);
+ Tb const b33 = mat_traits<B>::template read_element<3,3>(b);
+ mat_traits<A>::template write_element<0,0>(a)=a00*b00+a01*b10+a02*b20+a03*b30;
+ mat_traits<A>::template write_element<0,1>(a)=a00*b01+a01*b11+a02*b21+a03*b31;
+ mat_traits<A>::template write_element<0,2>(a)=a00*b02+a01*b12+a02*b22+a03*b32;
+ mat_traits<A>::template write_element<0,3>(a)=a00*b03+a01*b13+a02*b23+a03*b33;
+ mat_traits<A>::template write_element<1,0>(a)=a10*b00+a11*b10+a12*b20+a13*b30;
+ mat_traits<A>::template write_element<1,1>(a)=a10*b01+a11*b11+a12*b21+a13*b31;
+ mat_traits<A>::template write_element<1,2>(a)=a10*b02+a11*b12+a12*b22+a13*b32;
+ mat_traits<A>::template write_element<1,3>(a)=a10*b03+a11*b13+a12*b23+a13*b33;
+ mat_traits<A>::template write_element<2,0>(a)=a20*b00+a21*b10+a22*b20+a23*b30;
+ mat_traits<A>::template write_element<2,1>(a)=a20*b01+a21*b11+a22*b21+a23*b31;
+ mat_traits<A>::template write_element<2,2>(a)=a20*b02+a21*b12+a22*b22+a23*b32;
+ mat_traits<A>::template write_element<2,3>(a)=a20*b03+a21*b13+a22*b23+a23*b33;
+ mat_traits<A>::template write_element<3,0>(a)=a30*b00+a31*b10+a32*b20+a33*b30;
+ mat_traits<A>::template write_element<3,1>(a)=a30*b01+a31*b11+a32*b21+a33*b31;
+ mat_traits<A>::template write_element<3,2>(a)=a30*b02+a31*b12+a32*b22+a33*b32;
+ mat_traits<A>::template write_element<3,3>(a)=a30*b03+a31*b13+a32*b23+a33*b33;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_mm_defined;
+
+ template <>
+ struct
+ mul_eq_mm_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==1,
+ deduce_mat2<A,B,4,1> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
+ Ta const a30 = mat_traits<A>::template read_element<3,0>(a);
+ Ta const a31 = mat_traits<A>::template read_element<3,1>(a);
+ Ta const a32 = mat_traits<A>::template read_element<3,2>(a);
+ Ta const a33 = mat_traits<A>::template read_element<3,3>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
+ typedef typename deduce_mat2<A,B,4,1>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==4);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==1);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20+a03*b30;
+ mat_traits<R>::template write_element<1,0>(r)=a10*b00+a11*b10+a12*b20+a13*b30;
+ mat_traits<R>::template write_element<2,0>(r)=a20*b00+a21*b10+a22*b20+a23*b30;
+ mat_traits<R>::template write_element<3,0>(r)=a30*b00+a31*b10+a32*b20+a33*b30;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<4,4,1>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==1 && mat_traits<B>::rows==4 &&
+ mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
+ deduce_mat2<A,B,1,4> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b03 = mat_traits<B>::template read_element<0,3>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b13 = mat_traits<B>::template read_element<1,3>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ Tb const b23 = mat_traits<B>::template read_element<2,3>(b);
+ Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
+ Tb const b31 = mat_traits<B>::template read_element<3,1>(b);
+ Tb const b32 = mat_traits<B>::template read_element<3,2>(b);
+ Tb const b33 = mat_traits<B>::template read_element<3,3>(b);
+ typedef typename deduce_mat2<A,B,1,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::rows==1);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<R>::cols==4);
+ R r;
+ mat_traits<R>::template write_element<0,0>(r)=a00*b00+a01*b10+a02*b20+a03*b30;
+ mat_traits<R>::template write_element<0,1>(r)=a00*b01+a01*b11+a02*b21+a03*b31;
+ mat_traits<R>::template write_element<0,2>(r)=a00*b02+a01*b12+a02*b22+a03*b32;
+ mat_traits<R>::template write_element<0,3>(r)=a00*b03+a01*b13+a02*b23+a03*b33;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct mul_mm_defined;
+
+ template <>
+ struct
+ mul_mm_defined<1,4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/swizzle2.hpp b/boost/qvm/gen/swizzle2.hpp
new file mode 100644
index 0000000000..fd953d3812
--- /dev/null
+++ b/boost/qvm/gen/swizzle2.hpp
@@ -0,0 +1,624 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_61CDD11E9D9C167272E61DF0844F4A77
+#define BOOST_QVM_61CDD11E9D9C167272E61DF0844F4A77
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/detail/swizzle_traits.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > const &
+ _11()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > const &
+ _01()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > const &>::type
+ W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > &>::type
+ W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > const &>::type
+ Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > &>::type
+ Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > const &>::type
+ Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > &>::type
+ Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > const &>::type
+ X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > &>::type
+ X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > const &
+ _10()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > const &
+ _00()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > const &>::type
+ W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > &>::type
+ W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > const &>::type
+ Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > &>::type
+ Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > const &>::type
+ Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > &>::type
+ Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > const &>::type
+ X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > &>::type
+ X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > const &>::type
+ _1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > &>::type
+ _1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > const &>::type
+ _0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > &>::type
+ _0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > const &>::type
+ WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > &>::type
+ WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > const &>::type
+ ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > &>::type
+ ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > const &>::type
+ YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > &>::type
+ YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > const &>::type
+ XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > &>::type
+ XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > const &>::type
+ _1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > &>::type
+ _1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > const &>::type
+ _0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > &>::type
+ _0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > const &>::type
+ WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > &>::type
+ WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > const &>::type
+ ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > &>::type
+ ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > const &>::type
+ YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > &>::type
+ YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > const &>::type
+ XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > &>::type
+ XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > const &>::type
+ _1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > &>::type
+ _1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > const &>::type
+ _0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > &>::type
+ _0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > const &>::type
+ WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > &>::type
+ WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > const &>::type
+ ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > &>::type
+ ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > const &>::type
+ YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > &>::type
+ YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > const &>::type
+ XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > &>::type
+ XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > const &>::type
+ _1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > &>::type
+ _1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > const &>::type
+ _0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > &>::type
+ _0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > const &>::type
+ WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > &>::type
+ WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > const &>::type
+ ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > &>::type
+ ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > const &>::type
+ YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > &>::type
+ YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > const &>::type
+ XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > &>::type
+ XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > &>(a);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/swizzle3.hpp b/boost/qvm/gen/swizzle3.hpp
new file mode 100644
index 0000000000..30a24c3a35
--- /dev/null
+++ b/boost/qvm/gen/swizzle3.hpp
@@ -0,0 +1,3816 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_2D7E8392C53CBC9121E33749ECF4D5
+#define BOOST_QVM_2D7E8392C53CBC9121E33749ECF4D5
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/detail/swizzle_traits.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &
+ _111()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &
+ _011()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ W11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ W11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ Z11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ Z11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ Y11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ Y11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ X11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ X11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &
+ _101()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &
+ _001()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ W01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ W01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ Z01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ Z01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ Y01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ Y01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ X01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ X01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _1W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _1W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _0W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _0W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ WW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ WW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ ZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ ZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ YW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ YW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ XW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ XW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _1Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _1Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _0Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _0Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ WZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ WZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ ZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ ZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ YZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ YZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ XZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ XZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _1Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _1Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _0Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _0Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ WY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ WY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ ZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ ZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ YY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ YY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ XY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ XY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _1X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _1X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ _0X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ _0X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ WX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ WX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ ZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ ZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ YX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ YX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>::type
+ XX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>::type
+ XX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &
+ _110()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &
+ _010()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ W10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ W10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ Z10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ Z10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ Y10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ Y10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ X10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ X10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &
+ _100()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &
+ _000()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ W00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ W00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ Z00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ Z00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ Y00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ Y00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ X00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ X00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _1W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _1W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _0W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _0W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ WW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ WW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ ZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ ZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ YW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ YW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ XW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ XW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _1Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _1Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _0Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _0Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ WZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ WZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ ZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ ZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ YZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ YZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ XZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ XZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _1Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _1Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _0Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _0Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ WY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ WY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ ZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ ZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ YY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ YY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ XY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ XY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _1X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _1X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ _0X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ _0X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ WX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ WX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ ZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ ZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ YX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ YX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>::type
+ XX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>::type
+ XX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _11W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _11W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _01W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _01W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ W1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ W1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ Z1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ Z1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ Y1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ Y1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ X1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ X1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _10W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _10W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _00W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _00W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ W0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ W0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ Z0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ Z0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ Y0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ Y0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ X0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ X0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _1WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _1WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _0WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _0WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ WWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ WWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ ZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ ZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ YWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ YWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ XWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>::type
+ XWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _1ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _1ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _0ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _0ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ WZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ WZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ ZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ ZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ YZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ YZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ XZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>::type
+ XZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _1YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _1YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _0YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _0YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ WYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ WYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ ZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ ZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ YYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ YYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ XYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>::type
+ XYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _1XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _1XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ _0XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ _0XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ WXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ WXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ ZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ ZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ YXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ YXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>::type
+ XXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>::type
+ XXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _11Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _11Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _01Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _01Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ W1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ W1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ Z1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ Z1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ Y1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ Y1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ X1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ X1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _10Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _10Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _00Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _00Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ W0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ W0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ Z0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ Z0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ Y0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ Y0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ X0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ X0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _1WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _1WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _0WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _0WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ WWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ WWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ ZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ ZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ YWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ YWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ XWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>::type
+ XWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _1ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _1ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _0ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _0ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ WZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ WZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ ZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ ZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ YZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ YZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ XZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>::type
+ XZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _1YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _1YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _0YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _0YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ WYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ WYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ ZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ ZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ YYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ YYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ XYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>::type
+ XYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _1XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _1XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ _0XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ _0XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ WXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ WXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ ZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ ZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ YXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ YXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>::type
+ XXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>::type
+ XXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _11Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _11Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _01Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _01Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ W1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ W1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ Z1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ Z1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ Y1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ Y1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ X1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ X1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _10Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _10Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _00Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _00Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ W0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ W0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ Z0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ Z0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ Y0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ Y0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ X0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ X0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _1WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _1WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _0WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _0WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ WWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ WWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ ZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ ZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ YWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ YWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ XWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>::type
+ XWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _1ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _1ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _0ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _0ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ WZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ WZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ ZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ ZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ YZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ YZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ XZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>::type
+ XZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _1YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _1YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _0YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _0YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ WYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ WYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ ZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ ZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ YYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ YYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ XYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>::type
+ XYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _1XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _1XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ _0XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ _0XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ WXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ WXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ ZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ ZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ YXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ YXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>::type
+ XXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>::type
+ XXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _11X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _11X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _01X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _01X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ W1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ W1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ Z1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ Z1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ Y1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ Y1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ X1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ X1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _10X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _10X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _00X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _00X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ W0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ W0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ Z0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ Z0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ Y0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ Y0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ X0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ X0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _1WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _1WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _0WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _0WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ WWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ WWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ ZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ ZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ YWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ YWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ XWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>::type
+ XWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _1ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _1ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _0ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _0ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ WZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ WZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ ZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ ZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ YZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ YZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ XZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>::type
+ XZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _1YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _1YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _0YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _0YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ WYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ WYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ ZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ ZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ YYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ YYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ XYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>::type
+ XYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _1XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _1XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ _0XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ _0XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ WXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ WXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ ZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ ZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ YXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ YXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>::type
+ XXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>::type
+ XXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > &>(a);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/swizzle4.hpp b/boost/qvm/gen/swizzle4.hpp
new file mode 100644
index 0000000000..db10e2a3b6
--- /dev/null
+++ b/boost/qvm/gen/swizzle4.hpp
@@ -0,0 +1,23160 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_D49FD4A4597E35CF3222F4CCCFD3902D
+#define BOOST_QVM_D49FD4A4597E35CF3222F4CCCFD3902D
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/detail/swizzle_traits.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _1111()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _0111()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W111( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W111( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z111( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z111( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y111( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y111( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X111( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X111( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _1011()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _0011()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W011( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W011( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z011( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z011( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y011( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y011( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X011( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X011( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1W11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1W11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0W11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0W11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WW11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WW11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZW11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZW11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YW11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YW11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XW11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XW11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1Z11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1Z11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0Z11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0Z11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZ11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZ11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZ11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZ11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZ11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZ11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZ11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZ11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1Y11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1Y11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0Y11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0Y11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WY11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WY11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZY11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZY11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YY11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YY11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XY11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XY11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1X11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1X11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0X11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0X11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WX11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WX11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZX11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZX11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YX11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YX11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XX11( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XX11( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _1101()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _0101()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W101( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W101( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z101( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z101( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y101( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y101( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X101( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X101( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _1001()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &
+ _0001()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W001( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W001( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z001( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z001( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y001( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y001( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X001( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X001( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1W01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1W01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0W01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0W01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WW01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WW01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZW01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZW01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YW01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YW01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XW01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XW01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1Z01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1Z01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0Z01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0Z01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZ01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZ01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZ01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZ01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZ01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZ01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZ01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZ01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1Y01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1Y01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0Y01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0Y01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WY01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WY01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZY01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZY01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YY01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YY01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XY01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XY01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1X01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1X01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0X01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0X01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WX01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WX01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZX01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZX01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YX01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YX01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XX01( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XX01( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _11W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _11W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _01W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _01W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W1W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W1W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z1W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z1W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y1W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y1W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X1W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X1W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _10W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _10W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _00W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _00W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W0W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W0W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z0W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z0W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y0W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y0W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X0W1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X0W1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1WW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1WW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0WW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0WW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WWW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WWW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZWW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZWW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YWW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YWW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XWW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XWW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1ZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1ZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0ZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0ZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1YW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1YW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0YW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0YW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WYW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WYW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZYW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZYW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YYW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YYW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XYW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XYW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1XW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1XW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0XW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0XW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WXW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WXW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZXW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZXW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YXW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YXW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XXW1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XXW1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _11Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _11Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _01Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _01Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W1Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W1Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z1Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z1Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y1Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y1Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X1Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X1Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _10Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _10Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _00Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _00Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W0Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W0Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z0Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z0Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y0Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y0Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X0Z1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X0Z1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1WZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1WZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0WZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0WZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WWZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WWZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZWZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZWZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YWZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YWZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XWZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XWZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1ZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1ZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0ZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0ZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1YZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1YZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0YZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0YZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WYZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WYZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZYZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZYZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YYZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YYZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XYZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XYZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1XZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1XZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0XZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0XZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WXZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WXZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZXZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZXZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YXZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YXZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XXZ1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XXZ1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _11Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _11Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _01Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _01Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W1Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W1Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z1Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z1Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y1Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y1Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X1Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X1Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _10Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _10Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _00Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _00Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W0Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W0Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z0Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z0Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y0Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y0Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X0Y1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X0Y1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1WY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1WY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0WY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0WY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WWY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WWY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZWY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZWY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YWY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YWY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XWY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XWY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1ZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1ZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0ZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0ZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1YY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1YY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0YY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0YY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WYY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WYY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZYY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZYY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YYY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YYY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XYY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XYY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1XY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1XY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0XY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0XY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WXY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WXY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZXY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZXY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YXY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YXY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XXY1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XXY1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _11X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _11X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _01X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _01X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W1X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W1X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z1X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z1X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y1X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y1X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X1X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X1X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _10X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _10X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _00X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _00X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ W0X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ W0X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Z0X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Z0X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ Y0X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ Y0X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ X0X1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ X0X1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1WX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1WX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0WX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0WX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WWX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WWX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZWX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZWX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YWX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YWX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XWX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XWX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1ZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1ZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0ZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0ZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XZX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XZX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1YX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1YX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0YX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0YX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WYX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WYX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZYX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZYX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YYX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YYX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XYX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XYX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _1XX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _1XX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ _0XX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ _0XX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ WXX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ WXX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ ZXX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ ZXX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ YXX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ YXX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>::type
+ XXX1( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>::type
+ XXX1( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _1110()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _0110()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W110( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W110( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z110( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z110( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y110( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y110( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X110( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X110( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _1010()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _0010()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W010( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W010( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z010( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z010( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y010( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y010( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X010( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X010( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1W10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1W10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0W10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0W10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WW10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WW10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZW10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZW10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YW10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YW10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XW10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XW10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1Z10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1Z10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0Z10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0Z10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZ10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZ10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZ10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZ10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZ10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZ10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZ10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZ10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1Y10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1Y10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0Y10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0Y10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WY10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WY10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZY10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZY10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YY10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YY10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XY10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XY10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1X10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1X10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0X10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0X10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WX10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WX10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZX10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZX10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YX10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YX10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XX10( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XX10( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _1100()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _0100()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W100( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W100( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z100( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z100( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y100( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y100( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X100( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X100( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _1000()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &
+ _0000()
+ {
+ return *reinterpret_cast<qvm_detail::sw01_<qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const *>(qvm_detail::get_null());
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W000( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W000( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z000( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z000( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y000( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y000( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X000( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X000( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1W00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1W00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0W00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0W00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WW00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WW00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZW00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZW00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YW00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YW00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XW00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XW00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1Z00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1Z00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0Z00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0Z00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZ00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZ00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZ00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZ00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZ00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZ00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZ00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZ00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1Y00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1Y00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0Y00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0Y00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WY00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WY00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZY00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZY00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YY00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YY00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XY00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XY00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1X00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1X00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0X00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0X00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WX00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WX00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZX00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZX00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YX00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YX00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XX00( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XX00( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _11W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _11W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _01W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _01W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W1W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W1W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z1W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z1W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y1W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y1W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X1W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X1W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _10W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _10W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _00W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _00W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W0W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W0W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z0W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z0W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y0W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y0W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X0W0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X0W0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1WW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1WW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0WW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0WW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WWW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WWW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZWW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZWW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YWW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YWW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XWW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XWW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1ZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1ZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0ZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0ZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1YW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1YW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0YW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0YW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WYW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WYW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZYW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZYW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YYW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YYW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XYW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XYW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1XW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1XW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0XW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0XW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WXW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WXW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZXW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZXW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YXW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YXW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XXW0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XXW0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _11Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _11Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _01Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _01Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W1Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W1Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z1Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z1Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y1Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y1Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X1Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X1Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _10Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _10Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _00Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _00Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W0Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W0Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z0Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z0Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y0Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y0Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X0Z0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X0Z0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1WZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1WZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0WZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0WZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WWZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WWZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZWZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZWZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YWZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YWZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XWZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XWZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1ZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1ZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0ZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0ZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1YZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1YZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0YZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0YZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WYZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WYZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZYZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZYZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YYZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YYZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XYZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XYZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1XZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1XZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0XZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0XZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WXZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WXZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZXZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZXZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YXZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YXZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XXZ0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XXZ0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _11Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _11Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _01Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _01Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W1Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W1Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z1Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z1Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y1Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y1Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X1Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X1Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _10Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _10Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _00Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _00Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W0Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W0Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z0Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z0Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y0Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y0Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X0Y0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X0Y0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1WY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1WY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0WY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0WY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WWY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WWY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZWY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZWY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YWY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YWY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XWY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XWY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1ZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1ZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0ZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0ZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1YY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1YY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0YY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0YY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WYY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WYY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZYY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZYY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YYY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YYY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XYY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XYY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1XY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1XY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0XY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0XY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WXY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WXY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZXY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZXY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YXY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YXY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XXY0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XXY0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _11X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _11X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _01X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _01X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W1X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W1X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z1X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z1X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y1X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y1X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X1X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X1X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _10X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _10X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _00X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _00X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ W0X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ W0X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Z0X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Z0X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ Y0X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ Y0X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ X0X0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ X0X0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1WX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1WX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0WX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0WX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WWX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WWX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZWX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZWX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YWX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YWX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XWX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XWX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1ZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1ZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0ZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0ZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XZX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XZX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1YX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1YX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0YX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0YX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WYX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WYX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZYX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZYX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YYX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YYX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XYX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XYX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _1XX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _1XX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ _0XX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ _0XX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ WXX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ WXX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ ZXX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ ZXX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ YXX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ YXX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>::type
+ XXX0( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>::type
+ XXX0( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _111W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _111W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _011W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _011W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W11W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W11W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z11W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z11W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y11W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y11W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X11W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X11W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _101W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _101W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _001W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _001W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W01W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W01W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z01W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z01W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y01W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y01W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X01W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X01W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1W1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1W1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0W1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0W1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WW1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WW1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZW1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZW1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YW1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YW1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XW1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XW1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1Z1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1Z1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0Z1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0Z1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZ1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZ1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZ1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZ1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZ1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZ1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZ1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZ1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1Y1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1Y1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0Y1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0Y1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WY1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WY1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZY1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZY1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YY1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YY1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XY1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XY1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1X1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1X1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0X1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0X1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WX1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WX1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZX1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZX1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YX1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YX1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XX1W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XX1W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _110W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _110W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _010W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _010W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W10W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W10W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z10W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z10W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y10W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y10W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X10W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X10W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _100W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _100W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _000W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _000W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W00W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W00W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z00W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z00W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y00W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y00W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X00W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X00W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1W0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1W0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0W0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0W0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WW0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WW0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZW0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZW0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YW0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YW0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XW0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XW0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1Z0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1Z0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0Z0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0Z0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZ0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZ0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZ0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZ0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZ0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZ0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZ0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZ0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1Y0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1Y0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0Y0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0Y0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WY0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WY0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZY0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZY0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YY0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YY0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XY0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XY0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1X0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1X0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0X0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0X0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WX0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WX0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZX0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZX0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YX0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YX0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XX0W( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XX0W( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _11WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _11WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _01WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _01WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W1WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W1WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z1WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z1WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y1WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y1WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X1WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X1WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _10WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _10WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _00WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _00WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W0WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W0WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z0WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z0WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y0WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y0WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X0WW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X0WW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1WWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1WWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0WWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0WWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WWWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WWWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZWWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZWWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YWWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YWWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XWWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XWWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1ZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1ZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0ZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0ZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1YWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1YWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0YWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0YWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WYWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WYWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZYWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZYWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YYWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YYWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XYWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XYWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1XWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1XWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0XWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0XWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WXWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WXWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZXWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZXWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YXWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YXWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XXWW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XXWW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _11ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _11ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _01ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _01ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W1ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W1ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z1ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z1ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y1ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y1ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X1ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X1ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _10ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _10ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _00ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _00ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W0ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W0ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z0ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z0ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y0ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y0ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X0ZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X0ZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1WZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1WZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0WZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0WZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WWZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WWZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZWZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZWZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YWZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YWZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XWZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XWZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1ZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1ZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0ZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0ZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1YZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1YZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0YZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0YZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WYZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WYZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZYZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZYZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YYZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YYZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XYZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XYZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1XZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1XZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0XZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0XZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WXZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WXZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZXZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZXZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YXZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YXZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XXZW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XXZW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _11YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _11YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _01YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _01YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W1YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W1YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z1YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z1YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y1YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y1YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X1YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X1YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _10YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _10YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _00YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _00YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W0YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W0YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z0YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z0YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y0YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y0YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X0YW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X0YW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1WYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1WYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0WYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0WYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WWYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WWYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZWYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZWYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YWYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YWYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XWYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XWYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1ZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1ZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0ZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0ZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1YYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1YYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0YYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0YYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WYYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WYYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZYYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZYYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YYYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YYYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XYYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XYYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1XYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1XYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0XYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0XYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WXYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WXYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZXYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZXYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YXYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YXYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XXYW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XXYW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _11XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _11XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _01XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _01XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W1XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W1XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z1XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z1XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y1XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y1XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X1XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X1XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _10XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _10XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _00XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _00XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ W0XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ W0XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Z0XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Z0XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ Y0XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ Y0XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ X0XW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ X0XW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1WXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1WXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0WXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0WXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WWXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WWXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZWXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZWXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YWXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YWXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XWXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XWXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1ZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1ZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0ZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0ZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XZXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XZXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1YXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1YXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0YXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0YXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WYXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WYXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZYXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZYXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YYXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YYXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XYXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XYXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _1XXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _1XXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ _0XXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ _0XXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ WXXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ WXXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ ZXXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ ZXXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ YXXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ YXXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>::type
+ XXXW( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>::type
+ XXXW( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _111Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _111Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _011Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _011Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W11Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W11Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z11Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z11Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y11Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y11Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X11Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X11Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _101Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _101Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _001Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _001Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W01Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W01Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z01Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z01Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y01Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y01Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X01Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X01Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1W1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1W1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0W1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0W1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WW1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WW1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZW1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZW1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YW1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YW1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XW1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XW1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1Z1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1Z1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0Z1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0Z1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZ1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZ1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZ1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZ1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZ1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZ1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZ1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZ1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1Y1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1Y1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0Y1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0Y1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WY1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WY1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZY1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZY1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YY1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YY1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XY1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XY1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1X1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1X1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0X1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0X1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WX1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WX1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZX1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZX1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YX1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YX1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XX1Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XX1Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _110Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _110Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _010Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _010Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W10Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W10Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z10Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z10Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y10Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y10Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X10Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X10Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _100Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _100Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _000Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _000Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W00Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W00Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z00Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z00Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y00Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y00Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X00Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X00Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1W0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1W0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0W0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0W0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WW0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WW0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZW0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZW0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YW0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YW0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XW0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XW0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1Z0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1Z0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0Z0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0Z0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZ0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZ0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZ0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZ0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZ0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZ0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZ0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZ0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1Y0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1Y0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0Y0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0Y0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WY0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WY0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZY0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZY0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YY0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YY0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XY0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XY0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1X0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1X0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0X0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0X0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WX0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WX0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZX0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZX0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YX0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YX0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XX0Z( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XX0Z( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _11WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _11WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _01WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _01WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W1WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W1WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z1WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z1WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y1WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y1WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X1WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X1WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _10WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _10WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _00WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _00WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W0WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W0WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z0WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z0WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y0WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y0WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X0WZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X0WZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1WWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1WWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0WWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0WWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WWWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WWWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZWWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZWWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YWWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YWWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XWWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XWWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1ZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1ZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0ZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0ZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1YWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1YWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0YWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0YWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WYWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WYWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZYWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZYWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YYWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YYWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XYWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XYWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1XWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1XWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0XWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0XWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WXWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WXWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZXWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZXWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YXWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YXWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XXWZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XXWZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _11ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _11ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _01ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _01ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W1ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W1ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z1ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z1ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y1ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y1ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X1ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X1ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _10ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _10ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _00ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _00ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W0ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W0ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z0ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z0ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y0ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y0ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X0ZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X0ZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1WZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1WZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0WZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0WZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WWZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WWZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZWZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZWZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YWZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YWZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XWZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XWZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1ZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1ZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0ZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0ZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1YZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1YZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0YZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0YZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WYZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WYZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZYZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZYZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YYZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YYZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XYZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XYZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1XZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1XZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0XZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0XZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WXZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WXZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZXZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZXZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YXZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YXZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XXZZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XXZZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _11YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _11YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _01YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _01YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W1YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W1YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z1YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z1YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y1YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y1YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X1YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X1YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _10YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _10YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _00YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _00YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W0YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W0YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z0YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z0YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y0YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y0YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X0YZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X0YZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1WYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1WYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0WYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0WYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WWYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WWYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZWYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZWYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YWYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YWYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XWYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XWYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1ZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1ZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0ZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0ZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1YYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1YYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0YYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0YYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WYYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WYYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZYYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZYYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YYYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YYYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XYYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XYYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1XYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1XYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0XYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0XYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WXYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WXYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZXYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZXYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YXYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YXYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XXYZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XXYZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _11XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _11XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _01XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _01XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W1XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W1XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z1XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z1XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y1XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y1XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X1XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X1XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _10XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _10XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _00XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _00XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ W0XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ W0XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Z0XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Z0XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ Y0XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ Y0XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ X0XZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ X0XZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1WXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1WXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0WXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0WXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WWXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WWXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZWXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZWXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YWXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YWXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XWXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XWXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1ZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1ZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0ZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0ZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XZXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XZXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1YXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1YXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0YXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0YXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WYXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WYXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZYXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZYXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YYXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YYXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XYXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XYXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _1XXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _1XXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ _0XXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ _0XXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ WXXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ WXXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ ZXXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ ZXXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ YXXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ YXXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>::type
+ XXXZ( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>::type
+ XXXZ( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _111Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _111Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _011Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _011Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W11Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W11Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z11Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z11Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y11Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y11Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X11Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X11Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _101Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _101Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _001Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _001Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W01Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W01Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z01Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z01Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y01Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y01Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X01Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X01Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1W1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1W1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0W1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0W1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WW1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WW1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZW1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZW1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YW1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YW1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XW1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XW1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1Z1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1Z1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0Z1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0Z1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZ1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZ1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZ1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZ1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZ1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZ1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZ1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZ1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1Y1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1Y1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0Y1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0Y1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WY1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WY1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZY1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZY1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YY1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YY1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XY1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XY1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1X1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1X1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0X1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0X1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WX1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WX1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZX1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZX1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YX1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YX1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XX1Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XX1Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _110Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _110Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _010Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _010Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W10Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W10Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z10Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z10Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y10Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y10Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X10Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X10Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _100Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _100Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _000Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _000Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W00Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W00Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z00Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z00Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y00Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y00Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X00Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X00Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1W0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1W0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0W0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0W0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WW0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WW0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZW0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZW0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YW0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YW0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XW0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XW0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1Z0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1Z0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0Z0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0Z0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZ0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZ0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZ0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZ0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZ0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZ0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZ0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZ0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1Y0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1Y0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0Y0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0Y0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WY0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WY0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZY0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZY0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YY0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YY0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XY0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XY0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1X0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1X0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0X0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0X0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WX0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WX0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZX0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZX0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YX0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YX0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XX0Y( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XX0Y( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _11WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _11WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _01WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _01WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W1WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W1WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z1WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z1WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y1WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y1WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X1WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X1WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _10WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _10WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _00WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _00WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W0WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W0WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z0WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z0WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y0WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y0WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X0WY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X0WY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1WWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1WWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0WWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0WWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WWWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WWWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZWWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZWWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YWWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YWWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XWWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XWWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1ZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1ZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0ZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0ZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1YWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1YWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0YWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0YWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WYWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WYWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZYWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZYWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YYWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YYWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XYWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XYWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1XWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1XWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0XWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0XWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WXWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WXWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZXWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZXWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YXWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YXWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XXWY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XXWY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _11ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _11ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _01ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _01ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W1ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W1ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z1ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z1ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y1ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y1ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X1ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X1ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _10ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _10ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _00ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _00ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W0ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W0ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z0ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z0ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y0ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y0ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X0ZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X0ZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1WZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1WZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0WZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0WZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WWZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WWZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZWZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZWZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YWZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YWZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XWZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XWZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1ZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1ZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0ZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0ZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1YZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1YZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0YZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0YZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WYZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WYZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZYZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZYZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YYZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YYZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XYZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XYZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1XZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1XZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0XZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0XZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WXZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WXZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZXZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZXZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YXZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YXZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XXZY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XXZY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _11YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _11YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _01YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _01YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W1YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W1YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z1YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z1YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y1YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y1YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X1YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X1YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _10YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _10YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _00YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _00YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W0YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W0YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z0YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z0YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y0YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y0YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X0YY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X0YY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1WYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1WYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0WYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0WYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WWYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WWYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZWYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZWYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YWYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YWYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XWYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XWYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1ZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1ZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0ZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0ZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1YYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1YYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0YYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0YYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WYYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WYYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZYYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZYYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YYYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YYYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XYYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XYYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1XYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1XYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0XYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0XYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WXYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WXYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZXYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZXYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YXYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YXYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XXYY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XXYY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _11XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _11XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _01XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _01XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W1XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W1XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z1XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z1XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y1XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y1XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X1XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X1XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _10XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _10XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _00XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _00XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ W0XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ W0XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Z0XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Z0XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ Y0XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ Y0XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ X0XY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ X0XY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1WXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1WXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0WXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0WXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WWXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WWXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZWXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZWXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YWXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YWXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XWXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XWXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1ZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1ZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0ZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0ZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XZXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XZXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1YXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1YXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0YXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0YXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WYXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WYXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZYXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZYXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YYXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YYXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XYXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XYXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _1XXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _1XXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ _0XXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ _0XXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ WXXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ WXXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ ZXXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ ZXXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ YXXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ YXXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>::type
+ XXXY( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>::type
+ XXXY( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _111X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _111X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _011X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _011X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W11X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W11X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z11X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z11X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y11X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y11X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X11X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X11X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _101X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _101X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _001X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _001X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W01X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W01X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z01X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z01X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y01X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y01X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X01X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X01X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1W1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1W1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0W1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0W1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WW1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WW1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZW1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZW1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YW1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YW1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XW1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XW1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1Z1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1Z1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0Z1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0Z1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZ1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZ1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZ1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZ1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZ1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZ1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZ1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZ1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1Y1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1Y1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0Y1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0Y1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WY1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WY1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZY1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZY1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YY1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YY1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XY1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XY1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1X1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1X1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0X1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0X1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WX1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WX1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZX1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZX1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YX1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YX1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XX1X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XX1X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _110X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _110X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _010X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _010X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W10X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W10X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z10X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z10X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y10X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y10X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X10X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X10X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _100X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _100X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _000X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _000X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W00X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W00X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z00X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z00X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y00X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y00X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X00X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X00X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1W0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1W0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0W0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0W0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WW0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WW0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZW0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZW0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YW0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YW0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XW0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XW0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1Z0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1Z0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0Z0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0Z0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZ0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZ0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZ0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZ0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZ0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZ0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZ0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZ0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1Y0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1Y0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0Y0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0Y0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WY0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WY0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZY0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZY0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YY0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YY0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XY0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XY0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1X0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1X0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0X0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0X0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WX0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WX0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZX0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZX0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YX0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YX0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XX0X( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XX0X( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _11WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _11WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _01WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _01WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W1WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W1WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z1WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z1WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y1WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y1WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X1WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X1WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _10WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _10WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _00WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _00WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W0WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W0WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z0WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z0WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y0WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y0WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X0WX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X0WX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1WWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1WWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0WWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0WWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WWWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WWWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZWWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZWWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YWWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YWWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XWWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XWWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1ZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1ZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0ZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0ZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1YWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1YWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0YWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0YWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WYWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WYWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZYWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZYWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YYWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YYWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XYWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XYWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1XWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1XWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0XWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0XWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WXWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WXWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZXWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZXWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YXWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YXWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XXWX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XXWX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _11ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _11ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _01ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _01ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W1ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W1ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z1ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z1ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y1ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y1ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X1ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X1ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _10ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _10ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _00ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _00ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W0ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W0ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z0ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z0ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y0ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y0ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X0ZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X0ZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1WZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1WZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0WZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0WZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WWZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WWZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZWZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZWZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YWZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YWZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XWZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XWZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1ZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1ZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0ZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0ZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1YZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1YZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0YZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0YZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WYZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WYZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZYZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZYZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YYZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YYZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XYZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XYZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1XZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1XZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0XZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0XZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WXZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WXZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZXZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZXZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YXZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YXZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XXZX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XXZX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _11YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _11YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _01YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _01YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W1YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W1YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z1YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z1YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y1YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y1YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X1YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X1YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _10YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _10YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _00YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _00YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W0YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W0YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z0YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z0YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y0YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y0YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X0YX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X0YX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1WYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1WYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0WYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0WYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WWYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WWYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZWYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZWYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YWYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YWYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XWYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XWYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1ZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1ZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0ZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0ZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1YYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1YYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0YYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0YYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WYYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WYYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZYYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZYYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YYYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YYYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XYYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XYYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1XYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1XYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0XYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0XYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WXYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WXYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZXYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZXYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YXYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YXYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XXYX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XXYX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _11XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _11XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _01XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _01XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W1XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W1XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z1XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z1XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y1XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y1XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X1XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X1XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _10XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _10XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _00XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _00XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ W0XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ W0XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Z0XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Z0XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ Y0XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ Y0XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ X0XX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ X0XX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1WXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1WXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0WXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0WXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WWXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WWXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZWXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZWXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YWXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YWXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XWXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XWXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1ZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1ZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0ZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0ZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XZXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XZXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1YXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1YXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0YXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0YXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WYXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WYXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZYXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZYXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YYXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YYXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XYXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XYXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _1XXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _1XXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ _0XXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ _0XXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<-1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ WXXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=4,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ WXXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<3,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ ZXXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=3,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ ZXXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<2,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ YXXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=2,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ YXXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<1,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>::type
+ XXXX( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > const &>(a);
+ }
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value && vec_traits<V>::dim>=1,
+ qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>::type
+ XXXX( V & a )
+ {
+ return reinterpret_cast<qvm_detail::sw_<V,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0,qvm_detail::swizzle_idx<0 > > > > > &>(a);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_mat_operations2.hpp b/boost/qvm/gen/vec_mat_operations2.hpp
new file mode 100644
index 0000000000..d446e9b27a
--- /dev/null
+++ b/boost/qvm/gen/vec_mat_operations2.hpp
@@ -0,0 +1,113 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_F622919DE18B1FDAB0CA992B9729D49
+#define BOOST_QVM_F622919DE18B1FDAB0CA992B9729D49
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==2 && mat_traits<A>::cols==2 &&
+ vec_traits<B>::dim==2,
+ deduce_vec2<A,B,2> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Tb const b0 = vec_traits<B>::template read_element<0>(b);
+ Tb const b1 = vec_traits<B>::template read_element<1>(b);
+ typedef typename deduce_vec2<A,B,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==2);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1;
+ vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_mv_defined;
+
+ template <>
+ struct
+ mul_mv_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<B>::rows==2 && mat_traits<B>::cols==2 &&
+ vec_traits<A>::dim==2,
+ deduce_vec2<A,B,2> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a0 = vec_traits<A>::template read_element<0>(a);
+ Ta const a1 = vec_traits<A>::template read_element<1>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ typedef typename deduce_vec2<A,B,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==2);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*b00+a1*b10;
+ vec_traits<R>::template write_element<1>(r)=a0*b01+a1*b11;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_vm_defined;
+
+ template <>
+ struct
+ mul_vm_defined<2,2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_mat_operations3.hpp b/boost/qvm/gen/vec_mat_operations3.hpp
new file mode 100644
index 0000000000..deec8ec04e
--- /dev/null
+++ b/boost/qvm/gen/vec_mat_operations3.hpp
@@ -0,0 +1,127 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_2C807EC599D5E980B2EAC9CC53BF67D6
+#define BOOST_QVM_2C807EC599D5E980B2EAC9CC53BF67D6
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3 &&
+ vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Tb const b0 = vec_traits<B>::template read_element<0>(b);
+ Tb const b1 = vec_traits<B>::template read_element<1>(b);
+ Tb const b2 = vec_traits<B>::template read_element<2>(b);
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2;
+ vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2;
+ vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_mv_defined;
+
+ template <>
+ struct
+ mul_mv_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<B>::rows==3 && mat_traits<B>::cols==3 &&
+ vec_traits<A>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a0 = vec_traits<A>::template read_element<0>(a);
+ Ta const a1 = vec_traits<A>::template read_element<1>(a);
+ Ta const a2 = vec_traits<A>::template read_element<2>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*b00+a1*b10+a2*b20;
+ vec_traits<R>::template write_element<1>(r)=a0*b01+a1*b11+a2*b21;
+ vec_traits<R>::template write_element<2>(r)=a0*b02+a1*b12+a2*b22;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_vm_defined;
+
+ template <>
+ struct
+ mul_vm_defined<3,3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_mat_operations4.hpp b/boost/qvm/gen/vec_mat_operations4.hpp
new file mode 100644
index 0000000000..3016cf2465
--- /dev/null
+++ b/boost/qvm/gen/vec_mat_operations4.hpp
@@ -0,0 +1,145 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_BF14D67E2DDC8E6683EF574961FF698F
+#define BOOST_QVM_BF14D67E2DDC8E6683EF574961FF698F
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 &&
+ vec_traits<B>::dim==4,
+ deduce_vec2<A,B,4> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
+ Ta const a30 = mat_traits<A>::template read_element<3,0>(a);
+ Ta const a31 = mat_traits<A>::template read_element<3,1>(a);
+ Ta const a32 = mat_traits<A>::template read_element<3,2>(a);
+ Ta const a33 = mat_traits<A>::template read_element<3,3>(a);
+ Tb const b0 = vec_traits<B>::template read_element<0>(b);
+ Tb const b1 = vec_traits<B>::template read_element<1>(b);
+ Tb const b2 = vec_traits<B>::template read_element<2>(b);
+ Tb const b3 = vec_traits<B>::template read_element<3>(b);
+ typedef typename deduce_vec2<A,B,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2+a03*b3;
+ vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2+a13*b3;
+ vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2+a23*b3;
+ vec_traits<R>::template write_element<3>(r)=a30*b0+a31*b1+a32*b2+a33*b3;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_mv_defined;
+
+ template <>
+ struct
+ mul_mv_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<B>::rows==4 && mat_traits<B>::cols==4 &&
+ vec_traits<A>::dim==4,
+ deduce_vec2<A,B,4> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename mat_traits<B>::scalar_type Tb;
+ Ta const a0 = vec_traits<A>::template read_element<0>(a);
+ Ta const a1 = vec_traits<A>::template read_element<1>(a);
+ Ta const a2 = vec_traits<A>::template read_element<2>(a);
+ Ta const a3 = vec_traits<A>::template read_element<3>(a);
+ Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
+ Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
+ Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
+ Tb const b03 = mat_traits<B>::template read_element<0,3>(b);
+ Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
+ Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
+ Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
+ Tb const b13 = mat_traits<B>::template read_element<1,3>(b);
+ Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
+ Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
+ Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
+ Tb const b23 = mat_traits<B>::template read_element<2,3>(b);
+ Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
+ Tb const b31 = mat_traits<B>::template read_element<3,1>(b);
+ Tb const b32 = mat_traits<B>::template read_element<3,2>(b);
+ Tb const b33 = mat_traits<B>::template read_element<3,3>(b);
+ typedef typename deduce_vec2<A,B,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*b00+a1*b10+a2*b20+a3*b30;
+ vec_traits<R>::template write_element<1>(r)=a0*b01+a1*b11+a2*b21+a3*b31;
+ vec_traits<R>::template write_element<2>(r)=a0*b02+a1*b12+a2*b22+a3*b32;
+ vec_traits<R>::template write_element<3>(r)=a0*b03+a1*b13+a2*b23+a3*b33;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct mul_vm_defined;
+
+ template <>
+ struct
+ mul_vm_defined<4,4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_operations2.hpp b/boost/qvm/gen/vec_operations2.hpp
new file mode 100644
index 0000000000..715aec5bdd
--- /dev/null
+++ b/boost/qvm/gen/vec_operations2.hpp
@@ -0,0 +1,632 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_5DD4CBFC96F5453B13D89A1CDBAE32
+#define BOOST_QVM_5DD4CBFC96F5453B13D89A1CDBAE32
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/throw_exception.hpp>
+#include <boost/qvm/vec_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ deduce_vec2<A,B,2> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==2);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)+vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)+vec_traits<B>::template read_element<1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_vv_defined;
+
+ template <>
+ struct
+ plus_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ deduce_vec2<A,B,2> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,2>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==2);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)-vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)-vec_traits<B>::template read_element<1>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_vv_defined;
+
+ template <>
+ struct
+ minus_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)+=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)+=vec_traits<B>::template read_element<1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_eq_vv_defined;
+
+ template <>
+ struct
+ plus_eq_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)-=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)-=vec_traits<B>::template read_element<1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_eq_vv_defined;
+
+ template <>
+ struct
+ minus_eq_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)*b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_vs_defined;
+
+ template <>
+ struct
+ mul_vs_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)*=b;
+ vec_traits<A>::template write_element<1>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_vs_defined;
+
+ template <>
+ struct
+ mul_eq_vs_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)/b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_vs_defined;
+
+ template <>
+ struct
+ div_vs_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)/=b;
+ vec_traits<A>::template write_element<1>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_eq_vs_defined;
+
+ template <>
+ struct
+ div_eq_vs_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)=vec_traits<B>::template read_element<1>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct assign_vv_defined;
+
+ template <>
+ struct
+ assign_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ vec_traits<R>::dim==2 && vec_traits<A>::dim==2,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct convert_to_v_defined;
+
+ template <>
+ struct
+ convert_to_v_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b) &&
+ vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct eq_vv_defined;
+
+ template <>
+ struct
+ eq_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b)) ||
+ !(vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct neq_vv_defined;
+
+ template <>
+ struct
+ neq_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2,
+ deduce_vec<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=-vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=-vec_traits<A>::template read_element<1>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_v_defined;
+
+ template <>
+ struct
+ minus_v_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==2,
+ typename vec_traits<A>::scalar_type>::type
+ mag( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const m2=a0*a0+a1*a1;
+ T const mag=sqrt<T>(m2);
+ return mag;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_v_defined;
+
+ template <>
+ struct
+ mag_v_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==2,
+ typename vec_traits<A>::scalar_type>::type
+ mag_sqr( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const m2=a0*a0+a1*a1;
+ return m2;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag_sqr;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_sqr_v_defined;
+
+ template <>
+ struct
+ mag_sqr_v_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2,
+ deduce_vec<A> >::type
+ normalized( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const m2=a0*a0+a1*a1;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*rm;
+ vec_traits<R>::template write_element<1>(r)=a1*rm;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalized;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==2,
+ void>::type
+ normalize( A & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const m2=a0*a0+a1*a1;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ vec_traits<A>::template write_element<0>(a)*=rm;
+ vec_traits<A>::template write_element<1>(a)*=rm;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalize;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct normalize_v_defined;
+
+ template <>
+ struct
+ normalize_v_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==2 && vec_traits<B>::dim==2,
+ deduce_scalar<typename vec_traits<A>::scalar_type,typename vec_traits<B>::scalar_type> >::type
+ dot( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ typedef typename deduce_scalar<Ta,Tb>::type Tr;
+ Ta const a0=vec_traits<A>::template read_element<0>(a);
+ Ta const a1=vec_traits<A>::template read_element<1>(a);
+ Tb const b0=vec_traits<B>::template read_element<0>(b);
+ Tb const b1=vec_traits<B>::template read_element<1>(b);
+ Tr const dot=a0*b0+a1*b1;
+ return dot;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::dot;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct dot_vv_defined;
+
+ template <>
+ struct
+ dot_vv_defined<2>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_operations3.hpp b/boost/qvm/gen/vec_operations3.hpp
new file mode 100644
index 0000000000..405848fd85
--- /dev/null
+++ b/boost/qvm/gen/vec_operations3.hpp
@@ -0,0 +1,653 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_209A50EE407836FD124932F69E7D49DC
+#define BOOST_QVM_209A50EE407836FD124932F69E7D49DC
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/throw_exception.hpp>
+#include <boost/qvm/vec_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)+vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)+vec_traits<B>::template read_element<1>(b);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)+vec_traits<B>::template read_element<2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_vv_defined;
+
+ template <>
+ struct
+ plus_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)-vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)-vec_traits<B>::template read_element<1>(b);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)-vec_traits<B>::template read_element<2>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_vv_defined;
+
+ template <>
+ struct
+ minus_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)+=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)+=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)+=vec_traits<B>::template read_element<2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_eq_vv_defined;
+
+ template <>
+ struct
+ plus_eq_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)-=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)-=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)-=vec_traits<B>::template read_element<2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_eq_vv_defined;
+
+ template <>
+ struct
+ minus_eq_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)*b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)*b;
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_vs_defined;
+
+ template <>
+ struct
+ mul_vs_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)*=b;
+ vec_traits<A>::template write_element<1>(a)*=b;
+ vec_traits<A>::template write_element<2>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_vs_defined;
+
+ template <>
+ struct
+ mul_eq_vs_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)/b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)/b;
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_vs_defined;
+
+ template <>
+ struct
+ div_vs_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)/=b;
+ vec_traits<A>::template write_element<1>(a)/=b;
+ vec_traits<A>::template write_element<2>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_eq_vs_defined;
+
+ template <>
+ struct
+ div_eq_vs_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)=vec_traits<B>::template read_element<2>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct assign_vv_defined;
+
+ template <>
+ struct
+ assign_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ vec_traits<R>::dim==3 && vec_traits<A>::dim==3,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct convert_to_v_defined;
+
+ template <>
+ struct
+ convert_to_v_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b) &&
+ vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b) &&
+ vec_traits<A>::template read_element<2>(a)==vec_traits<B>::template read_element<2>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct eq_vv_defined;
+
+ template <>
+ struct
+ eq_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b)) ||
+ !(vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b)) ||
+ !(vec_traits<A>::template read_element<2>(a)==vec_traits<B>::template read_element<2>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct neq_vv_defined;
+
+ template <>
+ struct
+ neq_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3,
+ deduce_vec<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=-vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=-vec_traits<A>::template read_element<1>(a);
+ vec_traits<R>::template write_element<2>(r)=-vec_traits<A>::template read_element<2>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_v_defined;
+
+ template <>
+ struct
+ minus_v_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==3,
+ typename vec_traits<A>::scalar_type>::type
+ mag( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const m2=a0*a0+a1*a1+a2*a2;
+ T const mag=sqrt<T>(m2);
+ return mag;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_v_defined;
+
+ template <>
+ struct
+ mag_v_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==3,
+ typename vec_traits<A>::scalar_type>::type
+ mag_sqr( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const m2=a0*a0+a1*a1+a2*a2;
+ return m2;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag_sqr;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_sqr_v_defined;
+
+ template <>
+ struct
+ mag_sqr_v_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3,
+ deduce_vec<A> >::type
+ normalized( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const m2=a0*a0+a1*a1+a2*a2;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*rm;
+ vec_traits<R>::template write_element<1>(r)=a1*rm;
+ vec_traits<R>::template write_element<2>(r)=a2*rm;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalized;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==3,
+ void>::type
+ normalize( A & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const m2=a0*a0+a1*a1+a2*a2;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ vec_traits<A>::template write_element<0>(a)*=rm;
+ vec_traits<A>::template write_element<1>(a)*=rm;
+ vec_traits<A>::template write_element<2>(a)*=rm;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalize;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct normalize_v_defined;
+
+ template <>
+ struct
+ normalize_v_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ deduce_scalar<typename vec_traits<A>::scalar_type,typename vec_traits<B>::scalar_type> >::type
+ dot( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ typedef typename deduce_scalar<Ta,Tb>::type Tr;
+ Ta const a0=vec_traits<A>::template read_element<0>(a);
+ Ta const a1=vec_traits<A>::template read_element<1>(a);
+ Ta const a2=vec_traits<A>::template read_element<2>(a);
+ Tb const b0=vec_traits<B>::template read_element<0>(b);
+ Tb const b1=vec_traits<B>::template read_element<1>(b);
+ Tb const b2=vec_traits<B>::template read_element<2>(b);
+ Tr const dot=a0*b0+a1*b1+a2*b2;
+ return dot;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::dot;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct dot_vv_defined;
+
+ template <>
+ struct
+ dot_vv_defined<3>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/gen/vec_operations4.hpp b/boost/qvm/gen/vec_operations4.hpp
new file mode 100644
index 0000000000..ac7c8e4c62
--- /dev/null
+++ b/boost/qvm/gen/vec_operations4.hpp
@@ -0,0 +1,674 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_AD4F14F2444066D06BC430B7323BA122
+#define BOOST_QVM_AD4F14F2444066D06BC430B7323BA122
+
+//This file was generated by a program. Do not edit manually.
+
+#include <boost/qvm/deduce_scalar.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/throw_exception.hpp>
+#include <boost/qvm/vec_traits.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ deduce_vec2<A,B,4> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)+vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)+vec_traits<B>::template read_element<1>(b);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)+vec_traits<B>::template read_element<2>(b);
+ vec_traits<R>::template write_element<3>(r)=vec_traits<A>::template read_element<3>(a)+vec_traits<B>::template read_element<3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_vv_defined;
+
+ template <>
+ struct
+ plus_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ deduce_vec2<A,B,4> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,4>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)-vec_traits<B>::template read_element<0>(b);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)-vec_traits<B>::template read_element<1>(b);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)-vec_traits<B>::template read_element<2>(b);
+ vec_traits<R>::template write_element<3>(r)=vec_traits<A>::template read_element<3>(a)-vec_traits<B>::template read_element<3>(b);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_vv_defined;
+
+ template <>
+ struct
+ minus_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)+=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)+=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)+=vec_traits<B>::template read_element<2>(b);
+ vec_traits<A>::template write_element<3>(a)+=vec_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator+=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct plus_eq_vv_defined;
+
+ template <>
+ struct
+ plus_eq_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)-=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)-=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)-=vec_traits<B>::template read_element<2>(b);
+ vec_traits<A>::template write_element<3>(a)-=vec_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_eq_vv_defined;
+
+ template <>
+ struct
+ minus_eq_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)*b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)*b;
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)*b;
+ vec_traits<R>::template write_element<3>(r)=vec_traits<A>::template read_element<3>(a)*b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_vs_defined;
+
+ template <>
+ struct
+ mul_vs_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)*=b;
+ vec_traits<A>::template write_element<1>(a)*=b;
+ vec_traits<A>::template write_element<2>(a)*=b;
+ vec_traits<A>::template write_element<3>(a)*=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mul_eq_vs_defined;
+
+ template <>
+ struct
+ mul_eq_vs_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4 && is_scalar<B>::value,
+ deduce_vec<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a)/b;
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a)/b;
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a)/b;
+ vec_traits<R>::template write_element<3>(r)=vec_traits<A>::template read_element<3>(a)/b;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_vs_defined;
+
+ template <>
+ struct
+ div_vs_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ vec_traits<A>::template write_element<0>(a)/=b;
+ vec_traits<A>::template write_element<1>(a)/=b;
+ vec_traits<A>::template write_element<2>(a)/=b;
+ vec_traits<A>::template write_element<3>(a)/=b;
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator/=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct div_eq_vs_defined;
+
+ template <>
+ struct
+ div_eq_vs_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<0>(a)=vec_traits<B>::template read_element<0>(b);
+ vec_traits<A>::template write_element<1>(a)=vec_traits<B>::template read_element<1>(b);
+ vec_traits<A>::template write_element<2>(a)=vec_traits<B>::template read_element<2>(b);
+ vec_traits<A>::template write_element<3>(a)=vec_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct assign_vv_defined;
+
+ template <>
+ struct
+ assign_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ vec_traits<R>::dim==4 && vec_traits<A>::dim==4,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ vec_traits<R>::template write_element<0>(r)=vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=vec_traits<A>::template read_element<1>(a);
+ vec_traits<R>::template write_element<2>(r)=vec_traits<A>::template read_element<2>(a);
+ vec_traits<R>::template write_element<3>(r)=vec_traits<A>::template read_element<3>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::convert_to;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct convert_to_v_defined;
+
+ template <>
+ struct
+ convert_to_v_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b) &&
+ vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b) &&
+ vec_traits<A>::template read_element<2>(a)==vec_traits<B>::template read_element<2>(b) &&
+ vec_traits<A>::template read_element<3>(a)==vec_traits<B>::template read_element<3>(b);
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator==;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct eq_vv_defined;
+
+ template <>
+ struct
+ eq_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ !(vec_traits<A>::template read_element<0>(a)==vec_traits<B>::template read_element<0>(b)) ||
+ !(vec_traits<A>::template read_element<1>(a)==vec_traits<B>::template read_element<1>(b)) ||
+ !(vec_traits<A>::template read_element<2>(a)==vec_traits<B>::template read_element<2>(b)) ||
+ !(vec_traits<A>::template read_element<3>(a)==vec_traits<B>::template read_element<3>(b));
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator!=;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct neq_vv_defined;
+
+ template <>
+ struct
+ neq_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4,
+ deduce_vec<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=-vec_traits<A>::template read_element<0>(a);
+ vec_traits<R>::template write_element<1>(r)=-vec_traits<A>::template read_element<1>(a);
+ vec_traits<R>::template write_element<2>(r)=-vec_traits<A>::template read_element<2>(a);
+ vec_traits<R>::template write_element<3>(r)=-vec_traits<A>::template read_element<3>(a);
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator-;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct minus_v_defined;
+
+ template <>
+ struct
+ minus_v_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==4,
+ typename vec_traits<A>::scalar_type>::type
+ mag( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const a3=vec_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ T const mag=sqrt<T>(m2);
+ return mag;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_v_defined;
+
+ template <>
+ struct
+ mag_v_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==4,
+ typename vec_traits<A>::scalar_type>::type
+ mag_sqr( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const a3=vec_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ return m2;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mag_sqr;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct mag_sqr_v_defined;
+
+ template <>
+ struct
+ mag_sqr_v_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4,
+ deduce_vec<A> >::type
+ normalized( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const a3=vec_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a0*rm;
+ vec_traits<R>::template write_element<1>(r)=a1*rm;
+ vec_traits<R>::template write_element<2>(r)=a2*rm;
+ vec_traits<R>::template write_element<3>(r)=a3*rm;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalized;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ vec_traits<A>::dim==4,
+ void>::type
+ normalize( A & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T const a0=vec_traits<A>::template read_element<0>(a);
+ T const a1=vec_traits<A>::template read_element<1>(a);
+ T const a2=vec_traits<A>::template read_element<2>(a);
+ T const a3=vec_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ if( m2==scalar_traits<typename vec_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ vec_traits<A>::template write_element<0>(a)*=rm;
+ vec_traits<A>::template write_element<1>(a)*=rm;
+ vec_traits<A>::template write_element<2>(a)*=rm;
+ vec_traits<A>::template write_element<3>(a)*=rm;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::normalize;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct normalize_v_defined;
+
+ template <>
+ struct
+ normalize_v_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ vec_traits<A>::dim==4 && vec_traits<B>::dim==4,
+ deduce_scalar<typename vec_traits<A>::scalar_type,typename vec_traits<B>::scalar_type> >::type
+ dot( A const & a, B const & b )
+ {
+ typedef typename vec_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ typedef typename deduce_scalar<Ta,Tb>::type Tr;
+ Ta const a0=vec_traits<A>::template read_element<0>(a);
+ Ta const a1=vec_traits<A>::template read_element<1>(a);
+ Ta const a2=vec_traits<A>::template read_element<2>(a);
+ Ta const a3=vec_traits<A>::template read_element<3>(a);
+ Tb const b0=vec_traits<B>::template read_element<0>(b);
+ Tb const b1=vec_traits<B>::template read_element<1>(b);
+ Tb const b2=vec_traits<B>::template read_element<2>(b);
+ Tb const b3=vec_traits<B>::template read_element<3>(b);
+ Tr const dot=a0*b0+a1*b1+a2*b2+a3*b3;
+ return dot;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::dot;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct dot_vv_defined;
+
+ template <>
+ struct
+ dot_vv_defined<4>
+ {
+ static bool const value=true;
+ };
+ }
+
+ }
+ }
+
+#endif
diff --git a/boost/qvm/inline.hpp b/boost/qvm/inline.hpp
new file mode 100644
index 0000000000..419fad223e
--- /dev/null
+++ b/boost/qvm/inline.hpp
@@ -0,0 +1,34 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_FORCEINLINE
+# if defined(_MSC_VER)
+# define BOOST_QVM_FORCEINLINE __forceinline
+# elif defined(__GNUC__) && __GNUC__>3
+# define BOOST_QVM_FORCEINLINE inline __attribute__ ((always_inline))
+# else
+# define BOOST_QVM_FORCEINLINE inline
+# endif
+#endif
+
+#ifndef BOOST_QVM_INLINE
+#define BOOST_QVM_INLINE inline
+#endif
+
+#ifndef BOOST_QVM_INLINE_TRIVIAL
+#define BOOST_QVM_INLINE_TRIVIAL BOOST_QVM_FORCEINLINE
+#endif
+
+#ifndef BOOST_QVM_INLINE_CRITICAL
+#define BOOST_QVM_INLINE_CRITICAL BOOST_QVM_FORCEINLINE
+#endif
+
+#ifndef BOOST_QVM_INLINE_OPERATIONS
+#define BOOST_QVM_INLINE_OPERATIONS BOOST_QVM_INLINE
+#endif
+
+#ifndef BOOST_QVM_INLINE_RECURSION
+#define BOOST_QVM_INLINE_RECURSION BOOST_QVM_INLINE_OPERATIONS
+#endif
diff --git a/boost/qvm/map.hpp b/boost/qvm/map.hpp
new file mode 100644
index 0000000000..9b53211a90
--- /dev/null
+++ b/boost/qvm/map.hpp
@@ -0,0 +1,13 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_74318C76B4ED11E58A3AE198BB8E7F8B
+#define UUID_74318C76B4ED11E58A3AE198BB8E7F8B
+
+#include <boost/qvm/map_vec_mat.hpp>
+#include <boost/qvm/map_mat_vec.hpp>
+#include <boost/qvm/map_mat_mat.hpp>
+
+#endif
diff --git a/boost/qvm/map_mat_mat.hpp b/boost/qvm/map_mat_mat.hpp
new file mode 100644
index 0000000000..8f691722ea
--- /dev/null
+++ b/boost/qvm/map_mat_mat.hpp
@@ -0,0 +1,895 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_20D98340A3EB11DEB2180CD156D89593
+#define UUID_20D98340A3EB11DEB2180CD156D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/detail/transp_impl.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row,class OriginalMatrix>
+ class
+ del_row_
+ {
+ del_row_( del_row_ const & );
+ del_row_ & operator=( del_row_ const & );
+ ~del_row_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int I,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::del_row_<I,OriginalMatrix> >
+ {
+ typedef qvm_detail::del_row_<I,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows-1;
+ static int const cols=mat_traits<OriginalMatrix>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<Row+(Row>=I),Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<Row+(Row>=I),Col>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(row+(row>=I),col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(row+(row>=I),col,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::del_row_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::del_row_<J,OriginalMatrix>,qvm_detail::del_row_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int Row,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_row_<Row,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_row_<Row,A> const &>(a);
+ }
+
+ template <int Row,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_row_<Row,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_row_<Row,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Col,class OriginalMatrix>
+ class
+ del_col_
+ {
+ del_col_( del_col_ const & );
+ del_col_ & operator=( del_col_ const & );
+ ~del_col_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ del_col_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int J,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::del_col_<J,OriginalMatrix> >
+ {
+ typedef qvm_detail::del_col_<J,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows;
+ static int const cols=mat_traits<OriginalMatrix>::cols-1;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<Row,Col+(Col>=J)>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<Row,Col+(Col>=J)>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(row,col+(col>=J),reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(row,col+(col>=J),reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::del_col_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::del_col_<J,OriginalMatrix>,qvm_detail::del_col_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_col_<Col,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_col( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_col_<Col,A> const &>(a);
+ }
+
+ template <int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_col_<Col,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_col( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_col_<Col,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row,int Col,class OriginalMatrix>
+ class
+ del_row_col_
+ {
+ del_row_col_( del_row_col_ const & );
+ ~del_row_col_();
+
+ public:
+
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row_col_ &
+ operator=( del_row_col_ const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row_col_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int I,int J,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::del_row_col_<I,J,OriginalMatrix> >
+ {
+ typedef qvm_detail::del_row_col_<I,J,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows-1;
+ static int const cols=mat_traits<OriginalMatrix>::cols-1;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<Row+(Row>=I),Col+(Col>=J)>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<Row+(Row>=I),Col+(Col>=J)>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(row+(row>=I),col+(col>=J),reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(row+(row>=I),col+(col>=J),reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int I,int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::del_row_col_<I,J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int I,int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::del_row_col_<I,J,OriginalMatrix>,qvm_detail::del_row_col_<I,J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int Row,int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_row_col_<Row,Col,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row_col( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_row_col_<Row,Col,A> const &>(a);
+ }
+
+ template <int Row,int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::del_row_col_<Row,Col,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ del_row_col( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::del_row_col_<Row,Col,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row,class OriginalMatrix>
+ class
+ neg_row_
+ {
+ neg_row_( neg_row_ const & );
+ neg_row_ & operator=( neg_row_ const & );
+ ~neg_row_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ neg_row_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int I,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::neg_row_<I,OriginalMatrix> >
+ {
+ typedef qvm_detail::neg_row_<I,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows;
+ static int const cols=mat_traits<OriginalMatrix>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return Row==I ?
+ -mat_traits<OriginalMatrix>::template read_element<Row,Col>(reinterpret_cast<OriginalMatrix const &>(x)) :
+ mat_traits<OriginalMatrix>::template read_element<Row,Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return row==I?
+ -mat_traits<OriginalMatrix>::read_element_idx(row,col,reinterpret_cast<OriginalMatrix const &>(x)) :
+ mat_traits<OriginalMatrix>::read_element_idx(row,col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::neg_row_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::neg_row_<J,OriginalMatrix>,qvm_detail::neg_row_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int Row,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::neg_row_<Row,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ neg_row( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::neg_row_<Row,A> const &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Col,class OriginalMatrix>
+ class
+ neg_col_
+ {
+ neg_col_( neg_col_ const & );
+ neg_col_ & operator=( neg_col_ const & );
+ ~neg_col_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ neg_col_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int J,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::neg_col_<J,OriginalMatrix> >
+ {
+ typedef qvm_detail::neg_col_<J,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows;
+ static int const cols=mat_traits<OriginalMatrix>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return Col==J?
+ -mat_traits<OriginalMatrix>::template read_element<Row,Col>(reinterpret_cast<OriginalMatrix const &>(x)) :
+ mat_traits<OriginalMatrix>::template read_element<Row,Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return col==J?
+ -mat_traits<OriginalMatrix>::read_element_idx(row,col,reinterpret_cast<OriginalMatrix const &>(x)) :
+ mat_traits<OriginalMatrix>::read_element_idx(row,col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::neg_col_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int J,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::neg_col_<J,OriginalMatrix>,qvm_detail::neg_col_<J,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::neg_col_<Col,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ neg_col( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::neg_col_<Col,A> const &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::transposed_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ transposed( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::transposed_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::transposed_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ transposed( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::transposed_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row1,int Row2,class OriginalMatrix>
+ class
+ swap_rows_
+ {
+ swap_rows_( swap_rows_ const & );
+ swap_rows_ & operator=( swap_rows_ const & );
+ ~swap_rows_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_rows_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int R1,int R2,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::swap_rows_<R1,R2,OriginalMatrix> >
+ {
+ typedef qvm_detail::swap_rows_<R1,R2,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows;
+ static int const cols=mat_traits<OriginalMatrix>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<(Row==R1 && R1!=R2)*R2+(Row==R2 && R1!=R2)*R1+((Row!=R1 && Row!=R2) || R1==R2)*Row,Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<(Row==R1 && R1!=R2)*R2+(Row==R2 && R1!=R2)*R1+((Row!=R1 && Row!=R2) || R1==R2)*Row,Col>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(row==R1?R2:row==R2?R1:row,col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(row==R1?R2:row==R2?R1:row,col,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int R1,int R2,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::swap_rows_<R1,R2,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int R1,int R2,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::swap_rows_<R1,R2,OriginalMatrix>,qvm_detail::swap_rows_<R1,R2,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int R1,int R2,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::swap_rows_<R1,R2,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_rows( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::swap_rows_<R1,R2,A> const &>(a);
+ }
+
+ template <int R1,int R2,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::swap_rows_<R1,R2,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_rows( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::swap_rows_<R1,R2,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row1,int Row2,class OriginalMatrix>
+ class
+ swap_cols_
+ {
+ swap_cols_( swap_cols_ const & );
+ swap_cols_ & operator=( swap_cols_ const & );
+ ~swap_cols_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_cols_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int C1,int C2,class OriginalMatrix>
+ struct
+ mat_traits< qvm_detail::swap_cols_<C1,C2,OriginalMatrix> >
+ {
+ typedef qvm_detail::swap_cols_<C1,C2,OriginalMatrix> this_matrix;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const rows=mat_traits<OriginalMatrix>::rows;
+ static int const cols=mat_traits<OriginalMatrix>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template read_element<Row,(Col==C1 && C1!=C2)*C2+(Col==C2 && C1!=C2)*C1+((Col!=C1 && Col!=C2) || C1==C2)*Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<OriginalMatrix>::template write_element<Row,(Col==C1 && C1!=C2)*C2+(Col==C2 && C1!=C2)*C1+((Col!=C1 && Col!=C2) || C1==C2)*Col>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::read_element_idx(row,col==C1?C2:col==C2?C1:col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<OriginalMatrix>::write_element_idx(row,col==C1?C2:col==C2?C1:col,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int C1,int C2,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat<qvm_detail::swap_cols_<C1,C2,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int C1,int C2,class OriginalMatrix,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::swap_cols_<C1,C2,OriginalMatrix>,qvm_detail::swap_cols_<C1,C2,OriginalMatrix>,R,C>
+ {
+ typedef mat<typename mat_traits<OriginalMatrix>::scalar_type,R,C> type;
+ };
+
+ template <int C1,int C2,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::swap_cols_<C1,C2,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_cols( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::swap_cols_<C1,C2,A> const &>(a);
+ }
+
+ template <int C1,int C2,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::swap_cols_<C1,C2,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ swap_cols( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::swap_cols_<C1,C2,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/map_mat_vec.hpp b/boost/qvm/map_mat_vec.hpp
new file mode 100644
index 0000000000..81a2527d21
--- /dev/null
+++ b/boost/qvm/map_mat_vec.hpp
@@ -0,0 +1,537 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_5265FC7CA1C011DE9EBDFFA956D89593
+#define UUID_5265FC7CA1C011DE9EBDFFA956D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Col,class OriginalMatrix>
+ class
+ col_
+ {
+ col_( col_ const & );
+ col_ & operator=( col_ const & );
+ ~col_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ col_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int Col,class OriginalMatrix>
+ struct
+ vec_traits< qvm_detail::col_<Col,OriginalMatrix> >
+ {
+ typedef qvm_detail::col_<Col,OriginalMatrix> this_vector;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const dim=mat_traits<OriginalMatrix>::rows;
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<mat_traits<OriginalMatrix>::cols);
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template read_element<I,Col>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template write_element<I,Col>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::read_element_idx(i,Col,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::write_element_idx(i,Col,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int Col,class OriginalMatrix,int D>
+ struct
+ deduce_vec<qvm_detail::col_<Col,OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <int Col,class OriginalMatrix,int D>
+ struct
+ deduce_vec2<qvm_detail::col_<Col,OriginalMatrix>,qvm_detail::col_<Col,OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::col_<Col,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ col( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::col_<Col,A> const &>(a);
+ }
+
+ template <int Col,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::col_<Col,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ col( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::col_<Col,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Row,class OriginalMatrix>
+ class
+ row_
+ {
+ row_( row_ const & );
+ row_ & operator=( row_ const & );
+ ~row_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ row_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <int Row,class OriginalMatrix>
+ struct
+ vec_traits< qvm_detail::row_<Row,OriginalMatrix> >
+ {
+ typedef qvm_detail::row_<Row,OriginalMatrix> this_vector;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const dim=mat_traits<OriginalMatrix>::cols;
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<mat_traits<OriginalMatrix>::rows);
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template read_element<Row,I>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template write_element<Row,I>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::read_element_idx(Row,i,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::write_element_idx(Row,i,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <int Row,class OriginalMatrix,int D>
+ struct
+ deduce_vec<qvm_detail::row_<Row,OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <int Row,class OriginalMatrix,int D>
+ struct
+ deduce_vec2<qvm_detail::row_<Row,OriginalMatrix>,qvm_detail::row_<Row,OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <int Row,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::row_<Row,A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ row( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::row_<Row,A> const &>(a);
+ }
+
+ template <int Row,class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::row_<Row,A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ row( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::row_<Row,A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalMatrix>
+ class
+ diag_
+ {
+ diag_( diag_ const & );
+ diag_ & operator=( diag_ const & );
+ ~diag_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ diag_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <int X,int Y,bool Which>
+ struct diag_bool_dispatch;
+
+ template <int X,int Y>
+ struct
+ diag_bool_dispatch<X,Y,true>
+ {
+ static int const value=X;
+ };
+
+ template <int X,int Y>
+ struct
+ diag_bool_dispatch<X,Y,false>
+ {
+ static int const value=Y;
+ };
+ }
+
+ template <class OriginalMatrix>
+ struct
+ vec_traits< qvm_detail::diag_<OriginalMatrix> >
+ {
+ typedef qvm_detail::diag_<OriginalMatrix> this_vector;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const dim=qvm_detail::diag_bool_dispatch<
+ mat_traits<OriginalMatrix>::rows,
+ mat_traits<OriginalMatrix>::cols,
+ mat_traits<OriginalMatrix>::rows<=mat_traits<OriginalMatrix>::cols>::value;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template read_element<I,I>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template write_element<I,I>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::read_element_idx(i,i,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::write_element_idx(i,i,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <class OriginalMatrix,int D>
+ struct
+ deduce_vec<qvm_detail::diag_<OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <class OriginalMatrix,int D>
+ struct
+ deduce_vec2<qvm_detail::diag_<OriginalMatrix>,qvm_detail::diag_<OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::diag_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ diag( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::diag_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value,
+ qvm_detail::diag_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ diag( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::diag_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalMatrix>
+ class
+ translation_
+ {
+ translation_( translation_ const & );
+ ~translation_();
+
+ public:
+
+ translation_ &
+ operator=( translation_ const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ translation_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalMatrix>
+ struct
+ vec_traits< qvm_detail::translation_<OriginalMatrix> >
+ {
+ typedef qvm_detail::translation_<OriginalMatrix> this_vector;
+ typedef typename mat_traits<OriginalMatrix>::scalar_type scalar_type;
+ static int const dim=mat_traits<OriginalMatrix>::rows-1;
+ BOOST_QVM_STATIC_ASSERT(mat_traits<OriginalMatrix>::rows==mat_traits<OriginalMatrix>::cols);
+ BOOST_QVM_STATIC_ASSERT(mat_traits<OriginalMatrix>::rows>=3);
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template read_element<I,dim>(reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return mat_traits<OriginalMatrix>::template write_element<I,dim>(reinterpret_cast<OriginalMatrix &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::read_element_idx(i,dim,reinterpret_cast<OriginalMatrix const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return mat_traits<OriginalMatrix>::write_element_idx(i,dim,reinterpret_cast<OriginalMatrix &>(x));
+ }
+ };
+
+ template <class OriginalMatrix,int D>
+ struct
+ deduce_vec<qvm_detail::translation_<OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <class OriginalMatrix,int D>
+ struct
+ deduce_vec2<qvm_detail::translation_<OriginalMatrix>,qvm_detail::translation_<OriginalMatrix>,D>
+ {
+ typedef vec<typename mat_traits<OriginalMatrix>::scalar_type,D> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value && mat_traits<A>::rows==mat_traits<A>::cols && mat_traits<A>::rows>=3,
+ qvm_detail::translation_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ translation( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::translation_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_mat<A>::value && mat_traits<A>::rows==mat_traits<A>::cols && mat_traits<A>::rows>=3,
+ qvm_detail::translation_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ translation( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::translation_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/map_vec_mat.hpp b/boost/qvm/map_vec_mat.hpp
new file mode 100644
index 0000000000..b7412f2963
--- /dev/null
+++ b/boost/qvm/map_vec_mat.hpp
@@ -0,0 +1,591 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_3EDF999CA1C011DEBA5C8DA956D89593
+#define UUID_3EDF999CA1C011DEBA5C8DA956D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/vec_traits.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalVector>
+ class
+ col_mat_
+ {
+ col_mat_( col_mat_ const & );
+ col_mat_ & operator=( col_mat_ const & );
+ ~col_mat_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ col_mat_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalVector>
+ struct
+ mat_traits< qvm_detail::col_mat_<OriginalVector> >
+ {
+ typedef qvm_detail::col_mat_<OriginalVector> this_matrix;
+ typedef typename vec_traits<OriginalVector>::scalar_type scalar_type;
+ static int const rows=vec_traits<OriginalVector>::dim;
+ static int const cols=1;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Col==0);
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ return vec_traits<OriginalVector>::template read_element<Row>(reinterpret_cast<OriginalVector const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Col==0);
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ return vec_traits<OriginalVector>::template write_element<Row>(reinterpret_cast<OriginalVector &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(col==0);
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ return vec_traits<OriginalVector>::read_element_idx(row,reinterpret_cast<OriginalVector const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(col==0);
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ return vec_traits<OriginalVector>::write_element_idx(row,reinterpret_cast<OriginalVector &>(x));
+ }
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat<qvm_detail::col_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::col_mat_<OriginalVector>,qvm_detail::col_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::col_mat_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ col_mat( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::col_mat_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::col_mat_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ col_mat( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::col_mat_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalVector>
+ class
+ row_mat_
+ {
+ row_mat_( row_mat_ const & );
+ row_mat_ & operator=( row_mat_ const & );
+ ~row_mat_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ row_mat_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalVector>
+ struct
+ mat_traits< qvm_detail::row_mat_<OriginalVector> >
+ {
+ typedef qvm_detail::row_mat_<OriginalVector> this_matrix;
+ typedef typename vec_traits<OriginalVector>::scalar_type scalar_type;
+ static int const rows=1;
+ static int const cols=vec_traits<OriginalVector>::dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row==0);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return vec_traits<OriginalVector>::template read_element<Col>(reinterpret_cast<OriginalVector const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row==0);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return vec_traits<OriginalVector>::template write_element<Col>(reinterpret_cast<OriginalVector &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row==0);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return vec_traits<OriginalVector>::read_element_idx(col,reinterpret_cast<OriginalVector const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row==0);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return vec_traits<OriginalVector>::write_element_idx(col,reinterpret_cast<OriginalVector &>(x));
+ }
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat<qvm_detail::row_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::row_mat_<OriginalVector>,qvm_detail::row_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::row_mat_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ row_mat( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::row_mat_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::row_mat_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ row_mat( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::row_mat_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalVector>
+ class
+ translation_mat_
+ {
+ translation_mat_( translation_mat_ const & );
+ translation_mat_ & operator=( translation_mat_ const & );
+ ~translation_mat_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ translation_mat_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <class M,int Row,int Col,bool TransCol=(Col==mat_traits<M>::cols-1)>
+ struct read_translation_matat;
+
+ template <class OriginalVector,int Row,int Col,bool TransCol>
+ struct
+ read_translation_matat<translation_mat_<OriginalVector>,Row,Col,TransCol>
+ {
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits< translation_mat_<OriginalVector> >::scalar_type
+ f( translation_mat_<OriginalVector> const & )
+ {
+ return scalar_traits<typename mat_traits< translation_mat_<OriginalVector> >::scalar_type>::value(0);
+ }
+ };
+
+ template <class OriginalVector,int D>
+ struct
+ read_translation_matat<translation_mat_<OriginalVector>,D,D,false>
+ {
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits< translation_mat_<OriginalVector> >::scalar_type
+ f( translation_mat_<OriginalVector> const & )
+ {
+ return scalar_traits<typename mat_traits< translation_mat_<OriginalVector> >::scalar_type>::value(1);
+ }
+ };
+
+ template <class OriginalVector,int D>
+ struct
+ read_translation_matat<translation_mat_<OriginalVector>,D,D,true>
+ {
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits< translation_mat_<OriginalVector> >::scalar_type
+ f( translation_mat_<OriginalVector> const & )
+ {
+ return scalar_traits<typename mat_traits< translation_mat_<OriginalVector> >::scalar_type>::value(1);
+ }
+ };
+
+ template <class OriginalVector,int Row,int Col>
+ struct
+ read_translation_matat<translation_mat_<OriginalVector>,Row,Col,true>
+ {
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits< translation_mat_<OriginalVector> >::scalar_type
+ f( translation_mat_<OriginalVector> const & x )
+ {
+ return vec_traits<OriginalVector>::template read_element<Row>(reinterpret_cast<OriginalVector const &>(x));
+ }
+ };
+ }
+
+ template <class OriginalVector>
+ struct
+ mat_traits< qvm_detail::translation_mat_<OriginalVector> >
+ {
+ typedef qvm_detail::translation_mat_<OriginalVector> this_matrix;
+ typedef typename vec_traits<OriginalVector>::scalar_type scalar_type;
+ static int const rows=vec_traits<OriginalVector>::dim+1;
+ static int const cols=vec_traits<OriginalVector>::dim+1;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return qvm_detail::read_translation_matat<qvm_detail::translation_mat_<OriginalVector>,Row,Col>::f(x);
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col==cols-1);
+ BOOST_QVM_STATIC_ASSERT(Col!=Row);
+ return vec_traits<OriginalVector>::template write_element<Row>(reinterpret_cast<OriginalVector &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return
+ row==col?
+ scalar_traits<scalar_type>::value(1):
+ (col==cols-1?
+ vec_traits<OriginalVector>::read_element_idx(row,reinterpret_cast<OriginalVector const &>(x)):
+ scalar_traits<scalar_type>::value(0));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col==cols-1);
+ BOOST_QVM_ASSERT(col!=row);
+ return vec_traits<OriginalVector>::write_element_idx(row,reinterpret_cast<OriginalVector &>(x));
+ }
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat<qvm_detail::translation_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::translation_mat_<OriginalVector>,qvm_detail::translation_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::translation_mat_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ translation_mat( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::translation_mat_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::translation_mat_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ translation_mat( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::translation_mat_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalVector>
+ class
+ diag_mat_
+ {
+ diag_mat_( diag_mat_ const & );
+ diag_mat_ & operator=( diag_mat_ const & );
+ ~diag_mat_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ diag_mat_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class OriginalVector>
+ struct
+ mat_traits< qvm_detail::diag_mat_<OriginalVector> >
+ {
+ typedef qvm_detail::diag_mat_<OriginalVector> this_matrix;
+ typedef typename vec_traits<OriginalVector>::scalar_type scalar_type;
+ static int const rows=vec_traits<OriginalVector>::dim;
+ static int const cols=vec_traits<OriginalVector>::dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return Row==Col?vec_traits<OriginalVector>::template read_element<Row>(reinterpret_cast<OriginalVector const &>(x)):scalar_traits<scalar_type>::value(0);
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Row==Col);
+ return vec_traits<OriginalVector>::template write_element<Row>(reinterpret_cast<OriginalVector &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return row==col?vec_traits<OriginalVector>::read_element_idx(row,reinterpret_cast<OriginalVector const &>(x)):scalar_traits<scalar_type>::value(0);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(row==col);
+ return vec_traits<OriginalVector>::write_element_idx(row,reinterpret_cast<OriginalVector &>(x));
+ }
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat<qvm_detail::diag_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class OriginalVector,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::diag_mat_<OriginalVector>,qvm_detail::diag_mat_<OriginalVector>,R,C>
+ {
+ typedef mat<typename vec_traits<OriginalVector>::scalar_type,R,C> type;
+ };
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::diag_mat_<A> const &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ diag_mat( A const & a )
+ {
+ return reinterpret_cast<typename qvm_detail::diag_mat_<A> const &>(a);
+ }
+
+ template <class A>
+ typename boost::enable_if_c<
+ is_vec<A>::value,
+ qvm_detail::diag_mat_<A> &>::type
+ BOOST_QVM_INLINE_TRIVIAL
+ diag_mat( A & a )
+ {
+ return reinterpret_cast<typename qvm_detail::diag_mat_<A> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat.hpp b/boost/qvm/mat.hpp
new file mode 100644
index 0000000000..cd17d41626
--- /dev/null
+++ b/boost/qvm/mat.hpp
@@ -0,0 +1,98 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_67E67D68A32F11DEA56FD18556D89593
+#define UUID_67E67D68A32F11DEA56FD18556D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int Rows,int Cols>
+ struct
+ mat
+ {
+ T a[Rows][Cols];
+ template <class R>
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <class M>
+ struct mat_traits;
+
+ template <class T,int Rows,int Cols>
+ struct
+ mat_traits< mat<T,Rows,Cols> >
+ {
+ typedef mat<T,Rows,Cols> this_matrix;
+ typedef T scalar_type;
+ static int const rows=Rows;
+ static int const cols=Cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Cols);
+ return x.a[Row][Col];
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Cols);
+ return x.a[Row][Col];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<Rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<Cols);
+ return x.a[row][col];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<Rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<Cols);
+ return x.a[row][col];
+ }
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat_access.hpp b/boost/qvm/mat_access.hpp
new file mode 100644
index 0000000000..a50ff66db2
--- /dev/null
+++ b/boost/qvm/mat_access.hpp
@@ -0,0 +1,258 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_47B1D1217B411E08424FA0ADFD72085
+#define UUID_47B1D1217B411E08424FA0ADFD72085
+
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ template <int R,int C,class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<M>::value,
+ typename mat_traits<M>::scalar_type>::type
+ A( M const & a )
+ {
+ BOOST_STATIC_ASSERT(R>=0);
+ BOOST_STATIC_ASSERT(R<mat_traits<M>::rows);
+ BOOST_STATIC_ASSERT(C>=0);
+ BOOST_STATIC_ASSERT(C<mat_traits<M>::cols);
+ return mat_traits<M>::template read_element<R,C>(a);
+ }
+
+ template <int R,int C,class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<M>::value,
+ typename mat_traits<M>::scalar_type &>::type
+ A( M & a )
+ {
+ BOOST_STATIC_ASSERT(R>=0);
+ BOOST_STATIC_ASSERT(R<mat_traits<M>::rows);
+ BOOST_STATIC_ASSERT(C>=0);
+ BOOST_STATIC_ASSERT(C<mat_traits<M>::cols);
+ return mat_traits<M>::template write_element<R,C>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A00( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A01( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A02( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A03( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A04( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A05( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A06( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A07( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A08( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A09( M const & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<0,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A10( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A11( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A12( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A13( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A14( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A15( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A16( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A17( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A18( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A19( M const & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<1,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A20( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A21( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A22( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A23( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A24( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A25( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A26( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A27( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A28( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A29( M const & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<2,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A30( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A31( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A32( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A33( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A34( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A35( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A36( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A37( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A38( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A39( M const & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<3,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A40( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A41( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A42( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A43( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A44( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A45( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A46( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A47( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A48( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A49( M const & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<4,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A50( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A51( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A52( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A53( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A54( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A55( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A56( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A57( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A58( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A59( M const & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<5,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A60( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A61( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A62( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A63( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A64( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A65( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A66( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A67( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A68( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A69( M const & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<6,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A70( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A71( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A72( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A73( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A74( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A75( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A76( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A77( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A78( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A79( M const & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<7,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A80( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A81( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A82( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A83( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A84( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A85( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A86( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A87( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A88( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A89( M const & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<8,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A90( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A91( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A92( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A93( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A94( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A95( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A96( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A97( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A98( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type>::type A99( M const & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template read_element<9,9>(a); }
+
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A00( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A01( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A02( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A03( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A04( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A05( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A06( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A07( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A08( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A09( M & a ) { BOOST_STATIC_ASSERT(0<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<0,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A10( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A11( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A12( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A13( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A14( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A15( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A16( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A17( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A18( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A19( M & a ) { BOOST_STATIC_ASSERT(1<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<1,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A20( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A21( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A22( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A23( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A24( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A25( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A26( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A27( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A28( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A29( M & a ) { BOOST_STATIC_ASSERT(2<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<2,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A30( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A31( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A32( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A33( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A34( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A35( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A36( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A37( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A38( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A39( M & a ) { BOOST_STATIC_ASSERT(3<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<3,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A40( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A41( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A42( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A43( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A44( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A45( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A46( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A47( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A48( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A49( M & a ) { BOOST_STATIC_ASSERT(4<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<4,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A50( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A51( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A52( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A53( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A54( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A55( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A56( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A57( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A58( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A59( M & a ) { BOOST_STATIC_ASSERT(5<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<5,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A60( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A61( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A62( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A63( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A64( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A65( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A66( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A67( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A68( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A69( M & a ) { BOOST_STATIC_ASSERT(6<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<6,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A70( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A71( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A72( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A73( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A74( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A75( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A76( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A77( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A78( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A79( M & a ) { BOOST_STATIC_ASSERT(7<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<7,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A80( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A81( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A82( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A83( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A84( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A85( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A86( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A87( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A88( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A89( M & a ) { BOOST_STATIC_ASSERT(8<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<8,9>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A90( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 0<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,0>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A91( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 1<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,1>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A92( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 2<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,2>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A93( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 3<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,3>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A94( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 4<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,4>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A95( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 5<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,5>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A96( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 6<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,6>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A97( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 7<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,7>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A98( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 8<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,8>(a); }
+ template <class M> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_mat<M>::value,typename mat_traits<M>::scalar_type &>::type A99( M & a ) { BOOST_STATIC_ASSERT(9<mat_traits<M>::rows && 9<mat_traits<M>::cols); return mat_traits<M>::template write_element<9,9>(a); }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat_index.hpp b/boost/qvm/mat_index.hpp
new file mode 100644
index 0000000000..e7bcdad1e5
--- /dev/null
+++ b/boost/qvm/mat_index.hpp
@@ -0,0 +1,145 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_90273D9C0E5911E281B7981F6288709B
+#define UUID_90273D9C0E5911E281B7981F6288709B
+
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/exception/info.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct
+ mat_index_read_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ matrix_r
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits<A>::scalar_type
+ read_element_idx( A const & a, int r, int c )
+ {
+ return (I/mat_traits<A>::cols)==r && (I%mat_traits<A>::cols)==c?
+ mat_traits<A>::template read_element<I/mat_traits<A>::cols,I%mat_traits<A>::cols>(a) :
+ matrix_r<I+1,N>::read_element_idx(a,r,c);
+ }
+ };
+
+ template <int N>
+ struct
+ matrix_r<N,N>
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename mat_traits<A>::scalar_type
+ read_element_idx( A const & a, int, int )
+ {
+ BOOST_QVM_ASSERT(0);
+ return mat_traits<A>::template read_element<0,0>(a);
+ }
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename boost::enable_if_c<
+ is_mat<A>::value &&
+ !qvm_detail::mat_index_read_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ typename mat_traits<A>::scalar_type>::type
+ mat_index_read( A const & a, int r, int c )
+ {
+ return qvm_detail::matrix_r<0,mat_traits<A>::rows*mat_traits<A>::cols>::read_element_idx(a,r,c);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct
+ mat_index_write_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ matrix_w
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename mat_traits<A>::scalar_type &
+ write_element_idx( A & a, int r, int c )
+ {
+ return (I/mat_traits<A>::cols)==r && (I%mat_traits<A>::cols)==c?
+ mat_traits<A>::template write_element<I/mat_traits<A>::cols,I%mat_traits<A>::cols>(a) :
+ matrix_w<I+1,N>::write_element_idx(a,r,c);
+ }
+ };
+
+ template <int N>
+ struct
+ matrix_w<N,N>
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename mat_traits<A>::scalar_type &
+ write_element_idx( A & a, int, int )
+ {
+ BOOST_QVM_ASSERT(0);
+ return mat_traits<A>::template write_element<0,0>(a);
+ }
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename boost::enable_if_c<
+ is_mat<A>::value &&
+ !qvm_detail::mat_index_write_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ typename mat_traits<A>::scalar_type &>::type
+ mat_index_write( A & a, int r, int c )
+ {
+ return qvm_detail::matrix_w<0,mat_traits<A>::rows*mat_traits<A>::cols>::write_element_idx(a,r,c);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::mat_index_read;
+ using ::boost::qvm::mat_index_write;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat_operations.hpp b/boost/qvm/mat_operations.hpp
new file mode 100644
index 0000000000..46eaba5efe
--- /dev/null
+++ b/boost/qvm/mat_operations.hpp
@@ -0,0 +1,1962 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_4F915D9ED30A11DF962186E3DFD72085
+#define UUID_4F915D9ED30A11DF962186E3DFD72085
+
+#include <boost/qvm/mat_operations2.hpp>
+#include <boost/qvm/mat_operations3.hpp>
+#include <boost/qvm/mat_operations4.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/detail/determinant_impl.hpp>
+#include <boost/qvm/detail/cofactor_impl.hpp>
+#include <boost/qvm/detail/transp_impl.hpp>
+#include <boost/qvm/scalar_traits.hpp>
+#include <string>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ BOOST_QVM_INLINE_CRITICAL
+ void const *
+ get_valid_ptr_mat_operations()
+ {
+ static int const obj=0;
+ return &obj;
+ }
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_to_string_detail
+ {
+ template <class T>
+ std::string to_string( T const & x );
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int C>
+ struct
+ to_string_m_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int SizeMinusOne>
+ struct
+ to_string_matrix_elements
+ {
+ template <class A>
+ static
+ std::string
+ f( A const & a )
+ {
+ using namespace qvm_to_string_detail;
+ return
+ ( (I%mat_traits<A>::cols)==0 ? '(' : ',' ) +
+ to_string(mat_traits<A>::template read_element<I/mat_traits<A>::cols,I%mat_traits<A>::cols>(a)) +
+ ( (I%mat_traits<A>::cols)==mat_traits<A>::cols-1 ? ")" : "" ) +
+ to_string_matrix_elements<I+1,SizeMinusOne>::f(a);
+ }
+ };
+
+ template <int SizeMinusOne>
+ struct
+ to_string_matrix_elements<SizeMinusOne,SizeMinusOne>
+ {
+ template <class A>
+ static
+ std::string
+ f( A const & a )
+ {
+ using namespace qvm_to_string_detail;
+ return
+ ( (SizeMinusOne%mat_traits<A>::cols)==0 ? '(' : ',' ) +
+ to_string(mat_traits<A>::template read_element<SizeMinusOne/mat_traits<A>::cols,SizeMinusOne%mat_traits<A>::cols>(a)) +
+ ')';
+ }
+ };
+ }
+
+ template <class A>
+ inline
+ typename boost::enable_if_c<
+ is_mat<A>::value &&
+ !qvm_detail::to_string_m_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ std::string>::type
+ to_string( A const & a )
+ {
+ return "("+qvm_detail::to_string_matrix_elements<0,mat_traits<A>::rows*mat_traits<A>::cols-1>::f(a)+')';
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ assign_mm_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ copy_matrix_elements
+ {
+ template <class A,class B>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ void
+ f( A & a, B const & b )
+ {
+ mat_traits<A>::template write_element<I/mat_traits<A>::cols,I%mat_traits<A>::cols>(a) =
+ mat_traits<B>::template read_element<I/mat_traits<B>::cols,I%mat_traits<B>::cols>(b);
+ copy_matrix_elements<I+1,N>::f(a,b);
+ }
+ };
+
+ template <int N>
+ struct
+ copy_matrix_elements<N,N>
+ {
+ template <class A,class B>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ void
+ f( A &, B const & )
+ {
+ }
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename boost::enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::assign_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ qvm_detail::copy_matrix_elements<0,mat_traits<A>::rows*mat_traits<A>::cols>::f(a,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B,class Cmp>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols,
+ bool>::type
+ cmp( A const & a, B const & b, Cmp f )
+ {
+ typedef typename deduce_scalar<
+ typename mat_traits<A>::scalar_type,
+ typename mat_traits<B>::scalar_type>::type T;
+ int const rows=mat_traits<A>::rows;
+ int const cols=mat_traits<A>::cols;
+ T m1[rows][cols]; assign(m1,a);
+ T m2[rows][cols]; assign(m2,b);
+ for( int i=0; i!=rows; ++i )
+ for( int j=0; j!=cols; ++j )
+ if( !f(m1[i][j],m2[i][j]) )
+ return false;
+ return true;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ convert_to_m_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<R>::value && is_mat<A>::value &&
+ mat_traits<R>::rows==mat_traits<A>::rows &&
+ mat_traits<R>::cols==mat_traits<A>::cols &&
+ !qvm_detail::convert_to_m_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r; assign(r,a);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ determinant_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ !qvm_detail::determinant_defined<mat_traits<A>::rows>::value,
+ typename mat_traits<A>::scalar_type>::type
+ determinant( A const & a )
+ {
+ return qvm_detail::determinant_impl(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T,int Dim>
+ class
+ identity_mat_
+ {
+ identity_mat_( identity_mat_ const & );
+ identity_mat_ & operator=( identity_mat_ const & );
+ ~identity_mat_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class T,int Dim>
+ struct
+ mat_traits< qvm_detail::identity_mat_<T,Dim> >
+ {
+ typedef qvm_detail::identity_mat_<T,Dim> this_matrix;
+ typedef T scalar_type;
+ static int const rows=Dim;
+ static int const cols=Dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Dim);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Dim);
+ return scalar_traits<scalar_type>::value(Row==Col);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<Dim);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<Dim);
+ return scalar_traits<scalar_type>::value(row==col);
+ }
+ };
+
+ template <class T,int Dim>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::identity_mat_<T,Dim> const &
+ identity_mat()
+ {
+ return *(qvm_detail::identity_mat_<T,Dim> const *)qvm_detail::get_valid_ptr_mat_operations();
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ set_identity( A & a )
+ {
+ assign(a,identity_mat<typename mat_traits<A>::scalar_type,mat_traits<A>::rows>());
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ struct
+ projection_
+ {
+ T const _00;
+ T const _11;
+ T const _22;
+ T const _23;
+ T const _32;
+
+ BOOST_QVM_INLINE_TRIVIAL
+ projection_( T _00, T _11, T _22, T _23, T _32 ):
+ _00(_00),
+ _11(_11),
+ _22(_22),
+ _23(_23),
+ _32(_32)
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <int Row,int Col>
+ struct
+ projection_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( projection_<T> const & )
+ {
+ return scalar_traits<T>::value(0);
+ }
+ };
+
+ template <> struct projection_get<0,0> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( projection_<T> const & m ) { return m._00; } };
+ template <> struct projection_get<1,1> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( projection_<T> const & m ) { return m._11; } };
+ template <> struct projection_get<2,2> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( projection_<T> const & m ) { return m._22; } };
+ template <> struct projection_get<2,3> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( projection_<T> const & m ) { return m._23; } };
+ template <> struct projection_get<3,2> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( projection_<T> const & m ) { return m._32; } };
+ }
+
+ template <class T>
+ struct
+ mat_traits< qvm_detail::projection_<T> >
+ {
+ typedef qvm_detail::projection_<T> this_matrix;
+ typedef T scalar_type;
+ static int const rows=4;
+ static int const cols=4;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return qvm_detail::projection_get<Row,Col>::get(x);
+ }
+ };
+
+ template <class T>
+ qvm_detail::projection_<T>
+ BOOST_QVM_INLINE_OPERATIONS
+ perspective_lh( T fov_y, T aspect_ratio, T z_near, T z_far )
+ {
+ T const one = scalar_traits<T>::value(1);
+ T const ys = one/tan<T>(fov_y/scalar_traits<T>::value(2));
+ T const xs = ys/aspect_ratio;
+ T const zd = z_far-z_near;
+ T const z1 = z_far/zd;
+ T const z2 = -z_near*z1;
+ return qvm_detail::projection_<T>(xs,ys,z1,z2,one);
+ }
+
+ template <class T>
+ qvm_detail::projection_<T>
+ BOOST_QVM_INLINE_OPERATIONS
+ perspective_rh( T fov_y, T aspect_ratio, T z_near, T z_far )
+ {
+ T const one = scalar_traits<T>::value(1);
+ T const ys = one/tan<T>(fov_y/scalar_traits<T>::value(2));
+ T const xs = ys/aspect_ratio;
+ T const zd = z_near-z_far;
+ T const z1 = z_far/zd;
+ T const z2 = z_near*z1;
+ return qvm_detail::projection_<T>(xs,ys,z1,z2,-one);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalType,class Scalar>
+ class
+ matrix_scalar_cast_
+ {
+ matrix_scalar_cast_( matrix_scalar_cast_ const & );
+ matrix_scalar_cast_ & operator=( matrix_scalar_cast_ const & );
+ ~matrix_scalar_cast_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ matrix_scalar_cast_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <bool> struct scalar_cast_matrix_filter { };
+ template <> struct scalar_cast_matrix_filter<true> { typedef int type; };
+ }
+
+ template <class OriginalType,class Scalar>
+ struct
+ mat_traits< qvm_detail::matrix_scalar_cast_<OriginalType,Scalar> >
+ {
+ typedef Scalar scalar_type;
+ typedef qvm_detail::matrix_scalar_cast_<OriginalType,Scalar> this_matrix;
+ static int const rows=mat_traits<OriginalType>::rows;
+ static int const cols=mat_traits<OriginalType>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return scalar_type(mat_traits<OriginalType>::template read_element<Row,Col>(reinterpret_cast<OriginalType const &>(x)));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return scalar_type(mat_traits<OriginalType>::read_element_idx(col,row,reinterpret_cast<OriginalType const &>(x)));
+ }
+ };
+
+ template <class OriginalType,class Scalar,int R,int C>
+ struct
+ deduce_mat<qvm_detail::matrix_scalar_cast_<OriginalType,Scalar>,R,C>
+ {
+ typedef mat<Scalar,R,C> type;
+ };
+
+ template <class Scalar,class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::matrix_scalar_cast_<T,Scalar> const &
+ scalar_cast( T const & x, typename qvm_detail::scalar_cast_matrix_filter<is_mat<T>::value>::type=0 )
+ {
+ return reinterpret_cast<qvm_detail::matrix_scalar_cast_<T,Scalar> const &>(x);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ div_eq_ms_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_scalar<B>::value &&
+ !qvm_detail::div_eq_ms_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<A>::write_element_idx(i,j,a)/=b;
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ div_ms_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_scalar<B>::value &&
+ !qvm_detail::div_ms_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_mat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<R>::write_element_idx(i,j,r)=mat_traits<A>::read_element_idx(i,j,a)/b;
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ eq_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::eq_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ if( mat_traits<A>::read_element_idx(i,j,a)!=mat_traits<B>::read_element_idx(i,j,b) )
+ return false;
+ return true;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ minus_eq_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::minus_eq_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<A>::write_element_idx(i,j,a)-=mat_traits<B>::read_element_idx(i,j,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ minus_m_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value &&
+ !qvm_detail::minus_m_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_mat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<R>::write_element_idx(i,j,r)=-mat_traits<A>::read_element_idx(i,j,a);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ minus_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::minus_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<A>::cols> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<A>::cols>::type R;
+ R r;
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<R>::write_element_idx(i,j,r)=mat_traits<A>::read_element_idx(i,j,a)-mat_traits<B>::read_element_idx(i,j,b);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ mul_eq_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::mul_eq_mm_defined<mat_traits<A>::rows>::value,
+ A &>::type
+ operator*=( A & r, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ Ta a[mat_traits<A>::rows][mat_traits<A>::cols];
+ for( int i=0; i<mat_traits<A>::rows; ++i )
+ for( int j=0; j<mat_traits<B>::cols; ++j )
+ a[i][j]=mat_traits<A>::read_element_idx(i,j,r);
+ for( int i=0; i<mat_traits<A>::rows; ++i )
+ for( int j=0; j<mat_traits<B>::cols; ++j )
+ {
+ Ta x(scalar_traits<Ta>::value(0));
+ for( int k=0; k<mat_traits<A>::cols; ++k )
+ x += a[i][k]*mat_traits<B>::read_element_idx(k,j,b);
+ mat_traits<A>::write_element_idx(i,j,r) = x;
+ }
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ mul_eq_ms_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_scalar<B>::value &&
+ !qvm_detail::mul_eq_ms_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<A>::write_element_idx(i,j,a)*=b;
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int R,int CR,int C>
+ struct
+ mul_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::cols==mat_traits<B>::rows &&
+ !qvm_detail::mul_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols,mat_traits<B>::cols>::value,
+ deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<B>::cols> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<B>::cols>::type R;
+ R r;
+ for( int i=0; i<mat_traits<A>::rows; ++i )
+ for( int j=0; j<mat_traits<B>::cols; ++j )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ Ta x(scalar_traits<Ta>::value(0));
+ for( int k=0; k<mat_traits<A>::cols; ++k )
+ x += mat_traits<A>::read_element_idx(i,k,a)*mat_traits<B>::read_element_idx(k,j,b);
+ mat_traits<R>::write_element_idx(i,j,r) = x;
+ }
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ mul_ms_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_scalar<B>::value &&
+ !qvm_detail::mul_ms_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_mat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_mat<A>::type R;
+ R r;
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<R>::write_element_idx(i,j,r)=mat_traits<A>::read_element_idx(i,j,a)*b;
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ neq_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::neq_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ if( mat_traits<A>::read_element_idx(i,j,a)!=mat_traits<B>::read_element_idx(i,j,b) )
+ return true;
+ return false;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ plus_eq_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::plus_eq_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<A>::write_element_idx(i,j,a)+=mat_traits<B>::read_element_idx(i,j,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ plus_mm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_mat<B>::value &&
+ mat_traits<A>::rows==mat_traits<B>::rows &&
+ mat_traits<A>::cols==mat_traits<B>::cols &&
+ !qvm_detail::plus_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<A>::cols> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_mat2<A,B,mat_traits<A>::rows,mat_traits<A>::cols>::type R;
+ R r;
+ for( int i=0; i!=mat_traits<A>::rows; ++i )
+ for( int j=0; j!=mat_traits<A>::cols; ++j )
+ mat_traits<R>::write_element_idx(i,j,r)=mat_traits<A>::read_element_idx(i,j,a)+mat_traits<B>::read_element_idx(i,j,b);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ class
+ mref_
+ {
+ mref_( mref_ const & );
+ mref_ & operator=( mref_ const & );
+ ~mref_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ mref_ &
+ operator=( R const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class M>
+ struct
+ mat_traits< qvm_detail::mref_<M> >
+ {
+ typedef typename mat_traits<M>::scalar_type scalar_type;
+ typedef qvm_detail::mref_<M> this_matrix;
+ static int const rows=mat_traits<M>::rows;
+ static int const cols=mat_traits<M>::cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<M>::template read_element<Row,Col>(reinterpret_cast<M const &>(x));
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<cols);
+ return mat_traits<M>::template write_element<Row,Col>(reinterpret_cast<M &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<M>::read_element_idx(row,col,reinterpret_cast<M const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return mat_traits<M>::write_element_idx(row,col,reinterpret_cast<M &>(x));
+ }
+ };
+
+ template <class M,int R,int C>
+ struct
+ deduce_mat<qvm_detail::mref_<M>,R,C>
+ {
+ typedef mat<typename mat_traits<M>::scalar_type,R,C> type;
+ };
+
+ template <class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<M>::value,
+ qvm_detail::mref_<M> const &>::type
+ mref( M const & a )
+ {
+ return reinterpret_cast<qvm_detail::mref_<M> const &>(a);
+ }
+
+ template <class M>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_mat<M>::value,
+ qvm_detail::mref_<M> &>::type
+ mref( M & a )
+ {
+ return reinterpret_cast<qvm_detail::mref_<M> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T,int Rows,int Cols>
+ class
+ zero_mat_
+ {
+ zero_mat_( zero_mat_ const & );
+ zero_mat_ & operator=( zero_mat_ const & );
+ ~zero_mat_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class T,int Rows,int Cols>
+ struct
+ mat_traits< qvm_detail::zero_mat_<T,Rows,Cols> >
+ {
+ typedef qvm_detail::zero_mat_<T,Rows,Cols> this_matrix;
+ typedef T scalar_type;
+ static int const rows=Rows;
+ static int const cols=Cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Cols);
+ return scalar_traits<scalar_type>::value(0);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<cols);
+ return scalar_traits<scalar_type>::value(0);
+ }
+ };
+
+ template <class T,int Rows,int Cols,int R,int C>
+ struct
+ deduce_mat<qvm_detail::zero_mat_<T,Rows,Cols>,R,C>
+ {
+ typedef mat<T,R,C> type;
+ };
+
+ template <class T,int Rows,int Cols>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::zero_mat_<T,Rows,Cols> const &
+ zero_mat()
+ {
+ return *(qvm_detail::zero_mat_<T,Rows,Cols> const *)qvm_detail::get_valid_ptr_mat_operations();
+ }
+
+ template <class T,int Dim>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::zero_mat_<T,Dim,Dim> const &
+ zero_mat()
+ {
+ return *(qvm_detail::zero_mat_<T,Dim,Dim> const *)qvm_detail::get_valid_ptr_mat_operations();
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value,
+ void>::type
+ set_zero( A & a )
+ {
+ assign(a,zero_mat<typename mat_traits<A>::scalar_type,mat_traits<A>::rows,mat_traits<A>::cols>());
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D,class V>
+ struct
+ rot_mat_
+ {
+ typedef typename vec_traits<V>::scalar_type scalar_type;
+ scalar_type a[3][3];
+
+ template <class Angle>
+ BOOST_QVM_INLINE
+ rot_mat_( V const & axis, Angle angle )
+ {
+ scalar_type const x=vec_traits<V>::template read_element<0>(axis);
+ scalar_type const y=vec_traits<V>::template read_element<1>(axis);
+ scalar_type const z=vec_traits<V>::template read_element<2>(axis);
+ scalar_type const m2=x*x+y*y+z*z;
+ if( m2==scalar_traits<scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ scalar_type const s = sin<Angle>(angle);
+ scalar_type const c = cos<Angle>(angle);
+ scalar_type const x2 = x*x;
+ scalar_type const y2 = y*y;
+ scalar_type const z2 = z*z;
+ scalar_type const xy = x*y;
+ scalar_type const xz = x*z;
+ scalar_type const yz = y*z;
+ scalar_type const xs = x*s;
+ scalar_type const ys = y*s;
+ scalar_type const zs = z*s;
+ scalar_type const one = scalar_traits<scalar_type>::value(1);
+ scalar_type const c1 = one-c;
+ a[0][0] = x2+(one-x2)*c;
+ a[0][1] = xy*c1-zs;
+ a[0][2] = xz*(one-c)+ys;
+ a[1][0] = xy*c1+zs;
+ a[1][1] = y2+(one-y2)*c;
+ a[1][2] = yz*c1-xs;
+ a[2][0] = xz*c1-ys;
+ a[2][1] = yz*c1+xs;
+ a[2][2] = z2+(one-z2)*c;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <int Row,int Col>
+ struct
+ rot_m_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const (&)[3][3] )
+ {
+ return scalar_traits<T>::value(Row==Col);
+ }
+ };
+
+ template <> struct rot_m_get<0,0> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[0][0]; } };
+ template <> struct rot_m_get<0,1> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[0][1]; } };
+ template <> struct rot_m_get<0,2> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[0][2]; } };
+ template <> struct rot_m_get<1,0> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[1][0]; } };
+ template <> struct rot_m_get<1,1> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[1][1]; } };
+ template <> struct rot_m_get<1,2> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[1][2]; } };
+ template <> struct rot_m_get<2,0> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[2][0]; } };
+ template <> struct rot_m_get<2,1> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[2][1]; } };
+ template <> struct rot_m_get<2,2> { template <class T> static BOOST_QVM_INLINE_CRITICAL T get( T const (&a)[3][3] ) { return a[2][2]; } };
+ }
+
+ template <class M>
+ struct mat_traits;
+
+ template <int D,class V>
+ struct
+ mat_traits< qvm_detail::rot_mat_<D,V> >
+ {
+ typedef qvm_detail::rot_mat_<D,V> this_matrix;
+ typedef typename this_matrix::scalar_type scalar_type;
+ static int const rows=D;
+ static int const cols=D;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<D);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<D);
+ return qvm_detail::rot_m_get<Row,Col>::get(x.a);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<D);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<D);
+ return row<3 && col<3?
+ x.a[row][col] :
+ scalar_traits<scalar_type>::value(row==col);
+ }
+ };
+
+ template <int Dim,class A,class Angle>
+ BOOST_QVM_INLINE
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==3,
+ qvm_detail::rot_mat_<Dim,A> >::type
+ rot_mat( A const & axis, Angle angle )
+ {
+ return qvm_detail::rot_mat_<Dim,A>(axis,angle);
+ }
+
+ template <class A,class B,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ mat_traits<A>::rows>=3 &&
+ is_vec<B>::value && vec_traits<B>::dim==3,
+ void>::type
+ set_rot( A & a, B const & axis, Angle angle )
+ {
+ assign(a,rot_mat<mat_traits<A>::rows>(axis,angle));
+ }
+
+ template <class A,class B,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ mat_traits<A>::rows>=3 &&
+ is_vec<B>::value && vec_traits<B>::dim==3,
+ void>::type
+ rotate( A & a, B const & axis, Angle angle )
+ {
+ a *= rot_mat<mat_traits<A>::rows>(axis,angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Dim,class Angle>
+ struct
+ rotx_mat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ rotx_mat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ rotx_mat_( rotx_mat_ const & );
+ rotx_mat_ & operator=( rotx_mat_ const & );
+ ~rotx_mat_();
+ };
+
+ template <int Row,int Col>
+ struct
+ rotx_m_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(Row==Col);
+ }
+ };
+
+ template <>
+ struct
+ rotx_m_get<1,1>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotx_m_get<1,2>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return -sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotx_m_get<2,1>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotx_m_get<2,2>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+ }
+
+ template <int Dim,class Angle>
+ struct
+ mat_traits< qvm_detail::rotx_mat_<Dim,Angle> >
+ {
+ typedef qvm_detail::rotx_mat_<Dim,Angle> this_matrix;
+ typedef Angle scalar_type;
+ static int const rows=Dim;
+ static int const cols=Dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Dim);
+ BOOST_QVM_STATIC_ASSERT(Col<Dim);
+ return qvm_detail::rotx_m_get<Row,Col>::get(reinterpret_cast<Angle const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(row<Dim);
+ BOOST_QVM_ASSERT(col<Dim);
+ Angle const & a=reinterpret_cast<Angle const &>(x);
+ if( row==1 )
+ {
+ if( col==1 )
+ return cos<scalar_type>(a);
+ if( col==2 )
+ return -sin<scalar_type>(a);
+ }
+ if( row==2 )
+ {
+ if( col==1 )
+ return sin<scalar_type>(a);
+ if( col==2 )
+ return cos<scalar_type>(a);
+ }
+ return scalar_traits<scalar_type>::value(row==col);
+ }
+ };
+
+ template <int Dim,class Angle>
+ struct
+ deduce_mat<qvm_detail::rotx_mat_<Dim,Angle>,Dim,Dim>
+ {
+ typedef mat<Angle,Dim,Dim> type;
+ };
+
+ template <int Dim,class Angle>
+ struct
+ deduce_mat2<qvm_detail::rotx_mat_<Dim,Angle>,qvm_detail::rotx_mat_<Dim,Angle>,Dim,Dim>
+ {
+ typedef mat<Angle,Dim,Dim> type;
+ };
+
+ template <int Dim,class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::rotx_mat_<Dim,Angle> const &
+ rotx_mat( Angle const & angle )
+ {
+ BOOST_QVM_STATIC_ASSERT(Dim>=3);
+ return reinterpret_cast<qvm_detail::rotx_mat_<Dim,Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=3 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ set_rotx( A & a, Angle angle )
+ {
+ assign(a,rotx_mat<mat_traits<A>::rows>(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=3 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ rotate_x( A & a, Angle angle )
+ {
+ a *= rotx_mat<mat_traits<A>::rows>(angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Dim,class Angle>
+ struct
+ roty_mat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ roty_mat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ roty_mat_( roty_mat_ const & );
+ roty_mat_ & operator=( roty_mat_ const & );
+ ~roty_mat_();
+ };
+
+ template <int Row,int Col>
+ struct
+ roty_m_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(Row==Col);
+ }
+ };
+
+ template <>
+ struct
+ roty_m_get<0,0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ roty_m_get<0,2>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ roty_m_get<2,0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return -sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ roty_m_get<2,2>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+ }
+
+ template <int Dim,class Angle>
+ struct
+ mat_traits< qvm_detail::roty_mat_<Dim,Angle> >
+ {
+ typedef qvm_detail::roty_mat_<Dim,Angle> this_matrix;
+ typedef Angle scalar_type;
+ static int const rows=Dim;
+ static int const cols=Dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Dim);
+ BOOST_QVM_STATIC_ASSERT(Col<Dim);
+ return qvm_detail::roty_m_get<Row,Col>::get(reinterpret_cast<Angle const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(row<Dim);
+ BOOST_QVM_ASSERT(col<Dim);
+ Angle const & a=reinterpret_cast<Angle const &>(x);
+ if( row==0 )
+ {
+ if( col==0 )
+ return cos<scalar_type>(a);
+ if( col==2 )
+ return sin<scalar_type>(a);
+ }
+ if( row==2 )
+ {
+ if( col==0 )
+ return -sin<scalar_type>(a);
+ if( col==2 )
+ return cos<scalar_type>(a);
+ }
+ return scalar_traits<scalar_type>::value(row==col);
+ }
+ };
+
+ template <int Dim,class Angle>
+ struct
+ deduce_mat<qvm_detail::roty_mat_<Dim,Angle>,Dim,Dim>
+ {
+ typedef mat<Angle,Dim,Dim> type;
+ };
+
+ template <int Dim,class Angle>
+ struct
+ deduce_mat2<qvm_detail::roty_mat_<Dim,Angle>,qvm_detail::roty_mat_<Dim,Angle>,Dim,Dim>
+ {
+ typedef mat<Angle,Dim,Dim> type;
+ };
+
+ template <int Dim,class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::roty_mat_<Dim,Angle> const &
+ roty_mat( Angle const & angle )
+ {
+ BOOST_QVM_STATIC_ASSERT(Dim>=3);
+ return reinterpret_cast<qvm_detail::roty_mat_<Dim,Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=2 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ set_roty( A & a, Angle angle )
+ {
+ assign(a,roty_mat<mat_traits<A>::rows>(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=3 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ rotate_y( A & a, Angle angle )
+ {
+ a *= roty_mat<mat_traits<A>::rows>(angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int Dim,class Angle>
+ struct
+ rotz_mat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ rotz_mat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ rotz_mat_( rotz_mat_ const & );
+ rotz_mat_ & operator=( rotz_mat_ const & );
+ ~rotz_mat_();
+ };
+
+ template <int Row,int Col>
+ struct
+ rotz_m_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(Row==Col);
+ }
+ };
+
+ template <>
+ struct
+ rotz_m_get<0,0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotz_m_get<0,1>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return -sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotz_m_get<1,0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle);
+ }
+ };
+
+ template <>
+ struct
+ rotz_m_get<1,1>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle);
+ }
+ };
+ }
+
+ template <int Dim,class Angle>
+ struct
+ mat_traits< qvm_detail::rotz_mat_<Dim,Angle> >
+ {
+ typedef qvm_detail::rotz_mat_<Dim,Angle> this_matrix;
+ typedef Angle scalar_type;
+ static int const rows=Dim;
+ static int const cols=Dim;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Dim);
+ BOOST_QVM_STATIC_ASSERT(Col<Dim);
+ return qvm_detail::rotz_m_get<Row,Col>::get(reinterpret_cast<Angle const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(row<Dim);
+ BOOST_QVM_ASSERT(col<Dim);
+ Angle const & a=reinterpret_cast<Angle const &>(x);
+ if( row==0 )
+ {
+ if( col==0 )
+ return cos<scalar_type>(a);
+ if( col==1 )
+ return -sin<scalar_type>(a);
+ }
+ if( row==1 )
+ {
+ if( col==0 )
+ return sin<scalar_type>(a);
+ if( col==1 )
+ return cos<scalar_type>(a);
+ }
+ return scalar_traits<scalar_type>::value(row==col);
+ }
+ };
+
+ template <int Dim,class Angle>
+ struct
+ deduce_mat<qvm_detail::rotz_mat_<Dim,Angle>,Dim,Dim>
+ {
+ typedef mat<Angle,Dim,Dim> type;
+ };
+
+ template <int Dim,class Angle,int R,int C>
+ struct
+ deduce_mat2<qvm_detail::rotz_mat_<Dim,Angle>,qvm_detail::rotz_mat_<Dim,Angle>,R,C>
+ {
+ typedef mat<Angle,R,C> type;
+ };
+
+ template <int Dim,class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::rotz_mat_<Dim,Angle> const &
+ rotz_mat( Angle const & angle )
+ {
+ BOOST_QVM_STATIC_ASSERT(Dim>=2);
+ return reinterpret_cast<qvm_detail::rotz_mat_<Dim,Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=2 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ set_rotz( A & a, Angle angle )
+ {
+ assign(a,rotz_mat<mat_traits<A>::rows>(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows>=2 &&
+ mat_traits<A>::rows==mat_traits<A>::cols,
+ void>::type
+ rotate_z( A & a, Angle angle )
+ {
+ a *= rotz_mat<mat_traits<A>::rows>(angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ inverse_m_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_scalar<B>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ !qvm_detail::inverse_m_defined<mat_traits<A>::rows>::value,
+ deduce_mat<A> >::type
+ inverse( A const & a, B det )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ BOOST_QVM_ASSERT(det!=scalar_traits<T>::value(0));
+ T f=scalar_traits<T>::value(1)/det;
+ typedef typename deduce_mat<A>::type cofactor_return_type;
+ cofactor_return_type c=qvm_detail::cofactor_impl(a);
+ return reinterpret_cast<qvm_detail::transposed_<cofactor_return_type> const &>(c) * f;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename lazy_enable_if_c<
+ is_mat<A>::value &&
+ mat_traits<A>::rows==mat_traits<A>::cols &&
+ !qvm_detail::inverse_m_defined<mat_traits<A>::rows>::value,
+ deduce_mat<A> >::type
+ inverse( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T det=determinant(a);
+ if( det==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_determinant_error());
+ return inverse(a,det);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::to_string;
+ using ::boost::qvm::assign;
+ using ::boost::qvm::determinant;
+ using ::boost::qvm::cmp;
+ using ::boost::qvm::convert_to;
+ using ::boost::qvm::set_identity;
+ using ::boost::qvm::set_zero;
+ using ::boost::qvm::scalar_cast;
+ using ::boost::qvm::operator/=;
+ using ::boost::qvm::operator/;
+ using ::boost::qvm::operator==;
+ using ::boost::qvm::operator-=;
+ using ::boost::qvm::operator-;
+ using ::boost::qvm::operator*=;
+ using ::boost::qvm::operator*;
+ using ::boost::qvm::operator!=;
+ using ::boost::qvm::operator+=;
+ using ::boost::qvm::operator+;
+ using ::boost::qvm::mref;
+ using ::boost::qvm::rot_mat;
+ using ::boost::qvm::set_rot;
+ using ::boost::qvm::rotate;
+ using ::boost::qvm::set_rotx;
+ using ::boost::qvm::rotate_x;
+ using ::boost::qvm::set_roty;
+ using ::boost::qvm::rotate_y;
+ using ::boost::qvm::set_rotz;
+ using ::boost::qvm::rotate_z;
+ using ::boost::qvm::inverse;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat_operations2.hpp b/boost/qvm/mat_operations2.hpp
new file mode 100644
index 0000000000..b390780173
--- /dev/null
+++ b/boost/qvm/mat_operations2.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/mat_operations2.hpp>
diff --git a/boost/qvm/mat_operations3.hpp b/boost/qvm/mat_operations3.hpp
new file mode 100644
index 0000000000..4c76d0753c
--- /dev/null
+++ b/boost/qvm/mat_operations3.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/mat_operations3.hpp>
diff --git a/boost/qvm/mat_operations4.hpp b/boost/qvm/mat_operations4.hpp
new file mode 100644
index 0000000000..ab0835adf7
--- /dev/null
+++ b/boost/qvm/mat_operations4.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/mat_operations4.hpp>
diff --git a/boost/qvm/mat_traits.hpp b/boost/qvm/mat_traits.hpp
new file mode 100644
index 0000000000..9937443979
--- /dev/null
+++ b/boost/qvm/mat_traits.hpp
@@ -0,0 +1,33 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_8C06FE26A3E711DEA02C88BA55D89593
+#define UUID_8C06FE26A3E711DEA02C88BA55D89593
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class M>
+ struct
+ mat_traits
+ {
+ static int const rows=0;
+ static int const cols=0;
+ typedef void scalar_type;
+ };
+
+ template <class T>
+ struct
+ is_mat
+ {
+ static bool const value=mat_traits<T>::rows>0 && mat_traits<T>::cols>0;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/mat_traits_array.hpp b/boost/qvm/mat_traits_array.hpp
new file mode 100644
index 0000000000..160ead7d61
--- /dev/null
+++ b/boost/qvm/mat_traits_array.hpp
@@ -0,0 +1,118 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_FA3ED0DCA17911DEA6BBA09955D89593
+#define UUID_FA3ED0DCA17911DEA6BBA09955D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_mat.hpp>
+#include <boost/qvm/detail/remove_const.hpp>
+#include <boost/qvm/assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int R,int CR,int C>
+ struct
+ mat_traits<T[R][CR][C]>
+ {
+ static int const rows=0;
+ static int const cols=0;
+ typedef void scalar_type;
+ };
+
+ template <class T,int Rows,int Cols>
+ struct
+ mat_traits<T[Rows][Cols]>
+ {
+ typedef T this_matrix[Rows][Cols];
+ typedef typename qvm_detail::remove_const<T>::type scalar_type;
+ static int const rows=Rows;
+ static int const cols=Cols;
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_matrix const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Cols);
+ return x[Row][Col];
+ }
+
+ template <int Row,int Col>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_matrix & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(Row>=0);
+ BOOST_QVM_STATIC_ASSERT(Row<Rows);
+ BOOST_QVM_STATIC_ASSERT(Col>=0);
+ BOOST_QVM_STATIC_ASSERT(Col<Cols);
+ return x[Row][Col];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int row, int col, this_matrix const & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<Rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<Cols);
+ return x[row][col];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int row, int col, this_matrix & x )
+ {
+ BOOST_QVM_ASSERT(row>=0);
+ BOOST_QVM_ASSERT(row<Rows);
+ BOOST_QVM_ASSERT(col>=0);
+ BOOST_QVM_ASSERT(col<Cols);
+ return x[row][col];
+ }
+ };
+
+ template <class T,int Rows,int Cols,int R,int C>
+ struct
+ deduce_mat<T[Rows][Cols],R,C>
+ {
+ typedef mat<T,R,C> type;
+ };
+
+ template <class T,int Rows,int Cols,int R,int C>
+ struct
+ deduce_mat<T const[Rows][Cols],R,C>
+ {
+ typedef mat<T,R,C> type;
+ };
+
+ template <class T1,class T2,int Rows,int Cols,int R,int C>
+ struct
+ deduce_mat2<T1[Rows][Cols],T2[Rows][Cols],R,C>
+ {
+ typedef mat<typename deduce_scalar<T1,T2>::type,R,C> type;
+ };
+
+ template <int Rows,int Cols,class T>
+ T (&ptr_mref( T * ptr ))[Rows][Cols]
+ {
+ return *reinterpret_cast<T (*)[Rows][Cols]>(ptr);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/math.hpp b/boost/qvm/math.hpp
new file mode 100644
index 0000000000..26ab3f4c86
--- /dev/null
+++ b/boost/qvm/math.hpp
@@ -0,0 +1,87 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_5FD6A664ACC811DEAAFF8A8055D89593
+#define UUID_5FD6A664ACC811DEAAFF8A8055D89593
+
+#include <math.h>
+#include <boost/qvm/inline.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T> T acos( T );
+ template <class T> T asin( T );
+ template <class T> T atan( T );
+ template <class T> T atan2( T, T );
+ template <class T> T cos( T );
+ template <class T> T sin( T );
+ template <class T> T tan( T );
+ template <class T> T cosh( T );
+ template <class T> T sinh( T );
+ template <class T> T tanh( T );
+ template <class T> T exp( T );
+ template <class T> T log( T );
+ template <class T> T log10( T );
+ template <class T> T mod( T , T );
+ template <class T> T pow( T, T );
+ template <class T> T sqrt( T );
+ template <class T> T ceil( T );
+ template <class T> T abs( T );
+ template <class T> T floor( T );
+ template <class T> T mod( T, T );
+ template <class T> T ldexp( T, int );
+ template <class T> T sign( T );
+
+ template <> BOOST_QVM_INLINE_TRIVIAL float acos<float>( float x ) { return ::acosf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float asin<float>( float x ) { return ::asinf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float atan<float>( float x ) { return ::atanf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float atan2<float>( float x, float y ) { return ::atan2f(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float cos<float>( float x ) { return ::cosf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float sin<float>( float x ) { return ::sinf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float tan<float>( float x ) { return ::tanf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float cosh<float>( float x ) { return ::coshf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float sinh<float>( float x ) { return ::sinhf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float tanh<float>( float x ) { return ::tanhf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float exp<float>( float x ) { return ::expf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float log<float>( float x ) { return ::logf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float log10<float>( float x ) { return ::log10f(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float mod<float>( float x, float y ) { return ::fmodf(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float pow<float>( float x, float y ) { return ::powf(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float sqrt<float>( float x ) { return ::sqrtf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float ceil<float>( float x ) { return ::ceilf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float abs<float>( float x ) { return ::fabsf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float floor<float>( float x ) { return ::floorf(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float ldexp<float>( float x, int y ) { return ::ldexpf(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL float sign<float>( float x ) { return x<0 ? -1.f : +1.f; }
+
+ template <> BOOST_QVM_INLINE_TRIVIAL double acos<double>( double x ) { return ::acos(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double asin<double>( double x ) { return ::asin(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double atan<double>( double x ) { return ::atan(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double atan2<double>( double x, double y ) { return ::atan2(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double cos<double>( double x ) { return ::cos(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double sin<double>( double x ) { return ::sin(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double tan<double>( double x ) { return ::tan(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double cosh<double>( double x ) { return ::cosh(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double sinh<double>( double x ) { return ::sinh(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double tanh<double>( double x ) { return ::tanh(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double exp<double>( double x ) { return ::exp(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double log<double>( double x ) { return ::log(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double log10<double>( double x ) { return ::log10(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double mod<double>( double x, double y ) { return ::fmod(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double pow<double>( double x, double y ) { return ::pow(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double sqrt<double>( double x ) { return ::sqrt(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double ceil<double>( double x ) { return ::ceil(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double abs<double>( double x ) { return ::fabs(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double floor<double>( double x ) { return ::floor(x); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double ldexp<double>( double x, int y ) { return ::ldexp(x,y); }
+ template <> BOOST_QVM_INLINE_TRIVIAL double sign<double>( double x ) { return x<0 ? -1.0 : +1.0; }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/operations.hpp b/boost/qvm/operations.hpp
new file mode 100644
index 0000000000..a82ddf8e84
--- /dev/null
+++ b/boost/qvm/operations.hpp
@@ -0,0 +1,15 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_0B9D9FB6B95D11DEA8E0305E55D89593
+#define UUID_0B9D9FB6B95D11DEA8E0305E55D89593
+
+#include <boost/qvm/quat_operations.hpp>
+#include <boost/qvm/vec_operations.hpp>
+#include <boost/qvm/mat_operations.hpp>
+#include <boost/qvm/quat_vec_operations.hpp>
+#include <boost/qvm/vec_mat_operations.hpp>
+
+#endif
diff --git a/boost/qvm/quat.hpp b/boost/qvm/quat.hpp
new file mode 100644
index 0000000000..1fcdd8046b
--- /dev/null
+++ b/boost/qvm/quat.hpp
@@ -0,0 +1,68 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_49C5A1042AEF11DF9603880056D89593
+#define UUID_49C5A1042AEF11DF9603880056D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T>
+ struct
+ quat
+ {
+ T a[4];
+ template <class R>
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <class Q>
+ struct quat_traits;
+
+ template <class T>
+ struct
+ quat_traits< quat<T> >
+ {
+ typedef quat<T> this_quaternion;
+ typedef T scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return x.a[I];
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_quaternion & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return x.a[I];
+ }
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/quat_access.hpp b/boost/qvm/quat_access.hpp
new file mode 100644
index 0000000000..fe69b29cb1
--- /dev/null
+++ b/boost/qvm/quat_access.hpp
@@ -0,0 +1,128 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_8AC84A2217C411E0A7AF3A1BDFD72085
+#define UUID_8AC84A2217C411E0A7AF3A1BDFD72085
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class Q>
+ struct
+ quat_v_
+ {
+ template <class R>
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ quat_v_( quat_v_ const & );
+ quat_v_ const & operator=( quat_v_ const & );
+ ~quat_v_();
+ };
+ }
+
+ template <class V>
+ struct vec_traits;
+
+ template <class Q>
+ struct
+ vec_traits< qvm_detail::quat_v_<Q> >
+ {
+ typedef qvm_detail::quat_v_<Q> this_vector;
+ typedef typename quat_traits<Q>::scalar_type scalar_type;
+ static int const dim=3;
+
+ template <int I>
+ BOOST_QVM_INLINE_CRITICAL
+ static
+ scalar_type
+ read_element( this_vector const & q )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return quat_traits<Q>::template read_element<I+1>( reinterpret_cast<Q const &>(q) );
+ }
+
+ template <int I>
+ BOOST_QVM_INLINE_CRITICAL
+ static
+ scalar_type &
+ write_element( this_vector & q )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return quat_traits<Q>::template write_element<I+1>( reinterpret_cast<Q &>(q) );
+ }
+ };
+
+ template <class Q,int D>
+ struct
+ deduce_vec<qvm_detail::quat_v_<Q>,D>
+ {
+ typedef vec<typename quat_traits<Q>::scalar_type,D> type;
+ };
+
+ template <class Q,int D>
+ struct
+ deduce_vec2<qvm_detail::quat_v_<Q>,qvm_detail::quat_v_<Q>,D>
+ {
+ typedef vec<typename quat_traits<Q>::scalar_type,D> type;
+ };
+
+ template <class Q>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_quat<Q>::value,
+ qvm_detail::quat_v_<Q> const &>::type
+ V( Q const & a )
+ {
+ return reinterpret_cast<qvm_detail::quat_v_<Q> const &>(a);
+ }
+
+ template <class Q>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_quat<Q>::value,
+ qvm_detail::quat_v_<Q> &>::type
+ V( Q & a )
+ {
+ return reinterpret_cast<qvm_detail::quat_v_<Q> &>(a);
+ }
+
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type>::type S( Q const & a ) { return quat_traits<Q>::template read_element<0>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type>::type X( Q const & a ) { return quat_traits<Q>::template read_element<1>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type>::type Y( Q const & a ) { return quat_traits<Q>::template read_element<2>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type>::type Z( Q const & a ) { return quat_traits<Q>::template read_element<3>(a); }
+
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type &>::type S( Q & a ) { return quat_traits<Q>::template write_element<0>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type &>::type X( Q & a ) { return quat_traits<Q>::template write_element<1>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type &>::type Y( Q & a ) { return quat_traits<Q>::template write_element<2>(a); }
+ template <class Q> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_quat<Q>::value,typename quat_traits<Q>::scalar_type &>::type Z( Q & a ) { return quat_traits<Q>::template write_element<3>(a); }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/quat_operations.hpp b/boost/qvm/quat_operations.hpp
new file mode 100644
index 0000000000..94195ad051
--- /dev/null
+++ b/boost/qvm/quat_operations.hpp
@@ -0,0 +1,1508 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_E6519754D19211DFB8405F74DFD72085
+#define UUID_E6519754D19211DFB8405F74DFD72085
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/deduce_quat.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/scalar_traits.hpp>
+#include <boost/qvm/math.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/qvm/throw_exception.hpp>
+#include <string>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ BOOST_QVM_INLINE_CRITICAL
+ void const *
+ get_valid_ptr_quat_operations()
+ {
+ static int const obj=0;
+ return &obj;
+ }
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ msvc_parse_bug_workaround
+ {
+ template <class A,class B>
+ struct
+ quats
+ {
+ static bool const value=is_quat<A>::value && is_quat<B>::value;
+ };
+ }
+
+ namespace
+ qvm_to_string_detail
+ {
+ template <class T>
+ std::string to_string( T const & x );
+ }
+
+ template <class A>
+ inline
+ typename boost::enable_if_c<
+ is_quat<A>::value,
+ std::string>::type
+ to_string( A const & a )
+ {
+ using namespace qvm_to_string_detail;
+ return '('+
+ to_string(quat_traits<A>::template read_element<0>(a))+','+
+ to_string(quat_traits<A>::template read_element<1>(a))+','+
+ to_string(quat_traits<A>::template read_element<2>(a))+','+
+ to_string(quat_traits<A>::template read_element<3>(a))+')';
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ quat_traits<A>::template write_element<0>(a) = quat_traits<B>::template read_element<0>(b);
+ quat_traits<A>::template write_element<1>(a) = quat_traits<B>::template read_element<1>(b);
+ quat_traits<A>::template write_element<2>(a) = quat_traits<B>::template read_element<2>(b);
+ quat_traits<A>::template write_element<3>(a) = quat_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ template <class A,class B,class Cmp>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ bool>::type
+ cmp( A const & a, B const & b, Cmp f )
+ {
+ typedef typename deduce_scalar<
+ typename quat_traits<A>::scalar_type,
+ typename quat_traits<B>::scalar_type>::type T;
+ T q1[4] =
+ {
+ quat_traits<A>::template read_element<0>(a),
+ quat_traits<A>::template read_element<1>(a),
+ quat_traits<A>::template read_element<2>(a),
+ quat_traits<A>::template read_element<3>(a)
+ };
+ T q2[4] =
+ {
+ quat_traits<B>::template read_element<0>(b),
+ quat_traits<B>::template read_element<1>(b),
+ quat_traits<B>::template read_element<2>(b),
+ quat_traits<B>::template read_element<3>(b)
+ };
+ int i;
+ for( i=0; i!=4; ++i )
+ if( !f(q1[i],q2[i]) )
+ break;
+ if( i==4 )
+ return true;
+ for( i=0; i!=4; ++i )
+ if( !f(q1[i],-q2[i]) )
+ return false;
+ return true;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_quat<R>::value && is_quat<A>::value,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r;
+ quat_traits<R>::template write_element<0>(r) = quat_traits<A>::template read_element<0>(a);
+ quat_traits<R>::template write_element<1>(r) = quat_traits<A>::template read_element<1>(a);
+ quat_traits<R>::template write_element<2>(r) = quat_traits<A>::template read_element<2>(a);
+ quat_traits<R>::template write_element<3>(r) = quat_traits<A>::template read_element<3>(a);
+ return r;
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<R>::value && is_mat<A>::value &&
+ mat_traits<A>::rows==3 && mat_traits<A>::cols==3,
+ R>::type
+ convert_to( A const & a )
+ {
+ typedef typename mat_traits<A>::scalar_type T;
+ T const mat[3][3] =
+ {
+ { mat_traits<A>::template read_element<0,0>(a), mat_traits<A>::template read_element<0,1>(a), mat_traits<A>::template read_element<0,2>(a) },
+ { mat_traits<A>::template read_element<1,0>(a), mat_traits<A>::template read_element<1,1>(a), mat_traits<A>::template read_element<1,2>(a) },
+ { mat_traits<A>::template read_element<2,0>(a), mat_traits<A>::template read_element<2,1>(a), mat_traits<A>::template read_element<2,2>(a) }
+ };
+ R r;
+ if( mat[0][0]+mat[1][1]+mat[2][2] > scalar_traits<T>::value(0) )
+ {
+ T t = mat[0][0] + mat[1][1] + mat[2][2] + scalar_traits<T>::value(1);
+ T s = (scalar_traits<T>::value(1)/sqrt<T>(t))/2;
+ quat_traits<R>::template write_element<0>(r)=s*t;
+ quat_traits<R>::template write_element<1>(r)=(mat[2][1]-mat[1][2])*s;
+ quat_traits<R>::template write_element<2>(r)=(mat[0][2]-mat[2][0])*s;
+ quat_traits<R>::template write_element<3>(r)=(mat[1][0]-mat[0][1])*s;
+ }
+ else if( mat[0][0]>mat[1][1] && mat[0][0]>mat[2][2] )
+ {
+ T t = mat[0][0] - mat[1][1] - mat[2][2] + scalar_traits<T>::value(1);
+ T s = (scalar_traits<T>::value(1)/sqrt<T>(t))/2;
+ quat_traits<R>::template write_element<0>(r)=(mat[2][1]-mat[1][2])*s;
+ quat_traits<R>::template write_element<1>(r)=s*t;
+ quat_traits<R>::template write_element<2>(r)=(mat[1][0]+mat[0][1])*s;
+ quat_traits<R>::template write_element<3>(r)=(mat[0][2]+mat[2][0])*s;
+ }
+ else if( mat[1][1]>mat[2][2] )
+ {
+ T t = - mat[0][0] + mat[1][1] - mat[2][2] + scalar_traits<T>::value(1);
+ T s = (scalar_traits<T>::value(1)/sqrt<T>(t))/2;
+ quat_traits<R>::template write_element<0>(r)=(mat[0][2]-mat[2][0])*s;
+ quat_traits<R>::template write_element<1>(r)=(mat[1][0]+mat[0][1])*s;
+ quat_traits<R>::template write_element<2>(r)=s*t;
+ quat_traits<R>::template write_element<3>(r)=(mat[2][1]+mat[1][2])*s;
+ }
+ else
+ {
+ T t = - mat[0][0] - mat[1][1] + mat[2][2] + scalar_traits<T>::value(1);
+ T s = (scalar_traits<T>::value(1)/sqrt<T>(t))/2;
+ quat_traits<R>::template write_element<0>(r)=(mat[1][0]-mat[0][1])*s;
+ quat_traits<R>::template write_element<1>(r)=(mat[0][2]+mat[2][0])*s;
+ quat_traits<R>::template write_element<2>(r)=(mat[2][1]+mat[1][2])*s;
+ quat_traits<R>::template write_element<3>(r)=s*t;
+ }
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value,
+ deduce_quat<A> >::type
+ conjugate( A const & a )
+ {
+ typedef typename deduce_quat<A>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=quat_traits<A>::template read_element<0>(a);
+ quat_traits<R>::template write_element<1>(r)=-quat_traits<A>::template read_element<1>(a);
+ quat_traits<R>::template write_element<2>(r)=-quat_traits<A>::template read_element<2>(a);
+ quat_traits<R>::template write_element<3>(r)=-quat_traits<A>::template read_element<3>(a);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ class
+ identity_quat_
+ {
+ identity_quat_( identity_quat_ const & );
+ identity_quat_ & operator=( identity_quat_ const & );
+ ~identity_quat_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class T>
+ struct
+ quat_traits< qvm_detail::identity_quat_<T> >
+ {
+ typedef qvm_detail::identity_quat_<T> this_quaternion;
+ typedef T scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return scalar_traits<T>::value(I==0);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_quaternion const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<4);
+ return scalar_traits<T>::value(i==0);
+ }
+ };
+
+ template <class T>
+ struct
+ deduce_quat< qvm_detail::identity_quat_<T> >
+ {
+ typedef quat<T> type;
+ };
+
+ template <class T>
+ struct
+ deduce_quat2< qvm_detail::identity_quat_<T>, qvm_detail::identity_quat_<T> >
+ {
+ typedef quat<T> type;
+ };
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::identity_quat_<T> const &
+ identity_quat()
+ {
+ return *(qvm_detail::identity_quat_<T> const *)qvm_detail::get_valid_ptr_quat_operations();
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ set_identity( A & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T const zero=scalar_traits<T>::value(0);
+ T const one=scalar_traits<T>::value(1);
+ quat_traits<A>::template write_element<0>(a) = one;
+ quat_traits<A>::template write_element<1>(a) = zero;
+ quat_traits<A>::template write_element<2>(a) = zero;
+ quat_traits<A>::template write_element<3>(a) = zero;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalType,class Scalar>
+ class
+ quaternion_scalar_cast_
+ {
+ quaternion_scalar_cast_( quaternion_scalar_cast_ const & );
+ quaternion_scalar_cast_ & operator=( quaternion_scalar_cast_ const & );
+ ~quaternion_scalar_cast_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ quaternion_scalar_cast_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <bool> struct scalar_cast_quaternion_filter { };
+ template <> struct scalar_cast_quaternion_filter<true> { typedef int type; };
+ }
+
+ template <class OriginalType,class Scalar>
+ struct
+ quat_traits< qvm_detail::quaternion_scalar_cast_<OriginalType,Scalar> >
+ {
+ typedef Scalar scalar_type;
+ typedef qvm_detail::quaternion_scalar_cast_<OriginalType,Scalar> this_quaternion;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return scalar_type(quat_traits<OriginalType>::template read_element<I>(reinterpret_cast<OriginalType const &>(x)));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_quaternion const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<4);
+ return scalar_type(quat_traits<OriginalType>::read_element_idx(i,reinterpret_cast<OriginalType const &>(x)));
+ }
+ };
+
+ template <class Scalar,class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::quaternion_scalar_cast_<T,Scalar> const &
+ scalar_cast( T const & x, typename qvm_detail::scalar_cast_quaternion_filter<is_quat<T>::value>::type=0 )
+ {
+ return reinterpret_cast<qvm_detail::quaternion_scalar_cast_<T,Scalar> const &>(x);
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_scalar<B>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ quat_traits<A>::template write_element<0>(a)/=b;
+ quat_traits<A>::template write_element<1>(a)/=b;
+ quat_traits<A>::template write_element<2>(a)/=b;
+ quat_traits<A>::template write_element<3>(a)/=b;
+ return a;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_scalar<B>::value,
+ deduce_quat<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_quat<A>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r) = quat_traits<A>::template read_element<0>(a)/b;
+ quat_traits<R>::template write_element<1>(r) = quat_traits<A>::template read_element<1>(a)/b;
+ quat_traits<R>::template write_element<2>(r) = quat_traits<A>::template read_element<2>(a)/b;
+ quat_traits<R>::template write_element<3>(r) = quat_traits<A>::template read_element<3>(a)/b;
+ return r;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ deduce_scalar<typename quat_traits<A>::scalar_type,typename quat_traits<B>::scalar_type> >::type
+ dot( A const & a, B const & b )
+ {
+ typedef typename quat_traits<A>::scalar_type Ta;
+ typedef typename quat_traits<B>::scalar_type Tb;
+ typedef typename deduce_scalar<Ta,Tb>::type Tr;
+ Ta const a0=quat_traits<A>::template read_element<0>(a);
+ Ta const a1=quat_traits<A>::template read_element<1>(a);
+ Ta const a2=quat_traits<A>::template read_element<2>(a);
+ Ta const a3=quat_traits<A>::template read_element<3>(a);
+ Tb const b0=quat_traits<B>::template read_element<0>(b);
+ Tb const b1=quat_traits<B>::template read_element<1>(b);
+ Tb const b2=quat_traits<B>::template read_element<2>(b);
+ Tb const b3=quat_traits<B>::template read_element<3>(b);
+ Tr const dp=a0*b0+a1*b1+a2*b2+a3*b3;
+ return dp;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ return
+ quat_traits<A>::template read_element<0>(a)==quat_traits<B>::template read_element<0>(b) &&
+ quat_traits<A>::template read_element<1>(a)==quat_traits<B>::template read_element<1>(b) &&
+ quat_traits<A>::template read_element<2>(a)==quat_traits<B>::template read_element<2>(b) &&
+ quat_traits<A>::template read_element<3>(a)==quat_traits<B>::template read_element<3>(b);
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value,
+ deduce_quat<A> >::type
+ inverse( A const & a )
+ {
+ typedef typename deduce_quat<A>::type R;
+ typedef typename quat_traits<A>::scalar_type TA;
+ TA aa = quat_traits<A>::template read_element<0>(a);
+ TA ab = quat_traits<A>::template read_element<1>(a);
+ TA ac = quat_traits<A>::template read_element<2>(a);
+ TA ad = quat_traits<A>::template read_element<3>(a);
+ TA m2 = ab*ab + ac*ac + ad*ad + aa*aa;
+ if( m2==scalar_traits<TA>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ TA rm=scalar_traits<TA>::value(1)/m2;
+ R r;
+ quat_traits<R>::template write_element<0>(r) = aa*rm;
+ quat_traits<R>::template write_element<1>(r) = -ab*rm;
+ quat_traits<R>::template write_element<2>(r) = -ac*rm;
+ quat_traits<R>::template write_element<3>(r) = -ad*rm;
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ typename quat_traits<A>::scalar_type>::type
+ mag_sqr( A const & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T x=quat_traits<A>::template read_element<0>(a);
+ T y=quat_traits<A>::template read_element<1>(a);
+ T z=quat_traits<A>::template read_element<2>(a);
+ T w=quat_traits<A>::template read_element<3>(a);
+ return x*x+y*y+z*z+w*w;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ typename quat_traits<A>::scalar_type>::type
+ mag( A const & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T x=quat_traits<A>::template read_element<0>(a);
+ T y=quat_traits<A>::template read_element<1>(a);
+ T z=quat_traits<A>::template read_element<2>(a);
+ T w=quat_traits<A>::template read_element<3>(a);
+ return sqrt<T>(x*x+y*y+z*z+w*w);
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if<
+ msvc_parse_bug_workaround::quats<A,B>,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ quat_traits<A>::template write_element<0>(a)-=quat_traits<B>::template read_element<0>(b);
+ quat_traits<A>::template write_element<1>(a)-=quat_traits<B>::template read_element<1>(b);
+ quat_traits<A>::template write_element<2>(a)-=quat_traits<B>::template read_element<2>(b);
+ quat_traits<A>::template write_element<3>(a)-=quat_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ deduce_quat2<A,B> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_quat2<A,B>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=quat_traits<A>::template read_element<0>(a)-quat_traits<B>::template read_element<0>(b);
+ quat_traits<R>::template write_element<1>(r)=quat_traits<A>::template read_element<1>(a)-quat_traits<B>::template read_element<1>(b);
+ quat_traits<R>::template write_element<2>(r)=quat_traits<A>::template read_element<2>(a)-quat_traits<B>::template read_element<2>(b);
+ quat_traits<R>::template write_element<3>(r)=quat_traits<A>::template read_element<3>(a)-quat_traits<B>::template read_element<3>(b);
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value,
+ deduce_quat<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_quat<A>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=-quat_traits<A>::template read_element<0>(a);
+ quat_traits<R>::template write_element<1>(r)=-quat_traits<A>::template read_element<1>(a);
+ quat_traits<R>::template write_element<2>(r)=-quat_traits<A>::template read_element<2>(a);
+ quat_traits<R>::template write_element<3>(r)=-quat_traits<A>::template read_element<3>(a);
+ return r;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if<
+ msvc_parse_bug_workaround::quats<A,B>,
+ A &>::type
+ operator*=( A & a, B const & b )
+ {
+ typedef typename quat_traits<A>::scalar_type TA;
+ typedef typename quat_traits<B>::scalar_type TB;
+ TA const aa=quat_traits<A>::template read_element<0>(a);
+ TA const ab=quat_traits<A>::template read_element<1>(a);
+ TA const ac=quat_traits<A>::template read_element<2>(a);
+ TA const ad=quat_traits<A>::template read_element<3>(a);
+ TB const ba=quat_traits<B>::template read_element<0>(b);
+ TB const bb=quat_traits<B>::template read_element<1>(b);
+ TB const bc=quat_traits<B>::template read_element<2>(b);
+ TB const bd=quat_traits<B>::template read_element<3>(b);
+ quat_traits<A>::template write_element<0>(a) = aa*ba - ab*bb - ac*bc - ad*bd;
+ quat_traits<A>::template write_element<1>(a) = aa*bb + ab*ba + ac*bd - ad*bc;
+ quat_traits<A>::template write_element<2>(a) = aa*bc + ac*ba + ad*bb - ab*bd;
+ quat_traits<A>::template write_element<3>(a) = aa*bd + ad*ba + ab*bc - ac*bb;
+ return a;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_scalar<B>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ quat_traits<A>::template write_element<0>(a)*=b;
+ quat_traits<A>::template write_element<1>(a)*=b;
+ quat_traits<A>::template write_element<2>(a)*=b;
+ quat_traits<A>::template write_element<3>(a)*=b;
+ return a;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ deduce_quat2<A,B> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename deduce_quat2<A,B>::type R;
+ typedef typename quat_traits<A>::scalar_type TA;
+ typedef typename quat_traits<B>::scalar_type TB;
+ TA const aa=quat_traits<A>::template read_element<0>(a);
+ TA const ab=quat_traits<A>::template read_element<1>(a);
+ TA const ac=quat_traits<A>::template read_element<2>(a);
+ TA const ad=quat_traits<A>::template read_element<3>(a);
+ TB const ba=quat_traits<B>::template read_element<0>(b);
+ TB const bb=quat_traits<B>::template read_element<1>(b);
+ TB const bc=quat_traits<B>::template read_element<2>(b);
+ TB const bd=quat_traits<B>::template read_element<3>(b);
+ R r;
+ quat_traits<R>::template write_element<0>(r) = aa*ba - ab*bb - ac*bc - ad*bd;
+ quat_traits<R>::template write_element<1>(r) = aa*bb + ab*ba + ac*bd - ad*bc;
+ quat_traits<R>::template write_element<2>(r) = aa*bc + ac*ba + ad*bb - ab*bd;
+ quat_traits<R>::template write_element<3>(r) = aa*bd + ad*ba + ab*bc - ac*bb;
+ return r;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_scalar<B>::value,
+ deduce_quat<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_quat<A>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=quat_traits<A>::template read_element<0>(a)*b;
+ quat_traits<R>::template write_element<1>(r)=quat_traits<A>::template read_element<1>(a)*b;
+ quat_traits<R>::template write_element<2>(r)=quat_traits<A>::template read_element<2>(a)*b;
+ quat_traits<R>::template write_element<3>(r)=quat_traits<A>::template read_element<3>(a)*b;
+ return r;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ return
+ quat_traits<A>::template read_element<0>(a)!=quat_traits<B>::template read_element<0>(b) ||
+ quat_traits<A>::template read_element<1>(a)!=quat_traits<B>::template read_element<1>(b) ||
+ quat_traits<A>::template read_element<2>(a)!=quat_traits<B>::template read_element<2>(b) ||
+ quat_traits<A>::template read_element<3>(a)!=quat_traits<B>::template read_element<3>(b);
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value,
+ deduce_quat<A> >::type
+ normalized( A const & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T const a0=quat_traits<A>::template read_element<0>(a);
+ T const a1=quat_traits<A>::template read_element<1>(a);
+ T const a2=quat_traits<A>::template read_element<2>(a);
+ T const a3=quat_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ if( m2==scalar_traits<typename quat_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ typedef typename deduce_quat<A>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=a0*rm;
+ quat_traits<R>::template write_element<1>(r)=a1*rm;
+ quat_traits<R>::template write_element<2>(r)=a2*rm;
+ quat_traits<R>::template write_element<3>(r)=a3*rm;
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ normalize( A & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T const a0=quat_traits<A>::template read_element<0>(a);
+ T const a1=quat_traits<A>::template read_element<1>(a);
+ T const a2=quat_traits<A>::template read_element<2>(a);
+ T const a3=quat_traits<A>::template read_element<3>(a);
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ if( m2==scalar_traits<typename quat_traits<A>::scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const rm=scalar_traits<T>::value(1)/sqrt<T>(m2);
+ quat_traits<A>::template write_element<0>(a)*=rm;
+ quat_traits<A>::template write_element<1>(a)*=rm;
+ quat_traits<A>::template write_element<2>(a)*=rm;
+ quat_traits<A>::template write_element<3>(a)*=rm;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if<
+ msvc_parse_bug_workaround::quats<A,B>,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ quat_traits<A>::template write_element<0>(a)+=quat_traits<B>::template read_element<0>(b);
+ quat_traits<A>::template write_element<1>(a)+=quat_traits<B>::template read_element<1>(b);
+ quat_traits<A>::template write_element<2>(a)+=quat_traits<B>::template read_element<2>(b);
+ quat_traits<A>::template write_element<3>(a)+=quat_traits<B>::template read_element<3>(b);
+ return a;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_quat<B>::value,
+ deduce_quat2<A,B> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_quat2<A,B>::type R;
+ R r;
+ quat_traits<R>::template write_element<0>(r)=quat_traits<A>::template read_element<0>(a)+quat_traits<B>::template read_element<0>(b);
+ quat_traits<R>::template write_element<1>(r)=quat_traits<A>::template read_element<1>(a)+quat_traits<B>::template read_element<1>(b);
+ quat_traits<R>::template write_element<2>(r)=quat_traits<A>::template read_element<2>(a)+quat_traits<B>::template read_element<2>(b);
+ quat_traits<R>::template write_element<3>(r)=quat_traits<A>::template read_element<3>(a)+quat_traits<B>::template read_element<3>(b);
+ return r;
+ }
+
+ template <class A,class B,class C>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value && is_quat<B>::value && is_scalar<C>::value,
+ deduce_quat2<A,B> >::type
+ slerp( A const & a, B const & b, C t )
+ {
+ typedef typename deduce_quat2<A,B>::type R;
+ typedef typename quat_traits<R>::scalar_type TR;
+ TR const one = scalar_traits<TR>::value(1);
+ TR dp = dot(a,b);
+ TR sc=one;
+ if( dp < one )
+ {
+ TR const theta = acosf(dp);
+ TR const invsintheta = one/sin<TR>(theta);
+ TR const scale = sin<TR>(theta*(one-t)) * invsintheta;
+ TR const invscale = sin<TR>(theta*t) * invsintheta * sc;
+ return a*scale + b*invscale;
+ }
+ else
+ return normalized(a+(b-a)*t);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ class
+ qref_
+ {
+ qref_( qref_ const & );
+ qref_ & operator=( qref_ const & );
+ ~qref_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ qref_ &
+ operator=( R const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class Q>
+ struct quat_traits;
+
+ template <class Q>
+ struct
+ quat_traits< qvm_detail::qref_<Q> >
+ {
+ typedef typename quat_traits<Q>::scalar_type scalar_type;
+ typedef qvm_detail::qref_<Q> this_quaternion;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return quat_traits<Q>::template read_element<I>(reinterpret_cast<Q const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_quaternion & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return quat_traits<Q>::template write_element<I>(reinterpret_cast<Q &>(x));
+ }
+ };
+
+ template <class Q>
+ struct
+ deduce_quat< qvm_detail::qref_<Q> >
+ {
+ typedef quat<typename quat_traits<Q>::scalar_type> type;
+ };
+
+ template <class Q>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_quat<Q>::value,
+ qvm_detail::qref_<Q> const &>::type
+ qref( Q const & a )
+ {
+ return reinterpret_cast<qvm_detail::qref_<Q> const &>(a);
+ }
+
+ template <class Q>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_quat<Q>::value,
+ qvm_detail::qref_<Q> &>::type
+ qref( Q & a )
+ {
+ return reinterpret_cast<qvm_detail::qref_<Q> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ class
+ zero_q_
+ {
+ zero_q_( zero_q_ const & );
+ zero_q_ & operator=( zero_q_ const & );
+ ~zero_q_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class T>
+ struct
+ quat_traits< qvm_detail::zero_q_<T> >
+ {
+ typedef qvm_detail::zero_q_<T> this_quaternion;
+ typedef T scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return scalar_traits<scalar_type>::value(0);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_quaternion const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<4);
+ return scalar_traits<scalar_type>::value(0);
+ }
+ };
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::zero_q_<T> const &
+ zero_quat()
+ {
+ return *(qvm_detail::zero_q_<T> const *)qvm_detail::get_valid_ptr_quat_operations();
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ set_zero( A & a )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T const zero=scalar_traits<T>::value(0);
+ quat_traits<A>::template write_element<0>(a) = zero;
+ quat_traits<A>::template write_element<1>(a) = zero;
+ quat_traits<A>::template write_element<2>(a) = zero;
+ quat_traits<A>::template write_element<3>(a) = zero;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class V>
+ struct
+ rot_quat_
+ {
+ typedef typename vec_traits<V>::scalar_type scalar_type;
+ scalar_type a[4];
+
+ template <class Angle>
+ BOOST_QVM_INLINE
+ rot_quat_( V const & axis, Angle angle )
+ {
+ scalar_type const x=vec_traits<V>::template read_element<0>(axis);
+ scalar_type const y=vec_traits<V>::template read_element<1>(axis);
+ scalar_type const z=vec_traits<V>::template read_element<2>(axis);
+ scalar_type const m2=x*x+y*y+z*z;
+ if( m2==scalar_traits<scalar_type>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ scalar_type const rm=scalar_traits<scalar_type>::value(1)/sqrt<scalar_type>(m2);
+ angle/=2;
+ scalar_type const s=sin<Angle>(angle);
+ a[0] = cos<Angle>(angle);
+ a[1] = rm*x*s;
+ a[2] = rm*y*s;
+ a[3] = rm*z*s;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class V>
+ struct
+ quat_traits< qvm_detail::rot_quat_<V> >
+ {
+ typedef qvm_detail::rot_quat_<V> this_quaternion;
+ typedef typename this_quaternion::scalar_type scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return x.a[I];
+ }
+ };
+
+ template <class V>
+ struct
+ deduce_quat< qvm_detail::rot_quat_<V> >
+ {
+ typedef quat<typename vec_traits<V>::scalar_type> type;
+ };
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE
+ typename enable_if_c<
+ is_vec<A>::value && vec_traits<A>::dim==3,
+ qvm_detail::rot_quat_<A> >::type
+ rot_quat( A const & axis, Angle angle )
+ {
+ return qvm_detail::rot_quat_<A>(axis,angle);
+ }
+
+ template <class A,class B,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value &&
+ is_vec<B>::value && vec_traits<B>::dim==3,
+ void>::type
+ set_rot( A & a, B const & axis, Angle angle )
+ {
+ assign(a,rot_quat(axis,angle));
+ }
+
+ template <class A,class B,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value &&
+ is_vec<B>::value && vec_traits<B>::dim==3,
+ void>::type
+ rotate( A & a, B const & axis, Angle angle )
+ {
+ a *= rot_quat(axis,angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ struct
+ rotx_quat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ rotx_quat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ rotx_quat_( rotx_quat_ const & );
+ rotx_quat_ & operator=( rotx_quat_ const & );
+ ~rotx_quat_();
+ };
+
+ template <int I>
+ struct
+ rotx_q_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(0);
+ }
+ };
+
+ template <>
+ struct
+ rotx_q_get<1>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle/2);
+ }
+ };
+
+ template <>
+ struct
+ rotx_q_get<0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle/2);
+ }
+ };
+ }
+
+ template <class Angle>
+ struct
+ quat_traits< qvm_detail::rotx_quat_<Angle> >
+ {
+ typedef qvm_detail::rotx_quat_<Angle> this_quaternion;
+ typedef Angle scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return qvm_detail::rotx_q_get<I>::get(reinterpret_cast<Angle const &>(x));
+ }
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat< qvm_detail::rotx_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat2< qvm_detail::rotx_quat_<Angle>, qvm_detail::rotx_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::rotx_quat_<Angle> const &
+ rotx_quat( Angle const & angle )
+ {
+ return reinterpret_cast<qvm_detail::rotx_quat_<Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ set_rotx( A & a, Angle angle )
+ {
+ assign(a,rotx_quat(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ rotate_x( A & a, Angle angle )
+ {
+ a *= rotx_quat(angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ struct
+ roty_quat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ roty_quat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ roty_quat_( roty_quat_ const & );
+ roty_quat_ & operator=( roty_quat_ const & );
+ ~roty_quat_();
+ };
+
+ template <int I>
+ struct
+ roty_q_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(0);
+ }
+ };
+
+ template <>
+ struct
+ roty_q_get<2>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle/2);
+ }
+ };
+
+ template <>
+ struct
+ roty_q_get<0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle/2);
+ }
+ };
+ }
+
+ template <class Angle>
+ struct
+ quat_traits< qvm_detail::roty_quat_<Angle> >
+ {
+ typedef qvm_detail::roty_quat_<Angle> this_quaternion;
+ typedef Angle scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return qvm_detail::roty_q_get<I>::get(reinterpret_cast<Angle const &>(x));
+ }
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat< qvm_detail::roty_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat2< qvm_detail::roty_quat_<Angle>, qvm_detail::roty_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::roty_quat_<Angle> const &
+ roty_quat( Angle const & angle )
+ {
+ return reinterpret_cast<qvm_detail::roty_quat_<Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ set_roty( A & a, Angle angle )
+ {
+ assign(a,roty_quat(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ rotate_y( A & a, Angle angle )
+ {
+ a *= roty_quat(angle);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ struct
+ rotz_quat_
+ {
+ BOOST_QVM_INLINE_TRIVIAL
+ rotz_quat_()
+ {
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+
+ private:
+
+ rotz_quat_( rotz_quat_ const & );
+ rotz_quat_ & operator=( rotz_quat_ const & );
+ ~rotz_quat_();
+ };
+
+ template <int I>
+ struct
+ rotz_q_get
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & )
+ {
+ return scalar_traits<T>::value(0);
+ }
+ };
+
+ template <>
+ struct
+ rotz_q_get<3>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return sin<T>(angle/2);
+ }
+ };
+
+ template <>
+ struct
+ rotz_q_get<0>
+ {
+ template <class T>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ T
+ get( T const & angle )
+ {
+ return cos<T>(angle/2);
+ }
+ };
+ }
+
+ template <class Angle>
+ struct
+ quat_traits< qvm_detail::rotz_quat_<Angle> >
+ {
+ typedef qvm_detail::rotz_quat_<Angle> this_quaternion;
+ typedef Angle scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return qvm_detail::rotz_q_get<I>::get(reinterpret_cast<Angle const &>(x));
+ }
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat< qvm_detail::rotz_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ struct
+ deduce_quat2< qvm_detail::rotz_quat_<Angle>, qvm_detail::rotz_quat_<Angle> >
+ {
+ typedef quat<Angle> type;
+ };
+
+ template <class Angle>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::rotz_quat_<Angle> const &
+ rotz_quat( Angle const & angle )
+ {
+ return reinterpret_cast<qvm_detail::rotz_quat_<Angle> const &>(angle);
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ set_rotz( A & a, Angle angle )
+ {
+ assign(a,rotz_quat(angle));
+ }
+
+ template <class A,class Angle>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value,
+ void>::type
+ rotate_z( A & a, Angle angle )
+ {
+ a *= rotz_quat(angle);
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_quat<A>::value && is_vec<B>::value && vec_traits<B>::dim==3,
+ typename quat_traits<A>::scalar_type>::type
+ axis_angle( A const & a, B & b )
+ {
+ typedef typename quat_traits<A>::scalar_type T;
+ T a0=quat_traits<A>::template read_element<0>(a);
+ T a1=quat_traits<A>::template read_element<1>(a);
+ T a2=quat_traits<A>::template read_element<2>(a);
+ T a3=quat_traits<A>::template read_element<3>(a);
+ if( a0>1 )
+ {
+ T const m2=a0*a0+a1*a1+a2*a2+a3*a3;
+ if( m2==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T const s=sqrt<T>(m2);
+ a0/=s;
+ a1/=s;
+ a2/=s;
+ a3/=s;
+ }
+ if( T s=sqrt<T>(1-a0*a0) )
+ {
+ vec_traits<B>::template write_element<0>(b) = a1/s;
+ vec_traits<B>::template write_element<1>(b) = a2/s;
+ vec_traits<B>::template write_element<2>(b) = a3/s;
+ }
+ else
+ {
+ typedef typename vec_traits<B>::scalar_type T;
+ vec_traits<B>::template write_element<0>(b) = scalar_traits<T>::value(1);
+ vec_traits<B>::template write_element<1>(b) = vec_traits<B>::template write_element<2>(b) = scalar_traits<T>::value(0);
+ }
+ return scalar_traits<T>::value(2) * qvm::acos(a0);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::assign;
+ using ::boost::qvm::cmp;
+ using ::boost::qvm::convert_to;
+ using ::boost::qvm::conjugate;
+ using ::boost::qvm::set_identity;
+ using ::boost::qvm::set_zero;
+ using ::boost::qvm::scalar_cast;
+ using ::boost::qvm::operator/=;
+ using ::boost::qvm::operator/;
+ using ::boost::qvm::dot;
+ using ::boost::qvm::operator==;
+ using ::boost::qvm::inverse;
+ using ::boost::qvm::mag_sqr;
+ using ::boost::qvm::mag;
+ using ::boost::qvm::slerp;
+ using ::boost::qvm::operator-=;
+ using ::boost::qvm::operator-;
+ using ::boost::qvm::operator*=;
+ using ::boost::qvm::operator*;
+ using ::boost::qvm::operator!=;
+ using ::boost::qvm::normalized;
+ using ::boost::qvm::normalize;
+ using ::boost::qvm::operator+=;
+ using ::boost::qvm::operator+;
+ using ::boost::qvm::qref;
+ using ::boost::qvm::rot_quat;
+ using ::boost::qvm::set_rot;
+ using ::boost::qvm::rotate;
+ using ::boost::qvm::rotx_quat;
+ using ::boost::qvm::set_rotx;
+ using ::boost::qvm::rotate_x;
+ using ::boost::qvm::roty_quat;
+ using ::boost::qvm::set_roty;
+ using ::boost::qvm::rotate_y;
+ using ::boost::qvm::rotz_quat;
+ using ::boost::qvm::set_rotz;
+ using ::boost::qvm::rotate_z;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/quat_traits.hpp b/boost/qvm/quat_traits.hpp
new file mode 100644
index 0000000000..9c46a049eb
--- /dev/null
+++ b/boost/qvm/quat_traits.hpp
@@ -0,0 +1,49 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_EF321CBE275911E084A4550FDFD72085
+#define UUID_EF321CBE275911E084A4550FDFD72085
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class Q>
+ struct
+ quat_traits
+ {
+ typedef void scalar_type;
+ };
+
+ namespace
+ is_quaternion_detail
+ {
+ template <class>
+ struct
+ is_void
+ {
+ static bool const value=false;
+ };
+
+ template <>
+ struct
+ is_void<void>
+ {
+ static bool const value=true;
+ };
+ }
+
+ template <class T>
+ struct
+ is_quat
+ {
+ static bool const value=!is_quaternion_detail::is_void<typename quat_traits<T>::scalar_type>::value;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/quat_traits_array.hpp b/boost/qvm/quat_traits_array.hpp
new file mode 100644
index 0000000000..f3b13d2dd5
--- /dev/null
+++ b/boost/qvm/quat_traits_array.hpp
@@ -0,0 +1,130 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_6D6B1EE2119A11E291554FEE6188709B
+#define UUID_6D6B1EE2119A11E291554FEE6188709B
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_quat.hpp>
+#include <boost/qvm/detail/remove_const.hpp>
+#include <boost/qvm/assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int D>
+ struct
+ quat_traits<T[D]>
+ {
+ typedef void scalar_type;
+ };
+ template <class T,int D>
+ struct
+ quat_traits<T[D][4]>
+ {
+ typedef void scalar_type;
+ };
+ template <class T,int D>
+ struct
+ quat_traits<T[4][D]>
+ {
+ typedef void scalar_type;
+ };
+ template <class T>
+ struct
+ quat_traits<T[4][4]>
+ {
+ typedef void scalar_type;
+ };
+ template <class T,int M,int N>
+ struct
+ quat_traits<T[M][N]>
+ {
+ typedef void scalar_type;
+ };
+
+ template <class T>
+ struct
+ quat_traits<T[4]>
+ {
+ typedef T this_quaternion[4];
+ typedef typename qvm_detail::remove_const<T>::type scalar_type;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_quaternion const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return x[I];
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_quaternion & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<4);
+ return x[I];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_quaternion const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<4);
+ return x[i];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_quaternion & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<4);
+ return x[i];
+ }
+ };
+
+ template <class T>
+ struct
+ deduce_quat<T[4]>
+ {
+ typedef quat<T> type;
+ };
+
+ template <class T>
+ struct
+ deduce_quat<T const[4]>
+ {
+ typedef quat<T> type;
+ };
+
+ template <class T1,class T2>
+ struct
+ deduce_quat2<T1[4],T2[4]>
+ {
+ typedef quat<typename deduce_scalar<T1,T2>::type> type;
+ };
+
+ template <class T>
+ T (&ptr_qref( T * ptr ))[4]
+ {
+ return *reinterpret_cast<T (*)[4]>(ptr);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/quat_vec_operations.hpp b/boost/qvm/quat_vec_operations.hpp
new file mode 100644
index 0000000000..bbdf33c390
--- /dev/null
+++ b/boost/qvm/quat_vec_operations.hpp
@@ -0,0 +1,62 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_51968952D30A11DFAFE78CE3DFD72085
+#define UUID_51968952D30A11DFAFE78CE3DFD72085
+
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_quat<A>::value &&
+ is_vec<B>::value && vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,3>::type R;
+ typedef typename quat_traits<A>::scalar_type TA;
+ typedef typename vec_traits<B>::scalar_type TB;
+ TA const aa = quat_traits<A>::template read_element<0>(a);
+ TA const ab = quat_traits<A>::template read_element<1>(a);
+ TA const ac = quat_traits<A>::template read_element<2>(a);
+ TA const ad = quat_traits<A>::template read_element<3>(a);
+ TA const t2 = aa*ab;
+ TA const t3 = aa*ac;
+ TA const t4 = aa*ad;
+ TA const t5 = -ab*ab;
+ TA const t6 = ab*ac;
+ TA const t7 = ab*ad;
+ TA const t8 = -ac*ac;
+ TA const t9 = ac*ad;
+ TA const t10 = -ad*ad;
+ TB const bx = vec_traits<B>::template read_element<0>(b);
+ TB const by = vec_traits<B>::template read_element<1>(b);
+ TB const bz = vec_traits<B>::template read_element<2>(b);
+ R r;
+ vec_traits<R>::template write_element<0>(r) = 2*((t8+t10)*bx + (t6-t4)*by + (t3+t7)*bz) + bx;
+ vec_traits<R>::template write_element<1>(r) = 2*((t4+t6)*bx + (t5+t10)*by + (t9-t2)*bz) + by;
+ vec_traits<R>::template write_element<2>(r) = 2*((t7-t3)*bx + (t2+t9)*by + (t5+t8)*bz) + bz;
+ return r;
+ }
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/scalar_traits.hpp b/boost/qvm/scalar_traits.hpp
new file mode 100644
index 0000000000..8f8107d76b
--- /dev/null
+++ b/boost/qvm/scalar_traits.hpp
@@ -0,0 +1,91 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_57E1C032B9F311DEB7D9BAFE55D89593
+#define UUID_57E1C032B9F311DEB7D9BAFE55D89593
+
+#include <boost/qvm/quat_traits.hpp>
+#include <boost/qvm/vec_traits.hpp>
+#include <boost/qvm/mat_traits.hpp>
+#include <boost/qvm/inline.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class Scalar>
+ struct
+ scalar_traits
+ {
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ Scalar
+ value( int v )
+ {
+ return Scalar(v);
+ }
+ };
+
+ template <class T>
+ struct
+ is_scalar
+ {
+ static bool const value=false;
+ };
+ template <> struct is_scalar<char> { static bool const value=true; };
+ template <> struct is_scalar<signed char> { static bool const value=true; };
+ template <> struct is_scalar<unsigned char> { static bool const value=true; };
+ template <> struct is_scalar<signed short> { static bool const value=true; };
+ template <> struct is_scalar<unsigned short> { static bool const value=true; };
+ template <> struct is_scalar<signed int> { static bool const value=true; };
+ template <> struct is_scalar<unsigned int> { static bool const value=true; };
+ template <> struct is_scalar<signed long> { static bool const value=true; };
+ template <> struct is_scalar<unsigned long> { static bool const value=true; };
+ template <> struct is_scalar<float> { static bool const value=true; };
+ template <> struct is_scalar<double> { static bool const value=true; };
+
+ namespace
+ qvm_detail
+ {
+ template <class A,bool M=is_mat<A>::value,bool Q=is_quat<A>::value,bool V=is_vec<A>::value>
+ struct
+ scalar_impl
+ {
+ };
+
+ template <class A>
+ struct
+ scalar_impl<A,true,false,false>
+ {
+ typedef typename mat_traits<A>::scalar_type type;
+ };
+
+ template <class A>
+ struct
+ scalar_impl<A,false,true,false>
+ {
+ typedef typename quat_traits<A>::scalar_type type;
+ };
+
+ template <class A>
+ struct
+ scalar_impl<A,false,false,true>
+ {
+ typedef typename vec_traits<A>::scalar_type type;
+ };
+ }
+
+ template <class A>
+ struct
+ scalar
+ {
+ typedef typename qvm_detail::scalar_impl<A>::type type;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/static_assert.hpp b/boost/qvm/static_assert.hpp
new file mode 100644
index 0000000000..e97ff4c519
--- /dev/null
+++ b/boost/qvm/static_assert.hpp
@@ -0,0 +1,9 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_STATIC_ASSERT
+#include <boost/static_assert.hpp>
+#define BOOST_QVM_STATIC_ASSERT BOOST_STATIC_ASSERT
+#endif
diff --git a/boost/qvm/swizzle.hpp b/boost/qvm/swizzle.hpp
new file mode 100644
index 0000000000..9275f263ae
--- /dev/null
+++ b/boost/qvm/swizzle.hpp
@@ -0,0 +1,13 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_3B4919D8A41411DEB0818E4C56D89593
+#define UUID_3B4919D8A41411DEB0818E4C56D89593
+
+#include <boost/qvm/swizzle2.hpp>
+#include <boost/qvm/swizzle3.hpp>
+#include <boost/qvm/swizzle4.hpp>
+
+#endif
diff --git a/boost/qvm/swizzle2.hpp b/boost/qvm/swizzle2.hpp
new file mode 100644
index 0000000000..0a5771645e
--- /dev/null
+++ b/boost/qvm/swizzle2.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/swizzle2.hpp>
diff --git a/boost/qvm/swizzle3.hpp b/boost/qvm/swizzle3.hpp
new file mode 100644
index 0000000000..7a561db07e
--- /dev/null
+++ b/boost/qvm/swizzle3.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/swizzle3.hpp>
diff --git a/boost/qvm/swizzle4.hpp b/boost/qvm/swizzle4.hpp
new file mode 100644
index 0000000000..ee3592ea6b
--- /dev/null
+++ b/boost/qvm/swizzle4.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/swizzle4.hpp>
diff --git a/boost/qvm/throw_exception.hpp b/boost/qvm/throw_exception.hpp
new file mode 100644
index 0000000000..83a498ea6b
--- /dev/null
+++ b/boost/qvm/throw_exception.hpp
@@ -0,0 +1,9 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_QVM_THROW_EXCEPTION
+#include <boost/throw_exception.hpp>
+#define BOOST_QVM_THROW_EXCEPTION BOOST_THROW_EXCEPTION
+#endif
diff --git a/boost/qvm/to_string.hpp b/boost/qvm/to_string.hpp
new file mode 100644
index 0000000000..d1826ea56e
--- /dev/null
+++ b/boost/qvm/to_string.hpp
@@ -0,0 +1,31 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_2812944066B011E29F616DCB6188709B
+#define UUID_2812944066B011E29F616DCB6188709B
+
+#include <boost/exception/to_string.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_to_string_detail
+ {
+ template <class T>
+ std::string
+ to_string( T const & x )
+ {
+ using boost::to_string;
+ return to_string(x);
+ }
+ }
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec.hpp b/boost/qvm/vec.hpp
new file mode 100644
index 0000000000..a14958a9a0
--- /dev/null
+++ b/boost/qvm/vec.hpp
@@ -0,0 +1,89 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_44EB56F0A33711DEB31B41BB56D89593
+#define UUID_44EB56F0A33711DEB31B41BB56D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/static_assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int D>
+ struct
+ vec
+ {
+ T a[D];
+ template <class R>
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <class V>
+ struct vec_traits;
+
+ template <class T,int Dim>
+ struct
+ vec_traits< vec<T,Dim> >
+ {
+ typedef vec<T,Dim> this_vector;
+ typedef T scalar_type;
+ static int const dim=Dim;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return x.a[I];
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return x.a[I];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return x.a[i];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return x.a[i];
+ }
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_access.hpp b/boost/qvm/vec_access.hpp
new file mode 100644
index 0000000000..add176b03a
--- /dev/null
+++ b/boost/qvm/vec_access.hpp
@@ -0,0 +1,82 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_10F2D1EA17B511E0BA29FE0BDFD72085
+#define UUID_10F2D1EA17B511E0BA29FE0BDFD72085
+
+#include <boost/qvm/vec_traits.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/static_assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ template <int I,class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value,
+ typename vec_traits<V>::scalar_type>::type
+ A( V const & a )
+ {
+ BOOST_STATIC_ASSERT(I>=0);
+ BOOST_STATIC_ASSERT(I<vec_traits<V>::dim);
+ return vec_traits<V>::template read_element<I>(a);
+ }
+
+ template <int I,class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value,
+ typename vec_traits<V>::scalar_type &>::type
+ A( V & a )
+ {
+ BOOST_STATIC_ASSERT(I>=0);
+ BOOST_STATIC_ASSERT(I<vec_traits<V>::dim);
+ return vec_traits<V>::template write_element<I>(a);
+ }
+
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type X( V const & a ) { BOOST_STATIC_ASSERT(0<vec_traits<V>::dim); return vec_traits<V>::template read_element<0>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type Y( V const & a ) { BOOST_STATIC_ASSERT(1<vec_traits<V>::dim); return vec_traits<V>::template read_element<1>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type Z( V const & a ) { BOOST_STATIC_ASSERT(2<vec_traits<V>::dim); return vec_traits<V>::template read_element<2>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type W( V const & a ) { BOOST_STATIC_ASSERT(3<vec_traits<V>::dim); return vec_traits<V>::template read_element<3>(a); }
+
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type X( V & a ) { BOOST_STATIC_ASSERT(0<vec_traits<V>::dim); return vec_traits<V>::template write_element<0>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type Y( V & a ) { BOOST_STATIC_ASSERT(1<vec_traits<V>::dim); return vec_traits<V>::template write_element<1>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type Z( V & a ) { BOOST_STATIC_ASSERT(2<vec_traits<V>::dim); return vec_traits<V>::template write_element<2>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type W( V & a ) { BOOST_STATIC_ASSERT(3<vec_traits<V>::dim); return vec_traits<V>::template write_element<3>(a); }
+
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A0( V const & a ) { BOOST_STATIC_ASSERT(0<vec_traits<V>::dim); return vec_traits<V>::template read_element<0>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A1( V const & a ) { BOOST_STATIC_ASSERT(1<vec_traits<V>::dim); return vec_traits<V>::template read_element<1>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A2( V const & a ) { BOOST_STATIC_ASSERT(2<vec_traits<V>::dim); return vec_traits<V>::template read_element<2>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A3( V const & a ) { BOOST_STATIC_ASSERT(3<vec_traits<V>::dim); return vec_traits<V>::template read_element<3>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A4( V const & a ) { BOOST_STATIC_ASSERT(4<vec_traits<V>::dim); return vec_traits<V>::template read_element<4>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A5( V const & a ) { BOOST_STATIC_ASSERT(5<vec_traits<V>::dim); return vec_traits<V>::template read_element<5>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A6( V const & a ) { BOOST_STATIC_ASSERT(6<vec_traits<V>::dim); return vec_traits<V>::template read_element<6>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A7( V const & a ) { BOOST_STATIC_ASSERT(7<vec_traits<V>::dim); return vec_traits<V>::template read_element<7>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A8( V const & a ) { BOOST_STATIC_ASSERT(8<vec_traits<V>::dim); return vec_traits<V>::template read_element<8>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type>::type A9( V const & a ) { BOOST_STATIC_ASSERT(9<vec_traits<V>::dim); return vec_traits<V>::template read_element<9>(a); }
+
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A0( V & a ) { BOOST_STATIC_ASSERT(0<vec_traits<V>::dim); return vec_traits<V>::template write_element<0>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A1( V & a ) { BOOST_STATIC_ASSERT(1<vec_traits<V>::dim); return vec_traits<V>::template write_element<1>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A2( V & a ) { BOOST_STATIC_ASSERT(2<vec_traits<V>::dim); return vec_traits<V>::template write_element<2>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A3( V & a ) { BOOST_STATIC_ASSERT(3<vec_traits<V>::dim); return vec_traits<V>::template write_element<3>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A4( V & a ) { BOOST_STATIC_ASSERT(4<vec_traits<V>::dim); return vec_traits<V>::template write_element<4>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A5( V & a ) { BOOST_STATIC_ASSERT(5<vec_traits<V>::dim); return vec_traits<V>::template write_element<5>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A6( V & a ) { BOOST_STATIC_ASSERT(6<vec_traits<V>::dim); return vec_traits<V>::template write_element<6>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A7( V & a ) { BOOST_STATIC_ASSERT(7<vec_traits<V>::dim); return vec_traits<V>::template write_element<7>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A8( V & a ) { BOOST_STATIC_ASSERT(8<vec_traits<V>::dim); return vec_traits<V>::template write_element<8>(a); }
+ template <class V> BOOST_QVM_INLINE_TRIVIAL typename enable_if_c<is_vec<V>::value,typename vec_traits<V>::scalar_type &>::type A9( V & a ) { BOOST_STATIC_ASSERT(9<vec_traits<V>::dim); return vec_traits<V>::template write_element<9>(a); }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_index.hpp b/boost/qvm/vec_index.hpp
new file mode 100644
index 0000000000..ba37979109
--- /dev/null
+++ b/boost/qvm/vec_index.hpp
@@ -0,0 +1,145 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_7FF8E2E00E5411E2AB79F7FE6188709B
+#define UUID_7FF8E2E00E5411E2AB79F7FE6188709B
+
+#include <boost/qvm/vec_traits.hpp>
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/enable_if.hpp>
+#include <boost/qvm/error.hpp>
+#include <boost/exception/info.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ vec_index_read_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ vector_r
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename vec_traits<A>::scalar_type
+ read_element_idx( A const & a, int i )
+ {
+ return I==i?
+ vec_traits<A>::template read_element<I>(a) :
+ vector_r<I+1,N>::read_element_idx(a,i);
+ }
+ };
+
+ template <int N>
+ struct
+ vector_r<N,N>
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename vec_traits<A>::scalar_type
+ read_element_idx( A const & a, int )
+ {
+ BOOST_QVM_ASSERT(0);
+ return vec_traits<A>::template read_element<0>(a);
+ }
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename boost::enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::vec_index_read_defined<vec_traits<A>::dim>::value,
+ typename vec_traits<A>::scalar_type>::type
+ vec_index_read( A const & a, int i )
+ {
+ return qvm_detail::vector_r<0,vec_traits<A>::dim>::read_element_idx(a,i);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ vec_index_write_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ vector_w
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ typename vec_traits<A>::scalar_type &
+ write_element_idx( A & a, int i )
+ {
+ return I==i?
+ vec_traits<A>::template write_element<I>(a) :
+ vector_w<I+1,N>::write_element_idx(a,i);
+ }
+ };
+
+ template <int N>
+ struct
+ vector_w<N,N>
+ {
+ template <class A>
+ static
+ BOOST_QVM_INLINE_TRIVIAL
+ typename vec_traits<A>::scalar_type &
+ write_element_idx( A & a, int )
+ {
+ BOOST_QVM_ASSERT(0);
+ return vec_traits<A>::template write_element<0>(a);
+ }
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename boost::enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::vec_index_write_defined<vec_traits<A>::dim>::value,
+ typename vec_traits<A>::scalar_type &>::type
+ vec_index_write( A & a, int i )
+ {
+ return qvm_detail::vector_w<0,vec_traits<A>::dim>::write_element_idx(a,i);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::vec_index_read;
+ using ::boost::qvm::vec_index_write;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_mat_operations.hpp b/boost/qvm/vec_mat_operations.hpp
new file mode 100644
index 0000000000..db84bd0205
--- /dev/null
+++ b/boost/qvm/vec_mat_operations.hpp
@@ -0,0 +1,168 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_A61EC088D31511DFA59D2B03E0D72085
+#define UUID_A61EC088D31511DFA59D2B03E0D72085
+
+#include <boost/qvm/vec_mat_operations2.hpp>
+#include <boost/qvm/vec_mat_operations3.hpp>
+#include <boost/qvm/vec_mat_operations4.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ mul_mv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_mat<A>::value && is_vec<B>::value &&
+ mat_traits<A>::cols==vec_traits<B>::dim &&
+ !qvm_detail::mul_mv_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
+ deduce_vec2<A,B,mat_traits<A>::rows> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,mat_traits<A>::rows>::type R;
+ R r;
+ for( int i=0; i<mat_traits<A>::rows; ++i )
+ {
+ typedef typename vec_traits<R>::scalar_type Tr;
+ Tr x(scalar_traits<Tr>::value(0));
+ for( int j=0; j<mat_traits<A>::cols; ++j )
+ x += mat_traits<A>::read_element_idx(i,j,a)*vec_traits<B>::read_element_idx(j,b);
+ vec_traits<R>::write_element_idx(i,r) = x;
+ }
+ return r;
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int M,int N>
+ struct
+ mul_vm_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_mat<B>::value &&
+ vec_traits<A>::dim==mat_traits<B>::rows &&
+ !qvm_detail::mul_vm_defined<mat_traits<B>::rows,mat_traits<B>::cols>::value,
+ deduce_vec2<A,B,mat_traits<B>::cols> >::type
+ operator*( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,mat_traits<B>::cols>::type R;
+ R r;
+ for( int i=0; i<mat_traits<B>::cols; ++i )
+ {
+ typedef typename vec_traits<R>::scalar_type Tr;
+ Tr x(scalar_traits<Tr>::value(0));
+ for( int j=0; j<mat_traits<B>::rows; ++j )
+ x += vec_traits<A>::read_element_idx(j,a)*mat_traits<B>::read_element_idx(j,i,b);
+ vec_traits<R>::write_element_idx(i,r) = x;
+ }
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 &&
+ vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ transform_point( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
+ Tb const b0 = vec_traits<B>::template read_element<0>(b);
+ Tb const b1 = vec_traits<B>::template read_element<1>(b);
+ Tb const b2 = vec_traits<B>::template read_element<2>(b);
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2+a03;
+ vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2+a13;
+ vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2+a23;
+ return r;
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ mat_traits<A>::rows==4 && mat_traits<A>::cols==4 &&
+ vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ transform_vector( A const & a, B const & b )
+ {
+ typedef typename mat_traits<A>::scalar_type Ta;
+ typedef typename vec_traits<B>::scalar_type Tb;
+ Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
+ Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
+ Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
+ Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
+ Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
+ Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
+ Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
+ Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
+ Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
+ Tb const b0 = vec_traits<B>::template read_element<0>(b);
+ Tb const b1 = vec_traits<B>::template read_element<1>(b);
+ Tb const b2 = vec_traits<B>::template read_element<2>(b);
+ typedef typename deduce_vec2<A,B,3>::type R;
+ BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
+ R r;
+ vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2;
+ vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2;
+ vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2;
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::operator*;
+ using ::boost::qvm::transform_point;
+ using ::boost::qvm::transform_vector;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_mat_operations2.hpp b/boost/qvm/vec_mat_operations2.hpp
new file mode 100644
index 0000000000..8d4a9b6014
--- /dev/null
+++ b/boost/qvm/vec_mat_operations2.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_mat_operations2.hpp>
diff --git a/boost/qvm/vec_mat_operations3.hpp b/boost/qvm/vec_mat_operations3.hpp
new file mode 100644
index 0000000000..8265ab293d
--- /dev/null
+++ b/boost/qvm/vec_mat_operations3.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_mat_operations3.hpp>
diff --git a/boost/qvm/vec_mat_operations4.hpp b/boost/qvm/vec_mat_operations4.hpp
new file mode 100644
index 0000000000..194005365e
--- /dev/null
+++ b/boost/qvm/vec_mat_operations4.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_mat_operations4.hpp>
diff --git a/boost/qvm/vec_operations.hpp b/boost/qvm/vec_operations.hpp
new file mode 100644
index 0000000000..7f259ac3c4
--- /dev/null
+++ b/boost/qvm/vec_operations.hpp
@@ -0,0 +1,986 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_384AFF3AD23A11DFA80B754FE0D72085
+#define UUID_384AFF3AD23A11DFA80B754FE0D72085
+
+#include <boost/qvm/vec_operations2.hpp>
+#include <boost/qvm/vec_operations3.hpp>
+#include <boost/qvm/vec_operations4.hpp>
+#include <boost/qvm/assert.hpp>
+#include <boost/qvm/scalar_traits.hpp>
+#include <string>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ namespace
+ qvm_detail
+ {
+ BOOST_QVM_INLINE_CRITICAL
+ void const *
+ get_valid_ptr_vec_operations()
+ {
+ static int const obj=0;
+ return &obj;
+ }
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_to_string_detail
+ {
+ template <class T>
+ std::string to_string( T const & x );
+ }
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ to_string_v_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int DimMinusOne>
+ struct
+ to_string_vector_elements
+ {
+ template <class A>
+ static
+ std::string
+ f( A const & a )
+ {
+ using namespace qvm_to_string_detail;
+ return to_string(vec_traits<A>::template read_element<I>(a))+','+to_string_vector_elements<I+1,DimMinusOne>::f(a);
+ }
+ };
+
+ template <int DimMinusOne>
+ struct
+ to_string_vector_elements<DimMinusOne,DimMinusOne>
+ {
+ template <class A>
+ static
+ std::string
+ f( A const & a )
+ {
+ using namespace qvm_to_string_detail;
+ return to_string(vec_traits<A>::template read_element<DimMinusOne>(a));
+ }
+ };
+ }
+
+ template <class A>
+ inline
+ typename boost::enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::to_string_v_defined<vec_traits<A>::dim>::value,
+ std::string>::type
+ to_string( A const & a )
+ {
+ return '('+qvm_detail::to_string_vector_elements<0,vec_traits<A>::dim-1>::f(a)+')';
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ assign_vv_defined
+ {
+ static bool const value=false;
+ };
+
+ template <int I,int N>
+ struct
+ copy_vector_elements
+ {
+ template <class A,class B>
+ static
+ void
+ f( A & a, B const & b )
+ {
+ vec_traits<A>::template write_element<I>(a)=vec_traits<B>::template read_element<I>(b);
+ copy_vector_elements<I+1,N>::f(a,b);
+ }
+ };
+
+ template <int N>
+ struct
+ copy_vector_elements<N,N>
+ {
+ template <class A,class B>
+ static
+ void
+ f( A &, B const & )
+ {
+ }
+ };
+ }
+
+ template <class A,class B>
+ inline
+ typename boost::enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::assign_vv_defined<vec_traits<A>::dim>::value,
+ A &>::type
+ assign( A & a, B const & b )
+ {
+ qvm_detail::copy_vector_elements<0,vec_traits<A>::dim>::f(a,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ convert_to_v_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class R,class A>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<R>::value && is_vec<A>::value &&
+ vec_traits<R>::dim==vec_traits<A>::dim &&
+ !qvm_detail::convert_to_v_defined<vec_traits<R>::dim>::value,
+ R>::type
+ convert_to( A const & a )
+ {
+ R r; assign(r,a);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==3 && vec_traits<B>::dim==3,
+ deduce_vec2<A,B,3> >::type
+ cross( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,3>::type R;
+ R r;
+ vec_traits<R>::template write_element<0>(r)=
+ vec_traits<A>::template read_element<1>(a)*vec_traits<B>::template read_element<2>(b)-
+ vec_traits<A>::template read_element<2>(a)*vec_traits<B>::template read_element<1>(b);
+ vec_traits<R>::template write_element<1>(r)=
+ vec_traits<A>::template read_element<2>(a)*vec_traits<B>::template read_element<0>(b)-
+ vec_traits<A>::template read_element<0>(a)*vec_traits<B>::template read_element<2>(b);
+ vec_traits<R>::template write_element<2>(r)=
+ vec_traits<A>::template read_element<0>(a)*vec_traits<B>::template read_element<1>(b)-
+ vec_traits<A>::template read_element<1>(a)*vec_traits<B>::template read_element<0>(b);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ template <class A,class B,class Cmp>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim,
+ bool>::type
+ cmp( A const & a, B const & b, Cmp f )
+ {
+ typedef typename deduce_scalar<
+ typename vec_traits<A>::scalar_type,
+ typename vec_traits<B>::scalar_type>::type T;
+ int const dim=vec_traits<A>::dim;
+ T v1[dim]; assign(v1,a);
+ T v2[dim]; assign(v2,b);
+ for( int i=0; i!=dim; ++i )
+ if( !f(v1[i],v2[i]) )
+ return false;
+ return true;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T,int Dim>
+ class
+ zero_vec_
+ {
+ zero_vec_( zero_vec_ const & );
+ zero_vec_ & operator=( zero_vec_ const & );
+ ~zero_vec_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class V>
+ struct vec_traits;
+
+ template <class T,int Dim>
+ struct
+ vec_traits< qvm_detail::zero_vec_<T,Dim> >
+ {
+ typedef qvm_detail::zero_vec_<T,Dim> this_vector;
+ typedef T scalar_type;
+ static int const dim=Dim;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<Dim);
+ return scalar_traits<scalar_type>::value(0);
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<Dim);
+ return scalar_traits<scalar_type>::value(0);
+ }
+ };
+
+ template <class T,int Dim,int D>
+ struct
+ deduce_vec<qvm_detail::zero_vec_<T,Dim>,D>
+ {
+ typedef vec<T,D> type;
+ };
+
+ template <class T,int Dim>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::zero_vec_<T,Dim> const &
+ zero_vec()
+ {
+ return *(qvm_detail::zero_vec_<T,Dim> const *)qvm_detail::get_valid_ptr_vec_operations();
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value,
+ void>::type
+ set_zero( A & a )
+ {
+ assign(a,zero_vec<typename vec_traits<A>::scalar_type,vec_traits<A>::dim>());
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class OriginalType,class Scalar>
+ class
+ vector_scalar_cast_
+ {
+ vector_scalar_cast_( vector_scalar_cast_ const & );
+ vector_scalar_cast_ & operator=( vector_scalar_cast_ const & );
+ ~vector_scalar_cast_();
+
+ public:
+
+ template <class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ vector_scalar_cast_ &
+ operator=( T const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+
+ template <bool> struct scalar_cast_vector_filter { };
+ template <> struct scalar_cast_vector_filter<true> { typedef int type; };
+ }
+
+ template <class OriginalType,class Scalar>
+ struct
+ vec_traits< qvm_detail::vector_scalar_cast_<OriginalType,Scalar> >
+ {
+ typedef Scalar scalar_type;
+ typedef qvm_detail::vector_scalar_cast_<OriginalType,Scalar> this_vector;
+ static int const dim=vec_traits<OriginalType>::dim;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return scalar_type(vec_traits<OriginalType>::template read_element<I>(reinterpret_cast<OriginalType const &>(x)));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return scalar_type(vec_traits<OriginalType>::read_element_idx(i,reinterpret_cast<OriginalType const &>(x)));
+ }
+ };
+
+ template <class OriginalType,class Scalar,int D>
+ struct
+ deduce_vec<qvm_detail::vector_scalar_cast_<OriginalType,Scalar>,D>
+ {
+ typedef vec<Scalar,D> type;
+ };
+
+ template <class Scalar,class T>
+ BOOST_QVM_INLINE_TRIVIAL
+ qvm_detail::vector_scalar_cast_<T,Scalar> const &
+ scalar_cast( T const & x, typename qvm_detail::scalar_cast_vector_filter<is_vec<T>::value>::type=0 )
+ {
+ return reinterpret_cast<qvm_detail::vector_scalar_cast_<T,Scalar> const &>(x);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ div_eq_vs_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_scalar<B>::value &&
+ !qvm_detail::div_eq_vs_defined<vec_traits<A>::dim>::value,
+ A &>::type
+ operator/=( A & a, B b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<A>::write_element_idx(i,a)/=b;
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ div_vs_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_scalar<B>::value &&
+ !qvm_detail::div_vs_defined<vec_traits<A>::dim>::value,
+ deduce_vec<A> >::type
+ operator/( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=vec_traits<A>::read_element_idx(i,a)/b;
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ dot_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::dot_vv_defined<vec_traits<A>::dim>::value,
+ deduce_scalar<typename vec_traits<A>::scalar_type,typename vec_traits<B>::scalar_type> >::type
+ dot( A const & a, B const & b )
+ {
+ typedef typename deduce_scalar<typename vec_traits<A>::scalar_type,typename vec_traits<B>::scalar_type>::type T;
+ T m(scalar_traits<T>::value(0));
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ m+=vec_traits<A>::read_element_idx(i,a)*vec_traits<B>::read_element_idx(i,b);
+ return m;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ eq_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::eq_vv_defined<vec_traits<A>::dim>::value,
+ bool>::type
+ operator==( A const & a, B const & b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ if( vec_traits<A>::read_element_idx(i,a)!=vec_traits<B>::read_element_idx(i,b) )
+ return false;
+ return true;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ mag_sqr_v_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::mag_sqr_v_defined<vec_traits<A>::dim>::value,
+ typename vec_traits<A>::scalar_type>::type
+ mag_sqr( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T m(scalar_traits<T>::value(0));
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ {
+ T x=vec_traits<A>::read_element_idx(i,a);
+ m+=x*x;
+ }
+ return m;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ mag_v_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::mag_v_defined<vec_traits<A>::dim>::value,
+ typename vec_traits<A>::scalar_type>::type
+ mag( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T m(scalar_traits<T>::value(0));
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ {
+ T x=vec_traits<A>::read_element_idx(i,a);
+ m+=x*x;
+ }
+ return sqrt<T>(m);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ minus_eq_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::minus_eq_vv_defined<vec_traits<A>::dim>::value,
+ A &>::type
+ operator-=( A & a, B const & b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<A>::write_element_idx(i,a)-=vec_traits<B>::read_element_idx(i,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ minus_v_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::minus_v_defined<vec_traits<A>::dim>::value,
+ deduce_vec<A> >::type
+ operator-( A const & a )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=-vec_traits<A>::read_element_idx(i,a);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ minus_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::minus_vv_defined<vec_traits<A>::dim>::value,
+ deduce_vec2<A,B,vec_traits<A>::dim> >::type
+ operator-( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,vec_traits<A>::dim>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=vec_traits<A>::read_element_idx(i,a)-vec_traits<B>::read_element_idx(i,b);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ mul_eq_vs_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_scalar<B>::value &&
+ !qvm_detail::mul_eq_vs_defined<vec_traits<A>::dim>::value,
+ A &>::type
+ operator*=( A & a, B b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<A>::write_element_idx(i,a)*=b;
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ mul_vs_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_scalar<B>::value &&
+ !qvm_detail::mul_vs_defined<vec_traits<A>::dim>::value,
+ deduce_vec<A> >::type
+ operator*( A const & a, B b )
+ {
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=vec_traits<A>::read_element_idx(i,a)*b;
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ neq_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::neq_vv_defined<vec_traits<A>::dim>::value,
+ bool>::type
+ operator!=( A const & a, B const & b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ if( vec_traits<A>::read_element_idx(i,a)!=vec_traits<B>::read_element_idx(i,b) )
+ return true;
+ return false;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ normalize_v_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::normalize_v_defined<vec_traits<A>::dim>::value,
+ deduce_vec<A> >::type
+ normalized( A const & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T m(scalar_traits<T>::value(0));
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ {
+ T x=vec_traits<A>::read_element_idx(i,a);
+ m+=x*x;
+ }
+ if( m==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T rm=scalar_traits<T>::value(1)/sqrt<T>(m);
+ typedef typename deduce_vec<A>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=vec_traits<A>::read_element_idx(i,a)*rm;
+ return r;
+ }
+
+ template <class A>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value &&
+ !qvm_detail::normalize_v_defined<vec_traits<A>::dim>::value,
+ void>::type
+ normalize( A & a )
+ {
+ typedef typename vec_traits<A>::scalar_type T;
+ T m(scalar_traits<T>::value(0));
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ {
+ T x=vec_traits<A>::read_element_idx(i,a);
+ m+=x*x;
+ }
+ if( m==scalar_traits<T>::value(0) )
+ BOOST_QVM_THROW_EXCEPTION(zero_magnitude_error());
+ T rm=scalar_traits<T>::value(1)/sqrt<T>(m);
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<A>::write_element_idx(i,a)*=rm;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ plus_eq_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::plus_eq_vv_defined<vec_traits<A>::dim>::value,
+ A &>::type
+ operator+=( A & a, B const & b )
+ {
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<A>::write_element_idx(i,a)+=vec_traits<B>::read_element_idx(i,b);
+ return a;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <int D>
+ struct
+ plus_vv_defined
+ {
+ static bool const value=false;
+ };
+ }
+
+ template <class A,class B>
+ BOOST_QVM_INLINE_OPERATIONS
+ typename lazy_enable_if_c<
+ is_vec<A>::value && is_vec<B>::value &&
+ vec_traits<A>::dim==vec_traits<B>::dim &&
+ !qvm_detail::plus_vv_defined<vec_traits<A>::dim>::value,
+ deduce_vec2<A,B,vec_traits<A>::dim> >::type
+ operator+( A const & a, B const & b )
+ {
+ typedef typename deduce_vec2<A,B,vec_traits<A>::dim>::type R;
+ R r;
+ for( int i=0; i!=vec_traits<A>::dim; ++i )
+ vec_traits<R>::write_element_idx(i,r)=vec_traits<A>::read_element_idx(i,a)+vec_traits<B>::read_element_idx(i,b);
+ return r;
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ qvm_detail
+ {
+ template <class T>
+ class
+ vref_
+ {
+ vref_( vref_ const & );
+ vref_ & operator=( vref_ const & );
+ ~vref_();
+
+ public:
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ vref_ &
+ operator=( R const & x )
+ {
+ assign(*this,x);
+ return *this;
+ }
+
+ template <class R>
+ BOOST_QVM_INLINE_TRIVIAL
+ operator R() const
+ {
+ R r;
+ assign(r,*this);
+ return r;
+ }
+ };
+ }
+
+ template <class V>
+ struct
+ vec_traits< qvm_detail::vref_<V> >
+ {
+ typedef typename vec_traits<V>::scalar_type scalar_type;
+ typedef qvm_detail::vref_<V> this_vector;
+ static int const dim=vec_traits<V>::dim;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return vec_traits<V>::template read_element<I>(reinterpret_cast<V const &>(x));
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<dim);
+ return vec_traits<V>::template write_element<I>(reinterpret_cast<V &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return vec_traits<V>::read_element_idx(i,reinterpret_cast<V const &>(x));
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<dim);
+ return vec_traits<V>::write_element_idx(i,reinterpret_cast<V &>(x));
+ }
+ };
+
+ template <class V,int D>
+ struct
+ deduce_vec<qvm_detail::vref_<V>,D>
+ {
+ typedef vec<typename vec_traits<V>::scalar_type,D> type;
+ };
+
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value,
+ qvm_detail::vref_<V> const &>::type
+ vref( V const & a )
+ {
+ return reinterpret_cast<qvm_detail::vref_<V> const &>(a);
+ }
+
+ template <class V>
+ BOOST_QVM_INLINE_TRIVIAL
+ typename enable_if_c<
+ is_vec<V>::value,
+ qvm_detail::vref_<V> &>::type
+ vref( V & a )
+ {
+ return reinterpret_cast<qvm_detail::vref_<V> &>(a);
+ }
+
+ ////////////////////////////////////////////////
+
+ namespace
+ sfinae
+ {
+ using ::boost::qvm::to_string;
+ using ::boost::qvm::assign;
+ using ::boost::qvm::convert_to;
+ using ::boost::qvm::cross;
+ using ::boost::qvm::cmp;
+ using ::boost::qvm::set_zero;
+ using ::boost::qvm::scalar_cast;
+ using ::boost::qvm::operator/=;
+ using ::boost::qvm::operator/;
+ using ::boost::qvm::dot;
+ using ::boost::qvm::operator==;
+ using ::boost::qvm::mag_sqr;
+ using ::boost::qvm::mag;
+ using ::boost::qvm::operator-=;
+ using ::boost::qvm::operator-;
+ using ::boost::qvm::operator*=;
+ using ::boost::qvm::operator*;
+ using ::boost::qvm::operator!=;
+ using ::boost::qvm::normalized;
+ using ::boost::qvm::normalize;
+ using ::boost::qvm::operator+=;
+ using ::boost::qvm::operator+;
+ using ::boost::qvm::vref;
+ }
+
+ ////////////////////////////////////////////////
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_operations2.hpp b/boost/qvm/vec_operations2.hpp
new file mode 100644
index 0000000000..bc1933d299
--- /dev/null
+++ b/boost/qvm/vec_operations2.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_operations2.hpp>
diff --git a/boost/qvm/vec_operations3.hpp b/boost/qvm/vec_operations3.hpp
new file mode 100644
index 0000000000..b979c597d5
--- /dev/null
+++ b/boost/qvm/vec_operations3.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_operations3.hpp>
diff --git a/boost/qvm/vec_operations4.hpp b/boost/qvm/vec_operations4.hpp
new file mode 100644
index 0000000000..a08be2ad20
--- /dev/null
+++ b/boost/qvm/vec_operations4.hpp
@@ -0,0 +1,6 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/qvm/gen/vec_operations4.hpp>
diff --git a/boost/qvm/vec_traits.hpp b/boost/qvm/vec_traits.hpp
new file mode 100644
index 0000000000..9b4465a92f
--- /dev/null
+++ b/boost/qvm/vec_traits.hpp
@@ -0,0 +1,32 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_01224884FC4111DF9570F7E4DED72085
+#define UUID_01224884FC4111DF9570F7E4DED72085
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class V>
+ struct
+ vec_traits
+ {
+ static int const dim=0;
+ typedef void scalar_type;
+ };
+
+ template <class T>
+ struct
+ is_vec
+ {
+ static bool const value=vec_traits<T>::dim>0;
+ };
+ }
+ }
+
+#endif
diff --git a/boost/qvm/vec_traits_array.hpp b/boost/qvm/vec_traits_array.hpp
new file mode 100644
index 0000000000..78c1333a67
--- /dev/null
+++ b/boost/qvm/vec_traits_array.hpp
@@ -0,0 +1,108 @@
+//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_DEC6035EA1C211DEA5E8ECB856D89593
+#define UUID_DEC6035EA1C211DEA5E8ECB856D89593
+
+#include <boost/qvm/inline.hpp>
+#include <boost/qvm/deduce_vec.hpp>
+#include <boost/qvm/detail/remove_const.hpp>
+#include <boost/qvm/assert.hpp>
+
+namespace
+boost
+ {
+ namespace
+ qvm
+ {
+ template <class T,int M,int N>
+ struct
+ vec_traits<T[M][N]>
+ {
+ static int const dim=0;
+ typedef void scalar_type;
+ };
+
+ template <class T,int Dim>
+ struct
+ vec_traits<T[Dim]>
+ {
+ typedef T this_vector[Dim];
+ typedef typename qvm_detail::remove_const<T>::type scalar_type;
+ static int const dim=Dim;
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element( this_vector const & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<Dim);
+ return x[I];
+ }
+
+ template <int I>
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element( this_vector & x )
+ {
+ BOOST_QVM_STATIC_ASSERT(I>=0);
+ BOOST_QVM_STATIC_ASSERT(I<Dim);
+ return x[I];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type
+ read_element_idx( int i, this_vector const & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<Dim);
+ return x[i];
+ }
+
+ static
+ BOOST_QVM_INLINE_CRITICAL
+ scalar_type &
+ write_element_idx( int i, this_vector & x )
+ {
+ BOOST_QVM_ASSERT(i>=0);
+ BOOST_QVM_ASSERT(i<Dim);
+ return x[i];
+ }
+ };
+
+ template <class T,int Dim,int D>
+ struct
+ deduce_vec<T[Dim],D>
+ {
+ typedef vec<T,D> type;
+ };
+
+ template <class T,int Dim,int D>
+ struct
+ deduce_vec<T const[Dim],D>
+ {
+ typedef vec<T,D> type;
+ };
+
+ template <class T1,class T2,int Dim,int D>
+ struct
+ deduce_vec2<T1[Dim],T2[Dim],D>
+ {
+ typedef vec<typename deduce_scalar<T1,T2>::type,D> type;
+ };
+
+ template <int Dim,class T>
+ T (&ptr_vref( T * ptr ))[Dim]
+ {
+ return *reinterpret_cast<T (*)[Dim]>(ptr);
+ }
+ }
+ }
+
+#endif
diff --git a/boost/rational.hpp b/boost/rational.hpp
index 72d11e7d06..2b74b05fd3 100644
--- a/boost/rational.hpp
+++ b/boost/rational.hpp
@@ -630,26 +630,25 @@ std::istream& operator>> (std::istream& is, rational<IntType>& r)
template <typename IntType>
std::ostream& operator<< (std::ostream& os, const rational<IntType>& r)
{
- using namespace std;
-
// The slash directly precedes the denominator, which has no prefixes.
- ostringstream ss;
+ std::ostringstream ss;
ss.copyfmt( os );
ss.tie( NULL );
- ss.exceptions( ios::goodbit );
+ ss.exceptions( std::ios::goodbit );
ss.width( 0 );
- ss << noshowpos << noshowbase << '/' << r.denominator();
+ ss << std::noshowpos << std::noshowbase << '/' << r.denominator();
// The numerator holds the showpos, internal, and showbase flags.
- string const tail = ss.str();
- streamsize const w = os.width() - static_cast<streamsize>( tail.size() );
+ std::string const tail = ss.str();
+ std::streamsize const w =
+ os.width() - static_cast<std::streamsize>( tail.size() );
ss.clear();
ss.str( "" );
ss.flags( os.flags() );
- ss << setw( w < 0 || (os.flags() & ios::adjustfield) != ios::internal ? 0 :
- w ) << r.numerator();
+ ss << std::setw( w < 0 || (os.flags() & std::ios::adjustfield) !=
+ std::ios::internal ? 0 : w ) << r.numerator();
return os << ss.str() + tail;
}
#endif // BOOST_NO_IOSTREAM
@@ -706,4 +705,3 @@ struct lcm_evaluator< rational<IntType> >
} // namespace boost
#endif // BOOST_RATIONAL_HPP
-
diff --git a/boost/regex/concepts.hpp b/boost/regex/concepts.hpp
index e974d69912..8cd5d99573 100644
--- a/boost/regex/concepts.hpp
+++ b/boost/regex/concepts.hpp
@@ -99,27 +99,27 @@ public:
typedef allocator_architype<U> other;
};
- pointer address(reference r);
- const_pointer address(const_reference r);
- pointer allocate(size_type);
- pointer allocate(size_type, pointer);
- void deallocate(pointer, size_type);
- size_type max_size()const;
+ pointer address(reference r){ return &r; }
+ const_pointer address(const_reference r) { return &r; }
+ pointer allocate(size_type n) { return static_cast<pointer>(std::malloc(n)); }
+ pointer allocate(size_type n, pointer) { return static_cast<pointer>(std::malloc(n)); }
+ void deallocate(pointer p, size_type) { std::free(p); }
+ size_type max_size()const { return UINT_MAX; }
- allocator_architype();
- allocator_architype(const allocator_architype&);
+ allocator_architype(){}
+ allocator_architype(const allocator_architype&){}
template <class Other>
- allocator_architype(const allocator_architype<Other>&);
+ allocator_architype(const allocator_architype<Other>&){}
- void construct(pointer, const_reference);
- void destroy(pointer);
+ void construct(pointer p, const_reference r) { new (p)T(r); }
+ void destroy(pointer p) { p->~T(); }
};
template <class T>
-bool operator == (const allocator_architype<T>&, const allocator_architype<T>&);
+bool operator == (const allocator_architype<T>&, const allocator_architype<T>&) {return true; }
template <class T>
-bool operator != (const allocator_architype<T>&, const allocator_architype<T>&);
+bool operator != (const allocator_architype<T>&, const allocator_architype<T>&) { return false; }
namespace boost{
//
@@ -130,7 +130,7 @@ template <class charT>
struct regex_traits_architype
{
public:
- regex_traits_architype();
+ regex_traits_architype(){}
typedef charT char_type;
// typedef std::size_t size_type;
typedef std::vector<char_type> string_type;
@@ -168,8 +168,8 @@ public:
private:
// this type is not copyable:
- regex_traits_architype(const regex_traits_architype&);
- regex_traits_architype& operator=(const regex_traits_architype&);
+ regex_traits_architype(const regex_traits_architype&){}
+ regex_traits_architype& operator=(const regex_traits_architype&){ return *this; }
};
//
diff --git a/boost/regex/icu.hpp b/boost/regex/icu.hpp
index a70aa0da81..a57fe57791 100644
--- a/boost/regex/icu.hpp
+++ b/boost/regex/icu.hpp
@@ -152,7 +152,7 @@ public:
char_class_type lookup_classname(const char_type* p1, const char_type* p2) const;
string_type lookup_collatename(const char_type* p1, const char_type* p2) const;
bool isctype(char_type c, char_class_type f) const;
- int toi(const char_type*& p1, const char_type* p2, int radix)const
+ boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const
{
return BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
}
@@ -403,6 +403,22 @@ void copy_results(MR1& out, MR2 const& in)
out.set_second(in[i].second.base(), i, in[i].matched);
}
}
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ // Copy full capture info as well:
+ for(int i = 0; i < (int)in.size(); ++i)
+ {
+ if(in[i].captures().size())
+ {
+ out[i].get_captures().assign(in[i].captures().size(), typename MR1::value_type());
+ for(int j = 0; j < out[i].captures().size(); ++j)
+ {
+ out[i].get_captures()[j].first = in[i].captures()[j].first.base();
+ out[i].get_captures()[j].second = in[i].captures()[j].second.base();
+ out[i].get_captures()[j].matched = in[i].captures()[j].matched;
+ }
+ }
+ }
+#endif
}
template <class BidiIterator, class Allocator>
diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
index d097eed959..0071a8ce8e 100644
--- a/boost/regex/v4/basic_regex_parser.hpp
+++ b/boost/regex/v4/basic_regex_parser.hpp
@@ -38,6 +38,21 @@ namespace BOOST_REGEX_DETAIL_NS{
#pragma warning(disable:4244 4800)
#endif
+inline boost::intmax_t umax(mpl::false_ const&)
+{
+ // Get out clause here, just in case numeric_limits is unspecialized:
+ return std::numeric_limits<boost::intmax_t>::is_specialized ? (std::numeric_limits<boost::intmax_t>::max)() : INT_MAX;
+}
+inline boost::intmax_t umax(mpl::true_ const&)
+{
+ return (std::numeric_limits<std::size_t>::max)();
+}
+
+inline boost::intmax_t umax()
+{
+ return umax(mpl::bool_<std::numeric_limits<boost::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>());
+}
+
template <class charT, class traits>
class basic_regex_parser : public basic_regex_creator<charT, traits>
{
@@ -528,7 +543,11 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
template <class charT, class traits>
bool basic_regex_parser<charT, traits>::parse_basic_escape()
{
- ++m_position;
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
bool result = true;
switch(this->m_traits.escape_syntax_type(*m_position))
{
@@ -868,7 +887,7 @@ escape_type_class_jump:
return false;
}
const charT* pc = m_position;
- int i = this->m_traits.toi(pc, m_end, 10);
+ boost::intmax_t i = this->m_traits.toi(pc, m_end, 10);
if((i < 0) && syn_end)
{
// Check for a named capture, get the leftmost one if there is more than one:
@@ -1075,7 +1094,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
// parse a repeat-range:
//
std::size_t min, max;
- int v;
+ boost::intmax_t v;
// skip whitespace:
while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
++m_position;
@@ -1094,7 +1113,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
// get min:
v = this->m_traits.toi(m_position, m_end, 10);
// skip whitespace:
- if(v < 0)
+ if((v < 0) || (v > umax()))
{
if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
{
@@ -1120,7 +1139,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
return parse_literal();
}
- min = v;
+ min = static_cast<std::size_t>(v);
// see if we have a comma:
if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma)
{
@@ -1143,7 +1162,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
}
// get the value if any:
v = this->m_traits.toi(m_position, m_end, 10);
- max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
+ max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
}
else
{
@@ -1665,19 +1684,19 @@ digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_cha
// does a value fit in the specified charT type?
//
template <class charT>
-bool valid_value(charT, int v, const mpl::true_&)
+bool valid_value(charT, boost::intmax_t v, const mpl::true_&)
{
return (v >> (sizeof(charT) * CHAR_BIT)) == 0;
}
template <class charT>
-bool valid_value(charT, int, const mpl::false_&)
+bool valid_value(charT, boost::intmax_t, const mpl::false_&)
{
return true; // v will alsways fit in a charT
}
template <class charT>
-bool valid_value(charT c, int v)
+bool valid_value(charT c, boost::intmax_t v)
{
- return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(int))>());
+ return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>());
}
template <class charT, class traits>
@@ -1753,10 +1772,10 @@ charT basic_regex_parser<charT, traits>::unescape_character()
fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
return result;
}
- int i = this->m_traits.toi(m_position, m_end, 16);
+ boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16);
if((m_position == m_end)
|| (i < 0)
- || ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)()))
+ || ((std::numeric_limits<charT>::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
{
// Rewind to start of escape:
@@ -1771,7 +1790,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
else
{
std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
- int i = this->m_traits.toi(m_position, m_position + len, 16);
+ boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16);
if((i < 0)
|| !valid_value(charT(0), i))
{
@@ -1790,7 +1809,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
// followed by up to 3 octal digits:
std::ptrdiff_t len = (std::min)(::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end), static_cast<std::ptrdiff_t>(4));
const charT* bp = m_position;
- int val = this->m_traits.toi(bp, bp + 1, 8);
+ boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8);
if(val != 0)
{
// Rewind to start of escape:
@@ -1801,7 +1820,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
return result;
}
val = this->m_traits.toi(m_position, m_position + len, 8);
- if(val < 0)
+ if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
{
// Rewind to start of escape:
--m_position;
@@ -1874,7 +1893,7 @@ bool basic_regex_parser<charT, traits>::parse_backref()
{
BOOST_ASSERT(m_position != m_end);
const charT* pc = m_position;
- int i = this->m_traits.toi(pc, pc + 1, 10);
+ boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10);
if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs)))
{
// not a backref at all but an octal escape sequence:
@@ -1996,7 +2015,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
int max_mark = m_max_mark;
m_mark_reset = -1;
m_max_mark = m_mark_count;
- int v;
+ boost::intmax_t v;
//
// select the actual extension used:
//
diff --git a/boost/regex/v4/cpp_regex_traits.hpp b/boost/regex/v4/cpp_regex_traits.hpp
index 709663a385..b7b32d8a5c 100644
--- a/boost/regex/v4/cpp_regex_traits.hpp
+++ b/boost/regex/v4/cpp_regex_traits.hpp
@@ -1027,11 +1027,11 @@ public:
return m_pimpl->isctype(c, f);
#endif
}
- int toi(const charT*& p1, const charT* p2, int radix)const;
+ boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const;
int value(charT c, int radix)const
{
const charT* pc = &c;
- return toi(pc, pc + 1, radix);
+ return (int)toi(pc, pc + 1, radix);
}
locale_type imbue(locale_type l)
{
@@ -1069,7 +1069,7 @@ private:
template <class charT>
-int cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
+boost::intmax_t cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
{
BOOST_REGEX_DETAIL_NS::parser_buf<charT> sbuf; // buffer for parsing numbers.
std::basic_istream<charT> is(&sbuf); // stream for parsing numbers.
@@ -1082,7 +1082,7 @@ int cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int rad
if(std::abs(radix) == 16) is >> std::hex;
else if(std::abs(radix) == 8) is >> std::oct;
else is >> std::dec;
- int val;
+ boost::intmax_t val;
if(is >> val)
{
first = first + ((last - first) - sbuf.in_avail());
diff --git a/boost/regex/v4/instances.hpp b/boost/regex/v4/instances.hpp
index f66b237cb9..05ac71a686 100644
--- a/boost/regex/v4/instances.hpp
+++ b/boost/regex/v4/instances.hpp
@@ -157,7 +157,7 @@ bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_RE
#endif
} // namespace
template BOOST_REGEX_DECL
-int cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
+boost::intmax_t cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
template BOOST_REGEX_DECL
std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
template BOOST_REGEX_DECL
diff --git a/boost/regex/v4/perl_matcher.hpp b/boost/regex/v4/perl_matcher.hpp
index a7298fbd7a..96a086b81a 100644
--- a/boost/regex/v4/perl_matcher.hpp
+++ b/boost/regex/v4/perl_matcher.hpp
@@ -537,6 +537,7 @@ private:
bool unwind_recursion_pop(bool);
bool unwind_commit(bool);
bool unwind_then(bool);
+ bool unwind_case(bool);
void destroy_single_repeat();
void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
void push_recursion_stopper();
@@ -547,6 +548,7 @@ private:
void push_non_greedy_repeat(const re_syntax_base* ps);
void push_recursion(int idx, const re_syntax_base* p, results_type* presults);
void push_recursion_pop();
+ void push_case_change(bool);
// pointer to base of stack:
saved_state* m_stack_base;
diff --git a/boost/regex/v4/perl_matcher_common.hpp b/boost/regex/v4/perl_matcher_common.hpp
index f3949ccf93..6febff4cc5 100644
--- a/boost/regex/v4/perl_matcher_common.hpp
+++ b/boost/regex/v4/perl_matcher_common.hpp
@@ -206,7 +206,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
search_base = base;
state_count = 0;
m_match_flags |= regex_constants::match_all;
- m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
m_presult->set_base(base);
m_presult->set_named_subs(this->re.get_named_subs());
if(m_match_flags & match_posix)
@@ -268,7 +268,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
// reset our state machine:
search_base = position = base;
pstate = re.get_first_state();
- m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), base, last);
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
m_presult->set_base(base);
m_presult->set_named_subs(this->re.get_named_subs());
m_match_flags |= regex_constants::match_init;
@@ -287,13 +287,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
++position;
}
// reset $` start:
- m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
//if((base != search_base) && (base == backstop))
// m_match_flags |= match_prev_avail;
}
if(m_match_flags & match_posix)
{
- m_result.set_size(1 + re.mark_count(), base, last);
+ m_result.set_size(static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
m_result.set_base(base);
}
@@ -794,15 +794,6 @@ inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref(
}
template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
-{
- // change our case sensitivity:
- this->icase = static_cast<const re_case*>(pstate)->icase;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::match_fail()
{
// Just force a backtrack:
diff --git a/boost/regex/v4/perl_matcher_non_recursive.hpp b/boost/regex/v4/perl_matcher_non_recursive.hpp
index bf77eaa57b..aa7af3b42f 100644
--- a/boost/regex/v4/perl_matcher_non_recursive.hpp
+++ b/boost/regex/v4/perl_matcher_non_recursive.hpp
@@ -138,6 +138,12 @@ struct saved_recursion : public saved_state
Results results;
};
+struct saved_change_case : public saved_state
+{
+ bool icase;
+ saved_change_case(bool c) : saved_state(18), icase(c) {}
+};
+
template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
{
@@ -243,6 +249,22 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(in
}
template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_case_change(bool c)
+{
+ //BOOST_ASSERT(index);
+ saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_change_case*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_change_case(c);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_stopper()
{
saved_state* pmp = m_backup_state;
@@ -348,6 +370,16 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id
}
template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+{
+ // change our case sensitivity:
+ push_case_change(this->icase);
+ this->icase = static_cast<const re_case*>(pstate)->icase;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
{
int index = static_cast<const re_brace*>(pstate)->index;
@@ -1142,6 +1174,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
&perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
&perl_matcher<BidiIterator, Allocator, traits>::unwind_commit,
&perl_matcher<BidiIterator, Allocator, traits>::unwind_then,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_case,
};
m_recursive_result = have_match;
@@ -1171,6 +1204,16 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_end(bool)
}
template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_case(bool)
+{
+ saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+ icase = pmp->icase;
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match)
{
saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
diff --git a/boost/regex/v4/perl_matcher_recursive.hpp b/boost/regex/v4/perl_matcher_recursive.hpp
index 3893837df3..33b9158193 100644
--- a/boost/regex/v4/perl_matcher_recursive.hpp
+++ b/boost/regex/v4/perl_matcher_recursive.hpp
@@ -289,11 +289,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
BidiIterator oldposition(position);
const re_syntax_base* old_pstate = jmp->alt.p;
pstate = pstate->next.p;
+ bool oldcase = icase;
m_have_then = false;
if(!match_all_states())
{
pstate = old_pstate;
position = oldposition;
+ icase = oldcase;
if(m_have_then)
{
m_can_backtrack = true;
@@ -1037,6 +1039,20 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_then()
}
template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+{
+ // change our case sensitivity:
+ bool oldcase = this->icase;
+ this->icase = static_cast<const re_case*>(pstate)->icase;
+ pstate = pstate->next.p;
+ bool result = match_all_states();
+ this->icase = oldcase;
+ return result;
+}
+
+
+
+template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index, bool have_match)
{
while(pstate)
diff --git a/boost/regex/v4/regex_format.hpp b/boost/regex/v4/regex_format.hpp
index e9006a7bd2..f0a0a11e40 100644
--- a/boost/regex/v4/regex_format.hpp
+++ b/boost/regex/v4/regex_format.hpp
@@ -86,7 +86,7 @@ struct trivial_format_traits
}
int toi(const charT*& p1, const charT* p2, int radix)const
{
- return global_toi(p1, p2, radix, *this);
+ return (int)global_toi(p1, p2, radix, *this);
}
};
@@ -165,7 +165,7 @@ private:
std::vector<char_type> v(i, j);
const char_type* start = &v[0];
const char_type* pos = start;
- int r = m_traits.toi(pos, &v[0] + v.size(), base);
+ int r = (int)m_traits.toi(pos, &v[0] + v.size(), base);
std::advance(i, pos - start);
return r;
}
diff --git a/boost/regex/v4/regex_traits.hpp b/boost/regex/v4/regex_traits.hpp
index 45a4bdf626..5d42770654 100644
--- a/boost/regex/v4/regex_traits.hpp
+++ b/boost/regex/v4/regex_traits.hpp
@@ -109,7 +109,7 @@ struct default_wrapper : public BaseT
{
return ((c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast<char>(c)) : ::boost::regex_constants::escape_type_identity;
}
- int toi(const char_type*& p1, const char_type* p2, int radix)const
+ boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const
{
return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
}
diff --git a/boost/regex/v4/regex_traits_defaults.hpp b/boost/regex/v4/regex_traits_defaults.hpp
index 1821883717..2a2cf21d37 100644
--- a/boost/regex/v4/regex_traits_defaults.hpp
+++ b/boost/regex/v4/regex_traits_defaults.hpp
@@ -304,13 +304,13 @@ int global_value(charT c)
return -1;
}
template <class charT, class traits>
-int global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
+boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
{
(void)t; // warning suppression
- int next_value = t.value(*p1, radix);
+ boost::intmax_t next_value = t.value(*p1, radix);
if((p1 == p2) || (next_value < 0) || (next_value >= radix))
return -1;
- int result = 0;
+ boost::intmax_t result = 0;
while(p1 != p2)
{
next_value = t.value(*p1, radix);
diff --git a/boost/regex/v4/w32_regex_traits.hpp b/boost/regex/v4/w32_regex_traits.hpp
index 560cc217bb..bf996d6119 100644
--- a/boost/regex/v4/w32_regex_traits.hpp
+++ b/boost/regex/v4/w32_regex_traits.hpp
@@ -640,13 +640,13 @@ public:
return true;
return false;
}
- int toi(const charT*& p1, const charT* p2, int radix)const
+ boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const
{
return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
}
int value(charT c, int radix)const
{
- int result = ::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
+ int result = (int)::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
return result < radix ? result : -1;
}
locale_type imbue(locale_type l)
diff --git a/boost/signals2/detail/foreign_ptr.hpp b/boost/signals2/detail/foreign_ptr.hpp
index 4349b38e6f..a28ba4337c 100644
--- a/boost/signals2/detail/foreign_ptr.hpp
+++ b/boost/signals2/detail/foreign_ptr.hpp
@@ -61,7 +61,6 @@ namespace boost
struct foreign_shared_ptr_impl_base
{
virtual ~foreign_shared_ptr_impl_base() {}
- virtual void* get() const = 0;
virtual foreign_shared_ptr_impl_base * clone() const = 0;
};
@@ -71,10 +70,6 @@ namespace boost
public:
foreign_shared_ptr_impl(const FSP &p): _p(p)
{}
- virtual void * get() const
- {
- return _p.get();
- }
virtual foreign_shared_ptr_impl * clone() const
{
return new foreign_shared_ptr_impl(*this);
diff --git a/boost/signals2/detail/signal_template.hpp b/boost/signals2/detail/signal_template.hpp
index d3adcee6bc..036876727a 100644
--- a/boost/signals2/detail/signal_template.hpp
+++ b/boost/signals2/detail/signal_template.hpp
@@ -794,7 +794,6 @@ namespace boost
shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
<BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> >
shared_pimpl(_weak_pimpl.lock());
- if(shared_pimpl == 0) throw expired_slot();
return (*shared_pimpl)(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));
}
result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const
@@ -802,7 +801,6 @@ namespace boost
shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
<BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> >
shared_pimpl(_weak_pimpl.lock());
- if(shared_pimpl == 0) throw expired_slot();
return (*shared_pimpl)(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));
}
private:
diff --git a/boost/signals2/detail/slot_call_iterator.hpp b/boost/signals2/detail/slot_call_iterator.hpp
index ee8426f474..9fee16ec69 100644
--- a/boost/signals2/detail/slot_call_iterator.hpp
+++ b/boost/signals2/detail/slot_call_iterator.hpp
@@ -14,6 +14,7 @@
#include <boost/assert.hpp>
#include <boost/aligned_storage.hpp>
+#include <boost/core/no_exceptions_support.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/optional.hpp>
#include <boost/scoped_ptr.hpp>
@@ -38,7 +39,7 @@ namespace boost {
disconnected_slot_count(0),
m_active_slot(0)
{}
-
+
~slot_call_iterator_cache()
{
if(m_active_slot)
@@ -47,9 +48,9 @@ namespace boost {
m_active_slot->dec_slot_refcount(lock);
}
}
-
+
template<typename M>
- void set_active_slot(garbage_collecting_lock<M> &lock,
+ void set_active_slot(garbage_collecting_lock<M> &lock,
connection_body_base *active_slot)
{
if(m_active_slot)
@@ -58,7 +59,7 @@ namespace boost {
if(m_active_slot)
m_active_slot->inc_slot_refcount(lock);
}
-
+
optional<ResultType> result;
typedef auto_buffer<void_shared_ptr_variant, store_n_objects<10> > tracked_ptrs_type;
tracked_ptrs_type tracked_ptrs;
@@ -104,15 +105,16 @@ namespace boost {
dereference() const
{
if (!cache->result) {
- try
+ BOOST_TRY
{
cache->result.reset(cache->f(*iter));
}
- catch(expired_slot &)
+ BOOST_CATCH(expired_slot &)
{
(*iter)->disconnect();
- throw;
+ BOOST_RETHROW
}
+ BOOST_CATCH_END
}
return cache->result.get();
}
@@ -140,7 +142,7 @@ namespace boost {
else
cache->set_active_slot(lock, (*callable_iter).get());
}
-
+
void lock_next_callable() const
{
if(iter == callable_iter)
diff --git a/boost/signals2/last_value.hpp b/boost/signals2/last_value.hpp
index c5d5f33b21..99fb6afbc3 100644
--- a/boost/signals2/last_value.hpp
+++ b/boost/signals2/last_value.hpp
@@ -11,8 +11,10 @@
#ifndef BOOST_SIGNALS2_LAST_VALUE_HPP
#define BOOST_SIGNALS2_LAST_VALUE_HPP
+#include <boost/core/no_exceptions_support.hpp>
#include <boost/optional.hpp>
#include <boost/signals2/expired_slot.hpp>
+#include <boost/throw_exception.hpp>
#include <stdexcept>
namespace boost {
@@ -36,16 +38,17 @@ namespace boost {
{
if(first == last)
{
- throw no_slots_error();
+ boost::throw_exception(no_slots_error());
}
optional<T> value;
while (first != last)
{
- try
+ BOOST_TRY
{
value = *first;
}
- catch(const expired_slot &) {}
+ BOOST_CATCH(const expired_slot &) {}
+ BOOST_CATCH_END
++first;
}
if(value) return value.get();
@@ -62,11 +65,12 @@ namespace boost {
{
while (first != last)
{
- try
+ BOOST_TRY
{
*first;
}
- catch(const expired_slot &) {}
+ BOOST_CATCH(const expired_slot &) {}
+ BOOST_CATCH_END
++first;
}
return;
diff --git a/boost/signals2/optional_last_value.hpp b/boost/signals2/optional_last_value.hpp
index 766e99bc53..812d152c73 100644
--- a/boost/signals2/optional_last_value.hpp
+++ b/boost/signals2/optional_last_value.hpp
@@ -11,6 +11,7 @@
#ifndef BOOST_SIGNALS2_OPTIONAL_LAST_VALUE_HPP
#define BOOST_SIGNALS2_OPTIONAL_LAST_VALUE_HPP
+#include <boost/core/no_exceptions_support.hpp>
#include <boost/optional.hpp>
#include <boost/signals2/expired_slot.hpp>
@@ -29,11 +30,12 @@ namespace boost {
optional<T> value;
while (first != last)
{
- try
+ BOOST_TRY
{
value = *first;
}
- catch(const expired_slot &) {}
+ BOOST_CATCH(const expired_slot &) {}
+ BOOST_CATCH_END
++first;
}
return value;
@@ -50,11 +52,12 @@ namespace boost {
{
while (first != last)
{
- try
+ BOOST_TRY
{
*first;
}
- catch(const expired_slot &) {}
+ BOOST_CATCH(const expired_slot &) {}
+ BOOST_CATCH_END
++first;
}
return;
diff --git a/boost/signals2/slot_base.hpp b/boost/signals2/slot_base.hpp
index 0dd80db146..48c8c06fd6 100644
--- a/boost/signals2/slot_base.hpp
+++ b/boost/signals2/slot_base.hpp
@@ -67,6 +67,7 @@ namespace boost
typedef std::vector<detail::void_shared_ptr_variant> locked_container_type;
const tracked_container_type& tracked_objects() const {return _tracked_objects;}
+ #if(!BOOST_NO_EXCEPTIONS)
locked_container_type lock() const
{
locked_container_type locked_objects;
@@ -81,6 +82,7 @@ namespace boost
}
return locked_objects;
}
+ #endif
bool expired() const
{
tracked_container_type::const_iterator it;
diff --git a/boost/smart_ptr/enable_shared_from_raw.hpp b/boost/smart_ptr/enable_shared_from_raw.hpp
index 669a6492b6..5cd3574e7c 100644
--- a/boost/smart_ptr/enable_shared_from_raw.hpp
+++ b/boost/smart_ptr/enable_shared_from_raw.hpp
@@ -104,7 +104,7 @@ private:
}
// Note: invoked automatically by shared_ptr; do not call
- template<class X, class Y> void _internal_accept_owner( shared_ptr<X> * ppx, Y * py ) const
+ template<class X, class Y> void _internal_accept_owner( shared_ptr<X> * ppx, Y * ) const
{
BOOST_ASSERT( ppx != 0 );
diff --git a/boost/smart_ptr/intrusive_ptr.hpp b/boost/smart_ptr/intrusive_ptr.hpp
index e5db609976..1e9339732b 100644
--- a/boost/smart_ptr/intrusive_ptr.hpp
+++ b/boost/smart_ptr/intrusive_ptr.hpp
@@ -59,7 +59,7 @@ public:
typedef T element_type;
- intrusive_ptr() BOOST_NOEXCEPT : px( 0 )
+ BOOST_CONSTEXPR intrusive_ptr() BOOST_NOEXCEPT : px( 0 )
{
}
@@ -122,6 +122,30 @@ public:
return *this;
}
+ template<class U> friend class intrusive_ptr;
+
+ template<class U>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ intrusive_ptr(intrusive_ptr<U> && rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty())
+
+#else
+
+ intrusive_ptr(intrusive_ptr<U> && rhs)
+
+#endif
+ : px( rhs.px )
+ {
+ rhs.px = 0;
+ }
+
+ template<class U>
+ intrusive_ptr & operator=(intrusive_ptr<U> && rhs) BOOST_NOEXCEPT
+ {
+ this_type( static_cast< intrusive_ptr<U> && >( rhs ) ).swap(*this);
+ return *this;
+ }
+
#endif
intrusive_ptr & operator=(intrusive_ptr const & rhs)
diff --git a/boost/smart_ptr/intrusive_ref_counter.hpp b/boost/smart_ptr/intrusive_ref_counter.hpp
index 82fa8bc3e3..b7587ea7a0 100644
--- a/boost/smart_ptr/intrusive_ref_counter.hpp
+++ b/boost/smart_ptr/intrusive_ref_counter.hpp
@@ -83,7 +83,7 @@ struct thread_safe_counter
static unsigned int decrement(boost::detail::atomic_count& counter) BOOST_NOEXCEPT
{
- return --counter;
+ return static_cast< unsigned int >(--counter);
}
};
diff --git a/boost/smart_ptr/shared_ptr.hpp b/boost/smart_ptr/shared_ptr.hpp
index bcefda8897..77f68bebd0 100644
--- a/boost/smart_ptr/shared_ptr.hpp
+++ b/boost/smart_ptr/shared_ptr.hpp
@@ -642,6 +642,14 @@ public:
return *this;
}
+ // aliasing move
+ template<class Y>
+ shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn()
+ {
+ pn.swap( r.pn );
+ r.px = 0;
+ }
+
#endif
#if !defined( BOOST_NO_CXX11_NULLPTR )
@@ -679,7 +687,16 @@ public:
{
this_type( r, p ).swap( *this );
}
-
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y> void reset( shared_ptr<Y> && r, element_type * p )
+ {
+ this_type( static_cast< shared_ptr<Y> && >( r ), p ).swap( *this );
+ }
+
+#endif
+
// never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
typename boost::detail::sp_dereference< T >::type operator* () const
{
diff --git a/boost/test/data/for_each_sample.hpp b/boost/test/data/for_each_sample.hpp
index b3bc1ffc78..4785b038cc 100644
--- a/boost/test/data/for_each_sample.hpp
+++ b/boost/test/data/for_each_sample.hpp
@@ -63,7 +63,9 @@ invoke_action( Action const& action, T&& args, std::true_type /* is_tuple */ )
{
invoke_action_impl( action,
std::forward<T>(args),
- typename make_index_sequence< 0, std::tuple_size<T>::value >::type{} );
+ typename make_index_sequence< 0,
+ std::tuple_size<typename std::decay<T>::type>::value
+ >::type{} );
}
diff --git a/boost/test/data/test_case.hpp b/boost/test/data/test_case.hpp
index 9564816ee4..dd9de141c4 100644
--- a/boost/test/data/test_case.hpp
+++ b/boost/test/data/test_case.hpp
@@ -37,6 +37,7 @@
#include <boost/test/detail/suppress_warnings.hpp>
#include <boost/test/tools/detail/print_helper.hpp>
+#include <boost/test/utils/string_cast.hpp>
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
&& !defined(BOOST_TEST_DATASET_MAX_ARITY)
@@ -122,16 +123,25 @@ public:
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line, DataSet&& ds )
: m_tc_name( ut_detail::normalize_test_case_name( tc_name ) )
+ , m_tc_file( tc_file )
+ , m_tc_line( tc_line )
+ , m_tc_index( 0 )
{
data::for_each_sample( std::forward<DataSet>( ds ), *this );
}
test_case_gen( test_case_gen&& gen )
: m_tc_name( gen.m_tc_name )
+ , m_tc_file( gen.m_tc_file )
+ , m_tc_line( gen.m_tc_line )
+ , m_tc_index( gen.m_tc_index )
, m_test_cases( std::move(gen.m_test_cases) )
{}
#else
test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line, DataSet const& ds )
: m_tc_name( ut_detail::normalize_test_case_name( tc_name ) )
+ , m_tc_file( tc_file )
+ , m_tc_line( tc_line )
+ , m_tc_index( 0 )
{
data::for_each_sample( ds, *this );
}
@@ -149,24 +159,23 @@ public:
}
#if !defined(BOOST_TEST_DATASET_VARIADIC)
- /// make this variadic
-#define TC_MAKE(z,arity,_) \
- template<BOOST_PP_ENUM_PARAMS(arity, typename Arg)> \
- void operator()( BOOST_PP_ENUM_BINARY_PARAMS(arity, Arg, const& arg) ) const \
- { \
- m_test_cases.push_back( new test_case( m_tc_name, m_tc_file, m_tc_line, \
- boost::bind( &TestCase::template test_method<BOOST_PP_ENUM_PARAMS(arity,Arg)>, \
- BOOST_PP_ENUM_PARAMS(arity, arg) ) ) ); \
- } \
+ // see BOOST_TEST_DATASET_MAX_ARITY to increase the default supported arity
+#define TC_MAKE(z,arity,_) \
+ template<BOOST_PP_ENUM_PARAMS(arity, typename Arg)> \
+ void operator()( BOOST_PP_ENUM_BINARY_PARAMS(arity, Arg, const& arg) ) const \
+ { \
+ m_test_cases.push_back( new test_case( genTestCaseName(), m_tc_file, m_tc_line, \
+ boost::bind( &TestCase::template test_method<BOOST_PP_ENUM_PARAMS(arity,Arg)>,\
+ BOOST_PP_ENUM_PARAMS(arity, arg) ) ) ); \
+ } \
BOOST_PP_REPEAT_FROM_TO(1, BOOST_TEST_DATASET_MAX_ARITY, TC_MAKE, _)
#else
-
template<typename ...Arg>
void operator()(Arg&& ... arg) const
{
m_test_cases.push_back(
- new test_case( m_tc_name,
+ new test_case( genTestCaseName(),
m_tc_file,
m_tc_line,
boost::bind( &TestCase::template test_method<Arg...>,
@@ -175,10 +184,16 @@ public:
#endif
private:
+ std::string genTestCaseName() const
+ {
+ return "_" + utils::string_cast(m_tc_index++);
+ }
+
// Data members
std::string m_tc_name;
const_string m_tc_file;
std::size_t m_tc_line;
+ mutable std::size_t m_tc_index;
mutable std::list<test_unit*> m_test_cases;
};
@@ -217,16 +232,16 @@ make_test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_l
/**/
#define BOOST_DATA_TEST_CASE_IMPL(arity, F, test_name, dataset, params) \
-struct test_name : public F { \
+struct BOOST_PP_CAT(test_name, case) : public F { \
template<BOOST_PP_ENUM_PARAMS(arity, typename Arg)> \
static void test_method( BOOST_DATA_TEST_CASE_PARAMS( params ) ) \
{ \
BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture entry.");\
- test_name t; \
+ BOOST_PP_CAT(test_name, case) t; \
BOOST_TEST_CHECKPOINT('"' << #test_name << "\" entry."); \
BOOST_TEST_CONTEXT( "" \
BOOST_PP_SEQ_FOR_EACH(BOOST_DATA_TEST_CONTEXT, _, params)) \
- t._impl(BOOST_PP_SEQ_ENUM(params)); \
+ t._impl(BOOST_PP_SEQ_ENUM(params)); \
BOOST_TEST_CHECKPOINT('"' << #test_name << "\" exit."); \
} \
private: \
@@ -234,15 +249,21 @@ private: \
void _impl(BOOST_DATA_TEST_CASE_PARAMS( params )); \
}; \
\
-BOOST_AUTO_TU_REGISTRAR( test_name )( \
- boost::unit_test::data::ds_detail::make_test_case_gen<test_name>( \
+BOOST_AUTO_TEST_SUITE( test_name ) \
+ \
+BOOST_AUTO_TU_REGISTRAR( BOOST_PP_CAT(test_name, case) )( \
+ boost::unit_test::data::ds_detail::make_test_case_gen< \
+ BOOST_PP_CAT(test_name, case)>( \
BOOST_STRINGIZE( test_name ), \
__FILE__, __LINE__, \
boost::unit_test::data::ds_detail::seed{} ->* dataset ), \
boost::unit_test::decorator::collector::instance() ); \
\
+BOOST_AUTO_TEST_SUITE_END() \
+ \
template<BOOST_PP_ENUM_PARAMS(arity, typename Arg)> \
- void test_name::_impl( BOOST_DATA_TEST_CASE_PARAMS( params ) ) \
+ void BOOST_PP_CAT(test_name, case)::_impl( \
+ BOOST_DATA_TEST_CASE_PARAMS( params ) ) \
/**/
#define BOOST_DATA_TEST_CASE_WITH_PARAMS( F, test_name, dataset, ... ) \
diff --git a/boost/test/detail/global_typedef.hpp b/boost/test/detail/global_typedef.hpp
index 9b7653c078..b9cfeb5206 100644
--- a/boost/test/detail/global_typedef.hpp
+++ b/boost/test/detail/global_typedef.hpp
@@ -34,10 +34,13 @@ enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAIL
//____________________________________________________________________________//
+//! Indicates the output format for the loggers or the test tree printing
enum output_format { OF_INVALID,
- OF_CLF, ///< compiler log format
- OF_XML, ///< XML format for report and log,
- OF_DOT ///< dot format for output content
+ OF_CLF, ///< compiler log format
+ OF_XML, ///< XML format for report and log,
+ OF_JUNIT, ///< JUNIT format for report and log,
+ OF_CUSTOM_LOGGER, ///< User specified logger.
+ OF_DOT ///< dot format for output content
};
//____________________________________________________________________________//
diff --git a/boost/test/detail/throw_exception.hpp b/boost/test/detail/throw_exception.hpp
index 2fee10c2cb..1568ec3c29 100644
--- a/boost/test/detail/throw_exception.hpp
+++ b/boost/test/detail/throw_exception.hpp
@@ -57,7 +57,6 @@ throw_exception(E const& e) { throw e; }
//____________________________________________________________________________//
#define BOOST_TEST_I_THROW( E ) unit_test::ut_detail::throw_exception( E )
-#define BOOST_TEST_I_THROW( E ) unit_test::ut_detail::throw_exception( E )
#define BOOST_TEST_I_ASSRT( cond, ex ) if( cond ) {} else BOOST_TEST_I_THROW( ex )
diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp
index c9036be5ba..3a203d15f9 100644
--- a/boost/test/execution_monitor.hpp
+++ b/boost/test/execution_monitor.hpp
@@ -66,6 +66,18 @@
#endif
+
+// Additional macro documentations not being generated without this hack
+#ifdef BOOST_TEST_DOXYGEN_DOC__
+
+//! Disables the support of the alternative stack
+//! during the compilation of the Boost.test framework. This is especially useful
+//! in case it is not possible to detect the lack of alternative stack support for
+//! your compiler (for instance, ESXi).
+#define BOOST_TEST_DISABLE_ALT_STACK
+
+#endif
+
//____________________________________________________________________________//
namespace boost {
@@ -276,7 +288,7 @@ private:
}; // execution_exception
// ************************************************************************** //
-/// Function execution monitor
+/// @brief Function execution monitor
/// This class is used to uniformly detect and report an occurrence of several types of signals and exceptions, reducing various
/// errors to a uniform execution_exception that is returned to a caller.
@@ -465,6 +477,7 @@ public:
char const* const p_failed_exp;
};
+//!@internal
#define BOOST_TEST_SYS_ASSERT( cond ) BOOST_TEST_I_ASSRT( cond, ::boost::system_error( BOOST_STRINGIZE( exp ) ) )
// ************************************************************************** //
diff --git a/boost/test/framework.hpp b/boost/test/framework.hpp
index 1f5189d23c..f94bcf125d 100644
--- a/boost/test/framework.hpp
+++ b/boost/test/framework.hpp
@@ -236,6 +236,7 @@ BOOST_TEST_DECL void test_unit_aborted( test_unit const& );
namespace impl {
// exclusively for self test
BOOST_TEST_DECL void setup_for_execution( test_unit const& );
+BOOST_TEST_DECL void setup_loggers( );
} // namespace impl
// ************************************************************************** //
diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp
index f7fc8ea4e2..ce6c6c7eb9 100644
--- a/boost/test/impl/execution_monitor.ipp
+++ b/boost/test/impl/execution_monitor.ipp
@@ -68,6 +68,7 @@ using std::va_list;
// to use vsnprintf
#if defined(__QNXNTO__)
# include <stdio.h>
+using std::va_list;
#endif
#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
@@ -155,8 +156,10 @@ namespace { void _set_se_translator( void* ) {} }
# include <android/api-level.h>
# endif
+// documentation of BOOST_TEST_DISABLE_ALT_STACK in execution_monitor.hpp
# if !defined(__CYGWIN__) && !defined(__QNXNTO__) && !defined(__bgq__) && \
- (!defined(__ANDROID__) || __ANDROID_API__ >= 8)
+ (!defined(__ANDROID__) || __ANDROID_API__ >= 8) && \
+ !defined(BOOST_TEST_DISABLE_ALT_STACK)
# define BOOST_TEST_USE_ALT_STACK
# endif
@@ -182,8 +185,8 @@ namespace { void _set_se_translator( void* ) {} }
#include <errno.h>
#endif
-#if defined(__GNUC__) && !defined(BOOST_NO_TYPEID)
-# include <cxxabi.h>
+#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+# include <boost/core/demangle.hpp>
#endif
#include <boost/test/detail/suppress_warnings.hpp>
@@ -304,23 +307,17 @@ struct fpe_except_guard {
unsigned m_previosly_enabled;
};
-#ifndef BOOST_NO_TYPEID
// ************************************************************************** //
// ************** typeid_name ************** //
// ************************************************************************** //
+#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
template<typename T>
-char const*
+std::string
typeid_name( T const& t )
{
-#ifdef __GNUC__
- int status;
-
- return abi::__cxa_demangle( typeid(t).name(), 0, 0, &status );
-#else
- return typeid(t).name();
-#endif
+ return boost::core::demangle(typeid(t).name());
}
#endif
@@ -605,7 +602,7 @@ system_signal_exception::report() const
break;
default:
- report_error( execution_exception::system_error,
+ report_error( execution_exception::system_error,
"unrecognized signal %d", m_sig_info->si_signo );
}
}
@@ -1224,7 +1221,7 @@ execution_monitor::execute( boost::function<int ()> const& F )
"std::string: %s", ex.c_str() ); }
// std:: exceptions
-#ifdef BOOST_NO_TYPEID
+#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
#define CATCH_AND_REPORT_STD_EXCEPTION( ex_name ) \
catch( ex_name const& ex ) \
{ detail::report_error( execution_exception::cpp_exception_error, \
@@ -1236,7 +1233,7 @@ execution_monitor::execute( boost::function<int ()> const& F )
catch( ex_name const& ex ) \
{ detail::report_error( execution_exception::cpp_exception_error, \
current_exception_cast<boost::exception const>(), \
- "%s: %s", detail::typeid_name(ex), ex.what() ); } \
+ "%s: %s", detail::typeid_name(ex).c_str(), ex.what() ); } \
/**/
#endif
@@ -1266,7 +1263,7 @@ execution_monitor::execute( boost::function<int ()> const& F )
catch( boost::exception const& ex )
{ detail::report_error( execution_exception::cpp_exception_error,
&ex,
-#ifdef BOOST_NO_TYPEID
+#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
"unknown boost::exception" ); }
#else
typeid(ex).name() ); }
@@ -1437,4 +1434,3 @@ disable( unsigned mask )
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
-
diff --git a/boost/test/impl/framework.ipp b/boost/test/impl/framework.ipp
index 78459bac27..a513c612e1 100644
--- a/boost/test/impl/framework.ipp
+++ b/boost/test/impl/framework.ipp
@@ -22,6 +22,7 @@
#include <boost/test/unit_test_parameters.hpp>
#include <boost/test/unit_test_log.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
#include <boost/test/unit_test_monitor.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/progress_monitor.hpp>
@@ -39,6 +40,7 @@
#include <boost/test/utils/foreach.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/basic_cstring/compare.hpp>
#include <boost/test/detail/global_typedef.hpp>
#include <boost/test/detail/throw_exception.hpp>
@@ -53,6 +55,7 @@
#include <set>
#include <cstdlib>
#include <ctime>
+#include <numeric>
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::time; using ::srand; }
@@ -98,7 +101,7 @@ tu_depth( test_unit_id tu_id, test_unit_id master_tu_id, order_info_per_tu& tuoi
return 0;
order_info& info = tuoi[tu_id];
-
+
if( info.depth == -1 )
info.depth = tu_depth( get_tu_parent( tu_id ), master_tu_id, tuoi ) + 1;
@@ -236,12 +239,12 @@ public:
name_filter( test_unit_id_list& targ_list, const_string filter_expr ) : m_targ_list( targ_list ), m_depth( 0 )
{
#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
- utils::string_token_iterator tit( filter_expr, (utils::dropped_delimeters = "/",
+ utils::string_token_iterator tit( filter_expr, (utils::dropped_delimeters = "/",
utils::kept_delimeters = utils::dt_none) );
while( tit != utils::string_token_iterator() ) {
- m_components.push_back(
- std::vector<component>( utils::string_token_iterator( *tit, (utils::dropped_delimeters = ",",
+ m_components.push_back(
+ std::vector<component>( utils::string_token_iterator( *tit, (utils::dropped_delimeters = ",",
utils::kept_delimeters = utils::dt_none) ),
utils::string_token_iterator() ) );
@@ -261,6 +264,7 @@ private:
std::vector<component> const& filters = m_components[m_depth-1];
// look for match
+ using namespace boost::placeholders;
return std::find_if( filters.begin(), filters.end(), bind( &component::pass, _1, boost::ref(tu) ) ) != filters.end();
}
@@ -351,8 +355,8 @@ private:
if( dep.p_run_status == tu.p_run_status )
continue;
- BOOST_TEST_MESSAGE( "Including test " << dep.p_type_name << ' ' << dep.full_name() <<
- " as a dependency of test " << tu.p_type_name << ' ' << tu.full_name() );
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Including test " << dep.p_type_name << ' ' << dep.full_name() <<
+ " as a dependency of test " << tu.p_type_name << ' ' << tu.full_name() );
m_dep_collector->push_back( dep_id );
}
@@ -397,22 +401,32 @@ parse_filters( test_unit_id master_tu_id, test_unit_id_list& tu_to_enable, test_
BOOST_TEST_FOREACH( const_string, filter, filters ) {
BOOST_TEST_SETUP_ASSERT( !filter.is_empty(), "Invalid filter specification" );
- enum { SELECTOR, ENABLER, DISABLER } filter_type = SELECTOR;
+ // each --run_test command may also be separated by a ':' (environment variable)
+ utils::string_token_iterator t_filter_it( filter, (utils::dropped_delimeters = ":",
+ utils::kept_delimeters = utils::dt_none) );
- // 11. Deduce filter type
- if( filter[0] == '!' || filter[0] == '+' ) {
- filter_type = filter[0] == '+' ? ENABLER : DISABLER;
- filter.trim_left( 1 );
- BOOST_TEST_SETUP_ASSERT( !filter.is_empty(), "Invalid filter specification" );
- }
+ while( t_filter_it != utils::string_token_iterator() ) {
+ const_string filter_token = *t_filter_it;
+
+ enum { SELECTOR, ENABLER, DISABLER } filter_type = SELECTOR;
+
+ // 11. Deduce filter type
+ if( filter_token[0] == '!' || filter_token[0] == '+' ) {
+ filter_type = filter_token[0] == '+' ? ENABLER : DISABLER;
+ filter_token.trim_left( 1 );
+ BOOST_TEST_SETUP_ASSERT( !filter_token.is_empty(), "Invalid filter specification" );
+ }
- had_selector_filter |= filter_type == SELECTOR;
+ had_selector_filter |= filter_type == SELECTOR;
- // 12. Add test units to corresponding list
- switch( filter_type ) {
- case SELECTOR:
- case ENABLER: add_filtered_test_units( master_tu_id, filter, tu_to_enable ); break;
- case DISABLER: add_filtered_test_units( master_tu_id, filter, tu_to_disable ); break;
+ // 12. Add test units to corresponding list
+ switch( filter_type ) {
+ case SELECTOR:
+ case ENABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_enable ); break;
+ case DISABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_disable ); break;
+ }
+
+ ++t_filter_it;
}
}
@@ -437,7 +451,7 @@ public:
, m_next_test_suite_id( MIN_TEST_SUITE_ID )
, m_test_in_progress( false )
, m_context_idx( 0 )
- , m_log_sink( std::cout )
+ , m_log_sinks( )
, m_report_sink( std::cerr )
{
}
@@ -787,7 +801,7 @@ public:
boost::execution_monitor m_aux_em;
- runtime_config::stream_holder m_log_sink;
+ std::map<output_format, runtime_config::stream_holder> m_log_sinks;
runtime_config::stream_holder m_report_sink;
};
@@ -809,7 +823,178 @@ setup_for_execution( test_unit const& tu )
{
s_frk_state().deduce_run_status( tu.p_id );
}
-
+
+struct sum_to_first_only {
+ sum_to_first_only() : is_first(true) {}
+ template <class T, class U>
+ T operator()(T const& l_, U const& r_) {
+ if(is_first) {
+ is_first = false;
+ return l_ + r_.first;
+ }
+ return l_ + ", " + r_.first;
+ }
+
+ bool is_first;
+};
+
+void
+setup_loggers()
+{
+
+ BOOST_TEST_I_TRY {
+
+
+
+#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+ bool has_combined_logger = runtime_config::has( runtime_config::COMBINED_LOGGER )
+ && !runtime_config::get< std::vector<std::string> >( runtime_config::COMBINED_LOGGER ).empty();
+#else
+ bool has_combined_logger = false;
+#endif
+
+ if( !has_combined_logger ) {
+ unit_test_log.set_threshold_level( runtime_config::get<log_level>( runtime_config::LOG_LEVEL ) );
+ const output_format format = runtime_config::get<output_format>( runtime_config::LOG_FORMAT );
+ unit_test_log.set_format( format );
+
+ runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
+ if( runtime_config::has( runtime_config::LOG_SINK ) )
+ stream_logger.setup( runtime_config::get<const_string>( runtime_config::LOG_SINK ) );
+ unit_test_log.set_stream( stream_logger.ref() );
+ }
+ else
+ {
+
+ const std::vector<std::string>& v_output_format = runtime_config::get< std::vector<std::string> >( runtime_config::COMBINED_LOGGER ) ;
+
+ static const std::pair<const char*, log_level> all_log_levels[] = {
+ std::make_pair( "all" , log_successful_tests ),
+ std::make_pair( "success" , log_successful_tests ),
+ std::make_pair( "test_suite" , log_test_units ),
+ std::make_pair( "unit_scope" , log_test_units ),
+ std::make_pair( "message" , log_messages ),
+ std::make_pair( "warning" , log_warnings ),
+ std::make_pair( "error" , log_all_errors ),
+ std::make_pair( "cpp_exception" , log_cpp_exception_errors ),
+ std::make_pair( "system_error" , log_system_errors ),
+ std::make_pair( "fatal_error" , log_fatal_errors ),
+ std::make_pair( "nothing" , log_nothing )
+ };
+
+ static const std::pair<const char*, output_format> all_formats[] = {
+ std::make_pair( "HRF" , OF_CLF ),
+ std::make_pair( "CLF" , OF_CLF ),
+ std::make_pair( "XML" , OF_XML ),
+ std::make_pair( "JUNIT", OF_JUNIT )
+ };
+
+
+ bool is_first = true;
+
+ BOOST_TEST_FOREACH( const_string, current_multi_config, v_output_format ) {
+
+#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+ utils::string_token_iterator current_config( current_multi_config, (utils::dropped_delimeters = ":",
+ utils::kept_delimeters = utils::dt_none) );
+
+ for( ; current_config != utils::string_token_iterator() ; ++current_config) {
+
+ utils::string_token_iterator current_format_specs( *current_config, (utils::keep_empty_tokens,
+ utils::dropped_delimeters = ",",
+ utils::kept_delimeters = utils::dt_none) );
+
+ output_format format = OF_INVALID ; // default
+ if( current_format_specs != utils::string_token_iterator() &&
+ current_format_specs->size() ) {
+
+ for(size_t elem=0; elem < sizeof(all_formats)/sizeof(all_formats[0]); elem++) {
+ if(const_string(all_formats[elem].first) == *current_format_specs) {
+ format = all_formats[elem].second;
+ break;
+ }
+ }
+ }
+
+ BOOST_TEST_I_ASSRT( format != OF_INVALID,
+ boost::runtime::access_to_missing_argument()
+ << "Unable to determine the logger type from '"
+ << *current_config
+ << "'. Possible choices are: "
+ << std::accumulate(all_formats,
+ all_formats + sizeof(all_formats)/sizeof(all_formats[0]),
+ std::string(""),
+ sum_to_first_only())
+ );
+
+ // activates this format
+ if( is_first ) {
+ unit_test_log.set_format( format );
+ }
+ else {
+ unit_test_log.add_format( format );
+ }
+ is_first = false;
+
+ unit_test_log_formatter * const formatter = unit_test_log.get_formatter(format);
+ BOOST_TEST_SETUP_ASSERT( formatter, "Logger setup error" );
+
+ log_level formatter_log_level = invalid_log_level;
+ if( !current_format_specs->size() ) {
+ formatter_log_level = formatter->get_log_level(); // default log level given by the formatter
+ }
+ else if( ++current_format_specs != utils::string_token_iterator() ) {
+
+ for(size_t elem=0; elem < sizeof(all_log_levels)/sizeof(all_log_levels[0]); elem++) {
+ if(const_string(all_log_levels[elem].first) == *current_format_specs) {
+ formatter_log_level = all_log_levels[elem].second;
+ break;
+ }
+ }
+ }
+
+
+ BOOST_TEST_I_ASSRT( formatter_log_level != invalid_log_level,
+ boost::runtime::access_to_missing_argument()
+ << "Unable to determine the log level from '"
+ << *current_config
+ << "'. Possible choices are: "
+ << std::accumulate(all_log_levels,
+ all_log_levels + sizeof(all_log_levels)/sizeof(all_log_levels[0]),
+ std::string(""),
+ sum_to_first_only())
+ );
+
+ unit_test_log.set_threshold_level( format, formatter_log_level );
+
+ runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
+ if( ++current_format_specs != utils::string_token_iterator() &&
+ current_format_specs->size() ) {
+ stream_logger.setup( *current_format_specs );
+ }
+ else {
+ stream_logger.setup( formatter->get_default_stream_description() );
+ }
+ unit_test_log.set_stream( format, stream_logger.ref() );
+
+ }
+#endif
+ }
+
+ }
+ }
+ BOOST_TEST_I_CATCH( boost::runtime::init_error, ex ) {
+ BOOST_TEST_SETUP_ASSERT( false, ex.msg );
+ }
+ BOOST_TEST_I_CATCH( boost::runtime::input_error, ex ) {
+ std::cerr << ex.msg << "\n\n";
+
+ BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_exception_failure ) );
+ }
+
+
+}
+
//____________________________________________________________________________//
} // namespace impl
@@ -829,15 +1014,14 @@ init( init_unit_test_func init_func, int argc, char* argv[] )
runtime_config::init( argc, argv );
// 20. Set the desired log level, format and sink
- unit_test_log.set_threshold_level( runtime_config::get<log_level>( runtime_config::LOG_LEVEL ) );
- unit_test_log.set_format( runtime_config::get<output_format>( runtime_config::LOG_FORMAT ) );
- s_frk_state().m_log_sink.setup( runtime_config::LOG_SINK );
- unit_test_log.set_stream( s_frk_state().m_log_sink.ref() );
+ impl::setup_loggers();
// 30. Set the desired report level, format and sink
results_reporter::set_level( runtime_config::get<report_level>( runtime_config::REPORT_LEVEL ) );
results_reporter::set_format( runtime_config::get<output_format>( runtime_config::REPORT_FORMAT ) );
- s_frk_state().m_report_sink.setup( runtime_config::REPORT_SINK );
+
+ if( runtime_config::has( runtime_config::REPORT_SINK ) )
+ s_frk_state().m_report_sink.setup( runtime_config::get<const_string>( runtime_config::REPORT_SINK ) );
results_reporter::set_stream( s_frk_state().m_report_sink.ref() );
// 40. Register default test observers
@@ -845,7 +1029,7 @@ init( init_unit_test_func init_func, int argc, char* argv[] )
register_observer( unit_test_log );
if( runtime_config::get<bool>( runtime_config::SHOW_PROGRESS ) ) {
- progress_monitor.set_stream( s_frk_state().m_log_sink.ref() );
+ progress_monitor.set_stream( std::cout ); // defaults to stdout
register_observer( progress_monitor );
}
@@ -1235,7 +1419,7 @@ run( test_unit_id id, bool continue_test )
case 1:
seed = static_cast<unsigned>( std::rand() ^ std::time( 0 ) ); // better init using std::rand() ^ ...
default:
- BOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << seed );
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test cases order is shuffled using seed: " << seed );
std::srand( seed );
}
diff --git a/boost/test/impl/junit_log_formatter.ipp b/boost/test/impl/junit_log_formatter.ipp
new file mode 100644
index 0000000000..a07ee5e2b0
--- /dev/null
+++ b/boost/test/impl/junit_log_formatter.ipp
@@ -0,0 +1,627 @@
+// (C) Copyright 2016 Raffi Enficiaud.
+// Distributed under the 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/test for the library home page.
+//
+///@file
+///@brief Contains the implementatoin of the Junit log formatter (OF_JUNIT)
+// ***************************************************************************
+
+#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
+#define BOOST_TEST_JUNIT_LOG_FORMATTER_IPP__
+
+// Boost.Test
+#include <boost/test/output/junit_log_formatter.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/xml_printer.hpp>
+#include <boost/test/utils/string_cast.hpp>
+#include <boost/test/framework.hpp>
+
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/results_collector.hpp>
+
+#include <boost/test/utils/algorithm.hpp>
+#include <boost/test/utils/string_cast.hpp>
+
+//#include <boost/test/results_reporter.hpp>
+
+
+// Boost
+#include <boost/version.hpp>
+
+// STL
+#include <iostream>
+#include <fstream>
+#include <set>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+
+struct s_replace_chars {
+ template <class T>
+ void operator()(T& to_replace)
+ {
+ if(to_replace == '/')
+ to_replace = '.';
+ else if(to_replace == ' ')
+ to_replace = '_';
+ }
+};
+
+inline std::string tu_name_normalize(std::string full_name)
+{
+ // maybe directly using normalize_test_case_name instead?
+ std::for_each(full_name.begin(), full_name.end(), s_replace_chars());
+ return full_name;
+}
+
+const_string file_basename(const_string filename) {
+
+ const_string path_sep( "\\/" );
+ const_string::iterator it = unit_test::utils::find_last_of( filename.begin(), filename.end(),
+ path_sep.begin(), path_sep.end() );
+ if( it != filename.end() )
+ filename.trim_left( it + 1 );
+
+ return filename;
+
+}
+
+// ************************************************************************** //
+// ************** junit_log_formatter ************** //
+// ************************************************************************** //
+
+void
+junit_log_formatter::log_start( std::ostream& ostr, counter_t test_cases_amount)
+{
+ map_tests.clear();
+ list_path_to_root.clear();
+ root_id = INV_TEST_UNIT_ID;
+}
+
+//____________________________________________________________________________//
+
+class junit_result_helper : public test_tree_visitor {
+public:
+ explicit junit_result_helper(
+ std::ostream& stream,
+ test_unit const& ts,
+ junit_log_formatter::map_trace_t const& mt,
+ bool display_build_info )
+ : m_stream(stream)
+ , m_ts( ts )
+ , m_map_test( mt )
+ , m_id( 0 )
+ , m_display_build_info(display_build_info)
+ { }
+
+ void add_log_entry(std::string const& entry_type,
+ test_case const& tc,
+ junit_impl::junit_log_helper::assertion_entry const& log) const
+ {
+ m_stream
+ << "<" << entry_type
+ << " message" << utils::attr_value() << log.logentry_message
+ << " type" << utils::attr_value() << log.logentry_type
+ << ">";
+
+ if(!log.output.empty()) {
+ m_stream << utils::cdata() << "\n" + log.output;
+ }
+
+ m_stream << "</" << entry_type << ">";
+ }
+
+ void visit( test_case const& tc )
+ {
+ test_results const& tr = results_collector.results( tc.p_id );
+
+ junit_impl::junit_log_helper detailed_log;
+ bool need_skipping_reason = false;
+ bool skipped = false;
+
+ junit_log_formatter::map_trace_t::const_iterator it_element(m_map_test.find(tc.p_id));
+ if( it_element != m_map_test.end() )
+ {
+ detailed_log = it_element->second;
+ }
+ else
+ {
+ need_skipping_reason = true;
+ }
+
+ std::string classname;
+ test_unit_id id(tc.p_parent_id);
+ while( id != m_ts.p_id ) {
+ test_unit const& tu = boost::unit_test::framework::get( id, TUT_ANY );
+
+ if(need_skipping_reason)
+ {
+ test_results const& tr_parent = results_collector.results( id );
+ if( tr_parent.p_skipped )
+ {
+ skipped = true;
+ detailed_log.system_out+= "- disabled: " + tu.full_name() + "\n";
+ }
+ junit_log_formatter::map_trace_t::const_iterator it_element_stack(m_map_test.find(id));
+ if( it_element_stack != m_map_test.end() )
+ {
+ detailed_log.system_out+= "- skipping decision: '" + it_element_stack->second.system_out + "'";
+ detailed_log.system_out = "SKIPPING decision stack:\n" + detailed_log.system_out;
+ need_skipping_reason = false;
+ }
+ }
+
+ classname = tu_name_normalize(tu.p_name) + "." + classname;
+ id = tu.p_parent_id;
+ }
+
+ // removes the trailing dot
+ if(!classname.empty() && *classname.rbegin() == '.') {
+ classname.erase(classname.size()-1);
+ }
+
+ //
+ // test case header
+
+ // total number of assertions
+ m_stream << "<testcase assertions" << utils::attr_value() << tr.p_assertions_passed + tr.p_assertions_failed;
+
+ // class name
+ if(!classname.empty())
+ m_stream << " classname" << utils::attr_value() << classname;
+
+ // test case name and time taken
+ m_stream
+ << " name" << utils::attr_value() << tu_name_normalize(tc.p_name)
+ << " time" << utils::attr_value() << double(tr.p_duration_microseconds) * 1E-6
+ << ">" << std::endl;
+
+ if( tr.p_skipped || skipped ) {
+ m_stream << "<skipped/>" << std::endl;
+ }
+ else {
+
+ for(std::vector< junit_impl::junit_log_helper::assertion_entry >::const_iterator it(detailed_log.assertion_entries.begin());
+ it != detailed_log.assertion_entries.end();
+ ++it)
+ {
+ if(it->log_entry == junit_impl::junit_log_helper::assertion_entry::log_entry_failure) {
+ add_log_entry("failure", tc, *it);
+ }
+ else if(it->log_entry == junit_impl::junit_log_helper::assertion_entry::log_entry_error) {
+ add_log_entry("error", tc, *it);
+ }
+ }
+ }
+
+ // system-out + all info/messages
+ std::string system_out = detailed_log.system_out;
+ for(std::vector< junit_impl::junit_log_helper::assertion_entry >::const_iterator it(detailed_log.assertion_entries.begin());
+ it != detailed_log.assertion_entries.end();
+ ++it)
+ {
+ if(it->log_entry != junit_impl::junit_log_helper::assertion_entry::log_entry_info)
+ continue;
+ system_out += it->output;
+ }
+
+ if(!system_out.empty()) {
+ m_stream
+ << "<system-out>"
+ << utils::cdata() << system_out
+ << "</system-out>"
+ << std::endl;
+ }
+
+ // system-err output + test case informations
+ std::string system_err = detailed_log.system_err;
+ {
+ // test case information (redundant but useful)
+ std::ostringstream o;
+ o << "Test case:" << std::endl
+ << "- name: " << tc.full_name() << std::endl
+ << "- description: '" << tc.p_description << "'" << std::endl
+ << "- file: " << file_basename(tc.p_file_name) << std::endl
+ << "- line: " << tc.p_line_num << std::endl
+ ;
+ system_err = o.str() + system_err;
+ }
+ m_stream
+ << "<system-err>"
+ << utils::cdata() << system_err
+ << "</system-err>"
+ << std::endl;
+
+ m_stream << "</testcase>" << std::endl;
+ }
+
+ bool test_suite_start( test_suite const& ts )
+ {
+ // unique test suite, without s, nesting not supported in CI
+ if( m_ts.p_id != ts.p_id )
+ return true;
+
+ test_results const& tr = results_collector.results( ts.p_id );
+
+ m_stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
+ m_stream << "<testsuite";
+
+ m_stream
+ // << "disabled=\"" << tr.p_test_cases_skipped << "\" "
+ << " tests" << utils::attr_value() << tr.p_test_cases_passed
+ << " skipped" << utils::attr_value() << tr.p_test_cases_skipped
+ << " errors" << utils::attr_value() << tr.p_test_cases_aborted
+ << " failures" << utils::attr_value() << tr.p_test_cases_failed
+ << " id" << utils::attr_value() << m_id++
+ << " name" << utils::attr_value() << tu_name_normalize(ts.p_name)
+ << " time" << utils::attr_value() << (tr.p_duration_microseconds * 1E-6)
+ << ">" << std::endl;
+
+ if(m_display_build_info)
+ {
+ m_stream << "<properties>" << std::endl;
+ m_stream << "<property name=\"platform\" value" << utils::attr_value() << BOOST_PLATFORM << std::endl;
+ m_stream << "<property name=\"compiler\" value" << utils::attr_value() << BOOST_COMPILER << std::endl;
+ m_stream << "<property name=\"stl\" value" << utils::attr_value() << BOOST_STDLIB << std::endl;
+
+ std::ostringstream o;
+ o << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100;
+ m_stream << "<property name=\"boost\" value" << utils::attr_value() << o.str() << std::endl;
+ m_stream << "</properties>" << std::endl;
+ }
+
+ return true; // indicates that the children should also be parsed
+ }
+
+ virtual void test_suite_finish( test_suite const& ts )
+ {
+ if( m_ts.p_id != ts.p_id )
+ return;
+ m_stream << "</testsuite>";
+ }
+
+private:
+ // Data members
+ std::ostream& m_stream;
+ test_unit const& m_ts;
+ junit_log_formatter::map_trace_t const& m_map_test;
+ size_t m_id;
+ bool m_display_build_info;
+};
+
+
+
+void
+junit_log_formatter::log_finish( std::ostream& ostr )
+{
+ junit_result_helper ch( ostr, boost::unit_test::framework::get( root_id, TUT_SUITE ), map_tests, m_display_build_info );
+ traverse_test_tree( root_id, ch, true ); // last is to ignore disabled suite special handling
+
+ return;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_build_info( std::ostream& ostr )
+{
+ m_display_build_info = true;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_start( std::ostream& ostr, test_unit const& tu )
+{
+ if(list_path_to_root.empty())
+ root_id = tu.p_id;
+ list_path_to_root.push_back( tu.p_id );
+ map_tests.insert(std::make_pair(tu.p_id, junit_impl::junit_log_helper())); // current_test_case_id not working here
+}
+
+
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_finish( std::ostream& ostr, test_unit const& tu, unsigned long elapsed )
+{
+ // the time is already stored in the result_reporter
+ assert( tu.p_id == list_path_to_root.back() );
+ list_path_to_root.pop_back();
+}
+
+void
+junit_log_formatter::test_unit_aborted( std::ostream& os, test_unit const& tu )
+{
+ assert( tu.p_id == list_path_to_root.back() );
+ //list_path_to_root.pop_back();
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::test_unit_skipped( std::ostream& ostr, test_unit const& tu, const_string reason )
+{
+ if(tu.p_type == TUT_CASE)
+ {
+ junit_impl::junit_log_helper& v = map_tests[tu.p_id];
+ v.system_out.assign(reason.begin(), reason.end());
+ }
+ else
+ {
+ junit_impl::junit_log_helper& v = map_tests[tu.p_id];
+ v.system_out.assign(reason.begin(), reason.end());
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_exception_start( std::ostream& ostr, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+ std::ostringstream o;
+ execution_exception::location const& loc = ex.where();
+
+ m_is_last_assertion_or_error = false;
+
+ if(!list_path_to_root.empty())
+ {
+ junit_impl::junit_log_helper& last_entry = map_tests[list_path_to_root.back()];
+
+ junit_impl::junit_log_helper::assertion_entry entry;
+
+ entry.logentry_message = "unexpected exception";
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_error;
+
+ switch(ex.code())
+ {
+ case execution_exception::cpp_exception_error:
+ entry.logentry_type = "uncaught exception";
+ break;
+ case execution_exception::timeout_error:
+ entry.logentry_type = "execution timeout";
+ break;
+ case execution_exception::user_error:
+ entry.logentry_type = "user, assert() or CRT error";
+ break;
+ case execution_exception::user_fatal_error:
+ // Looks like never used
+ entry.logentry_type = "user fatal error";
+ break;
+ case execution_exception::system_error:
+ entry.logentry_type = "system error";
+ break;
+ case execution_exception::system_fatal_error:
+ entry.logentry_type = "system fatal error";
+ break;
+ default:
+ entry.logentry_type = "no error"; // not sure how to handle this one
+ break;
+ }
+
+ o << "UNCAUGHT EXCEPTION:" << std::endl;
+ if( !loc.m_function.is_empty() )
+ o << "- function: \"" << loc.m_function << "\"" << std::endl;
+
+ o << "- file: " << file_basename(loc.m_file_name) << std::endl
+ << "- line: " << loc.m_line_num << std::endl
+ << std::endl;
+
+ o << "\nEXCEPTION STACK TRACE: --------------\n" << ex.what()
+ << "\n-------------------------------------";
+
+ if( !checkpoint_data.m_file_name.is_empty() ) {
+ o << std::endl << std::endl
+ << "Last checkpoint:" << std::endl
+ << "- message: \"" << checkpoint_data.m_message << "\"" << std::endl
+ << "- file: " << file_basename(checkpoint_data.m_file_name) << std::endl
+ << "- line: " << checkpoint_data.m_line_num << std::endl
+ ;
+ }
+
+ entry.output = o.str();
+
+ last_entry.assertion_entries.push_back(entry);
+ }
+
+ // check what to do with this one
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_exception_finish( std::ostream& ostr )
+{
+ // sealing the last entry
+ assert(!map_tests[list_path_to_root.back()].assertion_entries.back().sealed);
+ map_tests[list_path_to_root.back()].assertion_entries.back().sealed = true;
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_start( std::ostream& ostr, log_entry_data const& entry_data, log_entry_types let )
+{
+ junit_impl::junit_log_helper& last_entry = map_tests[list_path_to_root.back()];
+ m_is_last_assertion_or_error = true;
+ switch(let)
+ {
+ case unit_test_log_formatter::BOOST_UTL_ET_INFO:
+ case unit_test_log_formatter::BOOST_UTL_ET_MESSAGE:
+ case unit_test_log_formatter::BOOST_UTL_ET_WARNING:
+ {
+ std::ostringstream o;
+
+ junit_impl::junit_log_helper::assertion_entry entry;
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_info;
+ entry.logentry_message = "info";
+ entry.logentry_type = "message";
+
+ o << (let == unit_test_log_formatter::BOOST_UTL_ET_WARNING ?
+ "WARNING:" : (let == unit_test_log_formatter::BOOST_UTL_ET_MESSAGE ?
+ "MESSAGE:" : "INFO:"))
+ << std::endl
+ << "- file : " << file_basename(entry_data.m_file_name) << std::endl
+ << "- line : " << entry_data.m_line_num << std::endl
+ << "- message: "; // no CR
+
+ entry.output += o.str();
+ last_entry.assertion_entries.push_back(entry);
+ break;
+ }
+ default:
+ case unit_test_log_formatter::BOOST_UTL_ET_ERROR:
+ case unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR:
+ {
+ std::ostringstream o;
+ junit_impl::junit_log_helper::assertion_entry entry;
+ entry.log_entry = junit_impl::junit_log_helper::assertion_entry::log_entry_failure;
+ entry.logentry_message = "failure";
+ entry.logentry_type = (let == unit_test_log_formatter::BOOST_UTL_ET_ERROR ? "assertion error" : "fatal error");
+
+ o << "ASSERTION FAILURE:" << std::endl
+ << "- file : " << file_basename(entry_data.m_file_name) << std::endl
+ << "- line : " << entry_data.m_line_num << std::endl
+ << "- message: " ; // no CR
+
+ entry.output += o.str();
+ last_entry.assertion_entries.push_back(entry);
+ break;
+ }
+ }
+
+}
+
+ //____________________________________________________________________________//
+
+
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_value( std::ostream& ostr, const_string value )
+{
+ assert(map_tests[list_path_to_root.back()].assertion_entries.empty() || !map_tests[list_path_to_root.back()].assertion_entries.back().sealed);
+ junit_impl::junit_log_helper& last_entry = map_tests[list_path_to_root.back()];
+ std::ostringstream o;
+ utils::print_escaped_cdata( o, value );
+
+ if(!last_entry.assertion_entries.empty())
+ {
+ junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
+ log_entry.output += value;
+ }
+ else
+ {
+ // this may be a message coming from another observer
+ // the prefix is set in the log_entry_start
+ last_entry.system_out += value;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_finish( std::ostream& ostr )
+{
+ assert(map_tests[list_path_to_root.back()].assertion_entries.empty() || !map_tests[list_path_to_root.back()].assertion_entries.back().sealed);
+ junit_impl::junit_log_helper& last_entry = map_tests[list_path_to_root.back()];
+ if(!last_entry.assertion_entries.empty()) {
+ junit_impl::junit_log_helper::assertion_entry& log_entry = last_entry.assertion_entries.back();
+ log_entry.output += "\n\n"; // quote end, CR
+ log_entry.sealed = true;
+ }
+ else {
+ last_entry.system_out += "\n\n"; // quote end, CR
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::entry_context_start( std::ostream& ostr, log_level )
+{
+ std::vector< junit_impl::junit_log_helper::assertion_entry > &v_failure_or_error = map_tests[list_path_to_root.back()].assertion_entries;
+ assert(!v_failure_or_error.back().sealed);
+
+ if(m_is_last_assertion_or_error)
+ {
+ v_failure_or_error.back().output += "\n- context:\n";
+ }
+ else
+ {
+ v_failure_or_error.back().output += "\n\nCONTEXT:\n";
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::entry_context_finish( std::ostream& ostr )
+{
+ // no op, may be removed
+ assert(!map_tests[list_path_to_root.back()].assertion_entries.back().sealed);
+}
+
+//____________________________________________________________________________//
+
+void
+junit_log_formatter::log_entry_context( std::ostream& ostr, const_string context_descr )
+{
+ assert(!map_tests[list_path_to_root.back()].assertion_entries.back().sealed);
+ map_tests[list_path_to_root.back()].assertion_entries.back().output += (m_is_last_assertion_or_error ? " - '": "- '") + std::string(context_descr.begin(), context_descr.end()) + "'\n"; // quote end
+}
+
+//____________________________________________________________________________//
+
+
+std::string
+junit_log_formatter::get_default_stream_description() const {
+ std::string name = framework::master_test_suite().p_name.value;
+
+ static const std::string to_replace[] = { " ", "\"", "/", "\\", ":"};
+ static const std::string replacement[] = { "_", "_" , "_", "_" , "_"};
+
+ name = unit_test::utils::replace_all_occurrences_of(
+ name,
+ to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
+ replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
+
+ std::ifstream check_init((name + ".xml").c_str());
+ if(!check_init)
+ return name + ".xml";
+
+ int index = 0;
+ for(; index < 100; index++) {
+ std::string candidate = name + "_" + utils::string_cast(index) + ".xml";
+ std::ifstream file(candidate.c_str());
+ if(!file)
+ return candidate;
+ }
+
+ return name + ".xml";
+}
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_junit_log_formatter_IPP_020105GER
diff --git a/boost/test/impl/results_collector.ipp b/boost/test/impl/results_collector.ipp
index 17a31955ea..daee8bc3bf 100644
--- a/boost/test/impl/results_collector.ipp
+++ b/boost/test/impl/results_collector.ipp
@@ -83,6 +83,7 @@ test_results::operator+=( test_results const& tr )
p_test_cases_failed.value += tr.p_test_cases_failed;
p_test_cases_skipped.value += tr.p_test_cases_skipped;
p_test_cases_aborted.value += tr.p_test_cases_aborted;
+ p_duration_microseconds.value += tr.p_duration_microseconds;
}
//____________________________________________________________________________//
@@ -99,6 +100,7 @@ test_results::clear()
p_test_cases_failed.value = 0;
p_test_cases_skipped.value = 0;
p_test_cases_aborted.value = 0;
+ p_duration_microseconds.value= 0;
p_aborted.value = false;
p_skipped.value = false;
}
@@ -184,7 +186,7 @@ private:
//____________________________________________________________________________//
void
-results_collector_t::test_unit_finish( test_unit const& tu, unsigned long )
+results_collector_t::test_unit_finish( test_unit const& tu, unsigned long elapsed_in_microseconds )
{
if( tu.p_type == TUT_SUITE ) {
results_collect_helper ch( s_rc_impl().m_results_store[tu.p_id], tu );
@@ -192,15 +194,16 @@ results_collector_t::test_unit_finish( test_unit const& tu, unsigned long )
traverse_test_tree( tu, ch );
}
else {
- test_results const& tr = s_rc_impl().m_results_store[tu.p_id];
+ test_results & tr = s_rc_impl().m_results_store[tu.p_id];
+ tr.p_duration_microseconds.value = elapsed_in_microseconds;
bool num_failures_match = tr.p_aborted || tr.p_assertions_failed >= tr.p_expected_failures;
if( !num_failures_match )
- BOOST_TEST_MESSAGE( "Test case " << tu.full_name() << " has fewer failures than expected" );
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " has fewer failures than expected" );
bool check_any_assertions = tr.p_aborted || (tr.p_assertions_failed != 0) || (tr.p_assertions_passed != 0);
if( !check_any_assertions )
- BOOST_TEST_MESSAGE( "Test case " << tu.full_name() << " did not check any assertions" );
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " did not check any assertions" );
}
}
diff --git a/boost/test/impl/test_tools.ipp b/boost/test/impl/test_tools.ipp
index ed94da3a5b..a6b20a7729 100644
--- a/boost/test/impl/test_tools.ipp
+++ b/boost/test/impl/test_tools.ipp
@@ -29,6 +29,8 @@
#include <boost/test/detail/throw_exception.hpp>
+#include <boost/test/utils/algorithm.hpp>
+
// Boost
#include <boost/config.hpp>
@@ -505,7 +507,7 @@ output_test_stream::output_test_stream( const_string pattern_file_name, bool mat
m_pimpl->m_pattern.open( pattern_file_name.begin(), m );
if( !m_pimpl->m_pattern.is_open() )
- BOOST_TEST_MESSAGE( "Can't open pattern file " << pattern_file_name << " for " << (match_or_save ? "reading" : "writing") );
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Can't open pattern file " << pattern_file_name << " for " << (match_or_save ? "reading" : "writing") );
}
m_pimpl->m_match_or_save = match_or_save;
@@ -572,57 +574,163 @@ output_test_stream::is_equal( const_string arg, bool flush_stream )
//____________________________________________________________________________//
+std::string pretty_print_log(std::string str) {
+
+ static const std::string to_replace[] = { "\r", "\n" };
+ static const std::string replacement[] = { "\\r", "\\n" };
+
+ return unit_test::utils::replace_all_occurrences_of(
+ str,
+ to_replace, to_replace + sizeof(to_replace)/sizeof(to_replace[0]),
+ replacement, replacement + sizeof(replacement)/sizeof(replacement[0]));
+}
+
assertion_result
output_test_stream::match_pattern( bool flush_stream )
{
+ const std::string::size_type n_chars_presuffix = 10;
sync();
assertion_result result( true );
+ const std::string stream_string_repr = get_stream_string_representation();
+
if( !m_pimpl->m_pattern.is_open() ) {
result = false;
result.message() << "Pattern file can't be opened!";
}
else {
if( m_pimpl->m_match_or_save ) {
- for ( std::string::size_type i = 0; i < m_pimpl->m_synced_string.length(); ++i ) {
+
+ int offset = 0;
+ std::vector<char> last_elements;
+ for ( std::string::size_type i = 0; static_cast<int>(i + offset) < static_cast<int>(stream_string_repr.length()); ++i ) {
char c = m_pimpl->get_char();
- result = !m_pimpl->m_pattern.fail() &&
+ if( last_elements.size() <= n_chars_presuffix ) {
+ last_elements.push_back( c );
+ }
+ else {
+ last_elements[ i % last_elements.size() ] = c;
+ }
+
+ bool is_same = !m_pimpl->m_pattern.fail() &&
!m_pimpl->m_pattern.eof() &&
- (m_pimpl->m_synced_string[i] == c);
+ (stream_string_repr[i+offset] == c);
- if( !result ) {
- std::string::size_type suffix_size = (std::min)( m_pimpl->m_synced_string.length() - i,
- static_cast<std::string::size_type>(5) );
+ if( !is_same ) {
- // try to log area around the mismatch
- result.message() << "Mismatch at position " << i << '\n'
- << "..." << m_pimpl->m_synced_string.substr( i, suffix_size ) << "..." << '\n'
- << "..." << c;
+ result = false;
- std::string::size_type counter = suffix_size;
- while( --counter ) {
+ std::string::size_type prefix_size = (std::min)( i + offset, n_chars_presuffix );
+
+ std::string::size_type suffix_size = (std::min)( stream_string_repr.length() - i - offset,
+ n_chars_presuffix );
+
+ // try to log area around the mismatch
+ std::string substr = stream_string_repr.substr(0, i+offset);
+ std::size_t line = std::count(substr.begin(), substr.end(), '\n');
+ std::size_t column = i + offset - substr.rfind('\n');
+
+ result.message()
+ << "Mismatch at position " << i
+ << " (line " << line
+ << ", column " << column
+ << "): '" << pretty_print_log(std::string(1, stream_string_repr[i+offset])) << "' != '" << pretty_print_log(std::string(1, c)) << "' :\n";
+
+ // we already escape this substring because we need its actual size for the pretty print
+ // of the difference location.
+ std::string sub_str_prefix(pretty_print_log(stream_string_repr.substr( i + offset - prefix_size, prefix_size )));
+
+ // we need this substring as is because we compute the best matching substrings on it.
+ std::string sub_str_suffix(stream_string_repr.substr( i + offset, suffix_size));
+ result.message() << "... " << sub_str_prefix + pretty_print_log(sub_str_suffix) << " ..." << '\n';
+
+ result.message() << "... ";
+ for( std::size_t j = 0; j < last_elements.size() ; j++ )
+ result.message() << pretty_print_log(std::string(1, last_elements[(i + j + 1) % last_elements.size()]));
+
+ std::vector<char> last_elements_ordered;
+ last_elements_ordered.push_back(c);
+ for( std::string::size_type counter = 0; counter < suffix_size - 1 ; counter++ ) {
char c2 = m_pimpl->get_char();
if( m_pimpl->m_pattern.fail() || m_pimpl->m_pattern.eof() )
break;
- result.message() << c2;
+ result.message() << pretty_print_log(std::string(1, c2));
+
+ last_elements_ordered.push_back(c2);
+ }
+
+ // tries to find the best substring matching in the remainder of the
+ // two strings
+ std::size_t max_nb_char_in_common = 0;
+ std::size_t best_pattern_start_index = 0;
+ std::size_t best_stream_start_index = 0;
+ for( std::size_t pattern_start_index = best_pattern_start_index;
+ pattern_start_index < last_elements_ordered.size();
+ pattern_start_index++ ) {
+ for( std::size_t stream_start_index = best_stream_start_index;
+ stream_start_index < sub_str_suffix.size();
+ stream_start_index++ ) {
+
+ std::size_t max_size = (std::min)( last_elements_ordered.size() - pattern_start_index, sub_str_suffix.size() - stream_start_index );
+ if( max_nb_char_in_common > max_size )
+ break; // safely break to go to the outer loop
+
+ std::size_t nb_char_in_common = 0;
+ for( std::size_t k = 0; k < max_size; k++) {
+ if( last_elements_ordered[pattern_start_index + k] == sub_str_suffix[stream_start_index + k] )
+ nb_char_in_common ++;
+ else
+ break; // we take fully macthing substring only
+ }
+
+ if( nb_char_in_common > max_nb_char_in_common ) {
+ max_nb_char_in_common = nb_char_in_common;
+ best_pattern_start_index = pattern_start_index;
+ best_stream_start_index = stream_start_index;
+ }
+ }
+ }
+
+ // indicates with more precision the location of the mismatchs in ascii arts ...
+ result.message() << " ...\n... ";
+ for( std::string::size_type j = 0; j < sub_str_prefix.size(); j++) {
+ result.message() << ' ';
+ }
+
+ for( std::size_t k = 0; k < (std::max)(best_pattern_start_index, best_stream_start_index); k++ ) { // 1 is for the current char c
+ std::string s1(pretty_print_log(std::string(1, last_elements_ordered[(std::min)(k, best_pattern_start_index)])));
+ std::string s2(pretty_print_log(std::string(1, sub_str_suffix[(std::min)(k, best_stream_start_index)])));
+ for( int h = (std::max)(s1.size(), s2.size()); h > 0; h--)
+ result.message() << "~";
}
+ result.message() << "\n";
- result.message() << "...";
+ // first char is a replicat of c, so we do not copy it.
+ for(std::string::size_type counter = 0; counter < last_elements_ordered.size() - 1 ; counter++)
+ last_elements[ (i + 1 + counter) % last_elements.size() ] = last_elements_ordered[counter + 1];
+
+ i += last_elements_ordered.size()-1;
+ offset += best_stream_start_index - best_pattern_start_index;
- // skip rest of the bytes. May help for further matching
- m_pimpl->m_pattern.ignore(
- static_cast<std::streamsize>( m_pimpl->m_synced_string.length() - i - suffix_size) );
- break;
}
+
+ }
+
+ // not needed anymore
+ /*
+ if(offset > 0 && false) {
+ m_pimpl->m_pattern.ignore(
+ static_cast<std::streamsize>( offset ));
}
+ */
}
else {
- m_pimpl->m_pattern.write( m_pimpl->m_synced_string.c_str(),
- static_cast<std::streamsize>( m_pimpl->m_synced_string.length() ) );
+ m_pimpl->m_pattern.write( stream_string_repr.c_str(),
+ static_cast<std::streamsize>( stream_string_repr.length() ) );
m_pimpl->m_pattern.flush();
}
}
@@ -647,6 +755,12 @@ output_test_stream::flush()
#endif
}
+
+std::string
+output_test_stream::get_stream_string_representation() const {
+ return m_pimpl->m_synced_string;
+}
+
//____________________________________________________________________________//
std::size_t
diff --git a/boost/test/impl/unit_test_log.ipp b/boost/test/impl/unit_test_log.ipp
index 4c9ac40691..5f3fa6510d 100644
--- a/boost/test/impl/unit_test_log.ipp
+++ b/boost/test/impl/unit_test_log.ipp
@@ -23,12 +23,14 @@
#include <boost/test/unit_test_parameters.hpp>
#include <boost/test/utils/basic_cstring/compare.hpp>
+#include <boost/test/utils/foreach.hpp>
#include <boost/test/output/compiler_log_formatter.hpp>
#include <boost/test/output/xml_log_formatter.hpp>
+#include <boost/test/output/junit_log_formatter.hpp>
// Boost
-#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/io/ios_state.hpp>
typedef ::boost::io::ios_base_all_saver io_saver_type;
@@ -81,38 +83,68 @@ entry_value_collector::~entry_value_collector()
namespace {
+// log data
+struct unit_test_log_data_helper_impl {
+ typedef boost::shared_ptr<unit_test_log_formatter> formatter_ptr;
+ typedef boost::shared_ptr<io_saver_type> saver_ptr;
+
+ bool m_enabled;
+ output_format m_format;
+ std::ostream* m_stream;
+ saver_ptr m_stream_state_saver;
+ formatter_ptr m_log_formatter;
+ bool m_entry_in_progress;
+
+ unit_test_log_data_helper_impl(unit_test_log_formatter* p_log_formatter, output_format format, bool enabled = false)
+ : m_enabled( enabled )
+ , m_format( format )
+ , m_stream( &std::cout )
+ , m_stream_state_saver( new io_saver_type( std::cout ) )
+ , m_log_formatter()
+ , m_entry_in_progress( false )
+ {
+ m_log_formatter.reset(p_log_formatter);
+ m_log_formatter->set_log_level(log_all_errors);
+ }
+
+ // helper functions
+ std::ostream& stream()
+ {
+ return *m_stream;
+ }
+
+ log_level get_log_level() const
+ {
+ return m_log_formatter->get_log_level();
+ }
+};
+
struct unit_test_log_impl {
// Constructor
unit_test_log_impl()
- : m_stream( &std::cout )
- , m_stream_state_saver( new io_saver_type( std::cout ) )
- , m_threshold_level( log_all_errors )
- , m_log_formatter( new output::compiler_log_formatter )
{
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::compiler_log_formatter, OF_CLF, true) ); // only this one is active by default,
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::xml_log_formatter, OF_XML, false) );
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::junit_log_formatter, OF_JUNIT, false) );
}
- // log data
- typedef scoped_ptr<unit_test_log_formatter> formatter_ptr;
- typedef scoped_ptr<io_saver_type> saver_ptr;
-
- std::ostream* m_stream;
- saver_ptr m_stream_state_saver;
- log_level m_threshold_level;
- formatter_ptr m_log_formatter;
+ typedef std::vector<unit_test_log_data_helper_impl> v_formatter_data_t;
+ v_formatter_data_t m_log_formatter_data;
// entry data
- bool m_entry_in_progress;
- bool m_entry_started;
log_entry_data m_entry_data;
+ bool has_entry_in_progress() const {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl const&, current_logger_data, m_log_formatter_data ) {
+ if( current_logger_data.m_entry_in_progress )
+ return true;
+ }
+ return false;
+ }
+
// check point data
log_checkpoint_data m_checkpoint_data;
- // helper functions
- std::ostream& stream()
- {
- return *m_stream;
- }
void set_checkpoint( const_string file, std::size_t line_num, const_string msg )
{
assign_op( m_checkpoint_data.m_message, msg, 0 );
@@ -130,15 +162,17 @@ unit_test_log_impl& s_log_impl() { static unit_test_log_impl the_inst; return th
void
unit_test_log_t::test_start( counter_t test_cases_amount )
{
- if( s_log_impl().m_threshold_level == log_nothing )
- return;
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
+ continue;
- s_log_impl().m_log_formatter->log_start( s_log_impl().stream(), test_cases_amount );
+ current_logger_data.m_log_formatter->log_start( current_logger_data.stream(), test_cases_amount );
- if( runtime_config::get<bool>( runtime_config::BUILD_INFO ) )
- s_log_impl().m_log_formatter->log_build_info( s_log_impl().stream() );
+ if( runtime_config::get<bool>( runtime_config::BUILD_INFO ) )
+ current_logger_data.m_log_formatter->log_build_info( current_logger_data.stream() );
- s_log_impl().m_entry_in_progress = false;
+ current_logger_data.m_entry_in_progress = false;
+ }
}
//____________________________________________________________________________//
@@ -146,12 +180,14 @@ unit_test_log_t::test_start( counter_t test_cases_amount )
void
unit_test_log_t::test_finish()
{
- if( s_log_impl().m_threshold_level == log_nothing )
- return;
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
+ continue;
- s_log_impl().m_log_formatter->log_finish( s_log_impl().stream() );
+ current_logger_data.m_log_formatter->log_finish( current_logger_data.stream() );
- s_log_impl().stream().flush();
+ current_logger_data.stream().flush();
+ }
}
//____________________________________________________________________________//
@@ -167,13 +203,13 @@ unit_test_log_t::test_aborted()
void
unit_test_log_t::test_unit_start( test_unit const& tu )
{
- if( s_log_impl().m_threshold_level > log_test_units )
- return;
-
- if( s_log_impl().m_entry_in_progress )
+ if( s_log_impl().has_entry_in_progress() )
*this << log::end();
-
- s_log_impl().m_log_formatter->test_unit_start( s_log_impl().stream(), tu );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+ current_logger_data.m_log_formatter->test_unit_start( current_logger_data.stream(), tu );
+ }
}
//____________________________________________________________________________//
@@ -181,15 +217,18 @@ unit_test_log_t::test_unit_start( test_unit const& tu )
void
unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed )
{
- if( s_log_impl().m_threshold_level > log_test_units )
- return;
-
s_log_impl().m_checkpoint_data.clear();
- if( s_log_impl().m_entry_in_progress )
+ if( s_log_impl().has_entry_in_progress() )
*this << log::end();
- s_log_impl().m_log_formatter->test_unit_finish( s_log_impl().stream(), tu, elapsed );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+
+ current_logger_data.m_log_formatter->test_unit_finish( current_logger_data.stream(), tu, elapsed );
+ }
}
//____________________________________________________________________________//
@@ -197,13 +236,29 @@ unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed )
void
unit_test_log_t::test_unit_skipped( test_unit const& tu, const_string reason )
{
- if( s_log_impl().m_threshold_level > log_test_units )
- return;
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
- if( s_log_impl().m_entry_in_progress )
+ current_logger_data.m_log_formatter->test_unit_skipped( current_logger_data.stream(), tu, reason );
+ }
+}
+
+void
+unit_test_log_t::test_unit_aborted( test_unit const& tu )
+{
+ if( s_log_impl().has_entry_in_progress() )
*this << log::end();
- s_log_impl().m_log_formatter->test_unit_skipped( s_log_impl().stream(), tu, reason );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+
+ current_logger_data.m_log_formatter->test_unit_aborted(current_logger_data.stream(), tu );
+ }
}
//____________________________________________________________________________//
@@ -216,17 +271,20 @@ unit_test_log_t::exception_caught( execution_exception const& ex )
(ex.code() <= execution_exception::timeout_error ? log_system_errors
: log_fatal_errors );
- if( l >= s_log_impl().m_threshold_level ) {
- if( s_log_impl().m_entry_in_progress )
- *this << log::end();
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
- s_log_impl().m_log_formatter->log_exception_start( s_log_impl().stream(), s_log_impl().m_checkpoint_data, ex );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- log_entry_context( l );
+ if( current_logger_data.m_enabled && l >= current_logger_data.get_log_level() ) {
- s_log_impl().m_log_formatter->log_exception_finish( s_log_impl().stream() );
- }
+ current_logger_data.m_log_formatter->log_exception_start( current_logger_data.stream(), s_log_impl().m_checkpoint_data, ex );
+
+ log_entry_context( l );
+ current_logger_data.m_log_formatter->log_exception_finish( current_logger_data.stream() );
+ }
+ }
clear_entry_context();
}
@@ -249,10 +307,14 @@ set_unix_slash( char in )
unit_test_log_t&
unit_test_log_t::operator<<( log::begin const& b )
{
- if( s_log_impl().m_entry_in_progress )
+ if( s_log_impl().has_entry_in_progress() )
*this << log::end();
- s_log_impl().m_stream_state_saver->restore();
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_stream_state_saver->restore();
+ }
+ }
s_log_impl().m_entry_data.clear();
@@ -273,12 +335,15 @@ unit_test_log_t::operator<<( log::begin const& b )
unit_test_log_t&
unit_test_log_t::operator<<( log::end const& )
{
- if( s_log_impl().m_entry_in_progress ) {
+ if( s_log_impl().has_entry_in_progress() ) {
log_entry_context( s_log_impl().m_entry_data.m_level );
- s_log_impl().m_log_formatter->log_entry_finish( s_log_impl().stream() );
-
- s_log_impl().m_entry_in_progress = false;
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && current_logger_data.m_entry_in_progress ) {
+ current_logger_data.m_log_formatter->log_entry_finish( current_logger_data.stream() );
+ }
+ current_logger_data.m_entry_in_progress = false;
+ }
}
clear_entry_context();
@@ -309,43 +374,53 @@ unit_test_log_t::operator()( log_level l )
//____________________________________________________________________________//
bool
-unit_test_log_t::log_entry_start()
+unit_test_log_t::log_entry_start(output_format log_format)
{
- if( s_log_impl().m_entry_in_progress )
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+
+ if( current_logger_data.m_format != log_format )
+ continue;
+
+ if( current_logger_data.m_entry_in_progress )
+ return true;
+
+ if( !current_logger_data.m_enabled )
+ return false;
+
+ switch( s_log_impl().m_entry_data.m_level ) {
+ case log_successful_tests:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_INFO );
+ break;
+ case log_messages:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
+ break;
+ case log_warnings:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_WARNING );
+ break;
+ case log_all_errors:
+ case log_cpp_exception_errors:
+ case log_system_errors:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_ERROR );
+ break;
+ case log_fatal_errors:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
+ break;
+ case log_nothing:
+ case log_test_units:
+ case invalid_log_level:
+ return false;
+ }
+
+ current_logger_data.m_entry_in_progress = true;
return true;
-
- switch( s_log_impl().m_entry_data.m_level ) {
- case log_successful_tests:
- s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_INFO );
- break;
- case log_messages:
- s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
- break;
- case log_warnings:
- s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_WARNING );
- break;
- case log_all_errors:
- case log_cpp_exception_errors:
- case log_system_errors:
- s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_ERROR );
- break;
- case log_fatal_errors:
- s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
- break;
- case log_nothing:
- case log_test_units:
- case invalid_log_level:
- return false;
}
- s_log_impl().m_entry_in_progress = true;
-
- return true;
+ return false;
}
//____________________________________________________________________________//
@@ -353,9 +428,11 @@ unit_test_log_t::log_entry_start()
unit_test_log_t&
unit_test_log_t::operator<<( const_string value )
{
- if( s_log_impl().m_entry_data.m_level >= s_log_impl().m_threshold_level && !value.empty() && log_entry_start() )
- s_log_impl().m_log_formatter->log_entry_value( s_log_impl().stream(), value );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() && log_entry_start(current_logger_data.m_format) )
+ current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
+ }
return *this;
}
@@ -364,9 +441,10 @@ unit_test_log_t::operator<<( const_string value )
unit_test_log_t&
unit_test_log_t::operator<<( lazy_ostream const& value )
{
- if( s_log_impl().m_entry_data.m_level >= s_log_impl().m_threshold_level && !value.empty() && log_entry_start() )
- s_log_impl().m_log_formatter->log_entry_value( s_log_impl().stream(), value );
-
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() && log_entry_start(current_logger_data.m_format) )
+ current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
+ }
return *this;
}
@@ -381,12 +459,26 @@ unit_test_log_t::log_entry_context( log_level l )
const_string frame;
- s_log_impl().m_log_formatter->entry_context_start( s_log_impl().stream(), l );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->entry_context_start( current_logger_data.stream(), l );
+ }
+ }
while( !(frame=context.next()).is_empty() )
- s_log_impl().m_log_formatter->log_entry_context( s_log_impl().stream(), frame );
+ {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->log_entry_context( current_logger_data.stream(), frame );
+ }
+ }
+ }
- s_log_impl().m_log_formatter->entry_context_finish( s_log_impl().stream() );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->entry_context_finish( current_logger_data.stream() );
+ }
+ }
}
//____________________________________________________________________________//
@@ -402,11 +494,30 @@ unit_test_log_t::clear_entry_context()
void
unit_test_log_t::set_stream( std::ostream& str )
{
- if( s_log_impl().m_entry_in_progress )
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_stream = &str;
+ current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_stream( output_format log_format, std::ostream& str )
+{
+ if( s_log_impl().has_entry_in_progress() )
return;
- s_log_impl().m_stream = &str;
- s_log_impl().m_stream_state_saver.reset( new io_saver_type( str ) );
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_stream = &str;
+ current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
+ break;
+ }
+ }
}
//____________________________________________________________________________//
@@ -414,10 +525,28 @@ unit_test_log_t::set_stream( std::ostream& str )
void
unit_test_log_t::set_threshold_level( log_level lev )
{
- if( s_log_impl().m_entry_in_progress || lev == invalid_log_level )
+ if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_log_formatter->set_log_level( lev );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_threshold_level( output_format log_format, log_level lev )
+{
+ if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
return;
- s_log_impl().m_threshold_level = lev;
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_log_formatter->set_log_level( lev );
+ break;
+ }
+ }
}
//____________________________________________________________________________//
@@ -425,26 +554,90 @@ unit_test_log_t::set_threshold_level( log_level lev )
void
unit_test_log_t::set_format( output_format log_format )
{
- if( s_log_impl().m_entry_in_progress )
+ if( s_log_impl().has_entry_in_progress() )
return;
- switch( log_format ) {
- default:
- case OF_CLF:
- set_formatter( new output::compiler_log_formatter );
- break;
- case OF_XML:
- set_formatter( new output::xml_log_formatter );
- break;
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_enabled = current_logger_data.m_format == log_format;
}
}
//____________________________________________________________________________//
void
+unit_test_log_t::add_format( output_format log_format )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_enabled = true;
+ break;
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_formatter*
+unit_test_log_t::get_formatter( output_format log_format ) {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ return current_logger_data.m_log_formatter.get();
+ }
+ }
+ return 0;
+}
+
+
+void
+unit_test_log_t::add_formatter( unit_test_log_formatter* the_formatter )
+{
+ // remove only user defined logger
+ for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
+ ite(s_log_impl().m_log_formatter_data.end());
+ it != ite;
+ ++it)
+ {
+ if( it->m_format == OF_CUSTOM_LOGGER) {
+ s_log_impl().m_log_formatter_data.erase(it);
+ break;
+ }
+ }
+
+ if( the_formatter ) {
+ s_log_impl().m_log_formatter_data.push_back( unit_test_log_data_helper_impl(the_formatter, OF_CUSTOM_LOGGER, true) );
+ }
+}
+
+void
unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter )
{
- s_log_impl().m_log_formatter.reset( the_formatter );
+ // remove only user defined logger
+ log_level current_level = invalid_log_level;
+ std::ostream *current_stream = 0;
+ output_format previous_format = OF_INVALID;
+ for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
+ ite(s_log_impl().m_log_formatter_data.end());
+ it != ite;
+ ++it)
+ {
+ if( it->m_enabled ) {
+ if( current_level == invalid_log_level || it->m_format < previous_format || it->m_format == OF_CUSTOM_LOGGER) {
+ current_level = it->get_log_level();
+ current_stream = &(it->stream());
+ previous_format = it->m_format;
+ }
+ }
+ }
+
+ if( the_formatter ) {
+ add_formatter(the_formatter);
+ set_format(OF_CUSTOM_LOGGER);
+ set_threshold_level(OF_CUSTOM_LOGGER, current_level);
+ set_stream(OF_CUSTOM_LOGGER, *current_stream);
+ }
}
//____________________________________________________________________________//
@@ -459,6 +652,18 @@ unit_test_log_formatter::log_entry_value( std::ostream& ostr, lazy_ostream const
log_entry_value( ostr, (wrap_stringstream().ref() << value).str() );
}
+void
+unit_test_log_formatter::set_log_level(log_level new_log_level)
+{
+ m_log_level = new_log_level;
+}
+
+log_level
+unit_test_log_formatter::get_log_level() const
+{
+ return m_log_level;
+}
+
//____________________________________________________________________________//
} // namespace unit_test
@@ -467,3 +672,4 @@ unit_test_log_formatter::log_entry_value( std::ostream& ostr, lazy_ostream const
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+
diff --git a/boost/test/impl/unit_test_main.ipp b/boost/test/impl/unit_test_main.ipp
index 1f30c0213e..db61930652 100644
--- a/boost/test/impl/unit_test_main.ipp
+++ b/boost/test/impl/unit_test_main.ipp
@@ -191,7 +191,9 @@ unit_test_main( init_unit_test_func init_func, int argc, char* argv[] )
if( runtime_config::get<bool>( runtime_config::WAIT_FOR_DEBUGGER ) ) {
results_reporter::get_stream() << "Press any key to continue..." << std::endl;
- std::getchar();
+ // getchar is defined as a macro in uClibc. Use parenthesis to fix
+ // gcc bug 58952 for gcc <= 4.8.2.
+ (std::getchar)();
results_reporter::get_stream() << "Continuing..." << std::endl;
}
diff --git a/boost/test/impl/unit_test_parameters.ipp b/boost/test/impl/unit_test_parameters.ipp
index 3ca183e400..f49079ea3e 100644
--- a/boost/test/impl/unit_test_parameters.ipp
+++ b/boost/test/impl/unit_test_parameters.ipp
@@ -24,6 +24,7 @@
#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
#include <boost/test/utils/basic_cstring/compare.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/iterator/token_iterator.hpp>
#include <boost/test/debug.hpp>
#include <boost/test/framework.hpp>
@@ -69,7 +70,7 @@ namespace rt = boost::runtime;
namespace runtime_config {
-// UTF parameters
+// UTF parameters
std::string AUTO_START_DBG = "auto_start_dbg";
std::string BREAK_EXEC_PATH = "break_exec_path";
std::string BUILD_INFO = "build_info";
@@ -82,6 +83,7 @@ std::string LIST_LABELS = "list_labels";
std::string LOG_FORMAT = "log_format";
std::string LOG_LEVEL = "log_level";
std::string LOG_SINK = "log_sink";
+std::string COMBINED_LOGGER = "logger";
std::string OUTPUT_FORMAT = "output_format";
std::string RANDOM_SEED = "random";
std::string REPORT_FORMAT = "report_format";
@@ -134,9 +136,11 @@ register_parameters( rt::parameters_store& store )
#endif
));
- break_exec_path.add_cla_id( "--", BREAK_EXEC_PATH, "=" );
+ break_exec_path.add_cla_id( "--", BREAK_EXEC_PATH, "=" );
store.add( break_exec_path );
+ ///////////////////////////////////////////////
+
rt::option build_info( BUILD_INFO, (
rt::description = "Displays library build information.",
rt::env_var = "BOOST_TEST_BUILD_INFO",
@@ -162,7 +166,7 @@ register_parameters( rt::parameters_store& store )
#endif
rt::help = "If option " + CATCH_SYS_ERRORS + " has value no the frameworks does not attempt to catch "
"asynchronous system failure events (signals on *NIX platforms or structured exceptions on Windows). "
- " Default value is "
+ " Default value is "
#ifdef BOOST_TEST_DEFAULTS_TO_CORE_DUMP
"no."
#else
@@ -226,8 +230,8 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_LIST_CONTENT",
rt::default_value = OF_INVALID,
rt::optional_value = OF_CLF,
- rt::enum_values<unit_test::output_format>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+ rt::enum_values<unit_test::output_format>::value =
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "HRF", OF_CLF },
{ "DOT", OF_DOT }
@@ -266,17 +270,19 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_LOG_FORMAT",
rt::default_value = OF_CLF,
rt::enum_values<unit_test::output_format>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "HRF", OF_CLF },
{ "CLF", OF_CLF },
- { "XML", OF_XML }
+ { "XML", OF_XML },
+ { "JUNIT", OF_JUNIT },
},
#else
rt::enum_values_list<unit_test::output_format>()
( "HRF", OF_CLF )
( "CLF", OF_CLF )
( "XML", OF_XML )
+ ( "JUNIT", OF_JUNIT )
,
#endif
rt::help = "Parameter " + LOG_FORMAT + " allows to set the frameowrk's log format to one "
@@ -284,7 +290,7 @@ register_parameters( rt::parameters_store& store )
"parameter are the names of the output formats supplied by the framework. By "
"default the framework uses human readable format (HRF) for testing log. This "
"format is similar to compiler error format. Alternatively you can specify XML "
- "as log format. This format is easier to process by testing automation tools."
+ "or JUNIT as log format, which are easier to process by testing automation tools."
));
log_format.add_cla_id( "--", LOG_FORMAT, "=" );
@@ -298,7 +304,7 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_LOG_LEVEL",
rt::default_value = log_all_errors,
rt::enum_values<unit_test::log_level>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "all" , log_successful_tests },
{ "success" , log_successful_tests },
@@ -361,7 +367,7 @@ register_parameters( rt::parameters_store& store )
rt::description = "Specifies output format (both log and report).",
rt::env_var = "BOOST_TEST_OUTPUT_FORMAT",
rt::enum_values<unit_test::output_format>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "HRF", OF_CLF },
{ "CLF", OF_CLF },
@@ -374,7 +380,7 @@ register_parameters( rt::parameters_store& store )
( "XML", OF_XML )
,
#endif
- rt::help = "Parameter " + OUTPUT_FORMAT + " combines an effect of " + REPORT_FORMAT +
+ rt::help = "Parameter " + OUTPUT_FORMAT + " combines an effect of " + REPORT_FORMAT +
" and " + LOG_FORMAT + " parameters. This parameter has higher priority "
"than either one of them. In other words if this parameter is specified "
"it overrides the value of other two parameters. This parameter does not "
@@ -387,6 +393,19 @@ register_parameters( rt::parameters_store& store )
output_format.add_cla_id( "-", "o", " " );
store.add( output_format );
+ /////////////////////////////////////////////// combined logger option
+
+ rt::parameter<std::string,rt::REPEATABLE_PARAM> combined_logger( COMBINED_LOGGER, (
+ rt::description = "Specifies log level and sink for one or several log format",
+ rt::env_var = "BOOST_TEST_LOGGER",
+ rt::value_hint = "log_format:log_level:log_sink",
+ rt::help = "Parameter " + COMBINED_LOGGER + " allows to specify the logger type, level and sink\n"
+ "in one command."
+ ));
+
+ combined_logger.add_cla_id( "--", COMBINED_LOGGER, "=" );
+ store.add( combined_logger );
+
///////////////////////////////////////////////
rt::parameter<unsigned> random_seed( RANDOM_SEED, (
@@ -416,7 +435,7 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_REPORT_FORMAT",
rt::default_value = OF_CLF,
rt::enum_values<unit_test::output_format>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "HRF", OF_CLF },
{ "CLF", OF_CLF },
@@ -448,7 +467,7 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_REPORT_LEVEL",
rt::default_value = CONFIRMATION_REPORT,
rt::enum_values<unit_test::report_level>::value =
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
{
{ "confirm", CONFIRMATION_REPORT },
{ "short", SHORT_REPORT },
@@ -531,7 +550,7 @@ register_parameters( rt::parameters_store& store )
"filters', which allow to disable some test units. The __UTF__ also supports "
"enabling/disabling test units at compile time. These settings identify the default "
"set of test units to run. Parameter " + RUN_FILTERS + " is used to change this default. "
- "This parameter is repeatable, so you can specify more than one filter if necessary."
+ "This parameter is repeatable, so you can specify more than one filter if necessary."
));
tests_to_run.add_cla_id( "--", RUN_FILTERS, "=" );
@@ -545,8 +564,8 @@ register_parameters( rt::parameters_store& store )
rt::env_var = "BOOST_TEST_SAVE_PATTERN",
rt::help = "Parameter " + SAVE_TEST_PATTERN + " facilitates switching mode of operation for "
"testing output streams.\n\nThis parameter serves no particular purpose within the "
- "framework itself. It can be used by test modules relying on output_test_stream to "
- "implement testing logic. Default mode is 'match' (false)."
+ "framework itself. It can be used by test modules relying on output_test_stream to "
+ "implement testing logic. Default mode is 'match' (false)."
));
save_test_pattern.add_cla_id( "--", SAVE_TEST_PATTERN, "=" );
@@ -664,6 +683,7 @@ init( int& argc, char** argv )
s_arguments_store.set( REPORT_FORMAT, of );
s_arguments_store.set( LOG_FORMAT, of );
}
+
}
BOOST_TEST_I_CATCH( rt::init_error, ex ) {
BOOST_TEST_SETUP_ASSERT( false, ex.msg );
@@ -689,7 +709,7 @@ init( int& argc, char** argv )
std::cerr << "\n";
parser->usage( std::cerr );
}
-
+
BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_exception_failure ) );
}
BOOST_TEST_I_CATCH( rt::input_error, ex ) {
@@ -697,7 +717,7 @@ init( int& argc, char** argv )
if( parser )
parser->usage( std::cerr, ex.param_name );
-
+
BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_exception_failure ) );
}
}
diff --git a/boost/test/included/test_exec_monitor.hpp b/boost/test/included/test_exec_monitor.hpp
index cedbcb0ad8..34b6ef44dd 100644
--- a/boost/test/included/test_exec_monitor.hpp
+++ b/boost/test/included/test_exec_monitor.hpp
@@ -14,6 +14,7 @@
#define BOOST_INCLUDED_TEST_EXEC_MONITOR_HPP_071894GER
#include <boost/test/impl/compiler_log_formatter.ipp>
+#include <boost/test/impl/junit_log_formatter.ipp>
#include <boost/test/impl/debug.ipp>
#include <boost/test/impl/decorator.ipp>
#include <boost/test/impl/execution_monitor.ipp>
diff --git a/boost/test/included/unit_test.hpp b/boost/test/included/unit_test.hpp
index 03c0277d6d..8835acd455 100644
--- a/boost/test/included/unit_test.hpp
+++ b/boost/test/included/unit_test.hpp
@@ -13,6 +13,7 @@
#define BOOST_INCLUDED_UNIT_TEST_FRAMEWORK_HPP_071894GER
#include <boost/test/impl/compiler_log_formatter.ipp>
+#include <boost/test/impl/junit_log_formatter.ipp>
#include <boost/test/impl/debug.ipp>
#include <boost/test/impl/decorator.ipp>
#include <boost/test/impl/framework.ipp>
@@ -28,6 +29,7 @@
#include <boost/test/impl/unit_test_monitor.ipp>
#include <boost/test/impl/unit_test_parameters.ipp>
#include <boost/test/impl/xml_log_formatter.ipp>
+#include <boost/test/impl/junit_log_formatter.ipp>
#include <boost/test/impl/xml_report_formatter.ipp>
#define BOOST_TEST_INCLUDED
diff --git a/boost/test/output/compiler_log_formatter.hpp b/boost/test/output/compiler_log_formatter.hpp
index e3f98d7567..cb6172aab6 100644
--- a/boost/test/output/compiler_log_formatter.hpp
+++ b/boost/test/output/compiler_log_formatter.hpp
@@ -5,11 +5,8 @@
// See http://www.boost.org/libs/test for the library home page.
//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : contains compiler like Log formatter definition
+/// @file
+/// @brief Contains the formatter for the Human Readable Format (HRF)
// ***************************************************************************
#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
@@ -31,6 +28,7 @@ namespace output {
// ************** compiler_log_formatter ************** //
// ************************************************************************** //
+//!@brief Log formatter for the Human Readable Format (HRF) log format
class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
public:
compiler_log_formatter() : m_color_output( false ) {}
diff --git a/boost/test/output/junit_log_formatter.hpp b/boost/test/output/junit_log_formatter.hpp
new file mode 100644
index 0000000000..b6e818e37f
--- /dev/null
+++ b/boost/test/output/junit_log_formatter.hpp
@@ -0,0 +1,135 @@
+// (C) Copyright 2016 Raffi Enficiaud.
+// Distributed under the 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/test for the library home page.
+//
+///@file
+///@brief Contains the definition of the Junit log formatter (OF_JUNIT)
+// ***************************************************************************
+
+#ifndef BOOST_TEST_JUNIT_LOG_FORMATTER__
+#define BOOST_TEST_JUNIT_LOG_FORMATTER__
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+//#include <boost/test/results_collector.hpp>
+
+// STL
+#include <cstddef> // std::size_t
+#include <map>
+#include <list>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+
+ namespace junit_impl {
+
+ // helper for the JUnit logger
+ struct junit_log_helper
+ {
+ struct assertion_entry {
+
+ enum log_entry_t {
+ log_entry_info,
+ log_entry_error,
+ log_entry_failure
+ };
+
+ assertion_entry() : sealed(false)
+ {}
+
+ std::string logentry_message;
+ std::string logentry_type; // the one that will get expanded in the final junit (failure, error)
+ std::string output; // additional information/message generated by the assertion
+
+ log_entry_t log_entry; // the type associated to the assertion (or error)
+
+ bool sealed; // indicates if the entry can accept additional information
+ };
+
+ std::string system_out; // sysout: additional information
+ std::string system_err; // syserr: additional information
+
+ // list of failure, errors and messages (assertions message and the full log)
+ std::vector< assertion_entry > assertion_entries;
+
+ };
+ }
+
+// ************************************************************************** //
+// ************** junit_log_formatter ************** //
+// ************************************************************************** //
+
+/// JUnit logger class
+class junit_log_formatter : public unit_test_log_formatter {
+public:
+
+ junit_log_formatter() : m_display_build_info(false)
+ {
+ this->m_log_level = log_successful_tests;
+ }
+
+ // Formatter interface
+ void log_start( std::ostream&, counter_t test_cases_amount );
+ void log_finish( std::ostream& );
+ void log_build_info( std::ostream& );
+
+ void test_unit_start( std::ostream&, test_unit const& tu );
+ void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+ void test_unit_skipped( std::ostream&, test_unit const& tu, const_string reason );
+ void test_unit_aborted( std::ostream& os, test_unit const& tu );
+
+ void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+ void log_exception_finish( std::ostream& );
+
+ void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+
+ using unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
+ void log_entry_value( std::ostream&, const_string value );
+ void log_entry_finish( std::ostream& );
+
+ void entry_context_start( std::ostream&, log_level );
+ void log_entry_context( std::ostream&, const_string );
+ void entry_context_finish( std::ostream& );
+
+ //! Discards changes in the log level
+ virtual void set_log_level(log_level )
+ {
+ }
+
+ //! Instead of a regular stream, returns a file name corresponding to
+ //! the current master test suite. If the file already exists, adds an index
+ //! to it.
+ virtual std::string get_default_stream_description() const;
+
+
+private:
+ typedef std::map<test_unit_id, junit_impl::junit_log_helper> map_trace_t;
+ map_trace_t map_tests;
+
+ std::list<test_unit_id> list_path_to_root;
+ test_unit_id root_id;
+ bool m_display_build_info;
+ bool m_is_last_assertion_or_error; // true if failure, false if error
+
+ friend class junit_result_helper;
+};
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_JUNIT_LOG_FORMATTER__
diff --git a/boost/test/results_collector.hpp b/boost/test/results_collector.hpp
index d12fefb39c..7d2c2bee58 100644
--- a/boost/test/results_collector.hpp
+++ b/boost/test/results_collector.hpp
@@ -5,10 +5,11 @@
// See http://www.boost.org/libs/test for the library home page.
//
-/// @file results_collector.hpp @brief defines testing result collector components
+/// @file
+/// @brief Defines testing result collector components
///
-/// Defines class results_collector_t that is responsible for
-/// gathering test results and class test_results for presenting this information to end-user
+/// Defines classes for keeping track (@ref test_results) and collecting
+/// (@ref results_collector_t) the states of the test units.
// ***************************************************************************
#ifndef BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
@@ -44,59 +45,71 @@ inline void first_failed_assertion() {}
// ************************************************************************** //
/// @brief Collection of attributes constituting test unit results
///
-/// This class is a collection of attributes describing testing results. The atributes presented as public properties on
+/// This class is a collection of attributes describing a test result.
+///
+/// The attributes presented as public properties on
/// an instance of the class. In addition summary conclusion methods are presented to generate simple answer to pass/fail question
-// ************************************************************************** //
class BOOST_TEST_DECL test_results {
public:
test_results();
/// Type representing counter like public property
- typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)(test_results)(results_collect_helper) ) counter_prop;
+ typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)
+ (test_results)
+ (results_collect_helper) ) counter_prop;
/// Type representing boolean like public property
- typedef BOOST_READONLY_PROPERTY( bool, (results_collector_t)(test_results)(results_collect_helper) ) bool_prop;
+ typedef BOOST_READONLY_PROPERTY( bool, (results_collector_t)
+ (test_results)
+ (results_collect_helper) ) bool_prop;
- /// @name Public properties
- counter_prop p_assertions_passed;
- counter_prop p_assertions_failed;
- counter_prop p_warnings_failed;
+ counter_prop p_assertions_passed; //!< Number of successful assertions
+ counter_prop p_assertions_failed; //!< Number of failing assertions
+ counter_prop p_warnings_failed; //!< Number of warnings
counter_prop p_expected_failures;
- counter_prop p_test_cases_passed;
- counter_prop p_test_cases_warned;
- counter_prop p_test_cases_failed;
- counter_prop p_test_cases_skipped;
- counter_prop p_test_cases_aborted;
- bool_prop p_aborted;
- bool_prop p_skipped;
- /// @}
-
- /// @name Summary conclusion
+ counter_prop p_test_cases_passed; //!< Number of successfull test cases
+ counter_prop p_test_cases_warned; //!< Number of warnings in test cases
+ counter_prop p_test_cases_failed; //!< Number of failing test cases
+ counter_prop p_test_cases_skipped; //!< Number of skipped test cases
+ counter_prop p_test_cases_aborted; //!< Number of aborted test cases
+ counter_prop p_duration_microseconds; //!< Duration of the test in microseconds
+ bool_prop p_aborted; //!< Indicates that the test unit execution has been aborted
+ bool_prop p_skipped; //!< Indicates that the test unit execution has been skipped
/// Returns true if test unit passed
bool passed() const;
- /// Produces result code for the test unit execution
- /// This methhod return one of the result codes defined in boost/cstdlib.hpp
- /// @returns boost::exit_success on success, boost::exit_exception_failure in case test unit was aborted for any reason
- /// (incuding uncausght exception) and boost::exit_test_failure otherwise
+ /// Produces result code for the test unit execution
+ ///
+ /// This methhod return one of the result codes defined in @c boost/cstdlib.hpp
+ /// @returns
+ /// - @c boost::exit_success on success,
+ /// - @c boost::exit_exception_failure in case test unit
+ /// was aborted for any reason (incuding uncaught exception)
+ /// - and @c boost::exit_test_failure otherwise
int result_code() const;
- /// @}
- // collection helper
+ //! Combines the results of the current instance with another
+ //!
+ //! Only the counters are updated and the @c p_aborted and @c p_skipped are left unchanged.
void operator+=( test_results const& );
+ //! Resets the current state of the result
void clear();
};
// ************************************************************************** //
-/// This class implements test observer interface to collect the result of test unit execution
-// ************************************************************************** //
-
+/// @brief Collects and combines the test results
+///
+/// This class collects and combines the results of the test unit during the execution of the
+/// test tree. The results_collector_t::results() function combines the test results on a subtree
+/// of the test tree.
+///
+/// @see boost::unit_test::test_observer
class BOOST_TEST_DECL results_collector_t : public test_observer, public singleton<results_collector_t> {
public:
- virtual void test_start( counter_t test_cases_amount );
+ virtual void test_start( counter_t );
virtual void test_unit_start( test_unit const& );
virtual void test_unit_finish( test_unit const&, unsigned long );
@@ -109,7 +122,7 @@ public:
virtual int priority() { return 2; }
/// Results access per test unit
-
+ ///
/// @param[in] tu_id id of a test unit
test_results const& results( test_unit_id tu_id ) const;
@@ -125,4 +138,3 @@ BOOST_TEST_SINGLETON_INST( results_collector )
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
-
diff --git a/boost/test/tools/output_test_stream.hpp b/boost/test/tools/output_test_stream.hpp
index 02d3715e9d..2abbf7b521 100644
--- a/boost/test/tools/output_test_stream.hpp
+++ b/boost/test/tools/output_test_stream.hpp
@@ -39,10 +39,10 @@ class BOOST_TEST_DECL output_test_stream : public wrap_stringstream::wrapped_str
public:
//! Constructor
//!
- //!@param[in] pattern_file_name indicates the name of the file for matching. If the
+ //!@param[in] pattern_file_name indicates the name of the file for matching. If the
//! string is empty, the standard input or output streams are used instead
//! (depending on match_or_save)
- //!@param[in] match_or_save if true, the pattern file will be read, otherwise it will be
+ //!@param[in] match_or_save if true, the pattern file will be read, otherwise it will be
//! written
//!@param[in] text_or_binary if false, opens the stream in binary mode. Otherwise the stream
//! is opened with default flags and the carriage returns are ignored.
@@ -51,38 +51,49 @@ public:
bool text_or_binary = true );
// Destructor
- ~output_test_stream();
+ virtual ~output_test_stream();
//! Checks if the stream is empty
//!
//!@param[in] flush_stream if true, flushes the stream after the call
- assertion_result is_empty( bool flush_stream = true );
-
+ virtual assertion_result is_empty( bool flush_stream = true );
+
//! Checks the length of the stream
//!
//!@param[in] length target length
//!@param[in] flush_stream if true, flushes the stream after the call. Set to false to call
//! additional checks on the same content.
- assertion_result check_length( std::size_t length, bool flush_stream = true );
-
+ virtual assertion_result check_length( std::size_t length, bool flush_stream = true );
+
//! Checks the content of the stream against a string
//!
//!@param[in] arg_ the target stream
//!@param[in] flush_stream if true, flushes the stream after the call.
- assertion_result is_equal( const_string arg_, bool flush_stream = true );
+ virtual assertion_result is_equal( const_string arg_, bool flush_stream = true );
//! Checks the content of the stream against a pattern file
//!
- //!@param[in] flush_stream if true, flushes the stream after the call.
- assertion_result match_pattern( bool flush_stream = true );
+ //!@param[in] flush_stream if true, flushes/resets the stream after the call.
+ virtual assertion_result match_pattern( bool flush_stream = true );
//! Flushes the stream
void flush();
+protected:
+
+ //! Returns the string representation of the stream
+ //!
+ //! May be overriden in order to mutate the string before the matching operations.
+ virtual std::string get_stream_string_representation() const;
+
private:
// helper functions
+
+ //! Length of the stream
std::size_t length();
- void sync();
+
+ //! Synching the stream into an internal string representation
+ virtual void sync();
struct Impl;
Impl* m_pimpl;
diff --git a/boost/test/tree/global_fixture.hpp b/boost/test/tree/global_fixture.hpp
index 89ee61eb0c..2114595929 100644
--- a/boost/test/tree/global_fixture.hpp
+++ b/boost/test/tree/global_fixture.hpp
@@ -5,11 +5,8 @@
// See http://www.boost.org/libs/test for the library home page.
//
-// File : $RCSfile$
-//
-// Version : $Revision: 74640 $
-//
-// Description : defines global_fixture
+/// @file
+/// Defines global_fixture
// ***************************************************************************
#ifndef BOOST_TEST_TREE_GLOBAL_FIXTURE_HPP_091911GER
diff --git a/boost/test/tree/observer.hpp b/boost/test/tree/observer.hpp
index d878949f67..4db930fb07 100644
--- a/boost/test/tree/observer.hpp
+++ b/boost/test/tree/observer.hpp
@@ -28,17 +28,57 @@ namespace unit_test {
// ************** test_observer ************** //
// ************************************************************************** //
+/// @brief Generic test observer interface
+///
+/// This interface is used by observers in order to receive notifications from the
+/// Boost.Test framework on the current execution state.
+///
+/// Several observers can be running at the same time, and it is not unusual to
+/// have interactions among them. The test_observer#priority member function allows the specification
+/// of a particular order among them (lowest priority executed first, except specified otherwise).
+///
class BOOST_TEST_DECL test_observer {
public:
- // test observer interface
- virtual void test_start( counter_t /* test_cases_amount */ ) {}
+
+ //! Called before the framework starts executing the test cases
+ //!
+ //! @param[in] number_of_test_cases indicates the number of test cases. Only active
+ //! test cases are taken into account.
+ //!
+ virtual void test_start( counter_t /* number_of_test_cases */ ) {}
+
+
+ //! Called after the framework ends executing the test cases
+ //!
+ //! @note The call is made with a reversed priority order.
virtual void test_finish() {}
+
+ //! Called when a critical error is detected
+ //!
+ //! The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework.
+ //! Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining
+ //! tests are discarded.
+ //!
+ //! @note may be called before test_observer::test_unit_finish()
virtual void test_aborted() {}
- virtual void test_unit_start( test_unit const& ) {}
- virtual void test_unit_finish( test_unit const&, unsigned long /* elapsed */ ) {}
+ //! Called before the framework starts executing a test unit
+ //!
+ //! @param[in] test_unit the test being executed
+ virtual void test_unit_start( test_unit const& /* test */) {}
+
+ //! Called at each end of a test unit.
+ //!
+ //! @param elapsed duration of the test unit in microseconds.
+ virtual void test_unit_finish( test_unit const& /* test */, unsigned long /* elapsed */ ) {}
virtual void test_unit_skipped( test_unit const& tu, const_string ) { test_unit_skipped( tu ); }
virtual void test_unit_skipped( test_unit const& ) {} ///< backward compatibility
+
+ //! Called when a test unit indicates a fatal error.
+ //!
+ //! A fatal error happens when
+ //! - a strong assertion (with @c REQUIRE) fails, which indicates that the test case cannot continue
+ //! - an unexpected exception is caught by the Boost.Test framework
virtual void test_unit_aborted( test_unit const& ) {}
virtual void assertion_result( unit_test::assertion_result ar )
@@ -50,12 +90,18 @@ public:
default: break;
}
}
+
+ //! Called when an exception is intercepted
+ //!
+ //! In case an exception is intercepted, this call happens before the call
+ //! to @ref test_unit_aborted in order to log
+ //! additional data about the exception.
virtual void exception_caught( execution_exception const& ) {}
virtual int priority() { return 0; }
protected:
- // depracated now
+ //! Deprecated
virtual void assertion_result( bool /* passed */ ) {}
BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
diff --git a/boost/test/tree/test_case_counter.hpp b/boost/test/tree/test_case_counter.hpp
index 6feaddcb0e..a74f37f152 100644
--- a/boost/test/tree/test_case_counter.hpp
+++ b/boost/test/tree/test_case_counter.hpp
@@ -5,11 +5,8 @@
// See http://www.boost.org/libs/test for the library home page.
//
-// File : $RCSfile$
-//
-// Version : $Revision: 74640 $
-//
-// Description : defines test_case_counter
+/// @file
+/// Defines @ref test_case_counter
// ***************************************************************************
#ifndef BOOST_TEST_TREE_TEST_CASE_COUNTER_HPP_100211GER
@@ -33,6 +30,7 @@ namespace unit_test {
// ************** test_case_counter ************** //
// ************************************************************************** //
+///! Counts the number of enabled test cases
class test_case_counter : public test_tree_visitor {
public:
// Constructor
diff --git a/boost/test/unit_test_log.hpp b/boost/test/unit_test_log.hpp
index 4126953d02..ba998b0ca4 100644
--- a/boost/test/unit_test_log.hpp
+++ b/boost/test/unit_test_log.hpp
@@ -85,6 +85,30 @@ private:
// ************** unit_test_log ************** //
// ************************************************************************** //
+/// @brief Manages the sets of loggers, their streams and log levels
+///
+/// The Boost.Test framework allows for having several formatters/loggers at the same time, each of which
+/// having their own log level and output stream.
+///
+/// This class serves the purpose of
+/// - exposing an interface to the test framework (as a boost::unit_test::test_observer)
+/// - exposing an interface to the testing tools
+/// - managing several loggers
+///
+/// @note Accesses to the functions exposed by this class are made through the singleton
+/// @c boost::unit_test::unit_test_log.
+///
+/// Users/developers willing to implement their own formatter need to:
+/// - implement a boost::unit_test::unit_test_log_formatter that will output the desired format
+/// - register the formatter during a eg. global fixture using the method @c set_formatter (though the framework singleton).
+///
+/// @warning this observer has a higher priority than the @ref boost::unit_test::results_collector_t. This means
+/// that the various @ref boost::unit_test::test_results associated to each test unit may not be available at the time
+/// the @c test_unit_start, @c test_unit_finish ... are called.
+///
+/// @see
+/// - boost::unit_test::test_observer
+/// - boost::unit_test::unit_test_log_formatter
class BOOST_TEST_DECL unit_test_log_t : public test_observer, public singleton<unit_test_log_t> {
public:
// test_observer interface implementation
@@ -95,17 +119,83 @@ public:
virtual void test_unit_start( test_unit const& );
virtual void test_unit_finish( test_unit const&, unsigned long elapsed );
virtual void test_unit_skipped( test_unit const&, const_string );
+ virtual void test_unit_aborted( test_unit const& );
virtual void exception_caught( execution_exception const& ex );
virtual int priority() { return 1; }
// log configuration methods
+ //! Sets the stream for all loggers
+ //!
+ //! This will override the log sink/stream of all loggers, whether enabled or not.
void set_stream( std::ostream& );
+
+ //! Sets the stream for specific logger
+ //!
+ //! @note Has no effect if the specified format is not found
+ //! @par Since Boost 1.62
+ void set_stream( output_format, std::ostream& );
+
+ //! Sets the threshold level for all loggers/formatters.
+ //!
+ //! This will override the log level of all loggers, whether enabled or not.
void set_threshold_level( log_level );
+
+ //! Sets the threshold/log level of a specific format
+ //!
+ //! @note Has no effect if the specified format is not found
+ //! @par Since Boost 1.62
+ void set_threshold_level( output_format, log_level );
+
+ //! Add a format to the set of loggers
+ //!
+ //! Adding a logger means that the specified logger is enabled. The log level is managed by the formatter itself
+ //! and specifies what events are forwarded to the underlying formatter.
+ //! @par Since Boost 1.62
+ void add_format( output_format );
+
+ //! Sets the format of the logger
+ //!
+ //! This will become the only active format of the logs.
void set_format( output_format );
+
+ //! Returns the logger instance for a specific format.
+ //!
+ //! @returns the logger/formatter instance, or @c (unit_test_log_formatter*)0 if the format is not found.
+ //! @par Since Boost 1.62
+ unit_test_log_formatter* get_formatter( output_format );
+
+ //! Sets the logger instance
+ //!
+ //! The specified logger becomes the unique active one. The custom log formatter has the
+ //! format @c OF_CUSTOM_LOGGER. If such a format exists already, its formatter gets replaced by the one
+ //! given in argument.
+ //!
+ //! The log level and output stream of the new formatter are taken from the currently active logger. In case
+ //! several loggers are active, the order of priority is CUSTOM, HRF, XML, and JUNIT.
+ //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed.
+ //!
+ //! @note The ownership of the pointer is transfered to the Boost.Test framework. This call is equivalent to
+ //! - a call to @c add_formatter
+ //! - a call to @c set_format(OF_CUSTOM_LOGGER)
+ //! - a configuration of the newly added logger with a previously configured stream and log level.
void set_formatter( unit_test_log_formatter* );
+ //! Adds a custom log formatter to the set of formatters
+ //!
+ //! The specified logger is added with the format @c OF_CUSTOM_LOGGER, such that it can
+ //! be futher selected or its stream/log level can be specified.
+ //! If there is already a custom logger (with @c OF_CUSTOM_LOGGER), then
+ //! the existing one gets replaced by the one given in argument.
+ //! The provided logger is added with an enabled state.
+ //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed and
+ //! no other action is performed.
+ //!
+ //! @note The ownership of the pointer is transfered to the Boost.Test framework.
+ //! @par Since Boost 1.62
+ void add_formatter( unit_test_log_formatter* the_formatter );
+
// test progress logging
void set_checkpoint( const_string file, std::size_t line_num, const_string msg = const_string() );
@@ -120,7 +210,7 @@ public:
private:
// Implementation helpers
- bool log_entry_start();
+ bool log_entry_start(output_format log_format);
void log_entry_context( log_level l );
void clear_entry_context();
@@ -142,6 +232,17 @@ BOOST_TEST_SINGLETON_INST( unit_test_log )
// ************** Unit test log interface helpers ************** //
// ************************************************************************** //
+// messages sent by the framework
+#define BOOST_TEST_FRAMEWORK_MESSAGE( M ) \
+ (::boost::unit_test::unit_test_log \
+ << ::boost::unit_test::log::begin( \
+ "boost.test framework", \
+ __LINE__ )) \
+ ( ::boost::unit_test::log_messages ) \
+ << BOOST_TEST_LAZY_MSG( M ) \
+/**/
+
+
#define BOOST_TEST_MESSAGE( M ) \
BOOST_TEST_LOG_ENTRY( ::boost::unit_test::log_messages ) \
<< BOOST_TEST_LAZY_MSG( M ) \
diff --git a/boost/test/unit_test_log_formatter.hpp b/boost/test/unit_test_log_formatter.hpp
index 1e3d64322f..5a9d6bada5 100644
--- a/boost/test/unit_test_log_formatter.hpp
+++ b/boost/test/unit_test_log_formatter.hpp
@@ -23,6 +23,7 @@
// STL
#include <iosfwd>
#include <string> // for std::string
+#include <iostream>
#include <boost/test/detail/suppress_warnings.hpp>
@@ -72,19 +73,37 @@ struct BOOST_TEST_DECL log_checkpoint_data
};
// ************************************************************************** //
-/// Abstract Unit Test Framework log formatter interface
-
-/// During the test module execution Unit Test Framework can report messages about success or failure of assertions,
-/// which test suites are being run and more (specifically which messages are reported depends on log level threshold selected by the user).
-/// All these messages constitute Unit Test Framework log. There are many ways (formats) to present these messages to the user. Boost.Test comes with
-/// two formats: "Compiler-like log format" and "XML based log format". Former is intended for human consumption and later is intended for processing
-/// by automated regression test systems. If you want to produce some other format you need to implement class with specific interface and use
-/// method unit_test_log_t::set_formatter during a test module initialization to set an active formatter. The class unit_test_log_formatter defines this
-/// interface.
+/// @brief Abstract Unit Test Framework log formatter interface
///
-/// This interface requires you to format all possible messages being produced in the log. These includes error messages about failed assertions, messages
-/// about caught exceptions and information messages about test units being started/ended. All the methods in this interface takes a reference to standard
-/// stream as a first argument. This is where final messages needs to be directed to. Also you are given all the information necessary to produce a message.
+/// During the test module execution Unit Test Framework can report messages about success
+/// or failure of assertions, which test suites are being run and more (specifically which
+/// messages are reported depends on log level threshold selected by the user).
+///
+/// All these messages constitute Unit Test Framework log. There are many ways (formats) to present
+/// these messages to the user.
+///
+/// Boost.Test comes with three formats:
+/// - Compiler-like log format: intended for human consumption/diagnostic
+/// - XML based log format: intended for processing by automated regression test systems.
+/// - JUNIT based log format: intended for processing by automated regression test systems.
+///
+/// If you want to produce some other format you need to implement class with specific interface and use
+/// method @c unit_test_log_t::set_formatter during a test module initialization to set an active formatter.
+/// The class unit_test_log_formatter defines this interface.
+///
+/// This interface requires you to format all possible messages being produced in the log.
+/// These includes error messages about failed assertions, messages about caught exceptions and
+/// information messages about test units being started/ended. All the methods in this interface takes
+/// a reference to standard stream as a first argument. This is where final messages needs to be directed
+/// to. Also you are given all the information necessary to produce a message.
+///
+/// @par Since Boost 1.62:
+/// - Each formatter may indicate the default output stream. This is convenient for instance for streams intended
+/// for automated processing that indicate a file. See @c get_default_stream_description for more details.
+/// - Each formatter may manage its own log level through the getter/setter @c get_log_level and @c set_log_level .
+///
+/// @see
+/// - boost::unit_test::test_observer for an indication of the calls of the test observer interface
class BOOST_TEST_DECL unit_test_log_formatter {
public:
/// Types of log entries (messages written into a log)
@@ -95,26 +114,31 @@ public:
BOOST_UTL_ET_FATAL_ERROR ///< Fatal error notification message
};
+ //! Constructor
+ unit_test_log_formatter()
+ : m_log_level(log_all_errors)
+ {}
+
// Destructor
virtual ~unit_test_log_formatter() {}
// @name Test start/finish
/// Invoked at the beginning of test module execution
-
+ ///
/// @param[in] os output stream to write a messages to
/// @param[in] test_cases_amount total test case amount to be run
/// @see log_finish
virtual void log_start( std::ostream& os, counter_t test_cases_amount ) = 0;
/// Invoked at the end of test module execution
-
+ ///
/// @param[in] os output stream to write a messages into
/// @see log_start
virtual void log_finish( std::ostream& os ) = 0;
/// Invoked when Unit Test Framework build information is requested
-
+ ///
/// @param[in] os output stream to write a messages into
virtual void log_build_info( std::ostream& os ) = 0;
// @}
@@ -122,22 +146,22 @@ public:
// @name Test unit start/finish
/// Invoked when test unit starts (either test suite or test case)
-
+ ///
/// @param[in] os output stream to write a messages into
/// @param[in] tu test unit being started
/// @see test_unit_finish
virtual void test_unit_start( std::ostream& os, test_unit const& tu ) = 0;
/// Invoked when test unit finishes
-
+ ///
/// @param[in] os output stream to write a messages into
/// @param[in] tu test unit being finished
- /// @param[in] elapsed time in milliseconds spend executing this test unit
+ /// @param[in] elapsed time in microseconds spend executing this test unit
/// @see test_unit_start
virtual void test_unit_finish( std::ostream& os, test_unit const& tu, unsigned long elapsed ) = 0;
/// Invoked if test unit skipped for any reason
-
+ ///
/// @param[in] os output stream to write a messages into
/// @param[in] tu skipped test unit
/// @param[in] reason explanation why was it skipped
@@ -149,14 +173,23 @@ public:
/// Deprecated version of this interface
virtual void test_unit_skipped( std::ostream& os, test_unit const& tu ) {}
+ /// Invoked when a test unit is aborted
+ virtual void test_unit_aborted( std::ostream& os, test_unit const& tu ) {}
+
// @}
// @name Uncaught exception report
/// Invoked when Unit Test Framework detects uncaught exception
-
- /// Call to this function starts uncaught exception report. It is going to followed by context information. Report is finalized by call to
- /// log_exception_finish.
+ ///
+ /// The framwork calls this function when an uncaught exception it detected.
+ /// This call is followed by context information:
+ /// - one call to @c entry_context_start,
+ /// - as many calls to @c log_entry_context as there are context entries
+ /// - one call to @c entry_context_finish
+ ///
+ /// The logging of the exception information is finilized by a call to @c log_exception_finish.
+ ///
/// @param[in] os output stream to write a messages into
/// @param[in] lcd information about the last checkpoint before the exception was triggered
/// @param[in] ex information about the caught exception
@@ -164,7 +197,7 @@ public:
virtual void log_exception_start( std::ostream& os, log_checkpoint_data const& lcd, execution_exception const& ex ) = 0;
/// Invoked when Unit Test Framework detects uncaught exception
-
+ ///
/// Call to this function finishes uncaught exception report.
/// @param[in] os output stream to write a messages into
/// @see log_exception_start
@@ -182,10 +215,13 @@ public:
/// @param[in] led log entry attributes
/// @param[in] let log entry type log_entry_finish
/// @see log_entry_value, log_entry_finish
+ ///
+ /// @note call to this function may happen before any call to test_unit_start or all calls to test_unit_finish as the
+ /// framework might log errors raised during global initialization/shutdown.
virtual void log_entry_start( std::ostream& os, log_entry_data const& led, log_entry_types let ) = 0;
/// Invoked by Unit Test Framework to report a log entry content
-
+ ///
/// This is one of two overloaded methods to report log entry content. This one is used to report plain string value.
/// @param[in] os output stream to write a messages into.
/// @param[in] value log entry string value
@@ -217,7 +253,7 @@ public:
/// Context consists of multiple "scopes" identified by description messages assigned by the test module using
/// BOOST_TEST_INFO/BOOST_TEST_CONTEXT statements.
/// @param[in] os output stream to write a messages into
- /// @param[in] l entry log_leveg, to be used to fine tune the message
+ /// @param[in] l entry log_level, to be used to fine tune the message
/// @see log_entry_context, entry_context_finish
virtual void entry_context_start( std::ostream& os, log_level l ) = 0;
@@ -235,6 +271,42 @@ public:
/// @see log_entry_start, entry_context_context
virtual void entry_context_finish( std::ostream& os ) = 0;
// @}
+
+ // @name Log level management
+
+ /// Sets the log level of the logger/formatter
+ ///
+ /// Some loggers need to manage the log level by their own. This
+ /// member function let the implementation decide of that.
+ /// @par Since Boost 1.62
+ virtual void set_log_level(log_level new_log_level);
+
+ /// Returns the log level of the logger/formatter
+ /// @par Since Boost 1.62
+ virtual log_level get_log_level() const;
+ // @}
+
+
+ // @name Stream management
+
+ /// Returns a default stream for this logger.
+ ///
+ /// The returned string describes the stream as if it was passed from
+ /// the command line @c "--log_sink" parameter. With that regards, @b stdout and @b stderr
+ /// have special meaning indicating the standard output or error stream respectively.
+ ///
+ /// @par Since Boost 1.62
+ virtual std::string get_default_stream_description() const
+ {
+ return "stdout";
+ }
+
+ // @}
+
+
+protected:
+ log_level m_log_level;
+
};
} // namespace unit_test
diff --git a/boost/test/unit_test_parameters.hpp b/boost/test/unit_test_parameters.hpp
index ad69c1732e..d6fecf0b8a 100644
--- a/boost/test/unit_test_parameters.hpp
+++ b/boost/test/unit_test_parameters.hpp
@@ -17,6 +17,7 @@
// Boost.Test
#include <boost/test/detail/global_typedef.hpp>
#include <boost/test/utils/runtime/argument.hpp>
+#include <boost/make_shared.hpp>
// STL
#include <iostream>
@@ -34,7 +35,7 @@ namespace runtime_config {
// ************** runtime_config ************** //
// ************************************************************************** //
-// UTF parameters
+// UTF parameters
BOOST_TEST_DECL extern std::string AUTO_START_DBG;
BOOST_TEST_DECL extern std::string BREAK_EXEC_PATH;
BOOST_TEST_DECL extern std::string BUILD_INFO;
@@ -44,6 +45,7 @@ BOOST_TEST_DECL extern std::string DETECT_FP_EXCEPT;
BOOST_TEST_DECL extern std::string DETECT_MEM_LEAKS;
BOOST_TEST_DECL extern std::string LIST_CONTENT;
BOOST_TEST_DECL extern std::string LIST_LABELS;
+BOOST_TEST_DECL extern std::string COMBINED_LOGGER;
BOOST_TEST_DECL extern std::string LOG_FORMAT;
BOOST_TEST_DECL extern std::string LOG_LEVEL;
BOOST_TEST_DECL extern std::string LOG_SINK;
@@ -76,6 +78,11 @@ get( runtime::cstring parameter_name )
return argument_store().get<T>( parameter_name );
}
+inline bool has( runtime::cstring parameter_name )
+{
+ return argument_store().has( parameter_name );
+}
+
/// For public access
BOOST_TEST_DECL bool save_pattern();
@@ -86,35 +93,34 @@ BOOST_TEST_DECL bool save_pattern();
class stream_holder {
public:
// Constructor
- explicit stream_holder( std::ostream& default_stream )
+ explicit stream_holder( std::ostream& default_stream = std::cout)
: m_stream( &default_stream )
{
}
- void setup( runtime::cstring param_name )
+ void setup( const const_string& stream_name )
{
- if( !runtime_config::argument_store().has( param_name ) )
+ if(stream_name.empty())
return;
- std::string const& file_name = runtime_config::get<std::string>( param_name );
-
- if( file_name == "stderr" )
+ if( stream_name == "stderr" )
m_stream = &std::cerr;
- else if( file_name == "stdout" )
+ else if( stream_name == "stdout" )
m_stream = &std::cout;
else {
- m_file.open( file_name.c_str() );
- m_stream = &m_file;
+ m_file = boost::make_shared<std::ofstream>();
+ m_file->open( std::string(stream_name.begin(), stream_name.end()).c_str() );
+ m_stream = m_file.get();
}
}
// Access methods
- std::ostream& ref() const { return *m_stream; }
+ std::ostream& ref() const { return *m_stream; }
private:
// Data members
- std::ofstream m_file;
- std::ostream* m_stream;
+ boost::shared_ptr<std::ofstream> m_file;
+ std::ostream* m_stream;
};
} // namespace runtime_config
diff --git a/boost/test/utils/algorithm.hpp b/boost/test/utils/algorithm.hpp
index 76625cbd91..a5491816eb 100644
--- a/boost/test/utils/algorithm.hpp
+++ b/boost/test/utils/algorithm.hpp
@@ -213,6 +213,104 @@ find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1,
//____________________________________________________________________________//
+
+/// @brief This algorithm replaces all occurrences of a set of substrings by another substrings
+///
+/// @param str - string of operation
+/// @param first1 - iterator to the beginning of the substrings to replace
+/// @param last1 - iterator to the end of the substrings to replace
+/// @param first2 - iterator to the beginning of the substrings to replace with
+/// @param last2 - iterator to the end of the substrings to replace with
+template<class StringClass, class ForwardIterator>
+inline StringClass
+replace_all_occurrences_of( StringClass str,
+ ForwardIterator first1, ForwardIterator last1,
+ ForwardIterator first2, ForwardIterator last2)
+{
+ for(; first1 != last1 && first2 != last2; ++first1, ++first2) {
+ std::size_t found = str.find( *first1 );
+ while( found != StringClass::npos ) {
+ str.replace(found, first1->size(), *first2 );
+ found = str.find( *first1, found + first2->size() );
+ }
+ }
+
+ return str;
+}
+
+/// @brief This algorithm replaces all occurrences of a string with basic wildcards
+/// with another (optionally containing wildcards as well).
+///
+/// @param str - string to transform
+/// @param it_string_to_find - iterator to the beginning of the substrings to replace
+/// @param it_string_to_find_end - iterator to the end of the substrings to replace
+/// @param it_string_to_replace - iterator to the beginning of the substrings to replace with
+/// @param it_string_to_replace_end - iterator to the end of the substrings to replace with
+///
+/// The wildcard is the symbol '*'. Only a unique wildcard per string is supported. The replacement
+/// string may also contain a wildcard, in which case it is considered as a placeholder to the content
+/// of the wildcard in the source string.
+/// Example:
+/// - In order to replace the occurrences of @c 'time=\"some-variable-value\"' to a constant string,
+/// one may use @c 'time=\"*\"' as the string to search for, and 'time=\"0.0\"' as the replacement string.
+/// - In order to replace the occurrences of 'file.cpp(XX)' per 'file.cpp:XX', where XX is a variable to keep,
+/// on may use @c 'file.cpp(*)' as the string to search for, and 'file.cpp:*' as the replacement string.
+template<class StringClass, class ForwardIterator>
+inline StringClass
+replace_all_occurrences_with_wildcards(
+ StringClass str,
+ ForwardIterator it_string_to_find, ForwardIterator it_string_to_find_end,
+ ForwardIterator it_string_to_replace, ForwardIterator it_string_to_replace_end)
+{
+ for(; it_string_to_find != it_string_to_find_end && it_string_to_replace != it_string_to_replace_end;
+ ++it_string_to_find, ++ it_string_to_replace) {
+
+ std::size_t wildcard_pos = it_string_to_find->find("*");
+ if(wildcard_pos == StringClass::npos) {
+ ForwardIterator it_to_find_current_end(it_string_to_find);
+ ForwardIterator it_to_replace_current_end(it_string_to_replace);
+ str = replace_all_occurrences_of(
+ str,
+ it_string_to_find, ++it_to_find_current_end,
+ it_string_to_replace, ++it_to_replace_current_end);
+ continue;
+ }
+
+ std::size_t wildcard_pos_replace = it_string_to_replace->find("*");
+
+ std::size_t found_begin = str.find( it_string_to_find->substr(0, wildcard_pos) );
+ while( found_begin != StringClass::npos ) {
+ std::size_t found_end = str.find(it_string_to_find->substr(wildcard_pos+1), found_begin + wildcard_pos + 1); // to simplify
+ if( found_end != StringClass::npos ) {
+
+ if( wildcard_pos_replace == StringClass::npos ) {
+ StringClass replace_content = *it_string_to_replace;
+ str.replace(
+ found_begin,
+ found_end + (it_string_to_find->size() - wildcard_pos - 1 ) - found_begin,
+ replace_content);
+ } else {
+ StringClass replace_content =
+ it_string_to_replace->substr(0, wildcard_pos_replace)
+ + str.substr(found_begin + wildcard_pos,
+ found_end - found_begin - wildcard_pos)
+ + it_string_to_replace->substr(wildcard_pos_replace+1) ;
+ str.replace(
+ found_begin,
+ found_end + (it_string_to_find->size() - wildcard_pos - 1 ) - found_begin,
+ replace_content);
+
+ }
+ }
+
+ // may adapt the restart to the replacement and be more efficient
+ found_begin = str.find( it_string_to_find->substr(0, wildcard_pos), found_begin + 1 );
+ }
+ }
+
+ return str;
+}
+
} // namespace utils
} // namespace unit_test
} // namespace boost
diff --git a/boost/test/utils/runtime/argument_factory.hpp b/boost/test/utils/runtime/argument_factory.hpp
index a163deb9a2..f3448f8cc4 100644
--- a/boost/test/utils/runtime/argument_factory.hpp
+++ b/boost/test/utils/runtime/argument_factory.hpp
@@ -128,7 +128,7 @@ template<typename EnumType>
struct value_interpreter<EnumType, true> {
template<typename Modifiers>
explicit value_interpreter( Modifiers const& m )
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#if defined(BOOST_TEST_CLA_NEW_API)
: m_name_to_value( m[enum_values<EnumType>::value] )
{
}
diff --git a/boost/test/utils/runtime/errors.hpp b/boost/test/utils/runtime/errors.hpp
index c11686132c..37f8d9371b 100644
--- a/boost/test/utils/runtime/errors.hpp
+++ b/boost/test/utils/runtime/errors.hpp
@@ -74,60 +74,60 @@ class specific_param_error : public Base {
protected:
explicit specific_param_error( cstring param_name ) : Base( param_name ) {}
~specific_param_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-};
+
+public:
//____________________________________________________________________________//
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
+ !defined(BOOST_NO_CXX11_REF_QUALIFIERS)
-template<typename Derived, typename Base>
-inline Derived
-operator<<(specific_param_error<Derived, Base>&& ex, char const* val)
-{
- ex.msg.append( val );
+ Derived operator<<(char const* val) &&
+ {
+ this->msg.append( val );
- return reinterpret_cast<Derived&&>(ex);
-}
+ return reinterpret_cast<Derived&&>(*this);
+ }
-//____________________________________________________________________________//
+ //____________________________________________________________________________//
-template<typename Derived, typename Base, typename T>
-inline Derived
-operator<<(specific_param_error<Derived, Base>&& ex, T const& val)
-{
- ex.msg.append( unit_test::utils::string_cast( val ) );
+ template<typename T>
+ Derived operator<<(T const& val) &&
+ {
+ this->msg.append( unit_test::utils::string_cast( val ) );
- return reinterpret_cast<Derived&&>(ex);
-}
+ return reinterpret_cast<Derived&&>(*this);
+ }
-//____________________________________________________________________________//
+ //____________________________________________________________________________//
#else
-template<typename Derived, typename Base>
-inline Derived
-operator<<(specific_param_error<Derived, Base> const& ex, char const* val)
-{
- const_cast<specific_param_error<Derived, Base>&>(ex).msg.append( val );
+ Derived const& operator<<(char const* val) const
+ {
+ const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( val );
- return static_cast<Derived const&>(ex);
-}
+ return static_cast<Derived const&>(*this);
+ }
-//____________________________________________________________________________//
+ //____________________________________________________________________________//
-template<typename Derived, typename Base, typename T>
-inline Derived
-operator<<(specific_param_error<Derived, Base> const& ex, T const& val)
-{
- const_cast<specific_param_error<Derived, Base>&>(ex).msg.append( unit_test::utils::string_cast( val ) );
+ template<typename T>
+ Derived const& operator<<(T const& val) const
+ {
+ const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( unit_test::utils::string_cast( val ) );
- return static_cast<Derived const&>(ex);
-}
+ return static_cast<Derived const&>(*this);
+ }
-//____________________________________________________________________________//
+ //____________________________________________________________________________//
#endif
+};
+
+
+
// ************************************************************************** //
// ************** specific exception types ************** //
// ************************************************************************** //
diff --git a/boost/test/utils/runtime/modifier.hpp b/boost/test/utils/runtime/modifier.hpp
index ed77ca0afe..f4f5a42baa 100644
--- a/boost/test/utils/runtime/modifier.hpp
+++ b/boost/test/utils/runtime/modifier.hpp
@@ -23,6 +23,15 @@
#include <boost/test/detail/suppress_warnings.hpp>
+
+// New CLA API available only for some C++11 compilers
+#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) \
+ && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) \
+ && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) \
+ && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#define BOOST_TEST_CLA_NEW_API
+#endif
+
namespace boost {
namespace runtime {
@@ -32,10 +41,6 @@ namespace runtime {
namespace {
-#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-#define BOOST_TEST_CLA_NEW_API
-#endif
-
#ifdef BOOST_TEST_CLA_NEW_API
auto const& description = unit_test::static_constant<nfp::typed_keyword<cstring,struct description_t>>::value;
auto const& help = unit_test::static_constant<nfp::typed_keyword<cstring,struct help_t>>::value;
diff --git a/boost/thread/barrier.hpp b/boost/thread/barrier.hpp
index 47daf07b35..4c1b1b59a0 100644
--- a/boost/thread/barrier.hpp
+++ b/boost/thread/barrier.hpp
@@ -145,7 +145,7 @@ namespace boost
unsigned int count,
BOOST_THREAD_RV_REF(F) funct,
typename enable_if<
- typename is_void<typename result_of<F>::type>::type, dummy*
+ typename is_void<typename result_of<F()>::type>::type, dummy*
>::type=0
)
: m_count(check_counter(count)),
@@ -160,7 +160,7 @@ namespace boost
unsigned int count,
F &funct,
typename enable_if<
- typename is_void<typename result_of<F>::type>::type, dummy*
+ typename is_void<typename result_of<F()>::type>::type, dummy*
>::type=0
)
: m_count(check_counter(count)),
@@ -176,7 +176,7 @@ namespace boost
unsigned int count,
BOOST_THREAD_RV_REF(F) funct,
typename enable_if<
- typename is_same<typename result_of<F>::type, unsigned int>::type, dummy*
+ typename is_same<typename result_of<F()>::type, unsigned int>::type, dummy*
>::type=0
)
: m_count(check_counter(count)),
@@ -189,7 +189,7 @@ namespace boost
unsigned int count,
F& funct,
typename enable_if<
- typename is_same<typename result_of<F>::type, unsigned int>::type, dummy*
+ typename is_same<typename result_of<F()>::type, unsigned int>::type, dummy*
>::type=0
)
: m_count(check_counter(count)),
@@ -225,6 +225,7 @@ namespace boost
m_generation++;
m_count = static_cast<unsigned int>(fct_());
BOOST_ASSERT(m_count != 0);
+ lock.unlock();
m_cond.notify_all();
return true;
}
diff --git a/boost/thread/completion_latch.hpp b/boost/thread/completion_latch.hpp
index ea76474276..03f4e8962b 100644
--- a/boost/thread/completion_latch.hpp
+++ b/boost/thread/completion_latch.hpp
@@ -96,7 +96,6 @@ namespace boost
leavers_(0)
{
}
- template <typename F>
completion_latch(std::size_t count, void(*funct)()) :
count_(count), funct_(funct), waiters_(0), leavers_(0)
{
diff --git a/boost/thread/concurrent_queues/queue_views.hpp b/boost/thread/concurrent_queues/queue_views.hpp
index 5a4512dd6e..d04f54ed70 100644
--- a/boost/thread/concurrent_queues/queue_views.hpp
+++ b/boost/thread/concurrent_queues/queue_views.hpp
@@ -76,26 +76,15 @@ namespace concurrent
// Modifiers
void close() { queue->close(); }
- void push(const value_type& x) { queue->push_front(x); }
-
void pull(value_type& x) { queue->pull(x); };
// enable_if is_nothrow_copy_movable<value_type>
value_type pull() { return queue->pull(); }
- queue_op_status try_push(const value_type& x) { return queue->try_push_front(x); }
-
queue_op_status try_pull(value_type& x) { return queue->try_pull(x); }
- queue_op_status nonblocking_push(const value_type& x) { return queue->nonblocking_push_front(x); }
-
queue_op_status nonblocking_pull(value_type& x) { return queue->nonblocking_pull(x); }
- queue_op_status wait_push(const value_type& x) { return queue->wait_push_front(x); }
queue_op_status wait_pull(value_type& x) { return queue->wait_pull(x); }
- void push(BOOST_THREAD_RV_REF(value_type) x) { queue->push_front(forward<value_type>(x)); }
- queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->try_push_front(forward<value_type>(x)); }
- queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->nonblocking_push_front(forward<value_type>(x)); }
- queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x) { return queue->wait_push_front(forward<value_type>(x)); }
};
diff --git a/boost/thread/concurrent_queues/sync_timed_queue.hpp b/boost/thread/concurrent_queues/sync_timed_queue.hpp
index 36223d8715..e6a360f2b1 100644
--- a/boost/thread/concurrent_queues/sync_timed_queue.hpp
+++ b/boost/thread/concurrent_queues/sync_timed_queue.hpp
@@ -69,7 +69,7 @@ namespace detail
class sync_timed_queue
: private sync_priority_queue<detail::scheduled_type<T, Clock> >
{
- typedef detail::scheduled_type<T> stype;
+ typedef detail::scheduled_type<T, Clock> stype;
typedef sync_priority_queue<stype> super;
public:
typedef T value_type;
@@ -229,7 +229,8 @@ namespace detail
if (super::closed(lk)) return true;
while (! super::empty(lk)) {
if (! time_not_reached(lk)) return false;
- super::not_empty_.wait_until(lk, super::data_.top().time);
+ time_point tp = super::data_.top().time;
+ super::not_empty_.wait_until(lk, tp);
if (super::closed(lk)) return true;
}
if (super::closed(lk)) return true;
@@ -245,7 +246,8 @@ namespace detail
while (time_not_reached(lk))
{
super::throw_if_closed(lk);
- super::not_empty_.wait_until(lk,super::data_.top().time);
+ time_point tp = super::data_.top().time;
+ super::not_empty_.wait_until(lk,tp);
super::wait_until_not_empty(lk);
}
return pull(lk);
@@ -260,7 +262,7 @@ namespace detail
while (time_not_reached(lk))
{
super::throw_if_closed(lk);
- if (queue_op_status::timeout == super::not_empty_.wait_until(lk, tpmin)) {
+ if (cv_status::timeout == super::not_empty_.wait_until(lk, tpmin)) {
if (time_not_reached(lk)) return queue_op_status::not_ready;
return queue_op_status::timeout;
}
diff --git a/boost/thread/detail/config.hpp b/boost/thread/detail/config.hpp
index 475dadbaaa..b060b81c95 100644
--- a/boost/thread/detail/config.hpp
+++ b/boost/thread/detail/config.hpp
@@ -100,8 +100,8 @@
#if !defined BOOST_THREAD_VERSION
#define BOOST_THREAD_VERSION 2
#else
-#if BOOST_THREAD_VERSION!=2 && BOOST_THREAD_VERSION!=3 && BOOST_THREAD_VERSION!=4
-#error "BOOST_THREAD_VERSION must be 2, 3 or 4"
+#if BOOST_THREAD_VERSION!=2 && BOOST_THREAD_VERSION!=3 && BOOST_THREAD_VERSION!=4 && BOOST_THREAD_VERSION!=5
+#error "BOOST_THREAD_VERSION must be 2, 3, 4 or 5"
#endif
#endif
@@ -304,6 +304,13 @@
#endif // BOOST_THREAD_VERSION>=4
+
+#if BOOST_THREAD_VERSION>=5
+//#define BOOST_THREAD_FUTURE_BLOCKING
+#else
+//#define BOOST_THREAD_FUTURE_BLOCKING
+#define BOOST_THREAD_ASYNC_FUTURE_WAITS
+#endif
// INTERRUPTIONS
#if ! defined BOOST_THREAD_PROVIDES_INTERRUPTIONS \
&& ! defined BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
diff --git a/boost/thread/executors/generic_executor_ref.hpp b/boost/thread/executors/generic_executor_ref.hpp
index de270bcfed..da0382c160 100644
--- a/boost/thread/executors/generic_executor_ref.hpp
+++ b/boost/thread/executors/generic_executor_ref.hpp
@@ -32,7 +32,7 @@ namespace boost
/// executor is not copyable.
BOOST_THREAD_NO_COPYABLE(executor_ref)
- executor_ref(Executor& ex) : ex(ex) {}
+ executor_ref(Executor& ex_) : ex(ex_) {}
/**
* \par Effects
@@ -98,9 +98,9 @@ namespace boost
typedef executors::work work;
template<typename Executor>
- generic_executor_ref(Executor& ex)
- //: ex(make_shared<executor_ref<Executor> >(ex)) // todo check why this doesn't works with C++03
- : ex( new executor_ref<Executor>(ex) )
+ generic_executor_ref(Executor& ex_)
+ //: ex(make_shared<executor_ref<Executor> >(ex_)) // todo check why this doesn't works with C++03
+ : ex( new executor_ref<Executor>(ex_) )
{
}
diff --git a/boost/thread/future.hpp b/boost/thread/future.hpp
index 6100c1606b..b98ff3d338 100644
--- a/boost/thread/future.hpp
+++ b/boost/thread/future.hpp
@@ -14,7 +14,6 @@
// due to boost::exception::exception_ptr dependency
//#define BOOST_THREAD_CONTINUATION_SYNC
-#define BOOST_THREAD_FUTURE_BLOCKING
#ifndef BOOST_NO_EXCEPTIONS
@@ -177,8 +176,8 @@ namespace boost
ex()
{}
- shared_state_base(exceptional_ptr const& ex):
- exception(ex.ptr_),
+ shared_state_base(exceptional_ptr const& ex_):
+ exception(ex_.ptr_),
done(true),
is_valid_(true),
is_deferred_(false),
@@ -825,6 +824,12 @@ namespace boost
{
#ifdef BOOST_THREAD_FUTURE_BLOCKING
join();
+#elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS
+ unique_lock<boost::mutex> lk(this->mutex);
+ while(!this->done)
+ {
+ this->waiters.wait(lk);
+ }
#endif
}
@@ -853,9 +858,9 @@ namespace boost
void init(BOOST_THREAD_FWD_REF(Fp) f)
{
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f));
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f));
#else
- thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f)).detach();
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f)).detach();
#endif
}
@@ -878,9 +883,9 @@ namespace boost
void init(BOOST_THREAD_FWD_REF(Fp) f)
{
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
#else
- thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
#endif
}
@@ -904,9 +909,9 @@ namespace boost
void init(BOOST_THREAD_FWD_REF(Fp) f)
{
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
#else
- thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
#endif
}
@@ -1634,7 +1639,7 @@ namespace boost
base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
{
}
- inline BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R> >) other); // EXTENSION
+ inline explicit BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R> >) other); // EXTENSION
explicit BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(shared_future<R>) other) :
base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
@@ -4379,9 +4384,9 @@ namespace detail
void launch_continuation() {
#if defined BOOST_THREAD_FUTURE_BLOCKING
boost::lock_guard<boost::mutex> lk(this->mutex);
- this->thr_ = thread(&future_async_continuation_shared_state::run, static_shared_from_this(this));
+ this->thr_ = boost::thread(&future_async_continuation_shared_state::run, static_shared_from_this(this));
#else
- thread(&base_type::run, static_shared_from_this(this)).detach();
+ boost::thread(&base_type::run, static_shared_from_this(this)).detach();
#endif
}
};
@@ -4498,9 +4503,9 @@ namespace detail {
void launch_continuation() {
#if defined BOOST_THREAD_FUTURE_BLOCKING
boost::lock_guard<boost::mutex> lk(this->mutex);
- this->thr_ = thread(&base_type::run, static_shared_from_this(this));
+ this->thr_ = boost::thread(&base_type::run, static_shared_from_this(this));
#else
- thread(&base_type::run, static_shared_from_this(this)).detach();
+ boost::thread(&base_type::run, static_shared_from_this(this)).detach();
#endif
}
};
@@ -4767,17 +4772,17 @@ namespace detail {
#endif
} else if (underlying_cast<int>(policy) & int(launch::inherit)) {
- launch policy = this->launch_policy(lock);
- if (underlying_cast<int>(policy) & int(launch::async)) {
+ launch policy_ = this->launch_policy(lock);
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
- } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
- } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
assert(this->future_->get_executor());
typedef executor Ex;
Ex& ex = *(this->future_->get_executor());
@@ -4888,22 +4893,22 @@ namespace detail {
)));
#endif
} else if (underlying_cast<int>(policy) & int(launch::inherit)) {
- launch policy = this->launch_policy(lock);
+ launch policy_ = this->launch_policy(lock);
- if (underlying_cast<int>(policy) & int(launch::async)) {
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
- } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
- } else if (underlying_cast<int>(policy) & int(launch::sync)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::sync)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
- } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
assert(this->future_->get_executor());
typedef executor Ex;
Ex& ex = *(this->future_->get_executor());
@@ -5015,21 +5020,21 @@ namespace detail {
#endif
} else if (underlying_cast<int>(policy) & int(launch::inherit)) {
- launch policy = this->launch_policy(lock);
- if (underlying_cast<int>(policy) & int(launch::async)) {
+ launch policy_ = this->launch_policy(lock);
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_async_continuation_shared_state<shared_future<R>, future_type>(
lock, *this, boost::forward<F>(func)
)));
- } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_deferred_continuation_shared_state<shared_future<R>, future_type>(
lock, *this, boost::forward<F>(func)
)));
- } else if (underlying_cast<int>(policy) & int(launch::sync)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::sync)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_sync_continuation_shared_state<shared_future<R>, future_type>(
lock, *this, boost::forward<F>(func)
)));
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
- } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
typedef executor Ex;
Ex& ex = *(this->future_->get_executor());
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_executor_continuation_shared_state<Ex, shared_future<R>, future_type>(ex,
@@ -5311,9 +5316,9 @@ namespace detail
return;
}
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_when_all_vector_shared_state::run, this->shared_from_this());
+ this->thr_ = boost::thread(&future_when_all_vector_shared_state::run, this->shared_from_this());
#else
- thread(&future_when_all_vector_shared_state::run, this->shared_from_this()).detach();
+ boost::thread(&future_when_all_vector_shared_state::run, this->shared_from_this()).detach();
#endif
}
@@ -5382,9 +5387,9 @@ namespace detail
}
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_when_any_vector_shared_state::run, this->shared_from_this());
+ this->thr_ = boost::thread(&future_when_any_vector_shared_state::run, this->shared_from_this());
#else
- thread(&future_when_any_vector_shared_state::run, this->shared_from_this()).detach();
+ boost::thread(&future_when_any_vector_shared_state::run, this->shared_from_this()).detach();
#endif
}
@@ -5489,9 +5494,9 @@ namespace detail
return;
}
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_when_all_tuple_shared_state::run, this->shared_from_this());
+ this->thr_ = boost::thread(&future_when_all_tuple_shared_state::run, this->shared_from_this());
#else
- thread(&future_when_all_tuple_shared_state::run, this->shared_from_this()).detach();
+ boost::thread(&future_when_all_tuple_shared_state::run, this->shared_from_this()).detach();
#endif
}
@@ -5560,9 +5565,9 @@ namespace detail
}
#ifdef BOOST_THREAD_FUTURE_BLOCKING
- this->thr_ = thread(&future_when_any_tuple_shared_state::run, this->shared_from_this());
+ this->thr_ = boost::thread(&future_when_any_tuple_shared_state::run, this->shared_from_this());
#else
- thread(&future_when_any_tuple_shared_state::run, this->shared_from_this()).detach();
+ boost::thread(&future_when_any_tuple_shared_state::run, this->shared_from_this()).detach();
#endif
}
diff --git a/boost/thread/lock_types.hpp b/boost/thread/lock_types.hpp
index 2b73edfb02..9b8c57c49f 100644
--- a/boost/thread/lock_types.hpp
+++ b/boost/thread/lock_types.hpp
@@ -934,7 +934,7 @@ namespace boost
if (m == 0)
{
boost::throw_exception(
- boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
}
if (owns_lock())
{
@@ -949,7 +949,7 @@ namespace boost
if (m == 0)
{
boost::throw_exception(
- boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
}
if (owns_lock())
{
@@ -964,7 +964,7 @@ namespace boost
if (m == 0)
{
boost::throw_exception(
- boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
}
if (!owns_lock())
{
@@ -980,11 +980,11 @@ namespace boost
{
if(m==0)
{
- boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
}
if(owns_lock())
{
- boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
}
is_locked=m->try_lock_upgrade_for(rel_time);
return is_locked;
@@ -994,11 +994,11 @@ namespace boost
{
if(m==0)
{
- boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
}
if(owns_lock())
{
- boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
}
is_locked=m->try_lock_upgrade_until(abs_time);
return is_locked;
@@ -1080,7 +1080,7 @@ namespace boost
//std-2104 unique_lock move-assignment should not be noexcept
upgrade_to_unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock<Mutex> BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT
{
- upgrade_to_unique_lock temp(other);
+ upgrade_to_unique_lock temp(::boost::move(other));
swap(temp);
return *this;
}
@@ -1167,7 +1167,7 @@ private unique_lock<Mutex>
#endif
try_lock_wrapper& operator=(BOOST_THREAD_RV_REF_BEG try_lock_wrapper<Mutex> BOOST_THREAD_RV_REF_END other)
{
- try_lock_wrapper temp(other);
+ try_lock_wrapper temp(::boost::move(other));
swap(temp);
return *this;
}
diff --git a/boost/thread/locks.hpp b/boost/thread/locks.hpp
index 6749964cf5..0905aec22a 100644
--- a/boost/thread/locks.hpp
+++ b/boost/thread/locks.hpp
@@ -10,6 +10,7 @@
#include <boost/thread/lock_algorithms.hpp>
#include <boost/thread/lock_types.hpp>
#include <boost/thread/lock_guard.hpp>
+#include <boost/thread/shared_lock_guard.hpp>
#include <boost/thread/lockable_traits.hpp>
#include <boost/thread/lock_options.hpp>
diff --git a/boost/thread/pthread/condition_variable_fwd.hpp b/boost/thread/pthread/condition_variable_fwd.hpp
index 1255eac59b..652a8c0baa 100644
--- a/boost/thread/pthread/condition_variable_fwd.hpp
+++ b/boost/thread/pthread/condition_variable_fwd.hpp
@@ -75,8 +75,9 @@ namespace boost
BOOST_THREAD_NO_COPYABLE(condition_variable)
condition_variable()
{
+ int res;
#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- int res=pthread_mutex_init(&internal_mutex,NULL);
+ res=pthread_mutex_init(&internal_mutex,NULL);
if(res)
{
boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread_mutex_init"));
diff --git a/boost/thread/pthread/shared_mutex.hpp b/boost/thread/pthread/shared_mutex.hpp
index 458d6c8361..b427b0f16a 100644
--- a/boost/thread/pthread/shared_mutex.hpp
+++ b/boost/thread/pthread/shared_mutex.hpp
@@ -269,13 +269,13 @@ namespace boost
// avoid other threads to lock, lock_upgrade or lock_shared, so only this thread is notified.
state.upgrade=false;
state.exclusive=true;
- lk.unlock();
+ //lk.unlock();
upgrade_cond.notify_one();
}
else
{
state.exclusive_waiting_blocked=false;
- lk.unlock();
+ //lk.unlock();
}
release_waiters();
}
diff --git a/boost/thread/pthread/thread_data.hpp b/boost/thread/pthread/thread_data.hpp
index dc8ba0fb1b..458bcd5422 100644
--- a/boost/thread/pthread/thread_data.hpp
+++ b/boost/thread/pthread/thread_data.hpp
@@ -228,7 +228,7 @@ namespace boost
namespace this_thread
{
- namespace hiden
+ namespace hidden
{
void BOOST_THREAD_DECL sleep_for(const timespec& ts);
void BOOST_THREAD_DECL sleep_until(const timespec& ts);
@@ -240,14 +240,14 @@ namespace boost
inline
void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns)
{
- return boost::this_thread::hiden::sleep_for(boost::detail::to_timespec(ns));
+ return boost::this_thread::hidden::sleep_for(boost::detail::to_timespec(ns));
}
#endif
#endif // BOOST_THREAD_USES_CHRONO
namespace no_interruption_point
{
- namespace hiden
+ namespace hidden
{
void BOOST_THREAD_DECL sleep_for(const timespec& ts);
void BOOST_THREAD_DECL sleep_until(const timespec& ts);
@@ -259,7 +259,7 @@ namespace boost
inline
void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns)
{
- return boost::this_thread::no_interruption_point::hiden::sleep_for(boost::detail::to_timespec(ns));
+ return boost::this_thread::no_interruption_point::hidden::sleep_for(boost::detail::to_timespec(ns));
}
#endif
#endif // BOOST_THREAD_USES_CHRONO
@@ -275,7 +275,7 @@ namespace boost
#endif
inline void sleep(system_time const& abs_time)
{
- return boost::this_thread::hiden::sleep_until(boost::detail::to_timespec(abs_time));
+ return boost::this_thread::hidden::sleep_until(boost::detail::to_timespec(abs_time));
}
template<typename TimeDuration>
diff --git a/boost/thread/thread_functors.hpp b/boost/thread/thread_functors.hpp
index f7bd816b17..bba129f767 100644
--- a/boost/thread/thread_functors.hpp
+++ b/boost/thread/thread_functors.hpp
@@ -43,9 +43,9 @@ namespace boost
{
void operator()(thread& t)
{
- t.interrupt();
if (t.joinable())
{
+ t.interrupt();
t.join();
}
}
diff --git a/boost/thread/win32/thread_primitives.hpp b/boost/thread/win32/thread_primitives.hpp
index 6d2ca7c2cf..c9e279faa0 100644
--- a/boost/thread/win32/thread_primitives.hpp
+++ b/boost/thread/win32/thread_primitives.hpp
@@ -16,6 +16,7 @@
#include <boost/assert.hpp>
#include <boost/thread/exceptions.hpp>
#include <boost/detail/interlocked.hpp>
+#include <boost/detail/winapi/config.hpp>
//#include <boost/detail/winapi/synchronization.hpp>
#include <algorithm>
@@ -156,7 +157,7 @@ namespace boost
{
struct _SECURITY_ATTRIBUTES;
# ifdef BOOST_NO_ANSI_APIS
-# if defined(BOOST_USE_WINAPI_VERSION) && ( BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA )
+# if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
__declspec(dllimport) void* __stdcall CreateMutexW(_SECURITY_ATTRIBUTES*,int,wchar_t const*);
__declspec(dllimport) void* __stdcall CreateSemaphoreW(_SECURITY_ATTRIBUTES*,long,long,wchar_t const*);
__declspec(dllimport) void* __stdcall CreateEventW(_SECURITY_ATTRIBUTES*,int,int,wchar_t const*);
@@ -339,7 +340,7 @@ namespace boost
{
#if !defined(BOOST_NO_ANSI_APIS)
handle const res = win32::CreateEventA(0, type, state, mutex_name);
-#elif defined(BOOST_USE_WINAPI_VERSION) && ( BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA )
+#elif BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
handle const res = win32::CreateEventW(0, type, state, mutex_name);
#else
handle const res = win32::CreateEventExW(
@@ -366,7 +367,7 @@ namespace boost
#if !defined(BOOST_NO_ANSI_APIS)
handle const res=win32::CreateSemaphoreA(0,initial_count,max_count,0);
#else
-#if defined(BOOST_USE_WINAPI_VERSION) && ( BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA )
+#if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
handle const res=win32::CreateSemaphoreEx(0,initial_count,max_count,0,0);
#else
handle const res=win32::CreateSemaphoreExW(0,initial_count,max_count,0,0,semaphore_all_access);
diff --git a/boost/type_index.hpp b/boost/type_index.hpp
index dce89d81d6..0310e2027b 100644
--- a/boost/type_index.hpp
+++ b/boost/type_index.hpp
@@ -234,7 +234,7 @@ inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.
///
-/// Retunrs runtime information about specified type.
+/// Returns runtime information about specified type.
///
/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.
///
@@ -249,7 +249,7 @@ inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
/// std::cout << ti.pretty_name(); // Outputs 'Derived'
/// \endcode
///
-/// \param runtime_val Varaible which runtime type must be returned.
+/// \param runtime_val Variable which runtime type must be returned.
/// \throw Nothing.
/// \return boost::typeindex::type_index with information about the specified variable.
template <class T>
diff --git a/boost/type_index/ctti_type_index.hpp b/boost/type_index/ctti_type_index.hpp
index ac1e5d290d..611ad92e11 100644
--- a/boost/type_index/ctti_type_index.hpp
+++ b/boost/type_index/ctti_type_index.hpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) Antony Polukhin, 2013-2014.
+// Copyright (c) Antony Polukhin, 2013-2016.
//
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -10,9 +10,9 @@
#define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
/// \file ctti_type_index.hpp
-/// \brief Contains boost::typeindex::ctti_type_index class.
+/// \brief Contains boost::typeindex::ctti_type_index class that is constexpr if C++14 constexpr is supported by compiler.
///
-/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement
+/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement
/// for std::type_index.
///
/// It is used in situations when typeid() method is not available or
@@ -89,37 +89,52 @@ inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
}
/// \class ctti_type_index
-/// This class is a wrapper that pretends to work exactly like stl_type_index, but does
+/// This class is a wrapper that pretends to work exactly like stl_type_index, but does
/// not require RTTI support. \b For \b description \b of \b functions \b see type_index_facade.
///
-/// This class produces slightly longer type names, so consider using stl_type_index
+/// This class on C++14 compatible compilers has following functions marked as constexpr:
+/// * default constructor
+/// * copy constructors and assignemnt operations
+/// * class methods: name(), before(const ctti_type_index& rhs), equal(const ctti_type_index& rhs)
+/// * static methods type_id<T>(), type_id_with_cvr<T>()
+/// * comparison operators
+///
+/// This class produces slightly longer type names, so consider using stl_type_index
/// in situations when typeid() is working.
class ctti_type_index: public type_index_facade<ctti_type_index, detail::ctti_data> {
- const detail::ctti_data* data_;
+ const char* data_;
inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) BOOST_NOEXCEPT
+ : data_(data)
+ {}
+
public:
typedef detail::ctti_data type_info_t;
- inline ctti_type_index() BOOST_NOEXCEPT
- : data_(&ctti_construct<void>())
+ BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT
+ : data_(boost::detail::ctti<void>::n())
{}
inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT
- : data_(&data)
+ : data_(reinterpret_cast<const char*>(&data))
{}
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
- inline const char* raw_name() const BOOST_NOEXCEPT;
+ inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline const char* raw_name() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline const char* name() const BOOST_NOEXCEPT;
inline std::string pretty_name() const;
inline std::size_t hash_code() const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+
template <class T>
- inline static ctti_type_index type_id() BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT;
template <class T>
- inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+ BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
template <class T>
inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
@@ -127,22 +142,35 @@ public:
inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT {
- return *data_;
+ return *reinterpret_cast<const detail::ctti_data*>(data_);
+}
+
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+ const char* const left = raw_name();
+ const char* const right = rhs.raw_name();
+ return /*left == right ||*/ !boost::typeindex::detail::constexpr_strcmp(left, right);
+}
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+ const char* const left = raw_name();
+ const char* const right = rhs.raw_name();
+ return /*left != right &&*/ boost::typeindex::detail::constexpr_strcmp(left, right) < 0;
}
template <class T>
-inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT {
typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_t;
- return ctti_construct<no_cvr_t>();
+ return ctti_type_index(boost::detail::ctti<no_cvr_t>::n());
}
template <class T>
-inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
- return ctti_construct<T>();
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
+ return ctti_type_index(boost::detail::ctti<T>::n());
}
@@ -152,8 +180,13 @@ inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST
}
-inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
- return reinterpret_cast<const char*>(data_);
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
+ return data_;
+}
+
+
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const BOOST_NOEXCEPT {
+ return data_;
}
inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT {
diff --git a/boost/type_index/detail/compile_time_type_info.hpp b/boost/type_index/detail/compile_time_type_info.hpp
index 635b45d67c..122a2ac013 100644
--- a/boost/type_index/detail/compile_time_type_info.hpp
+++ b/boost/type_index/detail/compile_time_type_info.hpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) Antony Polukhin, 2012-2014.
+// Copyright (c) Antony Polukhin, 2012-2016.
//
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -16,7 +16,6 @@
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/mpl/bool.hpp>
-#include <algorithm>
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
@@ -30,19 +29,21 @@
BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime = runtime_skip; \
BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[] = runtime_skip_until; \
}}} /* namespace boost::typeindex::detail */ \
- /**/
+ /**/
/// @endcond
+
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
/* Nothing to document. All the macro docs are moved to <boost/type_index.hpp> */
#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING)
-
# include <boost/preprocessor/facilities/expand.hpp>
BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING )
-
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && defined (BOOST_NO_CXX11_NOEXCEPT)
// sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "")
+#elif defined(_MSC_VER) && !defined (BOOST_NO_CXX11_NOEXCEPT)
+ // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "")
#elif defined(__clang__) && defined(__APPLE__)
// Someone made __clang_major__ equal to LLVM version rather than compiler version
// on APPLE platform.
@@ -54,11 +55,14 @@
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1
// note: checked on 3.0
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, "")
-#elif defined(__clang__) && __clang_major__ == 3 && __clang_minor__ > 0
+#elif defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ > 0))
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int"
// note: checked on 3.1, 3.4
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static contexpr char boost::detail::ctti<T>::s() [with long unsigned int I = 0ul; T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(87, 1, false, "")
+#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR)
// sizeof("static const char* boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
#else
@@ -70,7 +74,7 @@
namespace boost { namespace typeindex { namespace detail {
template <bool Condition>
- inline void assert_compile_time_legths() BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
BOOST_STATIC_ASSERT_MSG(
Condition,
"TypeIndex library is misconfigured for your compiler. "
@@ -78,15 +82,63 @@ namespace boost { namespace typeindex { namespace detail {
"'RTTI emulation limitations' of the documentation for more information."
);
}
-
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ sizeof(T) && false,
+ "TypeIndex library could not detect your compiler. "
+ "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
+ "correct compiler macro for getting the whole function name. "
+ "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
+ );
+ }
+
template <std::size_t ArrayLength>
- inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT {
return begin;
}
+ template<class ForwardIterator1, class ForwardIterator2>
+ BOOST_CXX14_CONSTEXPR inline ForwardIterator1 constexpr_search(
+ ForwardIterator1 first1,
+ ForwardIterator1 last1,
+ ForwardIterator2 first2,
+ ForwardIterator2 last2) BOOST_NOEXCEPT
+ {
+ if (first2 == last2) {
+ return first1; // specified in C++11
+ }
+
+ while (first1 != last1) {
+ ForwardIterator1 it1 = first1;
+ ForwardIterator2 it2 = first2;
+
+ while (*it1 == *it2) {
+ ++it1;
+ ++it2;
+ if (it2 == last2) return first1;
+ if (it1 == last1) return last1;
+ }
+
+ ++first1;
+ }
+
+ return last1;
+ }
+
+ BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT {
+ while (*v1 != '\0' && *v1 == *v2) {
+ ++v1;
+ ++v2;
+ };
+
+ return static_cast<int>(*v1) - *v2;
+ }
+
template <std::size_t ArrayLength>
- inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT {
- const char* const it = std::search(
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT {
+ const char* const it = constexpr_search(
begin, begin + ArrayLength,
ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1
);
@@ -94,13 +146,54 @@ namespace boost { namespace typeindex { namespace detail {
}
template <std::size_t ArrayLength>
- inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>();
return skip_begining_runtime<ArrayLength - ctti_skip_size_at_begin>(
begin + ctti_skip_size_at_begin,
boost::mpl::bool_<ctti_skip_more_at_runtime>()
);
}
+
+#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ template <std::size_t... I>
+ struct index_seq {};
+
+ template <typename Left, typename Right>
+ struct make_index_sequence_join;
+
+ template <std::size_t... Left, std::size_t... Right>
+ struct make_index_sequence_join<index_seq<Left...>, index_seq<Right...> > {
+ typedef index_seq<Left..., Right...> type;
+ };
+
+ template <std::size_t C, std::size_t D>
+ struct make_index_seq_impl {
+ typedef typename make_index_sequence_join<
+ typename make_index_seq_impl<C, D / 2>::type,
+ typename make_index_seq_impl<C + D / 2, (D + 1) / 2>::type
+ >::type type;
+ };
+
+ template <std::size_t C>
+ struct make_index_seq_impl<C, 0> {
+ typedef index_seq<> type;
+ };
+
+ template <std::size_t C>
+ struct make_index_seq_impl<C, 1> {
+ typedef index_seq<C> type;
+ };
+
+ template <char... C>
+ struct cstring {
+ static constexpr std::size_t size_ = sizeof...(C);
+ static constexpr char data_[size_] = { C... };
+ };
+
+ template <char... C>
+ constexpr char cstring<C...>::data_[];
+#endif
+
}}} // namespace boost::typeindex::detail
namespace boost { namespace detail {
@@ -110,11 +203,68 @@ namespace boost { namespace detail {
/// This name must be as short as possible, to avoid code bloat
template <class T>
struct ctti {
+
+#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ //helper functions
+ template <std::size_t I>
+ constexpr static char s() BOOST_NOEXCEPT { // step
+ constexpr std::size_t offset =
+ (I >= 10u ? 1u : 0u)
+ + (I >= 100u ? 1u : 0u)
+ + (I >= 1000u ? 1u : 0u)
+ + (I >= 10000u ? 1u : 0u)
+ + (I >= 100000u ? 1u : 0u)
+ + (I >= 1000000u ? 1u : 0u)
+ ;
+ #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+ return BOOST_TYPE_INDEX_FUNCTION_SIGNATURE[I + offset];
+ #elif defined(__FUNCSIG__)
+ return __FUNCSIG__[I + offset];
+ #else
+ return __PRETTY_FUNCTION__[I + offset];
+ #endif
+ }
+
+ template <std::size_t ...Indexes>
+ constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) BOOST_NOEXCEPT {
+ return ::boost::typeindex::detail::cstring<s<Indexes>()...>::data_;
+ }
+
+ template <std::size_t D = 0> // `D` means `Dummy`
+ constexpr static const char* n() BOOST_NOEXCEPT {
+ #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+ constexpr std::size_t size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+ #elif defined(__FUNCSIG__)
+ constexpr std::size_t size = sizeof(__FUNCSIG__);
+ #elif defined(__PRETTY_FUNCTION__) \
+ || defined(__GNUC__) \
+ || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
+ || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
+ || (defined(__ICC) && (__ICC >= 600)) \
+ || defined(__ghs__) \
+ || defined(__DMC__)
+ constexpr std::size_t size = sizeof(__PRETTY_FUNCTION__);
+ #else
+ boost::typeindex::detail::failed_to_get_function_name();
+ #endif
+
+ boost::typeindex::detail::assert_compile_time_legths<
+ (size > boost::typeindex::detail::ctti_skip_size_at_begin + boost::typeindex::detail::ctti_skip_size_at_end + sizeof("const *") - 1)
+ >();
+ static_assert(!boost::typeindex::detail::ctti_skip_more_at_runtime, "Skipping for GCC in C++14 mode is unsupported");
+
+ typedef typename boost::typeindex::detail::make_index_seq_impl<
+ boost::typeindex::detail::ctti_skip_size_at_begin,
+ size - sizeof("const *") + 1 - boost::typeindex::detail::ctti_skip_size_at_begin
+ >::type idx_seq;
+ return impl(idx_seq());
+ }
+#else
/// Returns raw name. Must be as short, as possible, to avoid code bloat
- static const char* n() BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR static const char* n() BOOST_NOEXCEPT {
#if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
- return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+ return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
#elif defined(__FUNCSIG__)
return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__FUNCSIG__);
#elif defined(__PRETTY_FUNCTION__) \
@@ -124,18 +274,13 @@ struct ctti {
|| (defined(__ICC) && (__ICC >= 600)) \
|| defined(__ghs__) \
|| defined(__DMC__)
-
return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__);
#else
- BOOST_STATIC_ASSERT_MSG(
- sizeof(T) && false,
- "TypeIndex library could not detect your compiler. "
- "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
- "correct compiler macro for getting the whole function name. "
- "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
- );
+ boost::typeindex::detail::failed_to_get_function_name();
+ return "";
#endif
}
+#endif
};
}} // namespace boost::detail
diff --git a/boost/type_index/type_index_facade.hpp b/boost/type_index/type_index_facade.hpp
index 931dedca25..dd35df2caa 100644
--- a/boost/type_index/type_index_facade.hpp
+++ b/boost/type_index/type_index_facade.hpp
@@ -66,7 +66,7 @@ template <class Derived, class TypeInfo>
class type_index_facade {
private:
/// @cond
- const Derived & derived() const BOOST_NOEXCEPT {
+ BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT {
return *static_cast<Derived const*>(this);
}
/// @endcond
@@ -154,34 +154,34 @@ protected:
/// @cond
template <class Derived, class TypeInfo>
-inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
}
template <class Derived, class TypeInfo>
-inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
- return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));;
+BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+ return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
}
template <class Derived, class TypeInfo>
-inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
return rhs < lhs;
}
template <class Derived, class TypeInfo>
-inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
return !(lhs > rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
return !(lhs < rhs);
}
template <class Derived, class TypeInfo>
-inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
return !(lhs == rhs);
}
diff --git a/boost/type_traits/extent.hpp b/boost/type_traits/extent.hpp
index dfb3c54ee8..124257878b 100644
--- a/boost/type_traits/extent.hpp
+++ b/boost/type_traits/extent.hpp
@@ -10,6 +10,7 @@
#ifndef BOOST_TT_EXTENT_HPP_INCLUDED
#define BOOST_TT_EXTENT_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
#include <boost/detail/workaround.hpp>
diff --git a/boost/type_traits/has_nothrow_assign.hpp b/boost/type_traits/has_nothrow_assign.hpp
index 65fbeefc39..7517fa804b 100644
--- a/boost/type_traits/has_nothrow_assign.hpp
+++ b/boost/type_traits/has_nothrow_assign.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/intrinsics.hpp>
diff --git a/boost/type_traits/has_nothrow_constructor.hpp b/boost/type_traits/has_nothrow_constructor.hpp
index a71d42e6e4..fa47b1db3c 100644
--- a/boost/type_traits/has_nothrow_constructor.hpp
+++ b/boost/type_traits/has_nothrow_constructor.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
diff --git a/boost/type_traits/has_nothrow_destructor.hpp b/boost/type_traits/has_nothrow_destructor.hpp
index 273eb9f198..ba70e8910e 100644
--- a/boost/type_traits/has_nothrow_destructor.hpp
+++ b/boost/type_traits/has_nothrow_destructor.hpp
@@ -11,7 +11,7 @@
#include <boost/type_traits/has_trivial_destructor.hpp>
-#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(__SUNPRO_CC) && !defined(BOOST_MSVC)
+#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(__SUNPRO_CC) && !(defined(BOOST_MSVC) && (_MSC_FULL_VER < 190023506))
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/is_destructible.hpp>
diff --git a/boost/type_traits/has_trivial_assign.hpp b/boost/type_traits/has_trivial_assign.hpp
index a434dae726..15b917e716 100644
--- a/boost/type_traits/has_trivial_assign.hpp
+++ b/boost/type_traits/has_trivial_assign.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/detail/config.hpp>
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
diff --git a/boost/type_traits/has_trivial_copy.hpp b/boost/type_traits/has_trivial_copy.hpp
index 9d3265d1dc..fd6ad2d03b 100644
--- a/boost/type_traits/has_trivial_copy.hpp
+++ b/boost/type_traits/has_trivial_copy.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/is_pod.hpp>
#include <boost/type_traits/is_reference.hpp>
diff --git a/boost/type_traits/has_trivial_move_assign.hpp b/boost/type_traits/has_trivial_move_assign.hpp
index f7bb1987cb..6d954ab669 100644
--- a/boost/type_traits/has_trivial_move_assign.hpp
+++ b/boost/type_traits/has_trivial_move_assign.hpp
@@ -11,6 +11,7 @@
#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
diff --git a/boost/type_traits/has_trivial_move_constructor.hpp b/boost/type_traits/has_trivial_move_constructor.hpp
index 9e601f38ae..5784f4bbff 100644
--- a/boost/type_traits/has_trivial_move_constructor.hpp
+++ b/boost/type_traits/has_trivial_move_constructor.hpp
@@ -11,6 +11,7 @@
#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
diff --git a/boost/type_traits/is_abstract.hpp b/boost/type_traits/is_abstract.hpp
index 7715c5ca37..781d94a479 100644
--- a/boost/type_traits/is_abstract.hpp
+++ b/boost/type_traits/is_abstract.hpp
@@ -48,6 +48,7 @@
// to degrade gracefully, rather than trash the compiler (John Maddock).
//
+#include <cstddef> // size_t
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
#ifndef BOOST_IS_ABSTRACT
diff --git a/boost/type_traits/is_array.hpp b/boost/type_traits/is_array.hpp
index 497dc49327..53e1613ab6 100644
--- a/boost/type_traits/is_array.hpp
+++ b/boost/type_traits/is_array.hpp
@@ -15,7 +15,7 @@
#define BOOST_TT_IS_ARRAY_HPP_INCLUDED
#include <boost/type_traits/integral_constant.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
namespace boost {
diff --git a/boost/type_traits/is_assignable.hpp b/boost/type_traits/is_assignable.hpp
index 9cf681dd31..49d171616a 100644
--- a/boost/type_traits/is_assignable.hpp
+++ b/boost/type_traits/is_assignable.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED
#define BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
#include <boost/detail/workaround.hpp>
diff --git a/boost/type_traits/is_const.hpp b/boost/type_traits/is_const.hpp
index d9dd2aa326..e0ed88a34b 100644
--- a/boost/type_traits/is_const.hpp
+++ b/boost/type_traits/is_const.hpp
@@ -21,6 +21,7 @@
#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED
#define BOOST_TT_IS_CONST_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
namespace boost {
@@ -35,7 +36,7 @@ namespace boost {
template <class T>
struct is_const : public false_type {};
template <class T> struct is_const<T const> : public true_type{};
- template <class T, size_t N> struct is_const<T const[N]> : public true_type{};
+ template <class T, std::size_t N> struct is_const<T const[N]> : public true_type{};
template <class T> struct is_const<T const[]> : public true_type{};
#endif
diff --git a/boost/type_traits/is_default_constructible.hpp b/boost/type_traits/is_default_constructible.hpp
index 0b7d960e7d..fa5d76a22d 100644
--- a/boost/type_traits/is_default_constructible.hpp
+++ b/boost/type_traits/is_default_constructible.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
#define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
#include <boost/detail/workaround.hpp>
diff --git a/boost/type_traits/is_destructible.hpp b/boost/type_traits/is_destructible.hpp
index 9f1e5d9817..742d990730 100644
--- a/boost/type_traits/is_destructible.hpp
+++ b/boost/type_traits/is_destructible.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
#define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
#include <boost/detail/workaround.hpp>
diff --git a/boost/type_traits/is_nothrow_move_constructible.hpp b/boost/type_traits/is_nothrow_move_constructible.hpp
index 4c8f734726..0d5d57a0f8 100644
--- a/boost/type_traits/is_nothrow_move_constructible.hpp
+++ b/boost/type_traits/is_nothrow_move_constructible.hpp
@@ -11,6 +11,7 @@
#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/config.hpp>
#include <boost/type_traits/intrinsics.hpp>
#include <boost/type_traits/integral_constant.hpp>
diff --git a/boost/type_traits/is_pod.hpp b/boost/type_traits/is_pod.hpp
index 9204c93e25..9bd196257a 100644
--- a/boost/type_traits/is_pod.hpp
+++ b/boost/type_traits/is_pod.hpp
@@ -9,6 +9,7 @@
#ifndef BOOST_TT_IS_POD_HPP_INCLUDED
#define BOOST_TT_IS_POD_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/detail/config.hpp>
#include <boost/type_traits/is_void.hpp>
#include <boost/type_traits/is_scalar.hpp>
diff --git a/boost/type_traits/is_virtual_base_of.hpp b/boost/type_traits/is_virtual_base_of.hpp
index f0052563e3..84cb355cd0 100644
--- a/boost/type_traits/is_virtual_base_of.hpp
+++ b/boost/type_traits/is_virtual_base_of.hpp
@@ -17,7 +17,7 @@ namespace detail {
#ifdef BOOST_MSVC
#pragma warning( push )
-#pragma warning( disable : 4584 4250)
+#pragma warning( disable : 4584 4250 4594)
#elif defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#endif
diff --git a/boost/type_traits/is_volatile.hpp b/boost/type_traits/is_volatile.hpp
index cefe987308..5b8e716b47 100644
--- a/boost/type_traits/is_volatile.hpp
+++ b/boost/type_traits/is_volatile.hpp
@@ -21,6 +21,7 @@
#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED
#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
namespace boost {
@@ -35,7 +36,7 @@ namespace boost {
template <class T>
struct is_volatile : public false_type {};
template <class T> struct is_volatile<T volatile> : public true_type{};
- template <class T, size_t N> struct is_volatile<T volatile[N]> : public true_type{};
+ template <class T, std::size_t N> struct is_volatile<T volatile[N]> : public true_type{};
template <class T> struct is_volatile<T volatile[]> : public true_type{};
#endif
diff --git a/boost/type_traits/rank.hpp b/boost/type_traits/rank.hpp
index 3dfc693687..1f820f1a55 100644
--- a/boost/type_traits/rank.hpp
+++ b/boost/type_traits/rank.hpp
@@ -10,6 +10,7 @@
#ifndef BOOST_TT_RANK_HPP_INCLUDED
#define BOOST_TT_RANK_HPP_INCLUDED
+#include <cstddef> // size_t
#include <boost/type_traits/integral_constant.hpp>
namespace boost {
diff --git a/boost/type_traits/remove_all_extents.hpp b/boost/type_traits/remove_all_extents.hpp
index 3ccdc98281..90c90d3523 100644
--- a/boost/type_traits/remove_all_extents.hpp
+++ b/boost/type_traits/remove_all_extents.hpp
@@ -10,7 +10,7 @@
#define BOOST_TT_REMOVE_ALL_EXTENTS_HPP_INCLUDED
#include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
#include <boost/detail/workaround.hpp>
namespace boost {
diff --git a/boost/type_traits/remove_const.hpp b/boost/type_traits/remove_const.hpp
index b47f851460..e238962c6d 100644
--- a/boost/type_traits/remove_const.hpp
+++ b/boost/type_traits/remove_const.hpp
@@ -12,7 +12,7 @@
#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED
#include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
#include <boost/detail/workaround.hpp>
namespace boost {
diff --git a/boost/type_traits/remove_cv.hpp b/boost/type_traits/remove_cv.hpp
index b50607f2ce..08393cfb81 100644
--- a/boost/type_traits/remove_cv.hpp
+++ b/boost/type_traits/remove_cv.hpp
@@ -13,7 +13,7 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
namespace boost {
diff --git a/boost/type_traits/remove_extent.hpp b/boost/type_traits/remove_extent.hpp
index 0b50a07034..b6528e525b 100644
--- a/boost/type_traits/remove_extent.hpp
+++ b/boost/type_traits/remove_extent.hpp
@@ -11,7 +11,7 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
namespace boost {
diff --git a/boost/type_traits/remove_pointer.hpp b/boost/type_traits/remove_pointer.hpp
index fb79e59d22..921665266f 100644
--- a/boost/type_traits/remove_pointer.hpp
+++ b/boost/type_traits/remove_pointer.hpp
@@ -18,7 +18,7 @@
namespace boost {
-#ifdef BOOST_MSVC
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1900)
namespace detail{
diff --git a/boost/type_traits/remove_volatile.hpp b/boost/type_traits/remove_volatile.hpp
index 475e39d22c..f5870f317f 100644
--- a/boost/type_traits/remove_volatile.hpp
+++ b/boost/type_traits/remove_volatile.hpp
@@ -13,7 +13,7 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
namespace boost {
diff --git a/boost/type_traits/type_with_alignment.hpp b/boost/type_traits/type_with_alignment.hpp
index ffa054a2f1..ddf1d98294 100644
--- a/boost/type_traits/type_with_alignment.hpp
+++ b/boost/type_traits/type_with_alignment.hpp
@@ -12,7 +12,7 @@
#include <boost/type_traits/is_pod.hpp>
#include <boost/static_assert.hpp>
#include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
#include <boost/detail/workaround.hpp>
#ifdef BOOST_MSVC
diff --git a/boost/unordered/detail/allocate.hpp b/boost/unordered/detail/allocate.hpp
index 4c20b168ab..a83edad271 100644
--- a/boost/unordered/detail/allocate.hpp
+++ b/boost/unordered/detail/allocate.hpp
@@ -14,23 +14,31 @@
#pragma once
#endif
+// Some of these includes are required for other detail headers.
#include <boost/unordered/detail/fwd.hpp>
#include <boost/move/move.hpp>
#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/inc.hpp>
-#include <boost/preprocessor/dec.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/utility/addressof.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
#include <boost/detail/select_type.hpp>
+#include <boost/swap.hpp>
#include <boost/assert.hpp>
+#include <boost/limits.hpp>
+#include <iterator>
#include <utility>
+#include <cmath>
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
#include <tuple>
@@ -808,6 +816,18 @@ namespace boost { namespace unordered { namespace detail { namespace func {
# endif
#else
+ template <typename Alloc, typename T>
+ inline void call_construct(Alloc&, T* address)
+ {
+ new ((void*) address) T();
+ }
+
+ template <typename Alloc, typename T, typename A0>
+ inline void call_construct(Alloc&, T* address,
+ BOOST_FWD_REF(A0) a0)
+ {
+ new ((void*) address) T(boost::forward<A0>(a0));
+ }
template <typename Alloc, typename T>
inline void destroy_value_impl(Alloc&, T* x) {
@@ -1053,74 +1073,182 @@ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::)
namespace boost { namespace unordered { namespace detail {
- ////////////////////////////////////////////////////////////////////////////
- //
- // array_constructor
+ ///////////////////////////////////////////////////////////////////
//
- // Allocate and construct an array in an exception safe manner, and
- // clean up if an exception is thrown before the container takes charge
- // of it.
+ // Node construction
- template <typename Allocator>
- struct array_constructor
+ template <typename NodeAlloc>
+ struct node_constructor
{
- typedef boost::unordered::detail::allocator_traits<Allocator> traits;
- typedef typename traits::pointer pointer;
+ typedef NodeAlloc node_allocator;
+ typedef boost::unordered::detail::allocator_traits<NodeAlloc>
+ node_allocator_traits;
+ typedef typename node_allocator_traits::value_type node;
+ typedef typename node_allocator_traits::pointer node_pointer;
+ typedef typename node::value_type value_type;
+
+ node_allocator& alloc_;
+ node_pointer node_;
+ bool node_constructed_;
+
+ node_constructor(node_allocator& n) :
+ alloc_(n),
+ node_(),
+ node_constructed_(false)
+ {
+ }
- Allocator& alloc_;
- pointer ptr_;
- pointer constructed_;
- std::size_t length_;
+ ~node_constructor();
- array_constructor(Allocator& a)
- : alloc_(a), ptr_(), constructed_(), length_(0)
+ void create_node();
+
+ // no throw
+ node_pointer release()
{
- constructed_ = pointer();
- ptr_ = pointer();
+ BOOST_ASSERT(node_ && node_constructed_);
+ node_pointer p = node_;
+ node_ = node_pointer();
+ return p;
}
- ~array_constructor() {
- if (ptr_) {
- for(pointer p = ptr_; p != constructed_; ++p) {
- boost::unordered::detail::func::destroy(
- boost::addressof(*p));
- }
-
- traits::deallocate(alloc_, ptr_, length_);
- }
+ void reclaim(node_pointer p) {
+ BOOST_ASSERT(!node_);
+ node_ = p;
+ node_constructed_ = true;
+ boost::unordered::detail::func::destroy_value_impl(alloc_,
+ node_->value_ptr());
}
- template <typename V>
- void construct(V const& v, std::size_t l)
- {
- BOOST_ASSERT(!ptr_);
- length_ = l;
- ptr_ = traits::allocate(alloc_, length_);
- pointer end = ptr_ + static_cast<std::ptrdiff_t>(length_);
- for(constructed_ = ptr_; constructed_ != end; ++constructed_) {
- new ((void*) boost::addressof(*constructed_)) V(v);
+ private:
+ node_constructor(node_constructor const&);
+ node_constructor& operator=(node_constructor const&);
+ };
+
+ template <typename Alloc>
+ node_constructor<Alloc>::~node_constructor()
+ {
+ if (node_) {
+ if (node_constructed_) {
+ boost::unordered::detail::func::destroy(
+ boost::addressof(*node_));
}
+
+ node_allocator_traits::deallocate(alloc_, node_, 1);
}
+ }
+
+ template <typename Alloc>
+ void node_constructor<Alloc>::create_node()
+ {
+ BOOST_ASSERT(!node_);
+ node_constructed_ = false;
+
+ node_ = node_allocator_traits::allocate(alloc_, 1);
+
+ new ((void*) boost::addressof(*node_)) node();
+ node_->init(node_);
+ node_constructed_ = true;
+ }
- pointer get() const
+ template <typename NodeAlloc>
+ struct node_tmp
+ {
+ typedef boost::unordered::detail::allocator_traits<NodeAlloc>
+ node_allocator_traits;
+ typedef typename node_allocator_traits::pointer node_pointer;
+
+ NodeAlloc& alloc_;
+ node_pointer node_;
+
+ explicit node_tmp(node_pointer n, NodeAlloc& a):
+ alloc_(a),
+ node_(n)
{
- return ptr_;
}
- pointer release()
+ ~node_tmp();
+
+ // no throw
+ node_pointer release()
{
- pointer p(ptr_);
- ptr_ = pointer();
+ node_pointer p = node_;
+ node_ = node_pointer();
return p;
}
-
- private:
-
- array_constructor(array_constructor const&);
- array_constructor& operator=(array_constructor const&);
};
+
+ template <typename Alloc>
+ node_tmp<Alloc>::~node_tmp()
+ {
+ if (node_) {
+ boost::unordered::detail::func::destroy_value_impl(alloc_,
+ node_->value_ptr());
+ boost::unordered::detail::func::destroy(
+ boost::addressof(*node_));
+ node_allocator_traits::deallocate(alloc_, node_, 1);
+ }
+ }
}}}
+namespace boost { namespace unordered { namespace detail { namespace func {
+
+ // Some nicer construct_value functions, might try to
+ // improve implementation later.
+
+ template <typename Alloc, BOOST_UNORDERED_EMPLACE_TEMPLATE>
+ inline typename boost::unordered::detail::allocator_traits<Alloc>::pointer
+ construct_value_generic(Alloc& alloc, BOOST_UNORDERED_EMPLACE_ARGS)
+ {
+ node_constructor<Alloc> a(alloc);
+ a.create_node();
+ construct_value_impl(alloc, a.node_->value_ptr(),
+ BOOST_UNORDERED_EMPLACE_FORWARD);
+ return a.release();
+ }
+
+ template <typename Alloc, typename U>
+ inline typename boost::unordered::detail::allocator_traits<Alloc>::pointer
+ construct_value(Alloc& alloc, BOOST_FWD_REF(U) x)
+ {
+ node_constructor<Alloc> a(alloc);
+ a.create_node();
+ boost::unordered::detail::func::call_construct(
+ alloc, a.node_->value_ptr(), boost::forward<U>(x));
+ return a.release();
+ }
+
+ // TODO: When possible, it might be better to use std::pair's
+ // constructor for std::piece_construct with std::tuple.
+ template <typename Alloc, typename Key>
+ inline typename boost::unordered::detail::allocator_traits<Alloc>::pointer
+ construct_pair(Alloc& alloc, BOOST_FWD_REF(Key) k)
+ {
+ node_constructor<Alloc> a(alloc);
+ a.create_node();
+ boost::unordered::detail::func::call_construct(
+ alloc, boost::addressof(a.node_->value_ptr()->first),
+ boost::forward<Key>(k));
+ boost::unordered::detail::func::call_construct(
+ alloc, boost::addressof(a.node_->value_ptr()->second));
+ return a.release();
+ }
+
+ template <typename Alloc, typename Key, typename Mapped>
+ inline typename boost::unordered::detail::allocator_traits<Alloc>::pointer
+ construct_pair(Alloc& alloc, BOOST_FWD_REF(Key) k, BOOST_FWD_REF(Mapped) m)
+ {
+ node_constructor<Alloc> a(alloc);
+ a.create_node();
+ boost::unordered::detail::func::call_construct(
+ alloc, boost::addressof(a.node_->value_ptr()->first),
+ boost::forward<Key>(k));
+ boost::unordered::detail::func::call_construct(
+ alloc, boost::addressof(a.node_->value_ptr()->second),
+ boost::forward<Mapped>(m));
+ return a.release();
+ }
+}}}}
+
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
diff --git a/boost/unordered/detail/buckets.hpp b/boost/unordered/detail/buckets.hpp
index 8a67345c95..232944b00a 100644
--- a/boost/unordered/detail/buckets.hpp
+++ b/boost/unordered/detail/buckets.hpp
@@ -14,14 +14,6 @@
#include <boost/unordered/detail/util.hpp>
#include <boost/unordered/detail/allocate.hpp>
-#include <boost/type_traits/aligned_storage.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/is_nothrow_move_constructible.hpp>
-#include <boost/type_traits/is_nothrow_move_assignable.hpp>
-#include <boost/swap.hpp>
-#include <boost/assert.hpp>
-#include <boost/limits.hpp>
-#include <boost/iterator.hpp>
namespace boost { namespace unordered { namespace detail {
@@ -56,7 +48,7 @@ namespace boost { namespace unordered { namespace iterator_detail {
template <typename Node, typename Policy>
struct l_iterator
- : public boost::iterator<
+ : public std::iterator<
std::forward_iterator_tag,
typename Node::value_type,
std::ptrdiff_t,
@@ -116,7 +108,7 @@ namespace boost { namespace unordered { namespace iterator_detail {
template <typename Node, typename Policy>
struct cl_iterator
- : public boost::iterator<
+ : public std::iterator<
std::forward_iterator_tag,
typename Node::value_type,
std::ptrdiff_t,
@@ -184,7 +176,7 @@ namespace boost { namespace unordered { namespace iterator_detail {
template <typename Node>
struct iterator
- : public boost::iterator<
+ : public std::iterator<
std::forward_iterator_tag,
typename Node::value_type,
std::ptrdiff_t,
@@ -248,7 +240,7 @@ namespace boost { namespace unordered { namespace iterator_detail {
template <typename Node>
struct c_iterator
- : public boost::iterator<
+ : public std::iterator<
std::forward_iterator_tag,
typename Node::value_type,
std::ptrdiff_t,
@@ -319,134 +311,14 @@ namespace boost { namespace unordered { namespace detail {
///////////////////////////////////////////////////////////////////
//
- // Node construction
-
- template <typename NodeAlloc>
- struct node_constructor
- {
- private:
-
- typedef NodeAlloc node_allocator;
- typedef boost::unordered::detail::allocator_traits<NodeAlloc>
- node_allocator_traits;
- typedef typename node_allocator_traits::value_type node;
- typedef typename node_allocator_traits::pointer node_pointer;
- typedef typename node::value_type value_type;
-
- protected:
-
- node_allocator& alloc_;
- node_pointer node_;
- bool node_constructed_;
- bool value_constructed_;
-
- public:
-
- node_constructor(node_allocator& n) :
- alloc_(n),
- node_(),
- node_constructed_(false),
- value_constructed_(false)
- {
- }
-
- ~node_constructor();
-
- void construct();
-
- template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
- void construct_with_value(BOOST_UNORDERED_EMPLACE_ARGS)
- {
- construct();
- boost::unordered::detail::func::construct_value_impl(
- alloc_, node_->value_ptr(), BOOST_UNORDERED_EMPLACE_FORWARD);
- value_constructed_ = true;
- }
-
- template <typename A0>
- void construct_with_value2(BOOST_FWD_REF(A0) a0)
- {
- construct();
- boost::unordered::detail::func::construct_value_impl(
- alloc_, node_->value_ptr(),
- BOOST_UNORDERED_EMPLACE_ARGS1(boost::forward<A0>(a0)));
- value_constructed_ = true;
- }
-
- value_type const& value() const {
- BOOST_ASSERT(node_ && node_constructed_ && value_constructed_);
- return node_->value();
- }
-
- // no throw
- node_pointer release()
- {
- BOOST_ASSERT(node_ && node_constructed_);
- node_pointer p = node_;
- node_ = node_pointer();
- return p;
- }
-
- private:
- node_constructor(node_constructor const&);
- node_constructor& operator=(node_constructor const&);
- };
-
- template <typename Alloc>
- node_constructor<Alloc>::~node_constructor()
- {
- if (node_) {
- if (value_constructed_) {
- boost::unordered::detail::func::destroy_value_impl(alloc_,
- node_->value_ptr());
- }
-
- if (node_constructed_) {
- boost::unordered::detail::func::destroy(
- boost::addressof(*node_));
- }
-
- node_allocator_traits::deallocate(alloc_, node_, 1);
- }
- }
-
- template <typename Alloc>
- void node_constructor<Alloc>::construct()
- {
- if(!node_) {
- node_constructed_ = false;
- value_constructed_ = false;
-
- node_ = node_allocator_traits::allocate(alloc_, 1);
-
- new ((void*) boost::addressof(*node_)) node();
- node_->init(node_);
- node_constructed_ = true;
- }
- else {
- BOOST_ASSERT(node_constructed_);
-
- if (value_constructed_)
- {
- boost::unordered::detail::func::destroy_value_impl(alloc_,
- node_->value_ptr());
- value_constructed_ = false;
- }
- }
- }
-
- ///////////////////////////////////////////////////////////////////
- //
// Node Holder
//
// Temporary store for nodes. Deletes any that aren't used.
template <typename NodeAlloc>
- struct node_holder : private node_constructor<NodeAlloc>
+ struct node_holder
{
private:
- typedef node_constructor<NodeAlloc> base;
-
typedef NodeAlloc node_allocator;
typedef boost::unordered::detail::allocator_traits<NodeAlloc>
node_allocator_traits;
@@ -456,13 +328,14 @@ namespace boost { namespace unordered { namespace detail {
typedef typename node::link_pointer link_pointer;
typedef boost::unordered::iterator_detail::iterator<node> iterator;
+ node_constructor<NodeAlloc> constructor_;
node_pointer nodes_;
public:
template <typename Table>
explicit node_holder(Table& b) :
- base(b.node_alloc()),
+ constructor_(b.node_alloc()),
nodes_()
{
if (b.size_) {
@@ -475,61 +348,71 @@ namespace boost { namespace unordered { namespace detail {
~node_holder();
- void node_for_assignment()
+ node_pointer pop_node()
{
- if (!this->node_ && nodes_) {
- this->node_ = nodes_;
- nodes_ = static_cast<node_pointer>(nodes_->next_);
- this->node_->init(this->node_);
- this->node_->next_ = link_pointer();
-
- this->node_constructed_ = true;
- this->value_constructed_ = true;
- }
+ node_pointer n = nodes_;
+ nodes_ = static_cast<node_pointer>(nodes_->next_);
+ n->init(n);
+ n->next_ = link_pointer();
+ return n;
}
template <typename T>
- inline void assign_impl(T const& v) {
- if (this->node_ && this->value_constructed_) {
- this->node_->value() = v;
+ inline node_pointer copy_of(T const& v) {
+ if (nodes_) {
+ node_tmp<NodeAlloc> a(pop_node(), constructor_.alloc_);
+ a.node_->value() = v;
+ return a.release();
}
else {
- this->construct_with_value2(v);
+ constructor_.create_node();
+ boost::unordered::detail::func::call_construct(
+ constructor_.alloc_, constructor_.node_->value_ptr(), v);
+ return constructor_.release();
}
}
template <typename T1, typename T2>
- inline void assign_impl(std::pair<T1 const, T2> const& v) {
- this->construct_with_value2(v);
+ inline node_pointer copy_of(std::pair<T1 const, T2> const& v) {
+ if (nodes_) {
+ constructor_.reclaim(pop_node());
+ }
+ else {
+ constructor_.create_node();
+ }
+ boost::unordered::detail::func::call_construct(
+ constructor_.alloc_, constructor_.node_->value_ptr(), v);
+ return constructor_.release();
}
template <typename T>
- inline void move_assign_impl(T& v) {
- if (this->node_ && this->value_constructed_) {
- this->node_->value() = boost::move(v);
+ inline node_pointer move_copy_of(T& v) {
+ if (nodes_) {
+ node_tmp<NodeAlloc> a(pop_node(), constructor_.alloc_);
+ a.node_->value() = boost::move(v);
+ return a.release();
}
else {
- this->construct_with_value2(boost::move(v));
+ constructor_.create_node();
+ boost::unordered::detail::func::call_construct(
+ constructor_.alloc_, constructor_.node_->value_ptr(),
+ boost::move(v));
+ return constructor_.release();
}
}
template <typename T1, typename T2>
- inline void move_assign_impl(std::pair<T1 const, T2>& v) {
- this->construct_with_value2(boost::move(v));
- }
-
- node_pointer copy_of(value_type const& v)
- {
- node_for_assignment();
- assign_impl(v);
- return base::release();
- }
-
- node_pointer move_copy_of(value_type& v)
- {
- node_for_assignment();
- move_assign_impl(v);
- return base::release();
+ inline node_pointer move_copy_of(std::pair<T1 const, T2>& v) {
+ if (nodes_) {
+ constructor_.reclaim(pop_node());
+ }
+ else {
+ constructor_.create_node();
+ }
+ boost::unordered::detail::func::call_construct(
+ constructor_.alloc_, constructor_.node_->value_ptr(),
+ boost::move(v));
+ return constructor_.release();
}
iterator begin() const
@@ -545,10 +428,10 @@ namespace boost { namespace unordered { namespace detail {
node_pointer p = nodes_;
nodes_ = static_cast<node_pointer>(p->next_);
- boost::unordered::detail::func::destroy_value_impl(this->alloc_,
+ boost::unordered::detail::func::destroy_value_impl(constructor_.alloc_,
p->value_ptr());
boost::unordered::detail::func::destroy(boost::addressof(*p));
- node_allocator_traits::deallocate(this->alloc_, p, 1);
+ node_allocator_traits::deallocate(constructor_.alloc_, p, 1);
}
}
diff --git a/boost/unordered/detail/equivalent.hpp b/boost/unordered/detail/equivalent.hpp
index 58478f99b6..691d3154ef 100644
--- a/boost/unordered/detail/equivalent.hpp
+++ b/boost/unordered/detail/equivalent.hpp
@@ -12,7 +12,6 @@
#pragma once
#endif
-#include <boost/unordered/detail/table.hpp>
#include <boost/unordered/detail/extract_key.hpp>
namespace boost { namespace unordered { namespace detail {
@@ -130,55 +129,6 @@ namespace boost { namespace unordered { namespace detail {
typedef typename pick::link_pointer link_pointer;
};
- template <typename A, typename T, typename H, typename P>
- struct multiset
- {
- typedef boost::unordered::detail::multiset<A, T, H, P> types;
-
- typedef A allocator;
- typedef T value_type;
- typedef H hasher;
- typedef P key_equal;
- typedef T key_type;
-
- typedef boost::unordered::detail::allocator_traits<allocator> traits;
- typedef boost::unordered::detail::pick_grouped_node<allocator,
- value_type> pick;
- typedef typename pick::node node;
- typedef typename pick::bucket bucket;
- typedef typename pick::link_pointer link_pointer;
-
- typedef boost::unordered::detail::grouped_table_impl<types> table;
- typedef boost::unordered::detail::set_extractor<value_type> extractor;
-
- typedef typename boost::unordered::detail::pick_policy<T>::type policy;
- };
-
- template <typename A, typename K, typename M, typename H, typename P>
- struct multimap
- {
- typedef boost::unordered::detail::multimap<A, K, M, H, P> types;
-
- typedef A allocator;
- typedef std::pair<K const, M> value_type;
- typedef H hasher;
- typedef P key_equal;
- typedef K key_type;
-
- typedef boost::unordered::detail::allocator_traits<allocator> traits;
- typedef boost::unordered::detail::pick_grouped_node<allocator,
- value_type> pick;
- typedef typename pick::node node;
- typedef typename pick::bucket bucket;
- typedef typename pick::link_pointer link_pointer;
-
- typedef boost::unordered::detail::grouped_table_impl<types> table;
- typedef boost::unordered::detail::map_extractor<key_type, value_type>
- extractor;
-
- typedef typename boost::unordered::detail::pick_policy<K>::type policy;
- };
-
template <typename Types>
struct grouped_table_impl : boost::unordered::detail::table<Types>
{
@@ -195,6 +145,7 @@ namespace boost { namespace unordered { namespace detail {
typedef typename table::key_equal key_equal;
typedef typename table::key_type key_type;
typedef typename table::node_constructor node_constructor;
+ typedef typename table::node_tmp node_tmp;
typedef typename table::extractor extractor;
typedef typename table::iterator iterator;
typedef typename table::c_iterator c_iterator;
@@ -381,11 +332,10 @@ namespace boost { namespace unordered { namespace detail {
}
inline iterator add_node(
- node_constructor& a,
+ node_pointer n,
std::size_t key_hash,
iterator pos)
{
- node_pointer n = a.release();
n->hash_ = key_hash;
if (pos.node_) {
this->add_after_node(n, pos.node_);
@@ -425,23 +375,23 @@ namespace boost { namespace unordered { namespace detail {
return iterator(n);
}
- iterator emplace_impl(node_constructor& a)
+ iterator emplace_impl(node_pointer n)
{
- key_type const& k = this->get_key(a.value());
+ node_tmp a(n, this->node_alloc());
+ key_type const& k = this->get_key(a.node_->value());
std::size_t key_hash = this->hash(k);
iterator position = this->find_node(key_hash, k);
-
- // reserve has basic exception safety if the hash function
- // throws, strong otherwise.
this->reserve_for_insert(this->size_ + 1);
- return this->add_node(a, key_hash, position);
+ return this->add_node(a.release(), key_hash, position);
}
- void emplace_impl_no_rehash(node_constructor& a)
+ void emplace_impl_no_rehash(node_pointer n)
{
- key_type const& k = this->get_key(a.value());
+ node_tmp a(n, this->node_alloc());
+ key_type const& k = this->get_key(a.node_->value());
std::size_t key_hash = this->hash(k);
- this->add_node(a, key_hash, this->find_node(key_hash, k));
+ iterator position = this->find_node(key_hash, k);
+ this->add_node(a.release(), key_hash, position);
}
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
@@ -465,10 +415,9 @@ namespace boost { namespace unordered { namespace detail {
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
iterator emplace(BOOST_UNORDERED_EMPLACE_ARGS)
{
- node_constructor a(this->node_alloc());
- a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD);
-
- return iterator(emplace_impl(a));
+ return iterator(emplace_impl(
+ boost::unordered::detail::func::construct_value_generic(
+ this->node_alloc(), BOOST_UNORDERED_EMPLACE_FORWARD)));
}
////////////////////////////////////////////////////////////////////////
@@ -477,37 +426,37 @@ namespace boost { namespace unordered { namespace detail {
// if hash function throws, or inserting > 1 element, basic exception
// safety. Strong otherwise
template <class I>
- typename boost::unordered::detail::enable_if_forward<I, void>::type
- insert_range(I i, I j)
+ void insert_range(I i, I j, typename
+ boost::unordered::detail::enable_if_forward<I, void*>::type = 0)
{
if(i == j) return;
- std::size_t distance = boost::unordered::detail::distance(i, j);
+ std::size_t distance = std::distance(i, j);
if(distance == 1) {
- node_constructor a(this->node_alloc());
- a.construct_with_value2(*i);
- emplace_impl(a);
+ emplace_impl(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *i));
}
else {
// Only require basic exception safety here
this->reserve_for_insert(this->size_ + distance);
- node_constructor a(this->node_alloc());
for (; i != j; ++i) {
- a.construct_with_value2(*i);
- emplace_impl_no_rehash(a);
+ emplace_impl_no_rehash(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *i));
}
}
}
template <class I>
- typename boost::unordered::detail::disable_if_forward<I, void>::type
- insert_range(I i, I j)
+ void insert_range(I i, I j, typename
+ boost::unordered::detail::disable_if_forward<I, void*>::type = 0)
{
- node_constructor a(this->node_alloc());
for (; i != j; ++i) {
- a.construct_with_value2(*i);
- emplace_impl(a);
+ emplace_impl(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *i));
}
}
@@ -621,31 +570,65 @@ namespace boost { namespace unordered { namespace detail {
////////////////////////////////////////////////////////////////////////
// fill_buckets
- template <class NodeCreator>
- static void fill_buckets(iterator n, table& dst,
- NodeCreator& creator)
- {
- link_pointer prev = dst.get_previous_start();
+ void copy_buckets(table const& src) {
+ this->create_buckets(this->bucket_count_);
- while (n.node_) {
+ for (iterator n = src.begin(); n.node_;) {
std::size_t key_hash = n.node_->hash_;
iterator group_end(n.node_->group_prev_->next_);
+ iterator pos = this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *n), key_hash, iterator());
+ for (++n; n != group_end; ++n)
+ {
+ this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *n), key_hash, pos);
+ }
+ }
+ }
+
+ void move_buckets(table const& src) {
+ this->create_buckets(this->bucket_count_);
- node_pointer first_node = creator.create(*n);
- node_pointer end = first_node;
- first_node->hash_ = key_hash;
- prev->next_ = first_node;
- ++dst.size_;
+ for (iterator n = src.begin(); n.node_;) {
+ std::size_t key_hash = n.node_->hash_;
+ iterator group_end(n.node_->group_prev_->next_);
+ iterator pos = this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), boost::move(*n)), key_hash, iterator());
+ for (++n; n != group_end; ++n)
+ {
+ this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), boost::move(*n)), key_hash, pos);
+ }
+ }
+ }
+ void assign_buckets(table const& src) {
+ node_holder<node_allocator> holder(*this);
+ for (iterator n = src.begin(); n.node_;) {
+ std::size_t key_hash = n.node_->hash_;
+ iterator group_end(n.node_->group_prev_->next_);
+ iterator pos = this->add_node(holder.copy_of(*n), key_hash, iterator());
for (++n; n != group_end; ++n)
{
- end = creator.create(*n);
- end->hash_ = key_hash;
- add_after_node(end, first_node);
- ++dst.size_;
+ this->add_node(holder.copy_of(*n), key_hash, pos);
}
+ }
+ }
- prev = place_in_bucket(dst, prev, end);
+ void move_assign_buckets(table& src) {
+ node_holder<node_allocator> holder(*this);
+ for (iterator n = src.begin(); n.node_;) {
+ std::size_t key_hash = n.node_->hash_;
+ iterator group_end(n.node_->group_prev_->next_);
+ iterator pos = this->add_node(holder.move_copy_of(*n), key_hash, iterator());
+ for (++n; n != group_end; ++n)
+ {
+ this->add_node(holder.move_copy_of(*n), key_hash, pos);
+ }
}
}
diff --git a/boost/unordered/detail/map.hpp b/boost/unordered/detail/map.hpp
new file mode 100644
index 0000000000..22f8e63350
--- /dev/null
+++ b/boost/unordered/detail/map.hpp
@@ -0,0 +1,61 @@
+
+// Copyright (C) 2005-2016 Daniel James
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/unordered/unordered_map_fwd.hpp>
+#include <boost/unordered/detail/equivalent.hpp>
+#include <boost/unordered/detail/unique.hpp>
+
+namespace boost { namespace unordered { namespace detail {
+ template <typename A, typename K, typename M, typename H, typename P>
+ struct map
+ {
+ typedef boost::unordered::detail::map<A, K, M, H, P> types;
+
+ typedef A allocator;
+ typedef std::pair<K const, M> value_type;
+ typedef H hasher;
+ typedef P key_equal;
+ typedef K key_type;
+
+ typedef boost::unordered::detail::allocator_traits<allocator>
+ traits;
+ typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
+ typedef typename pick::node node;
+ typedef typename pick::bucket bucket;
+ typedef typename pick::link_pointer link_pointer;
+
+ typedef boost::unordered::detail::table_impl<types> table;
+ typedef boost::unordered::detail::map_extractor<key_type, value_type>
+ extractor;
+
+ typedef typename boost::unordered::detail::pick_policy<K>::type policy;
+ };
+
+ template <typename A, typename K, typename M, typename H, typename P>
+ struct multimap
+ {
+ typedef boost::unordered::detail::multimap<A, K, M, H, P> types;
+
+ typedef A allocator;
+ typedef std::pair<K const, M> value_type;
+ typedef H hasher;
+ typedef P key_equal;
+ typedef K key_type;
+
+ typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ typedef boost::unordered::detail::pick_grouped_node<allocator,
+ value_type> pick;
+ typedef typename pick::node node;
+ typedef typename pick::bucket bucket;
+ typedef typename pick::link_pointer link_pointer;
+
+ typedef boost::unordered::detail::grouped_table_impl<types> table;
+ typedef boost::unordered::detail::map_extractor<key_type, value_type>
+ extractor;
+
+ typedef typename boost::unordered::detail::pick_policy<K>::type policy;
+ };
+
+}}}
diff --git a/boost/unordered/detail/set.hpp b/boost/unordered/detail/set.hpp
new file mode 100644
index 0000000000..3ed9dde0da
--- /dev/null
+++ b/boost/unordered/detail/set.hpp
@@ -0,0 +1,57 @@
+
+// Copyright (C) 2005-2016 Daniel James
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/unordered/unordered_set_fwd.hpp>
+#include <boost/unordered/detail/equivalent.hpp>
+#include <boost/unordered/detail/unique.hpp>
+
+namespace boost { namespace unordered { namespace detail {
+ template <typename A, typename T, typename H, typename P>
+ struct set
+ {
+ typedef boost::unordered::detail::set<A, T, H, P> types;
+
+ typedef A allocator;
+ typedef T value_type;
+ typedef H hasher;
+ typedef P key_equal;
+ typedef T key_type;
+
+ typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
+ typedef typename pick::node node;
+ typedef typename pick::bucket bucket;
+ typedef typename pick::link_pointer link_pointer;
+
+ typedef boost::unordered::detail::table_impl<types> table;
+ typedef boost::unordered::detail::set_extractor<value_type> extractor;
+
+ typedef typename boost::unordered::detail::pick_policy<T>::type policy;
+ };
+
+ template <typename A, typename T, typename H, typename P>
+ struct multiset
+ {
+ typedef boost::unordered::detail::multiset<A, T, H, P> types;
+
+ typedef A allocator;
+ typedef T value_type;
+ typedef H hasher;
+ typedef P key_equal;
+ typedef T key_type;
+
+ typedef boost::unordered::detail::allocator_traits<allocator> traits;
+ typedef boost::unordered::detail::pick_grouped_node<allocator,
+ value_type> pick;
+ typedef typename pick::node node;
+ typedef typename pick::bucket bucket;
+ typedef typename pick::link_pointer link_pointer;
+
+ typedef boost::unordered::detail::grouped_table_impl<types> table;
+ typedef boost::unordered::detail::set_extractor<value_type> extractor;
+
+ typedef typename boost::unordered::detail::pick_policy<T>::type policy;
+ };
+}}}
diff --git a/boost/unordered/detail/table.hpp b/boost/unordered/detail/table.hpp
index b356ca2203..ab4000b4e9 100644
--- a/boost/unordered/detail/table.hpp
+++ b/boost/unordered/detail/table.hpp
@@ -13,28 +13,12 @@
#endif
#include <boost/unordered/detail/buckets.hpp>
-#include <boost/unordered/detail/util.hpp>
-#include <boost/type_traits/aligned_storage.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <cmath>
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable:4127) // conditional expression is constant
#endif
-#if defined(BOOST_UNORDERED_DEPRECATED_EQUALITY)
-
-#if defined(__EDG__)
-#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#pragma message("Warning: BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported.")
-#elif defined(__GNUC__) || defined(__HP_aCC) || \
- defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#warning "BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported."
-#endif
-
-#endif
-
namespace boost { namespace unordered { namespace detail {
////////////////////////////////////////////////////////////////////////////
@@ -80,70 +64,6 @@ namespace boost { namespace unordered { namespace detail {
value_base& operator=(value_base const&);
};
- template <typename NodeAlloc>
- struct copy_nodes
- {
- typedef boost::unordered::detail::allocator_traits<NodeAlloc>
- node_allocator_traits;
-
- node_constructor<NodeAlloc> constructor;
-
- explicit copy_nodes(NodeAlloc& a) : constructor(a) {}
-
- typename node_allocator_traits::pointer create(
- typename node_allocator_traits::value_type::value_type const& v)
- {
- constructor.construct_with_value2(v);
- return constructor.release();
- }
- };
-
- template <typename NodeAlloc>
- struct move_nodes
- {
- typedef boost::unordered::detail::allocator_traits<NodeAlloc>
- node_allocator_traits;
-
- node_constructor<NodeAlloc> constructor;
-
- explicit move_nodes(NodeAlloc& a) : constructor(a) {}
-
- typename node_allocator_traits::pointer create(
- typename node_allocator_traits::value_type::value_type& v)
- {
- constructor.construct_with_value2(boost::move(v));
- return constructor.release();
- }
- };
-
- template <typename Buckets>
- struct assign_nodes
- {
- node_holder<typename Buckets::node_allocator> holder;
-
- explicit assign_nodes(Buckets& b) : holder(b) {}
-
- typename Buckets::node_pointer create(
- typename Buckets::value_type const& v)
- {
- return holder.copy_of(v);
- }
- };
-
- template <typename Buckets>
- struct move_assign_nodes
- {
- node_holder<typename Buckets::node_allocator> holder;
-
- explicit move_assign_nodes(Buckets& b) : holder(b) {}
-
- typename Buckets::node_pointer create(
- typename Buckets::value_type& v)
- {
- return holder.move_copy_of(v);
- }
- };
-
template <typename Types>
struct table :
boost::unordered::detail::functions<
@@ -187,6 +107,8 @@ namespace boost { namespace unordered { namespace detail {
bucket_pointer;
typedef boost::unordered::detail::node_constructor<node_allocator>
node_constructor;
+ typedef boost::unordered::detail::node_tmp<node_allocator>
+ node_tmp;
typedef boost::unordered::iterator_detail::
iterator<node> iterator;
@@ -403,9 +325,7 @@ namespace boost { namespace unordered { namespace detail {
void init(table const& x)
{
if (x.size_) {
- create_buckets(bucket_count_);
- copy_nodes<node_allocator> node_creator(node_alloc());
- table_impl::fill_buckets(x.begin(), *this, node_creator);
+ static_cast<table_impl*>(this)->copy_buckets(x);
}
}
@@ -416,11 +336,7 @@ namespace boost { namespace unordered { namespace detail {
}
else if(x.size_) {
// TODO: Could pick new bucket size?
- create_buckets(bucket_count_);
-
- move_nodes<node_allocator> node_creator(node_alloc());
- node_holder<node_allocator> nodes(x);
- table_impl::fill_buckets(nodes.begin(), *this, node_creator);
+ static_cast<table_impl*>(this)->move_buckets(x);
}
}
@@ -429,34 +345,53 @@ namespace boost { namespace unordered { namespace detail {
void create_buckets(std::size_t new_count)
{
- boost::unordered::detail::array_constructor<bucket_allocator>
- constructor(bucket_alloc());
-
- // Creates an extra bucket to act as the start node.
- constructor.construct(bucket(), new_count + 1);
+ std::size_t length = new_count + 1;
+ bucket_pointer new_buckets = bucket_allocator_traits::allocate(
+ bucket_alloc(), length);
+ bucket_pointer constructed = new_buckets;
- if (buckets_)
- {
- // Copy the nodes to the new buckets, including the dummy
- // node if there is one.
- (constructor.get() +
- static_cast<std::ptrdiff_t>(new_count))->next_ =
- (buckets_ + static_cast<std::ptrdiff_t>(
- bucket_count_))->next_;
- destroy_buckets();
+ BOOST_TRY {
+ bucket_pointer end = new_buckets
+ + static_cast<std::ptrdiff_t>(length);
+ for(; constructed != end; ++constructed) {
+ new ((void*) boost::addressof(*constructed)) bucket();
+ }
+
+ if (buckets_)
+ {
+ // Copy the nodes to the new buckets, including the dummy
+ // node if there is one.
+ (new_buckets +
+ static_cast<std::ptrdiff_t>(new_count))->next_ =
+ (buckets_ + static_cast<std::ptrdiff_t>(
+ bucket_count_))->next_;
+ destroy_buckets();
+ }
+ else if (bucket::extra_node)
+ {
+ node_constructor a(node_alloc());
+ a.create_node();
+
+ (new_buckets +
+ static_cast<std::ptrdiff_t>(new_count))->next_ =
+ a.release();
+ }
}
- else if (bucket::extra_node)
- {
- node_constructor a(node_alloc());
- a.construct();
+ BOOST_CATCH(...) {
+ for(bucket_pointer p = new_buckets; p != constructed; ++p) {
+ boost::unordered::detail::func::destroy(
+ boost::addressof(*p));
+ }
+
+ bucket_allocator_traits::deallocate(bucket_alloc(),
+ new_buckets, length);
- (constructor.get() +
- static_cast<std::ptrdiff_t>(new_count))->next_ =
- a.release();
+ BOOST_RETHROW;
}
+ BOOST_CATCH_END
bucket_count_ = new_count;
- buckets_ = constructor.release();
+ buckets_ = new_buckets;
recalculate_max_load();
}
@@ -662,11 +597,7 @@ namespace boost { namespace unordered { namespace detail {
clear_buckets();
}
- // assign_nodes takes ownership of the container's elements,
- // assigning to them if possible, and deleting any that are
- // left over.
- assign_nodes<table> node_creator(*this);
- table_impl::fill_buckets(x.begin(), *this, node_creator);
+ static_cast<table_impl*>(this)->assign_buckets(x);
}
void assign(table const& x, true_type)
@@ -691,9 +622,7 @@ namespace boost { namespace unordered { namespace detail {
// Finally copy the elements.
if (x.size_) {
- create_buckets(bucket_count_);
- copy_nodes<node_allocator> node_creator(node_alloc());
- table_impl::fill_buckets(x.begin(), *this, node_creator);
+ static_cast<table_impl*>(this)->copy_buckets(x);
}
}
}
@@ -747,12 +676,7 @@ namespace boost { namespace unordered { namespace detail {
clear_buckets();
}
- // move_assign_nodes takes ownership of the container's
- // elements, assigning to them if possible, and deleting
- // any that are left over.
- move_assign_nodes<table> node_creator(*this);
- node_holder<node_allocator> nodes(x);
- table_impl::fill_buckets(nodes.begin(), *this, node_creator);
+ static_cast<table_impl*>(this)->move_assign_buckets(x);
}
}
diff --git a/boost/unordered/detail/unique.hpp b/boost/unordered/detail/unique.hpp
index f76ca5a6a5..07923981dd 100644
--- a/boost/unordered/detail/unique.hpp
+++ b/boost/unordered/detail/unique.hpp
@@ -12,7 +12,6 @@
#pragma once
#endif
-#include <boost/unordered/detail/table.hpp>
#include <boost/unordered/detail/extract_key.hpp>
#include <boost/throw_exception.hpp>
#include <stdexcept>
@@ -126,54 +125,6 @@ namespace boost { namespace unordered { namespace detail {
typedef typename pick::link_pointer link_pointer;
};
- template <typename A, typename T, typename H, typename P>
- struct set
- {
- typedef boost::unordered::detail::set<A, T, H, P> types;
-
- typedef A allocator;
- typedef T value_type;
- typedef H hasher;
- typedef P key_equal;
- typedef T key_type;
-
- typedef boost::unordered::detail::allocator_traits<allocator> traits;
- typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
- typedef typename pick::node node;
- typedef typename pick::bucket bucket;
- typedef typename pick::link_pointer link_pointer;
-
- typedef boost::unordered::detail::table_impl<types> table;
- typedef boost::unordered::detail::set_extractor<value_type> extractor;
-
- typedef typename boost::unordered::detail::pick_policy<T>::type policy;
- };
-
- template <typename A, typename K, typename M, typename H, typename P>
- struct map
- {
- typedef boost::unordered::detail::map<A, K, M, H, P> types;
-
- typedef A allocator;
- typedef std::pair<K const, M> value_type;
- typedef H hasher;
- typedef P key_equal;
- typedef K key_type;
-
- typedef boost::unordered::detail::allocator_traits<allocator>
- traits;
- typedef boost::unordered::detail::pick_node<allocator, value_type> pick;
- typedef typename pick::node node;
- typedef typename pick::bucket bucket;
- typedef typename pick::link_pointer link_pointer;
-
- typedef boost::unordered::detail::table_impl<types> table;
- typedef boost::unordered::detail::map_extractor<key_type, value_type>
- extractor;
-
- typedef typename boost::unordered::detail::pick_policy<K>::type policy;
- };
-
template <typename Types>
struct table_impl : boost::unordered::detail::table<Types>
{
@@ -190,6 +141,7 @@ namespace boost { namespace unordered { namespace detail {
typedef typename table::key_equal key_equal;
typedef typename table::key_type key_type;
typedef typename table::node_constructor node_constructor;
+ typedef typename table::node_tmp node_tmp;
typedef typename table::extractor extractor;
typedef typename table::iterator iterator;
typedef typename table::c_iterator c_iterator;
@@ -308,10 +260,9 @@ namespace boost { namespace unordered { namespace detail {
// Emplace/Insert
inline iterator add_node(
- node_constructor& a,
+ node_pointer n,
std::size_t key_hash)
{
- node_pointer n = a.release();
n->hash_ = key_hash;
bucket_pointer b = this->get_bucket(this->hash_to_bucket(key_hash));
@@ -340,23 +291,21 @@ namespace boost { namespace unordered { namespace detail {
return iterator(n);
}
+ inline iterator resize_and_add_node(node_pointer n, std::size_t key_hash)
+ {
+ node_tmp b(n, this->node_alloc());
+ this->reserve_for_insert(this->size_ + 1);
+ return this->add_node(b.release(), key_hash);
+ }
+
value_type& operator[](key_type const& k)
{
std::size_t key_hash = this->hash(k);
iterator pos = this->find_node(key_hash, k);
-
if (pos.node_) return *pos;
-
- // Create the node before rehashing in case it throws an
- // exception (need strong safety in such a case).
- node_constructor a(this->node_alloc());
- a.construct_with_value(BOOST_UNORDERED_EMPLACE_ARGS3(
- boost::unordered::piecewise_construct,
- boost::make_tuple(k),
- boost::make_tuple()));
-
- this->reserve_for_insert(this->size_ + 1);
- return *add_node(a, key_hash);
+ return *this->resize_and_add_node(
+ boost::unordered::detail::func::construct_pair(this->node_alloc(), k),
+ key_hash);
}
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
@@ -406,32 +355,17 @@ namespace boost { namespace unordered { namespace detail {
{
std::size_t key_hash = this->hash(k);
iterator pos = this->find_node(key_hash, k);
-
- if (pos.node_) return emplace_return(pos, false);
-
- // Create the node before rehashing in case it throws an
- // exception (need strong safety in such a case).
- node_constructor a(this->node_alloc());
- a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD);
-
- // reserve has basic exception safety if the hash function
- // throws, strong otherwise.
- this->reserve_for_insert(this->size_ + 1);
- return emplace_return(this->add_node(a, key_hash), true);
- }
-
- emplace_return emplace_impl_with_node(node_constructor& a)
- {
- key_type const& k = this->get_key(a.value());
- std::size_t key_hash = this->hash(k);
- iterator pos = this->find_node(key_hash, k);
-
- if (pos.node_) return emplace_return(pos, false);
-
- // reserve has basic exception safety if the hash function
- // throws, strong otherwise.
- this->reserve_for_insert(this->size_ + 1);
- return emplace_return(this->add_node(a, key_hash), true);
+ if (pos.node_) {
+ return emplace_return(pos, false);
+ }
+ else {
+ return emplace_return(
+ this->resize_and_add_node(
+ boost::unordered::detail::func::construct_value_generic(
+ this->node_alloc(), BOOST_UNORDERED_EMPLACE_FORWARD),
+ key_hash),
+ true);
+ }
}
template <BOOST_UNORDERED_EMPLACE_TEMPLATE>
@@ -439,9 +373,21 @@ namespace boost { namespace unordered { namespace detail {
{
// Don't have a key, so construct the node first in order
// to be able to lookup the position.
- node_constructor a(this->node_alloc());
- a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD);
- return emplace_impl_with_node(a);
+ node_tmp b(
+ boost::unordered::detail::func::construct_value_generic(
+ this->node_alloc(), BOOST_UNORDERED_EMPLACE_FORWARD),
+ this->node_alloc());
+ key_type const& k = this->get_key(b.node_->value());
+ std::size_t key_hash = this->hash(k);
+ iterator pos = this->find_node(key_hash, k);
+ if (pos.node_) {
+ return emplace_return(pos, false);
+ }
+ else {
+ return emplace_return(
+ this->resize_and_add_node(b.release(), key_hash),
+ true);
+ }
}
////////////////////////////////////////////////////////////////////////
@@ -460,9 +406,7 @@ namespace boost { namespace unordered { namespace detail {
template <class InputIt>
void insert_range_impl(key_type const& k, InputIt i, InputIt j)
{
- node_constructor a(this->node_alloc());
-
- insert_range_impl2(a, k, i, j);
+ insert_range_impl2(k, i, j);
while(++i != j) {
// Note: can't use get_key as '*i' might not be value_type - it
@@ -473,26 +417,25 @@ namespace boost { namespace unordered { namespace detail {
// key here. Could be more efficient if '*i' is expensive. Could
// be less efficient if copying the full value_type is
// expensive.
- insert_range_impl2(a, extractor::extract(*i), i, j);
+ insert_range_impl2(extractor::extract(*i), i, j);
}
}
template <class InputIt>
- void insert_range_impl2(node_constructor& a, key_type const& k,
- InputIt i, InputIt j)
+ void insert_range_impl2(key_type const& k, InputIt i, InputIt j)
{
// No side effects in this initial code
std::size_t key_hash = this->hash(k);
iterator pos = this->find_node(key_hash, k);
if (!pos.node_) {
- a.construct_with_value2(*i);
+ node_tmp b(
+ boost::unordered::detail::func::construct_value(this->node_alloc(), *i),
+ this->node_alloc());
if(this->size_ + 1 > this->max_load_)
this->reserve_for_insert(this->size_ +
boost::unordered::detail::insert_size(i, j));
-
- // Nothing after this point can throw.
- this->add_node(a, key_hash);
+ this->add_node(b.release(), key_hash);
}
}
@@ -502,8 +445,24 @@ namespace boost { namespace unordered { namespace detail {
node_constructor a(this->node_alloc());
do {
- a.construct_with_value2(*i);
- emplace_impl_with_node(a);
+ if (!a.node_) { a.create_node(); }
+ boost::unordered::detail::func::call_construct(
+ a.alloc_, a.node_->value_ptr(), *i);
+ node_tmp b(a.release(), a.alloc_);
+
+ key_type const& k = this->get_key(b.node_->value());
+ std::size_t key_hash = this->hash(k);
+ iterator pos = this->find_node(key_hash, k);
+
+ if (pos.node_) {
+ a.reclaim(b.release());
+ }
+ else {
+ // reserve has basic exception safety if the hash function
+ // throws, strong otherwise.
+ this->reserve_for_insert(this->size_ + 1);
+ this->add_node(b.release(), key_hash);
+ }
} while(++i != j);
}
@@ -576,20 +535,39 @@ namespace boost { namespace unordered { namespace detail {
////////////////////////////////////////////////////////////////////////
// fill_buckets
- template <class NodeCreator>
- static void fill_buckets(iterator n, table& dst,
- NodeCreator& creator)
- {
- link_pointer prev = dst.get_previous_start();
+ void copy_buckets(table const& src) {
+ this->create_buckets(this->bucket_count_);
- while (n.node_) {
- node_pointer node = creator.create(*n);
- node->hash_ = n.node_->hash_;
- prev->next_ = node;
- ++dst.size_;
- ++n;
+ for(iterator n = src.begin(); n.node_; ++n) {
+ this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), *n), n.node_->hash_);
+ }
+ }
- prev = place_in_bucket(dst, prev);
+ void move_buckets(table const& src) {
+ this->create_buckets(this->bucket_count_);
+
+ for(iterator n = src.begin(); n.node_; ++n) {
+ this->add_node(
+ boost::unordered::detail::func::construct_value(
+ this->node_alloc(), boost::move(*n)), n.node_->hash_);
+ }
+ }
+
+ void assign_buckets(table const& src)
+ {
+ node_holder<node_allocator> holder(*this);
+ for(iterator n = src.begin(); n.node_; ++n) {
+ this->add_node(holder.copy_of(*n), n.node_->hash_);
+ }
+ }
+
+ void move_assign_buckets(table& src)
+ {
+ node_holder<node_allocator> holder(*this);
+ for(iterator n = src.begin(); n.node_; ++n) {
+ this->add_node(holder.move_copy_of(*n), n.node_->hash_);
}
}
diff --git a/boost/unordered/detail/util.hpp b/boost/unordered/detail/util.hpp
index 3428ed7ae2..0a406c85d4 100644
--- a/boost/unordered/detail/util.hpp
+++ b/boost/unordered/detail/util.hpp
@@ -124,33 +124,16 @@ namespace boost { namespace unordered { namespace detail {
////////////////////////////////////////////////////////////////////////////
// insert_size/initial_size
-#if !defined(BOOST_NO_STD_DISTANCE)
-
- using ::std::distance;
-
-#else
-
- template <class ForwardIterator>
- inline std::size_t distance(ForwardIterator i, ForwardIterator j) {
- std::size_t x;
- std::distance(i, j, x);
- return x;
- }
-
-#endif
-
template <class I>
- inline typename
- boost::unordered::detail::enable_if_forward<I, std::size_t>::type
- insert_size(I i, I j)
+ inline std::size_t insert_size(I i, I j, typename
+ boost::unordered::detail::enable_if_forward<I, void*>::type = 0)
{
return std::distance(i, j);
}
template <class I>
- inline typename
- boost::unordered::detail::disable_if_forward<I, std::size_t>::type
- insert_size(I, I)
+ inline std::size_t insert_size(I, I, typename
+ boost::unordered::detail::disable_if_forward<I, void*>::type = 0)
{
return 1;
}
diff --git a/boost/unordered/unordered_map.hpp b/boost/unordered/unordered_map.hpp
index 9b180796d1..3904e56ead 100644
--- a/boost/unordered/unordered_map.hpp
+++ b/boost/unordered/unordered_map.hpp
@@ -15,9 +15,7 @@
#endif
#include <boost/unordered/unordered_map_fwd.hpp>
-#include <boost/unordered/detail/equivalent.hpp>
-#include <boost/unordered/detail/unique.hpp>
-#include <boost/unordered/detail/util.hpp>
+#include <boost/unordered/detail/map.hpp>
#include <boost/functional/hash.hpp>
#include <boost/move/move.hpp>
diff --git a/boost/unordered/unordered_set.hpp b/boost/unordered/unordered_set.hpp
index 853b5d7317..c8c062152e 100644
--- a/boost/unordered/unordered_set.hpp
+++ b/boost/unordered/unordered_set.hpp
@@ -14,10 +14,7 @@
#pragma once
#endif
-#include <boost/unordered/unordered_set_fwd.hpp>
-#include <boost/unordered/detail/equivalent.hpp>
-#include <boost/unordered/detail/unique.hpp>
-#include <boost/unordered/detail/util.hpp>
+#include <boost/unordered/detail/set.hpp>
#include <boost/functional/hash.hpp>
#include <boost/move/move.hpp>
diff --git a/boost/utility/base_from_member.hpp b/boost/utility/base_from_member.hpp
index fc0e13c0d7..604541d19a 100644
--- a/boost/utility/base_from_member.hpp
+++ b/boost/utility/base_from_member.hpp
@@ -47,11 +47,11 @@
// {}
// This macro should only persist within this file.
-#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \
- template < BOOST_PP_ENUM_PARAMS(n, typename T) > \
- explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \
- : member( BOOST_PP_ENUM_PARAMS(n, x) ) \
- {} \
+#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \
+ template < BOOST_PP_ENUM_PARAMS(n, typename T) > \
+ base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \
+ : member( BOOST_PP_ENUM_PARAMS(n, x) ) \
+ {} \
/**/
@@ -142,7 +142,8 @@ protected:
: member()
{}
- BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
+ template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {}
+ BOOST_PP_REPEAT_FROM_TO( 2, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
BOOST_PRIVATE_CTR_DEF, _ )
#endif
diff --git a/boost/utility/string_ref.hpp b/boost/utility/string_ref.hpp
index 8707157c62..5acf346fba 100644
--- a/boost/utility/string_ref.hpp
+++ b/boost/utility/string_ref.hpp
@@ -27,6 +27,11 @@
#include <string>
#include <iosfwd>
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 cannot handle a defaulted function with noexcept specifier
+#define BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+#endif
+
namespace boost {
namespace detail {
@@ -57,26 +62,37 @@ namespace boost {
static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
// construct/copy
- BOOST_CONSTEXPR basic_string_ref ()
+ BOOST_CONSTEXPR basic_string_ref () BOOST_NOEXCEPT
: ptr_(NULL), len_(0) {}
- BOOST_CONSTEXPR basic_string_ref (const basic_string_ref &rhs)
+ // by defaulting these functions, basic_string_ref becomes
+ // trivially copy/move constructible.
+ BOOST_CONSTEXPR basic_string_ref (const basic_string_ref &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
: ptr_(rhs.ptr_), len_(rhs.len_) {}
+#endif
- basic_string_ref& operator=(const basic_string_ref &rhs) {
+ basic_string_ref& operator=(const basic_string_ref &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ {
ptr_ = rhs.ptr_;
len_ = rhs.len_;
return *this;
}
+#endif
- basic_string_ref(const charT* str)
+ basic_string_ref(const charT* str) BOOST_NOEXCEPT
: ptr_(str), len_(traits::length(str)) {}
template<typename Allocator>
basic_string_ref(const std::basic_string<charT, traits, Allocator>& str)
: ptr_(str.data()), len_(str.length()) {}
- BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len)
+ BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len) BOOST_NOEXCEPT
: ptr_(str), len_(len) {}
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
@@ -174,13 +190,13 @@ namespace boost {
size_type rfind(basic_string_ref s) const {
const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
s.crbegin (), s.crend (), traits::eq );
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
+ return iter == this->crend () ? npos : (std::distance(iter, this->crend()) - s.size());
}
size_type rfind(charT c) const {
const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (),
detail::string_ref_traits_eq<charT, traits> ( c ));
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
}
size_type find_first_of(charT c) const { return find (c); }
@@ -195,7 +211,7 @@ namespace boost {
size_type find_last_of(basic_string_ref s) const {
const_reverse_iterator iter = std::find_first_of
( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
}
size_type find_first_not_of(basic_string_ref s) const {
@@ -212,21 +228,17 @@ namespace boost {
size_type find_last_not_of(basic_string_ref s) const {
const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
}
size_type find_last_not_of(charT c) const {
for ( const_reverse_iterator iter = this->crbegin (); iter != this->crend (); ++iter )
if ( !traits::eq ( c, *iter ))
- return reverse_distance ( this->crbegin (), iter );
+ return this->size() - 1 - std::distance(this->crbegin(), iter);
return npos;
}
private:
- template <typename r_iter>
- size_type reverse_distance ( r_iter first, r_iter last ) const {
- return len_ - 1 - std::distance ( first, last );
- }
template <typename Iterator>
Iterator find_not_of ( Iterator first, Iterator last, basic_string_ref s ) const {
@@ -405,7 +417,7 @@ namespace boost {
namespace detail {
template<class charT, class traits>
- inline void insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
+ inline void sr_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
enum { chunk_size = 8 };
charT fill_chars[chunk_size];
std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
@@ -416,19 +428,19 @@ namespace boost {
}
template<class charT, class traits>
- void insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
+ void sr_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
const std::size_t size = str.size();
const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
if (!align_left) {
- detail::insert_fill_chars(os, alignment_size);
+ detail::sr_insert_fill_chars(os, alignment_size);
if (os.good())
os.write(str.data(), size);
}
else {
os.write(str.data(), size);
if (os.good())
- detail::insert_fill_chars(os, alignment_size);
+ detail::sr_insert_fill_chars(os, alignment_size);
}
}
@@ -444,7 +456,7 @@ namespace boost {
if (w <= size)
os.write(str.data(), size);
else
- detail::insert_aligned(os, str);
+ detail::sr_insert_aligned(os, str);
os.width(0);
}
return os;
diff --git a/boost/utility/string_view.hpp b/boost/utility/string_view.hpp
index 9de32ccc56..f5d5eb9060 100644
--- a/boost/utility/string_view.hpp
+++ b/boost/utility/string_view.hpp
@@ -30,6 +30,11 @@
#include <cstring>
#include <iosfwd>
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 cannot handle a defaulted function with noexcept specifier
+#define BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+#endif
+
namespace boost {
namespace detail {
@@ -65,14 +70,25 @@ namespace boost {
BOOST_CONSTEXPR basic_string_view() BOOST_NOEXCEPT
: ptr_(NULL), len_(0) {}
+ // by defaulting these functions, basic_string_ref becomes
+ // trivially copy/move constructible.
BOOST_CONSTEXPR basic_string_view(const basic_string_view &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
: ptr_(rhs.ptr_), len_(rhs.len_) {}
+#endif
- basic_string_view& operator=(const basic_string_view &rhs) BOOST_NOEXCEPT {
+ basic_string_view& operator=(const basic_string_view &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ {
ptr_ = rhs.ptr_;
len_ = rhs.len_;
return *this;
}
+#endif
template<typename Allocator>
basic_string_view(const std::basic_string<charT, traits,
@@ -146,13 +162,18 @@ namespace boost {
#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
template<typename Allocator = std::allocator<charT> >
- std::basic_string<charT, traits> to_string(const Allocator& a = Allocator()) const {
+ std::basic_string<charT, traits, Allocator> to_string(const Allocator& a = Allocator()) const {
return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
}
#else
std::basic_string<charT, traits> to_string() const {
return std::basic_string<charT, traits>(begin(), end());
}
+
+ template<typename Allocator>
+ std::basic_string<charT, traits, Allocator> to_string(const Allocator& a) const {
+ return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
+ }
#endif
size_type copy(charT* s, size_type n, size_type pos=0) const {
@@ -204,7 +225,7 @@ namespace boost {
// Searches
BOOST_CONSTEXPR bool starts_with(charT c) const BOOST_NOEXCEPT { // Boost extension
return !empty() && traits::eq(c, front());
- }
+ }
BOOST_CONSTEXPR bool starts_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
return len_ >= x.len_ && traits::compare(ptr_, x.ptr_, x.len_) == 0;
@@ -215,7 +236,7 @@ namespace boost {
}
BOOST_CONSTEXPR bool ends_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
- return len_ >= x.len_ &&
+ return len_ >= x.len_ &&
traits::compare(ptr_ + len_ - x.len_, x.ptr_, x.len_) == 0;
}
@@ -240,11 +261,11 @@ namespace boost {
BOOST_CXX14_CONSTEXPR size_type rfind(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
if (len_ < s.len_)
return npos;
- if (pos > len_ - s.len_)
+ if (pos > len_ - s.len_)
pos = len_ - s.len_;
if (s.len_ == 0u) // an empty string is always found
return pos;
- for (const charT* cur = ptr_ + pos;; --cur) {
+ for (const charT* cur = ptr_ + pos; ; --cur) {
if (traits::compare(cur, s.ptr_, s.len_) == 0)
return cur - ptr_;
if (cur == ptr_)
@@ -311,7 +332,7 @@ namespace boost {
// find_last_not_of
BOOST_CXX14_CONSTEXPR size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
if (pos >= len_)
- pos = len_ - 1;;
+ pos = len_ - 1;
if (s.len_ == 0u)
return pos;
pos = len_ - (pos+1);
@@ -357,7 +378,7 @@ namespace boost {
// Inequality
template<typename charT, typename traits>
inline bool operator!=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
if ( x.size () != y.size ()) return true;
return x.compare(y) != 0;
}
@@ -365,180 +386,180 @@ namespace boost {
// Less than
template<typename charT, typename traits>
inline bool operator<(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return x.compare(y) < 0;
}
// Greater than
template<typename charT, typename traits>
inline bool operator>(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return x.compare(y) > 0;
}
// Less than or equal to
template<typename charT, typename traits>
inline bool operator<=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return x.compare(y) <= 0;
}
// Greater than or equal to
template<typename charT, typename traits>
inline bool operator>=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return x.compare(y) >= 0;
}
// "sufficient additional overloads of comparison functions"
template<typename charT, typename traits, typename Allocator>
inline bool operator==(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x == basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator==(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) == y;
}
template<typename charT, typename traits>
inline bool operator==(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x == basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator==(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) == y;
}
template<typename charT, typename traits, typename Allocator>
inline bool operator!=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x != basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator!=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) != y;
}
template<typename charT, typename traits>
inline bool operator!=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x != basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator!=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) != y;
}
template<typename charT, typename traits, typename Allocator>
inline bool operator<(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x < basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator<(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) < y;
}
template<typename charT, typename traits>
inline bool operator<(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x < basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator<(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) < y;
}
template<typename charT, typename traits, typename Allocator>
inline bool operator>(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x > basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator>(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) > y;
}
template<typename charT, typename traits>
inline bool operator>(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x > basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator>(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) > y;
}
template<typename charT, typename traits, typename Allocator>
inline bool operator<=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x <= basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator<=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) <= y;
}
template<typename charT, typename traits>
inline bool operator<=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x <= basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator<=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) <= y;
}
template<typename charT, typename traits, typename Allocator>
inline bool operator>=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
return x >= basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits, typename Allocator>
inline bool operator>=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) >= y;
}
template<typename charT, typename traits>
inline bool operator>=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
+ const charT * y) BOOST_NOEXCEPT {
return x >= basic_string_view<charT, traits>(y);
}
template<typename charT, typename traits>
inline bool operator>=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
return basic_string_view<charT, traits>(x) >= y;
}
namespace detail {
template<class charT, class traits>
- inline void insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
+ inline void sv_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
enum { chunk_size = 8 };
charT fill_chars[chunk_size];
std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
@@ -549,19 +570,19 @@ namespace boost {
}
template<class charT, class traits>
- void insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_view<charT,traits>& str) {
+ void sv_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_view<charT,traits>& str) {
const std::size_t size = str.size();
const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
if (!align_left) {
- detail::insert_fill_chars(os, alignment_size);
+ detail::sv_insert_fill_chars(os, alignment_size);
if (os.good())
os.write(str.data(), size);
}
else {
os.write(str.data(), size);
if (os.good())
- detail::insert_fill_chars(os, alignment_size);
+ detail::sv_insert_fill_chars(os, alignment_size);
}
}
@@ -578,7 +599,7 @@ namespace boost {
if (w <= size)
os.write(str.data(), size);
else
- detail::insert_aligned(os, str);
+ detail::sv_insert_aligned(os, str);
os.width(0);
}
return os;
diff --git a/boost/uuid/detail/uuid_x86.hpp b/boost/uuid/detail/uuid_x86.hpp
index 5c736708e6..303c45b086 100644
--- a/boost/uuid/detail/uuid_x86.hpp
+++ b/boost/uuid/detail/uuid_x86.hpp
@@ -49,7 +49,7 @@ BOOST_FORCEINLINE __m128i load_unaligned_si128(const uint8_t* p) BOOST_NOEXCEPT
return _mm_lddqu_si128(reinterpret_cast< const __m128i* >(p));
#elif !defined(BOOST_UUID_DETAIL_MSVC_BUG981648)
return _mm_loadu_si128(reinterpret_cast< const __m128i* >(p));
-#elif BOOST_MSVC >= 1600
+#elif defined(BOOST_MSVC) && BOOST_MSVC >= 1600
__m128i mm = _mm_loadu_si128(reinterpret_cast< const __m128i* >(p));
// Make sure this load doesn't get merged with the subsequent instructions
_ReadWriteBarrier();
diff --git a/boost/uuid/uuid_io.hpp b/boost/uuid/uuid_io.hpp
index 1d30618aea..e92e88131b 100644
--- a/boost/uuid/uuid_io.hpp
+++ b/boost/uuid/uuid_io.hpp
@@ -46,7 +46,7 @@ template <typename ch, typename char_traits>
}
}
- os << std::hex;
+ os << std::hex << std::right;
os.fill(os.widen('0'));
std::size_t i=0;
@@ -57,13 +57,13 @@ template <typename ch, typename char_traits>
os << os.widen('-');
}
}
-
+
if (flags & std::ios_base::left) {
for (std::streamsize s=uuid_width; s<width; s++) {
os << fill;
}
}
-
+
os.width(0); //used the width so reset it
}
return os;
diff --git a/boost/variant.hpp b/boost/variant.hpp
index 6088c5d960..f179ccfe77 100644
--- a/boost/variant.hpp
+++ b/boost/variant.hpp
@@ -14,14 +14,14 @@
#define BOOST_VARIANT_HPP
// variant "main"
-#include "boost/variant/variant.hpp"
-#include "boost/variant/recursive_variant.hpp"
-#include "boost/variant/recursive_wrapper.hpp"
+#include <boost/variant/variant.hpp>
+#include <boost/variant/recursive_variant.hpp>
+#include <boost/variant/recursive_wrapper.hpp>
// common applications
-#include "boost/variant/get.hpp"
-#include "boost/variant/apply_visitor.hpp"
-#include "boost/variant/static_visitor.hpp"
-#include "boost/variant/visitor_ptr.hpp"
+#include <boost/variant/get.hpp>
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/variant/static_visitor.hpp>
+#include <boost/variant/visitor_ptr.hpp>
#endif // BOOST_VARIANT_HPP
diff --git a/boost/variant/apply_visitor.hpp b/boost/variant/apply_visitor.hpp
index 53bada09e9..6ad54fb700 100644
--- a/boost/variant/apply_visitor.hpp
+++ b/boost/variant/apply_visitor.hpp
@@ -13,8 +13,8 @@
#ifndef BOOST_VARIANT_APPLY_VISITOR_HPP
#define BOOST_VARIANT_APPLY_VISITOR_HPP
-#include "boost/variant/detail/apply_visitor_unary.hpp"
-#include "boost/variant/detail/apply_visitor_binary.hpp"
-#include "boost/variant/detail/apply_visitor_delayed.hpp"
+#include <boost/variant/detail/apply_visitor_unary.hpp>
+#include <boost/variant/detail/apply_visitor_binary.hpp>
+#include <boost/variant/detail/apply_visitor_delayed.hpp>
#endif // BOOST_VARIANT_APPLY_VISITOR_HPP
diff --git a/boost/variant/detail/apply_visitor_binary.hpp b/boost/variant/detail/apply_visitor_binary.hpp
index e5e22e1d82..6670cd8d27 100644
--- a/boost/variant/detail/apply_visitor_binary.hpp
+++ b/boost/variant/detail/apply_visitor_binary.hpp
@@ -13,21 +13,21 @@
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
-#include "boost/variant/detail/apply_visitor_unary.hpp"
+#include <boost/variant/detail/apply_visitor_unary.hpp>
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include "boost/utility/enable_if.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/type_traits/is_const.hpp"
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_const.hpp>
#endif
#if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
-# include "boost/variant/detail/has_result_type.hpp"
+# include <boost/variant/detail/has_result_type.hpp>
#endif
namespace boost {
diff --git a/boost/variant/detail/apply_visitor_delayed.hpp b/boost/variant/detail/apply_visitor_delayed.hpp
index 29f46141d8..515a93ef01 100644
--- a/boost/variant/detail/apply_visitor_delayed.hpp
+++ b/boost/variant/detail/apply_visitor_delayed.hpp
@@ -13,14 +13,14 @@
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/variant/detail/generic_result_type.hpp>
-#include "boost/variant/detail/apply_visitor_unary.hpp"
-#include "boost/variant/detail/apply_visitor_binary.hpp"
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+#include <boost/variant/detail/apply_visitor_unary.hpp>
+#include <boost/variant/detail/apply_visitor_binary.hpp>
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-#include "boost/variant/detail/has_result_type.hpp"
+#include <boost/variant/detail/has_result_type.hpp>
#include <boost/core/enable_if.hpp>
namespace boost {
diff --git a/boost/variant/detail/apply_visitor_unary.hpp b/boost/variant/detail/apply_visitor_unary.hpp
index 63c21a3fea..d4e2c166dc 100644
--- a/boost/variant/detail/apply_visitor_unary.hpp
+++ b/boost/variant/detail/apply_visitor_unary.hpp
@@ -13,14 +13,14 @@
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include "boost/core/enable_if.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/type_traits/is_const.hpp"
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_const.hpp>
#endif
#if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
@@ -30,7 +30,7 @@
# include <boost/mpl/size.hpp>
# include <boost/utility/declval.hpp>
# include <boost/core/enable_if.hpp>
-# include "boost/variant/detail/has_result_type.hpp"
+# include <boost/variant/detail/has_result_type.hpp>
#endif
namespace boost {
diff --git a/boost/variant/detail/backup_holder.hpp b/boost/variant/detail/backup_holder.hpp
index 1ccf160ce7..c11f12cf58 100644
--- a/boost/variant/detail/backup_holder.hpp
+++ b/boost/variant/detail/backup_holder.hpp
@@ -13,8 +13,8 @@
#ifndef BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
#define BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
-#include "boost/config.hpp"
-#include "boost/assert.hpp"
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
namespace boost {
namespace detail { namespace variant {
diff --git a/boost/variant/detail/cast_storage.hpp b/boost/variant/detail/cast_storage.hpp
index 24feed6bd2..0320278c15 100644
--- a/boost/variant/detail/cast_storage.hpp
+++ b/boost/variant/detail/cast_storage.hpp
@@ -13,7 +13,7 @@
#ifndef BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
#define BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
-#include "boost/config.hpp"
+#include <boost/config.hpp>
namespace boost {
namespace detail { namespace variant {
diff --git a/boost/variant/detail/config.hpp b/boost/variant/detail/config.hpp
index 84564a46b1..70725e2cc8 100644
--- a/boost/variant/detail/config.hpp
+++ b/boost/variant/detail/config.hpp
@@ -3,8 +3,8 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2003
-// Eric Friedman
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2016 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,25 +13,7 @@
#ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP
#define BOOST_VARIANT_DETAIL_CONFIG_HPP
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
-//
-#if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \
- || BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
- && !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
-# define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
-//
-#if !defined(BOOST_NO_SFINAE) \
- && !BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
- && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-# define BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
-#endif
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP
diff --git a/boost/variant/detail/element_index.hpp b/boost/variant/detail/element_index.hpp
index 8ea92ecc5e..cc926f6cf8 100644
--- a/boost/variant/detail/element_index.hpp
+++ b/boost/variant/detail/element_index.hpp
@@ -12,13 +12,13 @@
#ifndef BOOST_VARIANT_DETAIL_ELEMENT_INDEX_HPP
#define BOOST_VARIANT_DETAIL_ELEMENT_INDEX_HPP
-#include "boost/config.hpp"
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/config.hpp>
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/variant_fwd.hpp>
-#include "boost/type_traits/remove_cv.hpp"
-#include "boost/type_traits/remove_reference.hpp"
-#include "boost/mpl/find_if.hpp"
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/mpl/find_if.hpp>
namespace boost { namespace detail { namespace variant {
diff --git a/boost/variant/detail/enable_recursive.hpp b/boost/variant/detail/enable_recursive.hpp
index a974b4f078..757e0df585 100644
--- a/boost/variant/detail/enable_recursive.hpp
+++ b/boost/variant/detail/enable_recursive.hpp
@@ -13,25 +13,25 @@
#ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_HPP
#define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_HPP
-#include "boost/variant/detail/enable_recursive_fwd.hpp"
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/variant/detail/enable_recursive_fwd.hpp>
+#include <boost/variant/variant_fwd.hpp>
#if !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
-# include "boost/mpl/apply.hpp"
-# include "boost/mpl/eval_if.hpp"
-# include "boost/mpl/lambda.hpp"
+# include <boost/mpl/apply.hpp>
+# include <boost/mpl/eval_if.hpp>
+# include <boost/mpl/lambda.hpp>
#endif
-#include "boost/variant/detail/substitute.hpp"
-#include "boost/mpl/aux_/config/ctps.hpp"
-#include "boost/mpl/bool_fwd.hpp"
-#include "boost/mpl/if.hpp"
-#include "boost/mpl/or.hpp"
-#include "boost/type_traits/is_pointer.hpp"
-#include "boost/type_traits/is_reference.hpp"
-#include "boost/type_traits/is_same.hpp"
+#include <boost/variant/detail/substitute.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/bool_fwd.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
-#include "boost/variant/recursive_wrapper.hpp"
+#include <boost/variant/recursive_wrapper.hpp>
namespace boost {
namespace detail { namespace variant {
diff --git a/boost/variant/detail/enable_recursive_fwd.hpp b/boost/variant/detail/enable_recursive_fwd.hpp
index 39a6b71463..cac156b156 100644
--- a/boost/variant/detail/enable_recursive_fwd.hpp
+++ b/boost/variant/detail/enable_recursive_fwd.hpp
@@ -13,11 +13,11 @@
#ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
#define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
-#include "boost/mpl/aux_/config/ctps.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
-#include "boost/mpl/bool_fwd.hpp"
+#include <boost/mpl/bool_fwd.hpp>
-# include "boost/mpl/bool.hpp"
+# include <boost/mpl/bool.hpp>
namespace boost {
namespace detail { namespace variant {
diff --git a/boost/variant/detail/forced_return.hpp b/boost/variant/detail/forced_return.hpp
index 522b796fe0..333393a2ac 100644
--- a/boost/variant/detail/forced_return.hpp
+++ b/boost/variant/detail/forced_return.hpp
@@ -3,8 +3,8 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2003
-// Eric Friedman
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2015-2016 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,90 +13,52 @@
#ifndef BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
#define BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
-#include "boost/config.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/assert.hpp"
+#include <boost/config.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/assert.hpp>
+#include <cstdlib> // std::abort
-namespace boost {
-namespace detail { namespace variant {
-///////////////////////////////////////////////////////////////////////////////
-// (detail) function template forced_return
-//
-// Logical error to permit invocation at runtime, but (artificially) satisfies
-// compile-time requirement of returning a result value.
-//
-
-#if !defined(BOOST_MSVC) \
- && !defined(BOOST_NO_VOID_RETURNS)
-
-// "standard" implementation:
-
-template <typename T>
-inline T forced_return()
-{
- // logical error: should never be here! (see above)
- BOOST_ASSERT(false);
+#ifdef BOOST_MSVC
+# pragma warning( push )
+# pragma warning( disable : 4702 ) // unreachable code
+#endif
- T (*dummy_function_ptr)() = 0;
- return dummy_function_ptr();
-}
+namespace boost { namespace detail { namespace variant {
-template <>
-inline void forced_return<void>()
-{
- // logical error: should never be here! (see above)
- BOOST_ASSERT(false);
+BOOST_NORETURN inline void forced_return_no_return() { // fixes `must return a value` warnings
+ using namespace std;
+ abort(); // some implementations have no std::abort
}
-#elif !defined(BOOST_MSVC)
-// workaround implementation
+///////////////////////////////////////////////////////////////////////////////
+// (detail) function template forced_return
//
-// TODO: Determine the most efficient way to handle this -- as below? by
-// throwing? by recursive call to forced_return itself? etc.
+// Logical error to permit invocation at runtime, but (artificially) satisfies
+// compile-time requirement of returning a result value.
//
-
template <typename T>
-inline
+BOOST_NORETURN inline
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
forced_return()
{
// logical error: should never be here! (see above)
BOOST_ASSERT(false);
+ forced_return_no_return();
+
+#ifdef BOOST_NO_NORETURN
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) (*dummy)() = 0;
return dummy();
+#endif
}
-#else // defined(BOOST_MSVC)
+}}} // namespace boost::detail::variant
-# pragma warning( push )
-# pragma warning( disable : 4702 ) // unreachable code
-// msvc-specific implementation
-//
-// Leverages __declspec(noreturn) for optimized implementation.
-//
-
-__declspec(noreturn)
-inline void forced_return_no_return() {};
-
-template <typename T>
-inline
- BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
-forced_return()
-{
- // logical error: should never be here! (see above)
- BOOST_ASSERT(false);
-
- forced_return_no_return();
-}
+#ifdef BOOST_MSVC
# pragma warning( pop )
-
-#endif // BOOST_MSVC optimization
-
-}} // namespace detail::variant
-} // namespace boost
+#endif
#endif // BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
diff --git a/boost/variant/detail/generic_result_type.hpp b/boost/variant/detail/generic_result_type.hpp
index b3fbb19eeb..8b1289cacc 100644
--- a/boost/variant/detail/generic_result_type.hpp
+++ b/boost/variant/detail/generic_result_type.hpp
@@ -13,7 +13,7 @@
#ifndef BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
#define BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
-#include "boost/config.hpp"
+#include <boost/config.hpp>
//////////////////////////////////////////////////////////////////////////
// (workaround) macro BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE
diff --git a/boost/variant/detail/has_result_type.hpp b/boost/variant/detail/has_result_type.hpp
index 8ec3d361ee..80cd56ab11 100644
--- a/boost/variant/detail/has_result_type.hpp
+++ b/boost/variant/detail/has_result_type.hpp
@@ -12,8 +12,8 @@
#ifndef BOOST_VARIANT_DETAIL_HAS_RESULT_TYPE_HPP
#define BOOST_VARIANT_DETAIL_HAS_RESULT_TYPE_HPP
-#include "boost/config.hpp"
-#include "boost/type_traits/remove_reference.hpp"
+#include <boost/config.hpp>
+#include <boost/type_traits/remove_reference.hpp>
namespace boost { namespace detail { namespace variant {
diff --git a/boost/variant/detail/initializer.hpp b/boost/variant/detail/initializer.hpp
index f6f425e9b0..4a54c273c2 100644
--- a/boost/variant/detail/initializer.hpp
+++ b/boost/variant/detail/initializer.hpp
@@ -15,26 +15,26 @@
#include <new> // for placement new
-#include "boost/config.hpp"
+#include <boost/config.hpp>
-#include "boost/call_traits.hpp"
-#include "boost/detail/reference_content.hpp"
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/detail/move.hpp"
+#include <boost/call_traits.hpp>
+#include <boost/detail/reference_content.hpp>
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/detail/move.hpp>
#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-# include "boost/mpl/aux_/value_wknd.hpp"
-# include "boost/mpl/int.hpp"
-# include "boost/mpl/iter_fold.hpp"
-# include "boost/mpl/next.hpp"
-# include "boost/mpl/deref.hpp"
-# include "boost/mpl/pair.hpp"
-# include "boost/mpl/protect.hpp"
+# include <boost/mpl/aux_/value_wknd.hpp>
+# include <boost/mpl/int.hpp>
+# include <boost/mpl/iter_fold.hpp>
+# include <boost/mpl/next.hpp>
+# include <boost/mpl/deref.hpp>
+# include <boost/mpl/pair.hpp>
+# include <boost/mpl/protect.hpp>
#else
-# include "boost/variant/variant_fwd.hpp"
-# include "boost/preprocessor/cat.hpp"
-# include "boost/preprocessor/enum.hpp"
-# include "boost/preprocessor/repeat.hpp"
+# include <boost/variant/variant_fwd.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/enum.hpp>
+# include <boost/preprocessor/repeat.hpp>
#endif
namespace boost {
@@ -111,7 +111,7 @@ struct make_initializer_node
return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
static int initialize(void* dest, param2_T operand)
{
// This assert must newer trigger, because all the reference contents are
diff --git a/boost/variant/detail/make_variant_list.hpp b/boost/variant/detail/make_variant_list.hpp
index 37d725c0b6..b7a0feffd0 100644
--- a/boost/variant/detail/make_variant_list.hpp
+++ b/boost/variant/detail/make_variant_list.hpp
@@ -13,11 +13,11 @@
#ifndef BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
#define BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/variant/variant_fwd.hpp>
-#include "boost/mpl/list.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/enum.hpp"
+#include <boost/mpl/list.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/enum.hpp>
namespace boost {
namespace detail { namespace variant {
diff --git a/boost/variant/detail/move.hpp b/boost/variant/detail/move.hpp
index 0b12adf1ae..8900055b75 100644
--- a/boost/variant/detail/move.hpp
+++ b/boost/variant/detail/move.hpp
@@ -23,10 +23,10 @@
#include <iterator> // for iterator_traits
#include <new> // for placement new
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/move/move.hpp"
-#include "boost/move/adl_move_swap.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/move/move.hpp>
+#include <boost/move/adl_move_swap.hpp>
namespace boost { namespace detail { namespace variant {
diff --git a/boost/variant/detail/multivisitors_cpp11_based.hpp b/boost/variant/detail/multivisitors_cpp11_based.hpp
index 370db83660..f9286b7dfd 100644
--- a/boost/variant/detail/multivisitors_cpp11_based.hpp
+++ b/boost/variant/detail/multivisitors_cpp11_based.hpp
@@ -17,7 +17,7 @@
#endif
#include <boost/variant/detail/apply_visitor_unary.hpp>
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
#if defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_HDR_TUPLE)
# error "This file requires <tuple> and variadic templates support"
diff --git a/boost/variant/detail/over_sequence.hpp b/boost/variant/detail/over_sequence.hpp
index ff20a010c7..48394f072d 100644
--- a/boost/variant/detail/over_sequence.hpp
+++ b/boost/variant/detail/over_sequence.hpp
@@ -15,7 +15,7 @@
#ifndef BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
#define BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
-#include "boost/mpl/aux_/config/ctps.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
namespace boost {
diff --git a/boost/variant/detail/substitute.hpp b/boost/variant/detail/substitute.hpp
index d82720e464..2579eb51bb 100644
--- a/boost/variant/detail/substitute.hpp
+++ b/boost/variant/detail/substitute.hpp
@@ -18,19 +18,19 @@
#ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
#define BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
-#include "boost/mpl/aux_/config/ctps.hpp"
-
-#include "boost/variant/detail/substitute_fwd.hpp"
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-#include "boost/mpl/aux_/lambda_arity_param.hpp"
-#include "boost/mpl/aux_/preprocessor/params.hpp"
-#include "boost/mpl/aux_/preprocessor/repeat.hpp"
-#include "boost/mpl/int_fwd.hpp"
-#include "boost/mpl/limits/arity.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/empty.hpp"
-#include "boost/preprocessor/arithmetic/inc.hpp"
-#include "boost/preprocessor/iterate.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+#include <boost/variant/detail/substitute_fwd.hpp>
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+#include <boost/mpl/aux_/lambda_arity_param.hpp>
+#include <boost/mpl/aux_/preprocessor/params.hpp>
+#include <boost/mpl/aux_/preprocessor/repeat.hpp>
+#include <boost/mpl/int_fwd.hpp>
+#include <boost/mpl/limits/arity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/iterate.hpp>
namespace boost {
namespace detail { namespace variant {
@@ -158,7 +158,7 @@ struct substitute<
/**/
#define BOOST_PP_ITERATION_LIMITS (0,BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
-#define BOOST_PP_FILENAME_1 "boost/variant/detail/substitute.hpp"
+#define BOOST_PP_FILENAME_1 <boost/variant/detail/substitute.hpp>
#include BOOST_PP_ITERATE()
#undef BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL
diff --git a/boost/variant/detail/substitute_fwd.hpp b/boost/variant/detail/substitute_fwd.hpp
index 8084cb8845..cc490744e1 100644
--- a/boost/variant/detail/substitute_fwd.hpp
+++ b/boost/variant/detail/substitute_fwd.hpp
@@ -13,9 +13,9 @@
#ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
#define BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
-#include "boost/mpl/aux_/lambda_arity_param.hpp"
-#include "boost/mpl/aux_/template_arity.hpp"
-#include "boost/mpl/int_fwd.hpp"
+#include <boost/mpl/aux_/lambda_arity_param.hpp>
+#include <boost/mpl/aux_/template_arity.hpp>
+#include <boost/mpl/int_fwd.hpp>
///////////////////////////////////////////////////////////////////////////////
@@ -24,8 +24,8 @@
// Defined if 'substitute' is not implementable on the current compiler.
//
-#include "boost/mpl/aux_/config/ctps.hpp"
-#include "boost/mpl/aux_/config/ttp.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/ttp.hpp>
#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
&& !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
diff --git a/boost/variant/detail/variant_io.hpp b/boost/variant/detail/variant_io.hpp
index 192a3dea4a..63df74f24b 100644
--- a/boost/variant/detail/variant_io.hpp
+++ b/boost/variant/detail/variant_io.hpp
@@ -15,10 +15,10 @@
#include <iosfwd> // for std::basic_ostream forward declare
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/variant/variant_fwd.hpp>
-#include "boost/detail/templated_streams.hpp"
-#include "boost/variant/static_visitor.hpp"
+#include <boost/detail/templated_streams.hpp>
+#include <boost/variant/static_visitor.hpp>
namespace boost {
diff --git a/boost/variant/detail/visitation_impl.hpp b/boost/variant/detail/visitation_impl.hpp
index a36cae5f2b..d741a4ab29 100644
--- a/boost/variant/detail/visitation_impl.hpp
+++ b/boost/variant/detail/visitation_impl.hpp
@@ -13,27 +13,27 @@
#ifndef BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
#define BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
-#include "boost/config.hpp"
-
-#include "boost/variant/detail/backup_holder.hpp"
-#include "boost/variant/detail/cast_storage.hpp"
-#include "boost/variant/detail/forced_return.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/mpl/int.hpp"
-#include "boost/mpl/next.hpp"
-#include "boost/mpl/deref.hpp"
-#include "boost/mpl/or.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/inc.hpp"
-#include "boost/preprocessor/repeat.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/is_nothrow_move_constructible.hpp"
+#include <boost/config.hpp>
+
+#include <boost/variant/detail/backup_holder.hpp>
+#include <boost/variant/detail/cast_storage.hpp>
+#include <boost/variant/detail/forced_return.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
# pragma warning (push)
@@ -49,7 +49,7 @@
#if !defined(BOOST_VARIANT_VISITATION_UNROLLING_LIMIT)
#ifndef BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-# include "boost/mpl/limits/list.hpp"
+# include <boost/mpl/limits/list.hpp>
# define BOOST_VARIANT_VISITATION_UNROLLING_LIMIT \
BOOST_MPL_LIMIT_LIST_SIZE
#else
@@ -258,7 +258,7 @@ visitation_impl(
typedef typename is_same< next_type,apply_visitor_unrolled >::type
is_apply_visitor_unrolled;
- return visitation_impl(
+ return detail::variant::visitation_impl(
internal_which, logical_which
, visitor, storage
, is_apply_visitor_unrolled()
diff --git a/boost/variant/get.hpp b/boost/variant/get.hpp
index 3188a6547a..f3eb84dc29 100644
--- a/boost/variant/get.hpp
+++ b/boost/variant/get.hpp
@@ -15,19 +15,23 @@
#include <exception>
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/throw_exception.hpp"
-#include "boost/utility/addressof.hpp"
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/detail/element_index.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/element_index.hpp>
-#include "boost/type_traits/add_reference.hpp"
-#include "boost/type_traits/add_pointer.hpp"
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_pointer.hpp>
namespace boost {
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
//////////////////////////////////////////////////////////////////////////
// class bad_get
//
@@ -45,6 +49,10 @@ public: // std::exception implementation
}
};
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic pop
+#endif
+
//////////////////////////////////////////////////////////////////////////
// function template get<T>
@@ -139,7 +147,7 @@ relaxed_get(
)
{
typedef typename add_pointer<U>::type U_ptr;
- U_ptr result = relaxed_get<U>(&operand);
+ U_ptr result = relaxed_get<U>(boost::addressof(operand));
if (!result)
boost::throw_exception(bad_get());
@@ -155,7 +163,7 @@ relaxed_get(
)
{
typedef typename add_pointer<const U>::type U_ptr;
- U_ptr result = relaxed_get<const U>(&operand);
+ U_ptr result = relaxed_get<const U>(boost::addressof(operand));
if (!result)
boost::throw_exception(bad_get());
diff --git a/boost/variant/multivisitors.hpp b/boost/variant/multivisitors.hpp
index 9e24950563..18ae015ee4 100644
--- a/boost/variant/multivisitors.hpp
+++ b/boost/variant/multivisitors.hpp
@@ -17,7 +17,7 @@
#endif
#include <boost/config.hpp>
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
# include <boost/variant/detail/multivisitors_cpp11_based.hpp>
diff --git a/boost/variant/polymorphic_get.hpp b/boost/variant/polymorphic_get.hpp
index 05d9b0dcc8..89fca36de7 100644
--- a/boost/variant/polymorphic_get.hpp
+++ b/boost/variant/polymorphic_get.hpp
@@ -14,17 +14,17 @@
#include <exception>
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/throw_exception.hpp"
-#include "boost/utility/addressof.hpp"
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/get.hpp"
-
-#include "boost/type_traits/add_reference.hpp"
-#include "boost/type_traits/add_pointer.hpp"
-#include "boost/type_traits/is_base_of.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/get.hpp>
+
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/is_base_of.hpp>
namespace boost {
diff --git a/boost/variant/recursive_variant.hpp b/boost/variant/recursive_variant.hpp
index cb5eb4ce79..afba0be640 100644
--- a/boost/variant/recursive_variant.hpp
+++ b/boost/variant/recursive_variant.hpp
@@ -13,27 +13,27 @@
#ifndef BOOST_VARIANT_RECURSIVE_VARIANT_HPP
#define BOOST_VARIANT_RECURSIVE_VARIANT_HPP
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/detail/enable_recursive.hpp"
-#include "boost/variant/detail/substitute_fwd.hpp"
-#include "boost/variant/detail/make_variant_list.hpp"
-#include "boost/variant/detail/over_sequence.hpp"
-
-#include "boost/mpl/aux_/lambda_arity_param.hpp"
-
-#include "boost/mpl/equal.hpp"
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/mpl/if.hpp"
-#include "boost/mpl/protect.hpp"
-#include "boost/mpl/transform.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/repeat.hpp"
-
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/is_sequence.hpp"
-#include "boost/variant/variant.hpp"
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/enable_recursive.hpp>
+#include <boost/variant/detail/substitute_fwd.hpp>
+#include <boost/variant/detail/make_variant_list.hpp>
+#include <boost/variant/detail/over_sequence.hpp>
+
+#include <boost/mpl/aux_/lambda_arity_param.hpp>
+
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/transform.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repeat.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/variant/variant.hpp>
namespace boost {
diff --git a/boost/variant/recursive_wrapper.hpp b/boost/variant/recursive_wrapper.hpp
index f3b88d8ff4..ef32eddc0e 100644
--- a/boost/variant/recursive_wrapper.hpp
+++ b/boost/variant/recursive_wrapper.hpp
@@ -13,9 +13,9 @@
#ifndef BOOST_VARIANT_RECURSIVE_WRAPPER_HPP
#define BOOST_VARIANT_RECURSIVE_WRAPPER_HPP
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/detail/move.hpp"
-#include "boost/checked_delete.hpp"
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/detail/move.hpp>
+#include <boost/checked_delete.hpp>
namespace boost {
diff --git a/boost/variant/recursive_wrapper_fwd.hpp b/boost/variant/recursive_wrapper_fwd.hpp
index b42a68ffaf..2fc4341262 100644
--- a/boost/variant/recursive_wrapper_fwd.hpp
+++ b/boost/variant/recursive_wrapper_fwd.hpp
@@ -3,8 +3,8 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2002
-// Eric Friedman, Itay Maman
+// Copyright (c) 2002 Eric Friedman, Itay Maman
+// Copyright (c) 2016 Antony Polukhin
//
// Portions Copyright (C) 2002 David Abrahams
//
@@ -16,9 +16,10 @@
#define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
#include <boost/mpl/bool.hpp>
-#include "boost/mpl/aux_/config/ctps.hpp"
-#include "boost/mpl/aux_/lambda_support.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_constructible.hpp>
namespace boost {
@@ -40,10 +41,35 @@ namespace boost {
//
template <typename T> class recursive_wrapper;
+
+///////////////////////////////////////////////////////////////////////////////
+// metafunction is_constructible partial specializations.
+//
+// recursive_wrapper<T> is constructible only from T and recursive_wrapper<T>.
+//
+template <class T> struct is_constructible<recursive_wrapper<T>, T> : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, const T> : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, T&> : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, const T&> : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T> > : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T> > : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T>& > : boost::true_type{};
+template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T>& > : boost::true_type{};
+
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, U > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, U& > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U& > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U> > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U> > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U>& > : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U>& > : boost::false_type{};
+
+
///////////////////////////////////////////////////////////////////////////////
// metafunction is_recursive_wrapper (modeled on code by David Abrahams)
//
-// True iff specified type matches recursive_wrapper<T>.
+// True if specified type matches recursive_wrapper<T>.
//
namespace detail {
diff --git a/boost/variant/static_visitor.hpp b/boost/variant/static_visitor.hpp
index 27f56747ef..d1fc47e272 100644
--- a/boost/variant/static_visitor.hpp
+++ b/boost/variant/static_visitor.hpp
@@ -13,11 +13,11 @@
#ifndef BOOST_VARIANT_STATIC_VISITOR_HPP
#define BOOST_VARIANT_STATIC_VISITOR_HPP
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
-#include "boost/mpl/if.hpp"
-#include "boost/type_traits/is_base_and_derived.hpp"
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
diff --git a/boost/variant/variant.hpp b/boost/variant/variant.hpp
index fa09eb5641..6296238507 100644
--- a/boost/variant/variant.hpp
+++ b/boost/variant/variant.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
-// Copyright (c) 2012-2014 Antony Polukhin
+// Copyright (c) 2012-2016 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -18,72 +18,74 @@
#include <cstddef> // for std::size_t
#include <new> // for placement new
-#include "boost/type_index.hpp"
-
-#include "boost/variant/detail/config.hpp"
-#include "boost/mpl/aux_/value_wknd.hpp"
-
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/detail/backup_holder.hpp"
-#include "boost/variant/detail/enable_recursive_fwd.hpp"
-#include "boost/variant/detail/forced_return.hpp"
-#include "boost/variant/detail/initializer.hpp"
-#include "boost/variant/detail/make_variant_list.hpp"
-#include "boost/variant/detail/over_sequence.hpp"
-#include "boost/variant/detail/visitation_impl.hpp"
-#include "boost/variant/detail/hash_variant.hpp"
-
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/variant/detail/move.hpp"
-
-#include "boost/detail/no_exceptions_support.hpp"
-#include "boost/detail/reference_content.hpp"
-#include "boost/aligned_storage.hpp"
-#include "boost/blank.hpp"
-#include "boost/math/common_factor_ct.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/repeat.hpp"
-#include "boost/type_traits/alignment_of.hpp"
-#include "boost/type_traits/add_const.hpp"
-#include "boost/type_traits/has_nothrow_constructor.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/is_nothrow_move_assignable.hpp"
-#include "boost/type_traits/is_nothrow_move_constructible.hpp"
-#include "boost/type_traits/is_const.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/type_traits/is_rvalue_reference.hpp"
-#include "boost/utility/enable_if.hpp"
-#include "boost/utility/declval.hpp"
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/static_visitor.hpp"
-
-#include "boost/mpl/assert.hpp"
-#include "boost/mpl/begin_end.hpp"
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/deref.hpp"
-#include "boost/mpl/empty.hpp"
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/find_if.hpp"
-#include "boost/mpl/fold.hpp"
-#include "boost/mpl/front.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/mpl/if.hpp"
-#include "boost/mpl/int.hpp"
-#include "boost/mpl/is_sequence.hpp"
-#include "boost/mpl/iterator_range.hpp"
-#include "boost/mpl/iter_fold_if.hpp"
-#include "boost/mpl/logical.hpp"
-#include "boost/mpl/max_element.hpp"
-#include "boost/mpl/next.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/mpl/pair.hpp"
-#include "boost/mpl/protect.hpp"
-#include "boost/mpl/push_front.hpp"
-#include "boost/mpl/same_as.hpp"
-#include "boost/mpl/size_t.hpp"
-#include "boost/mpl/sizeof.hpp"
-#include "boost/mpl/transform.hpp"
+#include <boost/type_index.hpp>
+
+#include <boost/variant/detail/config.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/backup_holder.hpp>
+#include <boost/variant/detail/enable_recursive_fwd.hpp>
+#include <boost/variant/detail/forced_return.hpp>
+#include <boost/variant/detail/initializer.hpp>
+#include <boost/variant/detail/make_variant_list.hpp>
+#include <boost/variant/detail/over_sequence.hpp>
+#include <boost/variant/detail/visitation_impl.hpp>
+#include <boost/variant/detail/hash_variant.hpp>
+
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/variant/detail/move.hpp>
+
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/reference_content.hpp>
+#include <boost/aligned_storage.hpp>
+#include <boost/blank.hpp>
+#include <boost/math/common_factor_ct.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/static_visitor.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/iter_fold_if.hpp>
+#include <boost/mpl/logical.hpp>
+#include <boost/mpl/max_element.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/size_t.hpp>
+#include <boost/mpl/sizeof.hpp>
+#include <boost/mpl/transform.hpp>
///////////////////////////////////////////////////////////////////////////////
// Implementation Macros:
@@ -99,14 +101,14 @@
#if defined(BOOST_VARIANT_MINIMIZE_SIZE)
# include <climits> // for SCHAR_MAX
-# include "boost/mpl/eval_if.hpp"
-# include "boost/mpl/equal_to.hpp"
-# include "boost/mpl/identity.hpp"
-# include "boost/mpl/int.hpp"
-# include "boost/mpl/if.hpp"
-# include "boost/mpl/less.hpp"
-# include "boost/mpl/long.hpp"
-# include "boost/mpl/O1_size.hpp"
+# include <boost/mpl/eval_if.hpp>
+# include <boost/mpl/equal_to.hpp>
+# include <boost/mpl/identity.hpp>
+# include <boost/mpl/int.hpp>
+# include <boost/mpl/if.hpp>
+# include <boost/mpl/less.hpp>
+# include <boost/mpl/long.hpp>
+# include <boost/mpl/O1_size.hpp>
#endif
@@ -254,6 +256,72 @@ struct is_variant_move_noexcept_assignable {
#endif // BOOST_NO_CXX11_NOEXCEPT
///////////////////////////////////////////////////////////////////////////////
+// (detail) metafunction is_variant_constructible_from
+//
+// Derives from true_type if at least one variant's type is constructible from T.
+//
+template <class T1, class T2>
+struct is_constructible_ext:
+ boost::mpl::or_<
+ boost::is_constructible<
+ T1,
+ T2
+ >,
+ boost::is_constructible<
+ T1,
+ typename boost::add_lvalue_reference<T2>::type
+ >
+ >
+{};
+
+template <class T, class Types>
+struct is_variant_constructible_from:
+ boost::mpl::not_< boost::is_same<
+ typename boost::mpl::find_if<
+ Types,
+ is_constructible_ext<boost::mpl::_1, T>
+ >::type,
+ typename boost::mpl::end<Types>::type
+ > >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >:
+ boost::is_same<
+ typename boost::mpl::find_if<
+ typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::recursive_enabled_types,
+ mpl::not_< is_variant_constructible_from< boost::mpl::_1, Types> >
+ >::type,
+ typename boost::mpl::end< typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::recursive_enabled_types >::type
+ >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>& , Types >:
+ is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>& , Types >:
+ is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>&& , Types >:
+ is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const && , Types >:
+ is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCE
+
+
+///////////////////////////////////////////////////////////////////////////////
// (detail) metafunction make_storage
//
// Provides an aligned storage type capable of holding any of the types
@@ -899,10 +967,10 @@ public: // structors
public: // visitor interfaces
template <typename T>
- bool operator()(const T& rhs_content) const
+ bool operator()(T& rhs_content) const
{
// Since the precondition ensures lhs and rhs types are same, get T...
- known_get<const T> getter;
+ known_get<T> getter;
const T& lhs_content = lhs_.apply_visitor(getter);
// ...and compare lhs and rhs contents:
@@ -1120,6 +1188,7 @@ private: // helpers, for typedefs (below)
::boost::mpl::not_< mpl::empty<specified_types> >::value
));
+public: // public typedefs
typedef typename mpl::eval_if<
is_recursive_
, mpl::transform<
@@ -1129,9 +1198,7 @@ private: // helpers, for typedefs (below)
>
>
, mpl::identity< specified_types >
- >::type recursive_enabled_types;
-
-public: // public typedefs
+ >::type recursive_enabled_types; // used by is_variant_constructible_from<> trait
typedef typename mpl::transform<
recursive_enabled_types
@@ -1648,7 +1715,10 @@ private: // helpers, for structors, below
#endif
template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
- void convert_construct(
+ typename boost::enable_if<mpl::or_<
+ boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+ boost::detail::variant::is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&, internal_types>
+ > >::type convert_construct(
boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>& operand
, long
)
@@ -1657,7 +1727,10 @@ private: // helpers, for structors, below
}
template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
- void convert_construct(
+ typename boost::enable_if<mpl::or_<
+ boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+ boost::detail::variant::is_variant_constructible_from<const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&, internal_types>
+ > >::type convert_construct(
const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>& operand
, long
)
@@ -1667,7 +1740,10 @@ private: // helpers, for structors, below
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
- void convert_construct(
+ typename boost::enable_if<mpl::or_<
+ boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+ boost::detail::variant::is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&&, internal_types>
+ > >::type convert_construct(
boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&& operand
, long
)
@@ -1678,27 +1754,12 @@ private: // helpers, for structors, below
public: // structors, cont.
-#if !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
-
template <typename T>
- variant(const T& operand)
- {
- convert_construct(operand, 1L);
- }
-
- template <typename T>
- variant(T& operand)
- {
- convert_construct(operand, 1L);
- }
-
-#elif defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-
- // For compilers that cannot distinguish between T& and const T& in
- // template constructors, but do fully support SFINAE, we can workaround:
-
- template <typename T>
- variant(const T& operand)
+ variant(const T& operand,
+ typename boost::enable_if<mpl::and_<
+ mpl::not_< boost::is_same<T, variant> >,
+ boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
+ > >::type* = 0)
{
convert_construct(operand, 1L);
}
@@ -1706,31 +1767,25 @@ public: // structors, cont.
template <typename T>
variant(
T& operand
- , typename enable_if<
- mpl::not_< is_const<T> >
- , void
- >::type* = 0
+ , typename boost::enable_if<mpl::and_<
+ mpl::not_< is_const<T> >,
+ mpl::not_< boost::is_same<T, variant> >,
+ boost::detail::variant::is_variant_constructible_from<T&, internal_types>
+ > >::type* = 0
)
{
convert_construct(operand, 1L);
}
-#else // !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-
- // For compilers that cannot distinguish between T& and const T& in
- // template constructors, and do NOT support SFINAE, we can't workaround:
-
- template <typename T>
- variant(const T& operand)
- {
- convert_construct(operand, 1L);
- }
-#endif // BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING workarounds
-
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
- variant(T&& operand, typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type* = 0,
- typename boost::disable_if<boost::is_const<T> >::type* = 0)
+ variant(T&& operand,
+ typename boost::enable_if<mpl::and_<
+ boost::is_rvalue_reference<T&&>,
+ mpl::not_< boost::is_const<T> >,
+ mpl::not_< boost::is_same<T, variant> >,
+ boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
+ > >::type* = 0)
{
convert_construct( detail::variant::move(operand), 1L);
}
@@ -1748,7 +1803,7 @@ public: // structors, cont.
// ...and activate the *this's primary storage on success:
indicate_which(operand.which());
}
-
+
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
variant(variant&& operand) BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value)
{
@@ -2122,8 +2177,14 @@ public: // modifiers
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
- typename boost::enable_if_c<boost::is_rvalue_reference<T&&>::value && !boost::is_const<T>::value, variant& >::type
- operator=(T&& rhs)
+ typename boost::enable_if<
+ boost::mpl::and_<
+ boost::is_rvalue_reference<T&&>,
+ mpl::not_< boost::is_const<T> >,
+ boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
+ >,
+ variant&
+ >::type operator=(T&& rhs)
{
move_assign( detail::variant::move(rhs) );
return *this;
@@ -2131,7 +2192,13 @@ public: // modifiers
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename T>
- variant& operator=(const T& rhs)
+ typename boost::enable_if<
+ mpl::or_<
+ boost::is_same<T, variant>,
+ boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
+ >,
+ variant&
+ >::type operator=(const T& rhs)
{
assign(rhs);
return *this;
@@ -2146,7 +2213,7 @@ public: // modifiers
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
variant& operator=(variant&& rhs)
-#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6)
+#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6) || defined(__clang__)
BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value && variant_move_noexcept_assignable::type::value)
#endif
{
@@ -2192,10 +2259,6 @@ public: // queries
public: // prevent comparison with foreign types
-// Obsolete. Remove.
-# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \
- void
-
template <typename U>
void operator==(const U&) const
{
@@ -2412,7 +2475,7 @@ inline void swap(
// implementation additions
#if !defined(BOOST_NO_IOSTREAM)
-#include "boost/variant/detail/variant_io.hpp"
+#include <boost/variant/detail/variant_io.hpp>
#endif // BOOST_NO_IOSTREAM
#endif // BOOST_VARIANT_VARIANT_HPP
diff --git a/boost/variant/variant_fwd.hpp b/boost/variant/variant_fwd.hpp
index 4bf90aa1e1..769ecc4e54 100644
--- a/boost/variant/variant_fwd.hpp
+++ b/boost/variant/variant_fwd.hpp
@@ -4,7 +4,7 @@
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003 Eric Friedman, Itay Maman
-// Copyright (c) 2013 Antony Polukhin
+// Copyright (c) 2013-2016 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,28 +13,17 @@
#ifndef BOOST_VARIANT_VARIANT_FWD_HPP
#define BOOST_VARIANT_VARIANT_FWD_HPP
-#include "boost/variant/detail/config.hpp"
+#include <boost/variant/detail/config.hpp>
-#include "boost/blank_fwd.hpp"
-#include "boost/mpl/arg.hpp"
-#include "boost/mpl/limits/arity.hpp"
-#include "boost/mpl/aux_/na.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/enum.hpp"
-#include "boost/preprocessor/enum_params.hpp"
-#include "boost/preprocessor/enum_shifted_params.hpp"
-#include "boost/preprocessor/repeat.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_NO_REFERENCE_SUPPORT
-//
-// Defined if variant does not support references as bounded types.
-//
-#if defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) \
- && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) \
- && !defined(BOOST_VARIANT_NO_REFERENCE_SUPPORT)
-# define BOOST_VARIANT_NO_REFERENCE_SUPPORT
-#endif
+#include <boost/blank_fwd.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/limits/arity.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/enum.hpp>
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/repeat.hpp>
///////////////////////////////////////////////////////////////////////////////
// macro BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
@@ -54,7 +43,7 @@
// so only types declared w/ MPL lambda workarounds will work.
//
-#include "boost/variant/detail/substitute_fwd.hpp"
+#include <boost/variant/detail/substitute_fwd.hpp>
#if defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE) \
&& !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
@@ -140,7 +129,7 @@
// Implementation-defined preprocessor symbol describing the actual
// length of variant's pseudo-variadic template parameter list.
//
-#include "boost/mpl/limits/list.hpp"
+#include <boost/mpl/limits/list.hpp>
#define BOOST_VARIANT_LIMIT_TYPES \
BOOST_MPL_LIMIT_LIST_SIZE
@@ -151,7 +140,7 @@
// arguments. That is,
// make_recursive_variant< ..., T<[1], recursive_variant_, ... [N]> >.
//
-#include "boost/mpl/limits/arity.hpp"
+#include <boost/mpl/limits/arity.hpp>
#define BOOST_VARIANT_RECURSIVE_VARIANT_MAX_ARITY \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
diff --git a/boost/variant/visitor_ptr.hpp b/boost/variant/visitor_ptr.hpp
index 4ddb921279..61bc8dfc5f 100644
--- a/boost/variant/visitor_ptr.hpp
+++ b/boost/variant/visitor_ptr.hpp
@@ -13,15 +13,15 @@
#ifndef BOOST_VARIANT_VISITOR_PTR_HPP
#define BOOST_VARIANT_VISITOR_PTR_HPP
-#include "boost/variant/bad_visit.hpp"
-#include "boost/variant/static_visitor.hpp"
-
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/throw_exception.hpp"
-#include "boost/type_traits/add_reference.hpp"
-#include "boost/type_traits/is_reference.hpp"
-#include "boost/type_traits/is_void.hpp"
+#include <boost/variant/bad_visit.hpp>
+#include <boost/variant/static_visitor.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_void.hpp>
namespace boost {
diff --git a/boost/version.hpp b/boost/version.hpp
index ce6f79f840..a382352cd5 100644
--- a/boost/version.hpp
+++ b/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 106100
+#define BOOST_VERSION 106200
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
-#define BOOST_LIB_VERSION "1_61"
+#define BOOST_LIB_VERSION "1_62"
#endif