From 79994b09112c8ad598611045f72ad029531cf6e7 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sat, 15 Jan 2022 20:22:33 -0500 Subject: [PATCH] Included boost libraries --- Slang/Main.cpp | 2 +- Slang/boost/align.hpp | 22 + Slang/boost/aligned_storage.hpp | 18 + Slang/boost/any.hpp | 344 ++ Slang/boost/any/bad_any_cast.hpp | 43 + Slang/boost/any/basic_any.hpp | 480 ++ Slang/boost/any/fwd.hpp | 40 + Slang/boost/array.hpp | 456 ++ Slang/boost/asio.hpp | 200 + Slang/boost/assert.hpp | 85 + Slang/boost/assign.hpp | 24 + Slang/boost/atomic.hpp | 27 + Slang/boost/beast.hpp | 21 + Slang/boost/bimap.hpp | 19 + Slang/boost/bind.hpp | 60 + Slang/boost/blank.hpp | 106 + Slang/boost/blank_fwd.hpp | 22 + Slang/boost/call_traits.hpp | 20 + Slang/boost/callable_traits.hpp | 47 + Slang/boost/cast.hpp | 20 + Slang/boost/cerrno.hpp | 15 + Slang/boost/checked_delete.hpp | 17 + Slang/boost/chrono.hpp | 20 + Slang/boost/circular_buffer.hpp | 65 + Slang/boost/circular_buffer_fwd.hpp | 43 + Slang/boost/compressed_pair.hpp | 20 + Slang/boost/compute.hpp | 44 + Slang/boost/concept_archetype.hpp | 670 +++ Slang/boost/concept_check.hpp | 1082 ++++ Slang/boost/config.hpp | 67 + Slang/boost/contract.hpp | 44 + Slang/boost/contract_macro.hpp | 1409 +++++ Slang/boost/convert.hpp | 209 + Slang/boost/core/addressof.hpp | 274 + Slang/boost/core/alloc_construct.hpp | 169 + Slang/boost/core/allocator_access.hpp | 601 ++ Slang/boost/core/bit.hpp | 592 ++ Slang/boost/core/checked_delete.hpp | 71 + Slang/boost/core/cmath.hpp | 298 + Slang/boost/core/default_allocator.hpp | 148 + Slang/boost/core/demangle.hpp | 126 + Slang/boost/core/detail/splitmix64.hpp | 54 + Slang/boost/core/detail/string_view.hpp | 1205 ++++ Slang/boost/core/empty_value.hpp | 155 + Slang/boost/core/enable_if.hpp | 128 + Slang/boost/core/exchange.hpp | 49 + Slang/boost/core/explicit_operator_bool.hpp | 163 + Slang/boost/core/first_scalar.hpp | 45 + Slang/boost/core/ignore_unused.hpp | 100 + Slang/boost/core/is_same.hpp | 40 + Slang/boost/core/lightweight_test.hpp | 591 ++ Slang/boost/core/lightweight_test_trait.hpp | 91 + Slang/boost/core/no_exceptions_support.hpp | 56 + Slang/boost/core/noinit_adaptor.hpp | 88 + Slang/boost/core/noncopyable.hpp | 63 + Slang/boost/core/null_deleter.hpp | 44 + Slang/boost/core/nvp.hpp | 57 + Slang/boost/core/pointer_traits.hpp | 234 + Slang/boost/core/quick_exit.hpp | 59 + Slang/boost/core/ref.hpp | 338 ++ Slang/boost/core/scoped_enum.hpp | 194 + Slang/boost/core/span.hpp | 407 ++ Slang/boost/core/swap.hpp | 70 + Slang/boost/core/type_name.hpp | 1137 ++++ Slang/boost/core/typeinfo.hpp | 167 + Slang/boost/core/uncaught_exceptions.hpp | 155 + Slang/boost/core/underlying_type.hpp | 79 + Slang/boost/core/use_default.hpp | 17 + Slang/boost/crc.hpp | 2306 ++++++++ Slang/boost/cregex.hpp | 43 + Slang/boost/cstdfloat.hpp | 58 + Slang/boost/cstdint.hpp | 556 ++ Slang/boost/cstdlib.hpp | 41 + Slang/boost/current_function.hpp | 75 + Slang/boost/cxx11_char_types.hpp | 70 + Slang/boost/date_time.hpp | 17 + Slang/boost/describe.hpp | 20 + Slang/boost/dll.hpp | 27 + Slang/boost/dynamic_bitset.hpp | 17 + Slang/boost/dynamic_bitset_fwd.hpp | 25 + Slang/boost/enable_shared_from_this.hpp | 18 + Slang/boost/endian.hpp | 13 + Slang/boost/exception_ptr.hpp | 11 + Slang/boost/filesystem.hpp | 24 + Slang/boost/flyweight.hpp | 22 + Slang/boost/foreach.hpp | 1134 ++++ Slang/boost/foreach_fwd.hpp | 51 + Slang/boost/format.hpp | 59 + Slang/boost/function.hpp | 74 + Slang/boost/function_equal.hpp | 28 + Slang/boost/function_output_iterator.hpp | 18 + Slang/boost/functional.hpp | 581 ++ Slang/boost/generator_iterator.hpp | 85 + Slang/boost/geometry.hpp | 19 + Slang/boost/get_pointer.hpp | 76 + Slang/boost/gil.hpp | 49 + Slang/boost/hana.hpp | 209 + Slang/boost/histogram.hpp | 37 + Slang/boost/hof.hpp | 63 + Slang/boost/implicit_cast.hpp | 38 + Slang/boost/indirect_reference.hpp | 43 + Slang/boost/integer.hpp | 262 + Slang/boost/integer_fwd.hpp | 190 + Slang/boost/integer_traits.hpp | 256 + Slang/boost/intrusive_ptr.hpp | 18 + Slang/boost/io_fwd.hpp | 63 + Slang/boost/is_placeholder.hpp | 31 + Slang/boost/iterator.hpp | 20 + Slang/boost/iterator_adaptors.hpp | 13 + Slang/boost/json.hpp | 46 + Slang/boost/lambda2.hpp | 10 + Slang/boost/leaf.hpp | 11 + Slang/boost/lexical_cast.hpp | 105 + Slang/boost/limits.hpp | 146 + Slang/boost/local_function.hpp | 459 ++ Slang/boost/locale.hpp | 27 + Slang/boost/make_default.hpp | 40 + Slang/boost/make_shared.hpp | 16 + Slang/boost/make_unique.hpp | 13 + Slang/boost/math_fwd.hpp | 42 + Slang/boost/mem_fn.hpp | 24 + Slang/boost/memory_order.hpp | 82 + Slang/boost/metaparse.hpp | 118 + Slang/boost/mp11.hpp | 22 + Slang/boost/mpi.hpp | 35 + Slang/boost/multi_array.hpp | 572 ++ Slang/boost/multi_index_container.hpp | 1578 ++++++ Slang/boost/multi_index_container_fwd.hpp | 121 + Slang/boost/next_prior.hpp | 195 + Slang/boost/non_type.hpp | 27 + Slang/boost/noncopyable.hpp | 17 + Slang/boost/nondet_random.hpp | 22 + Slang/boost/none.hpp | 59 + Slang/boost/none_t.hpp | 41 + Slang/boost/operators.hpp | 920 +++ Slang/boost/operators_v1.hpp | 951 ++++ Slang/boost/optional.hpp | 18 + Slang/boost/outcome.hpp | 33 + Slang/boost/parameter.hpp | 30 + Slang/boost/pfr.hpp | 21 + Slang/boost/phoenix.hpp | 13 + Slang/boost/pointee.hpp | 76 + Slang/boost/pointer_cast.hpp | 122 + Slang/boost/pointer_to_other.hpp | 55 + Slang/boost/polymorphic_cast.hpp | 126 + Slang/boost/polymorphic_pointer_cast.hpp | 78 + Slang/boost/predef.h | 24 + Slang/boost/preprocessor.hpp | 19 + Slang/boost/process.hpp | 42 + Slang/boost/program_options.hpp | 25 + Slang/boost/progress.hpp | 145 + Slang/boost/python.hpp | 75 + Slang/boost/qvm.hpp | 11 + Slang/boost/qvm_lite.hpp | 11 + Slang/boost/random.hpp | 92 + Slang/boost/range.hpp | 23 + Slang/boost/ratio.hpp | 14 + Slang/boost/rational.hpp | 1046 ++++ Slang/boost/ref.hpp | 17 + Slang/boost/regex.h | 100 + Slang/boost/regex.hpp | 41 + Slang/boost/regex_fwd.hpp | 37 + Slang/boost/scope_exit.hpp | 1414 +++++ Slang/boost/scoped_array.hpp | 15 + Slang/boost/scoped_ptr.hpp | 15 + Slang/boost/shared_array.hpp | 19 + Slang/boost/shared_container_iterator.hpp | 69 + Slang/boost/shared_ptr.hpp | 19 + Slang/boost/signals2.hpp | 23 + Slang/boost/smart_ptr.hpp | 26 + Slang/boost/spirit.hpp | 27 + Slang/boost/stacktrace.hpp | 19 + Slang/boost/static_assert.hpp | 181 + Slang/boost/static_string.hpp | 13 + Slang/boost/swap.hpp | 17 + Slang/boost/system.hpp | 17 + Slang/boost/thread.hpp | 26 + Slang/boost/throw_exception.hpp | 181 + Slang/boost/timer.hpp | 75 + Slang/boost/token_functions.hpp | 653 +++ Slang/boost/token_iterator.hpp | 131 + Slang/boost/tokenizer.hpp | 98 + Slang/boost/type.hpp | 18 + Slang/boost/type_index.hpp | 265 + Slang/boost/type_index/ctti_type_index.hpp | 213 + .../detail/compile_time_type_info.hpp | 339 ++ .../type_index/detail/ctti_register_class.hpp | 40 + .../type_index/detail/stl_register_class.hpp | 40 + Slang/boost/type_index/runtime_cast.hpp | 28 + .../runtime_cast/boost_shared_ptr_cast.hpp | 49 + .../runtime_cast/detail/runtime_cast_impl.hpp | 57 + .../type_index/runtime_cast/pointer_cast.hpp | 74 + .../runtime_cast/reference_cast.hpp | 66 + .../runtime_cast/register_runtime_class.hpp | 138 + .../runtime_cast/std_shared_ptr_cast.hpp | 46 + Slang/boost/type_index/stl_type_index.hpp | 278 + Slang/boost/type_index/type_index_facade.hpp | 297 + Slang/boost/type_traits.hpp | 163 + Slang/boost/type_traits/add_const.hpp | 52 + Slang/boost/type_traits/add_cv.hpp | 47 + .../type_traits/add_lvalue_reference.hpp | 33 + Slang/boost/type_traits/add_pointer.hpp | 67 + Slang/boost/type_traits/add_reference.hpp | 66 + .../type_traits/add_rvalue_reference.hpp | 70 + Slang/boost/type_traits/add_volatile.hpp | 46 + Slang/boost/type_traits/aligned_storage.hpp | 138 + Slang/boost/type_traits/alignment_of.hpp | 119 + Slang/boost/type_traits/alignment_traits.hpp | 15 + Slang/boost/type_traits/arithmetic_traits.hpp | 20 + Slang/boost/type_traits/array_traits.hpp | 15 + .../type_traits/broken_compiler_spec.hpp | 21 + Slang/boost/type_traits/common_type.hpp | 152 + Slang/boost/type_traits/composite_traits.hpp | 29 + Slang/boost/type_traits/conditional.hpp | 28 + Slang/boost/type_traits/config.hpp | 21 + Slang/boost/type_traits/conjunction.hpp | 40 + Slang/boost/type_traits/conversion_traits.hpp | 17 + Slang/boost/type_traits/copy_cv.hpp | 40 + Slang/boost/type_traits/copy_cv_ref.hpp | 31 + Slang/boost/type_traits/copy_reference.hpp | 35 + Slang/boost/type_traits/cv_traits.hpp | 24 + Slang/boost/type_traits/decay.hpp | 49 + Slang/boost/type_traits/declval.hpp | 44 + .../type_traits/detail/bool_trait_def.hpp | 179 + .../type_traits/detail/bool_trait_undef.hpp | 28 + .../detail/common_arithmetic_type.hpp | 220 + .../type_traits/detail/common_type_impl.hpp | 107 + .../detail/composite_member_pointer_type.hpp | 113 + .../detail/composite_pointer_type.hpp | 153 + Slang/boost/type_traits/detail/config.hpp | 113 + Slang/boost/type_traits/detail/detector.hpp | 37 + .../detail/has_binary_operator.hpp | 279 + .../detail/has_postfix_operator.hpp | 250 + .../detail/has_prefix_operator.hpp | 280 + Slang/boost/type_traits/detail/ice_and.hpp | 42 + Slang/boost/type_traits/detail/ice_eq.hpp | 43 + Slang/boost/type_traits/detail/ice_not.hpp | 38 + Slang/boost/type_traits/detail/ice_or.hpp | 41 + .../type_traits/detail/is_function_cxx_03.hpp | 108 + .../type_traits/detail/is_function_cxx_11.hpp | 676 +++ .../detail/is_function_msvc10_fix.hpp | 30 + .../detail/is_function_ptr_helper.hpp | 444 ++ .../detail/is_function_ptr_tester.hpp | 609 ++ .../type_traits/detail/is_likely_lambda.hpp | 95 + .../detail/is_mem_fun_pointer_impl.hpp | 1328 +++++ .../detail/is_mem_fun_pointer_tester.hpp | 1603 ++++++ .../is_member_function_pointer_cxx_03.hpp | 117 + .../is_member_function_pointer_cxx_11.hpp | 697 +++ .../detail/is_rvalue_reference_msvc10_fix.hpp | 43 + Slang/boost/type_traits/detail/mp_defer.hpp | 56 + .../detail/template_arity_spec.hpp | 16 + .../boost/type_traits/detail/yes_no_type.hpp | 26 + Slang/boost/type_traits/detected.hpp | 24 + Slang/boost/type_traits/detected_or.hpp | 25 + Slang/boost/type_traits/disjunction.hpp | 40 + Slang/boost/type_traits/enable_if.hpp | 37 + Slang/boost/type_traits/extent.hpp | 139 + .../type_traits/floating_point_promotion.hpp | 28 + Slang/boost/type_traits/function_traits.hpp | 174 + Slang/boost/type_traits/has_bit_and.hpp | 49 + .../boost/type_traits/has_bit_and_assign.hpp | 55 + Slang/boost/type_traits/has_bit_or.hpp | 49 + Slang/boost/type_traits/has_bit_or_assign.hpp | 55 + Slang/boost/type_traits/has_bit_xor.hpp | 49 + .../boost/type_traits/has_bit_xor_assign.hpp | 55 + Slang/boost/type_traits/has_complement.hpp | 32 + Slang/boost/type_traits/has_dereference.hpp | 375 ++ Slang/boost/type_traits/has_divides.hpp | 40 + .../boost/type_traits/has_divides_assign.hpp | 47 + Slang/boost/type_traits/has_equal_to.hpp | 52 + Slang/boost/type_traits/has_greater.hpp | 52 + Slang/boost/type_traits/has_greater_equal.hpp | 52 + Slang/boost/type_traits/has_left_shift.hpp | 49 + .../type_traits/has_left_shift_assign.hpp | 55 + Slang/boost/type_traits/has_less.hpp | 52 + Slang/boost/type_traits/has_less_equal.hpp | 52 + Slang/boost/type_traits/has_logical_and.hpp | 40 + Slang/boost/type_traits/has_logical_not.hpp | 32 + Slang/boost/type_traits/has_logical_or.hpp | 40 + Slang/boost/type_traits/has_minus.hpp | 158 + Slang/boost/type_traits/has_minus_assign.hpp | 163 + Slang/boost/type_traits/has_modulus.hpp | 49 + .../boost/type_traits/has_modulus_assign.hpp | 55 + Slang/boost/type_traits/has_multiplies.hpp | 40 + .../type_traits/has_multiplies_assign.hpp | 47 + Slang/boost/type_traits/has_negate.hpp | 25 + Slang/boost/type_traits/has_new_operator.hpp | 147 + Slang/boost/type_traits/has_not_equal_to.hpp | 52 + .../boost/type_traits/has_nothrow_assign.hpp | 84 + .../type_traits/has_nothrow_constructor.hpp | 73 + Slang/boost/type_traits/has_nothrow_copy.hpp | 82 + .../type_traits/has_nothrow_destructor.hpp | 56 + Slang/boost/type_traits/has_operator.hpp | 51 + Slang/boost/type_traits/has_plus.hpp | 54 + Slang/boost/type_traits/has_plus_assign.hpp | 161 + .../boost/type_traits/has_post_decrement.hpp | 65 + .../boost/type_traits/has_post_increment.hpp | 65 + Slang/boost/type_traits/has_pre_decrement.hpp | 65 + Slang/boost/type_traits/has_pre_increment.hpp | 66 + Slang/boost/type_traits/has_right_shift.hpp | 49 + .../type_traits/has_right_shift_assign.hpp | 55 + .../boost/type_traits/has_trivial_assign.hpp | 52 + .../type_traits/has_trivial_constructor.hpp | 57 + Slang/boost/type_traits/has_trivial_copy.hpp | 63 + .../type_traits/has_trivial_destructor.hpp | 48 + .../type_traits/has_trivial_move_assign.hpp | 73 + .../has_trivial_move_constructor.hpp | 79 + Slang/boost/type_traits/has_unary_minus.hpp | 25 + Slang/boost/type_traits/has_unary_plus.hpp | 23 + .../type_traits/has_virtual_destructor.hpp | 26 + Slang/boost/type_traits/ice.hpp | 20 + Slang/boost/type_traits/integral_constant.hpp | 97 + .../boost/type_traits/integral_promotion.hpp | 187 + Slang/boost/type_traits/intrinsics.hpp | 391 ++ Slang/boost/type_traits/is_abstract.hpp | 150 + Slang/boost/type_traits/is_arithmetic.hpp | 22 + Slang/boost/type_traits/is_array.hpp | 43 + Slang/boost/type_traits/is_assignable.hpp | 85 + .../boost/type_traits/is_base_and_derived.hpp | 244 + Slang/boost/type_traits/is_base_of.hpp | 39 + Slang/boost/type_traits/is_base_of_tr1.hpp | 37 + Slang/boost/type_traits/is_bounded_array.hpp | 42 + Slang/boost/type_traits/is_class.hpp | 114 + Slang/boost/type_traits/is_complete.hpp | 92 + Slang/boost/type_traits/is_complex.hpp | 25 + Slang/boost/type_traits/is_compound.hpp | 24 + Slang/boost/type_traits/is_const.hpp | 47 + Slang/boost/type_traits/is_constructible.hpp | 90 + Slang/boost/type_traits/is_convertible.hpp | 506 ++ .../boost/type_traits/is_copy_assignable.hpp | 140 + .../type_traits/is_copy_constructible.hpp | 185 + .../type_traits/is_default_constructible.hpp | 98 + Slang/boost/type_traits/is_destructible.hpp | 69 + Slang/boost/type_traits/is_detected.hpp | 29 + .../type_traits/is_detected_convertible.hpp | 29 + Slang/boost/type_traits/is_detected_exact.hpp | 29 + Slang/boost/type_traits/is_empty.hpp | 120 + Slang/boost/type_traits/is_enum.hpp | 166 + Slang/boost/type_traits/is_final.hpp | 30 + Slang/boost/type_traits/is_float.hpp | 20 + Slang/boost/type_traits/is_floating_point.hpp | 30 + Slang/boost/type_traits/is_function.hpp | 27 + Slang/boost/type_traits/is_fundamental.hpp | 26 + Slang/boost/type_traits/is_integral.hpp | 89 + .../type_traits/is_list_constructible.hpp | 48 + .../boost/type_traits/is_lvalue_reference.hpp | 50 + .../is_member_function_pointer.hpp | 26 + .../type_traits/is_member_object_pointer.hpp | 24 + Slang/boost/type_traits/is_member_pointer.hpp | 45 + Slang/boost/type_traits/is_noncopyable.hpp | 39 + .../is_nothrow_move_assignable.hpp | 92 + .../is_nothrow_move_constructible.hpp | 97 + .../type_traits/is_nothrow_swappable.hpp | 67 + Slang/boost/type_traits/is_object.hpp | 28 + Slang/boost/type_traits/is_pod.hpp | 59 + Slang/boost/type_traits/is_pointer.hpp | 47 + Slang/boost/type_traits/is_polymorphic.hpp | 122 + Slang/boost/type_traits/is_reference.hpp | 30 + .../boost/type_traits/is_rvalue_reference.hpp | 29 + Slang/boost/type_traits/is_same.hpp | 41 + Slang/boost/type_traits/is_scalar.hpp | 27 + Slang/boost/type_traits/is_scoped_enum.hpp | 26 + Slang/boost/type_traits/is_signed.hpp | 163 + Slang/boost/type_traits/is_stateless.hpp | 33 + .../type_traits/is_trivially_copyable.hpp | 31 + .../boost/type_traits/is_unbounded_array.hpp | 41 + Slang/boost/type_traits/is_union.hpp | 31 + Slang/boost/type_traits/is_unscoped_enum.hpp | 25 + Slang/boost/type_traits/is_unsigned.hpp | 163 + .../boost/type_traits/is_virtual_base_of.hpp | 146 + Slang/boost/type_traits/is_void.hpp | 26 + Slang/boost/type_traits/is_volatile.hpp | 46 + Slang/boost/type_traits/make_signed.hpp | 137 + Slang/boost/type_traits/make_unsigned.hpp | 136 + Slang/boost/type_traits/make_void.hpp | 52 + Slang/boost/type_traits/negation.hpp | 23 + Slang/boost/type_traits/nonesuch.hpp | 35 + Slang/boost/type_traits/object_traits.hpp | 33 + Slang/boost/type_traits/promote.hpp | 26 + Slang/boost/type_traits/rank.hpp | 87 + Slang/boost/type_traits/reference_traits.hpp | 15 + .../boost/type_traits/remove_all_extents.hpp | 41 + Slang/boost/type_traits/remove_bounds.hpp | 28 + Slang/boost/type_traits/remove_const.hpp | 39 + Slang/boost/type_traits/remove_cv.hpp | 45 + Slang/boost/type_traits/remove_cv_ref.hpp | 30 + Slang/boost/type_traits/remove_extent.hpp | 41 + Slang/boost/type_traits/remove_pointer.hpp | 84 + Slang/boost/type_traits/remove_reference.hpp | 59 + Slang/boost/type_traits/remove_volatile.hpp | 39 + Slang/boost/type_traits/same_traits.hpp | 15 + Slang/boost/type_traits/transform_traits.hpp | 21 + Slang/boost/type_traits/type_identity.hpp | 31 + .../boost/type_traits/type_with_alignment.hpp | 260 + Slang/boost/units/absolute.hpp | 153 + Slang/boost/units/base_dimension.hpp | 107 + Slang/boost/units/base_unit.hpp | 128 + .../units/base_units/angle/arcminute.hpp | 36 + .../units/base_units/angle/arcsecond.hpp | 37 + Slang/boost/units/base_units/angle/degree.hpp | 27 + .../boost/units/base_units/angle/gradian.hpp | 27 + Slang/boost/units/base_units/angle/radian.hpp | 48 + .../units/base_units/angle/revolution.hpp | 36 + .../units/base_units/angle/steradian.hpp | 48 + .../astronomical/astronomical_unit.hpp | 27 + .../base_units/astronomical/light_day.hpp | 39 + .../base_units/astronomical/light_hour.hpp | 39 + .../base_units/astronomical/light_minute.hpp | 39 + .../base_units/astronomical/light_second.hpp | 27 + .../base_units/astronomical/light_year.hpp | 39 + .../units/base_units/astronomical/parsec.hpp | 27 + Slang/boost/units/base_units/cgs/biot.hpp | 31 + .../boost/units/base_units/cgs/centimeter.hpp | 31 + Slang/boost/units/base_units/cgs/gram.hpp | 49 + .../units/base_units/imperial/conversions.hpp | 46 + .../units/base_units/imperial/drachm.hpp | 39 + .../units/base_units/imperial/fluid_ounce.hpp | 39 + .../boost/units/base_units/imperial/foot.hpp | 39 + .../units/base_units/imperial/furlong.hpp | 39 + .../units/base_units/imperial/gallon.hpp | 40 + .../boost/units/base_units/imperial/gill.hpp | 40 + .../boost/units/base_units/imperial/grain.hpp | 39 + .../base_units/imperial/hundredweight.hpp | 39 + .../boost/units/base_units/imperial/inch.hpp | 39 + .../units/base_units/imperial/league.hpp | 39 + .../boost/units/base_units/imperial/mile.hpp | 39 + .../boost/units/base_units/imperial/ounce.hpp | 39 + .../boost/units/base_units/imperial/pint.hpp | 29 + .../boost/units/base_units/imperial/pound.hpp | 34 + .../boost/units/base_units/imperial/quart.hpp | 40 + .../units/base_units/imperial/quarter.hpp | 39 + .../boost/units/base_units/imperial/stone.hpp | 39 + .../boost/units/base_units/imperial/thou.hpp | 39 + Slang/boost/units/base_units/imperial/ton.hpp | 40 + .../boost/units/base_units/imperial/yard.hpp | 32 + .../units/base_units/information/bit.hpp | 41 + .../units/base_units/information/byte.hpp | 36 + .../units/base_units/information/hartley.hpp | 30 + .../units/base_units/information/nat.hpp | 30 + .../units/base_units/information/shannon.hpp | 36 + .../units/base_units/metric/angstrom.hpp | 37 + Slang/boost/units/base_units/metric/are.hpp | 19 + .../units/base_units/metric/atmosphere.hpp | 19 + Slang/boost/units/base_units/metric/bar.hpp | 19 + Slang/boost/units/base_units/metric/barn.hpp | 19 + Slang/boost/units/base_units/metric/day.hpp | 39 + Slang/boost/units/base_units/metric/fermi.hpp | 36 + .../boost/units/base_units/metric/hectare.hpp | 19 + Slang/boost/units/base_units/metric/hour.hpp | 37 + Slang/boost/units/base_units/metric/knot.hpp | 19 + Slang/boost/units/base_units/metric/liter.hpp | 19 + .../boost/units/base_units/metric/micron.hpp | 36 + .../boost/units/base_units/metric/minute.hpp | 37 + Slang/boost/units/base_units/metric/mmHg.hpp | 19 + .../units/base_units/metric/nautical_mile.hpp | 36 + Slang/boost/units/base_units/metric/ton.hpp | 39 + Slang/boost/units/base_units/metric/torr.hpp | 19 + Slang/boost/units/base_units/metric/year.hpp | 38 + Slang/boost/units/base_units/si/ampere.hpp | 48 + Slang/boost/units/base_units/si/candela.hpp | 48 + Slang/boost/units/base_units/si/kelvin.hpp | 48 + Slang/boost/units/base_units/si/kilogram.hpp | 31 + Slang/boost/units/base_units/si/meter.hpp | 50 + Slang/boost/units/base_units/si/mole.hpp | 48 + Slang/boost/units/base_units/si/second.hpp | 48 + .../units/base_units/temperature/celsius.hpp | 48 + .../base_units/temperature/conversions.hpp | 42 + .../base_units/temperature/fahrenheit.hpp | 48 + Slang/boost/units/base_units/us/cup.hpp | 39 + Slang/boost/units/base_units/us/dram.hpp | 39 + .../boost/units/base_units/us/fluid_dram.hpp | 39 + .../boost/units/base_units/us/fluid_ounce.hpp | 39 + Slang/boost/units/base_units/us/foot.hpp | 39 + Slang/boost/units/base_units/us/gallon.hpp | 39 + Slang/boost/units/base_units/us/gill.hpp | 39 + Slang/boost/units/base_units/us/grain.hpp | 39 + .../units/base_units/us/hundredweight.hpp | 40 + Slang/boost/units/base_units/us/inch.hpp | 39 + Slang/boost/units/base_units/us/mil.hpp | 39 + Slang/boost/units/base_units/us/mile.hpp | 39 + Slang/boost/units/base_units/us/minim.hpp | 39 + Slang/boost/units/base_units/us/ounce.hpp | 39 + Slang/boost/units/base_units/us/pint.hpp | 28 + Slang/boost/units/base_units/us/pound.hpp | 32 + .../boost/units/base_units/us/pound_force.hpp | 32 + Slang/boost/units/base_units/us/quart.hpp | 39 + .../boost/units/base_units/us/tablespoon.hpp | 39 + Slang/boost/units/base_units/us/teaspoon.hpp | 39 + Slang/boost/units/base_units/us/ton.hpp | 39 + Slang/boost/units/base_units/us/yard.hpp | 32 + Slang/boost/units/cmath.hpp | 729 +++ Slang/boost/units/config.hpp | 98 + Slang/boost/units/conversion.hpp | 186 + Slang/boost/units/derived_dimension.hpp | 208 + Slang/boost/units/detail/absolute_impl.hpp | 104 + Slang/boost/units/detail/cmath_impl.hpp | 154 + Slang/boost/units/detail/conversion_impl.hpp | 452 ++ Slang/boost/units/detail/dim_impl.hpp | 90 + Slang/boost/units/detail/dimension_impl.hpp | 347 ++ Slang/boost/units/detail/dimension_list.hpp | 133 + .../boost/units/detail/dimensionless_unit.hpp | 88 + .../units/detail/heterogeneous_conversion.hpp | 309 + Slang/boost/units/detail/linear_algebra.hpp | 1060 ++++ Slang/boost/units/detail/one.hpp | 117 + Slang/boost/units/detail/ordinal.hpp | 49 + .../units/detail/prevent_redefinition.hpp | 56 + Slang/boost/units/detail/push_front_if.hpp | 48 + .../boost/units/detail/push_front_or_add.hpp | 84 + Slang/boost/units/detail/sort.hpp | 109 + .../units/detail/static_rational_power.hpp | 201 + Slang/boost/units/detail/unscale.hpp | 249 + Slang/boost/units/detail/utility.hpp | 57 + Slang/boost/units/dim.hpp | 167 + Slang/boost/units/dimension.hpp | 150 + Slang/boost/units/dimensionless_quantity.hpp | 37 + Slang/boost/units/dimensionless_type.hpp | 55 + Slang/boost/units/dimensionless_unit.hpp | 37 + Slang/boost/units/get_dimension.hpp | 54 + Slang/boost/units/get_system.hpp | 51 + Slang/boost/units/heterogeneous_system.hpp | 428 ++ Slang/boost/units/homogeneous_system.hpp | 105 + Slang/boost/units/io.hpp | 1076 ++++ Slang/boost/units/is_dim.hpp | 42 + Slang/boost/units/is_dimension_list.hpp | 47 + Slang/boost/units/is_dimensionless.hpp | 47 + .../boost/units/is_dimensionless_quantity.hpp | 34 + Slang/boost/units/is_dimensionless_unit.hpp | 34 + Slang/boost/units/is_quantity.hpp | 42 + .../boost/units/is_quantity_of_dimension.hpp | 42 + Slang/boost/units/is_quantity_of_system.hpp | 42 + Slang/boost/units/is_unit.hpp | 41 + Slang/boost/units/is_unit_of_dimension.hpp | 46 + Slang/boost/units/is_unit_of_system.hpp | 46 + Slang/boost/units/lambda.hpp | 593 ++ Slang/boost/units/limits.hpp | 76 + Slang/boost/units/make_scaled_unit.hpp | 60 + Slang/boost/units/make_system.hpp | 145 + Slang/boost/units/operators.hpp | 164 + Slang/boost/units/physical_dimensions.hpp | 90 + .../physical_dimensions/absorbed_dose.hpp | 30 + .../physical_dimensions/acceleration.hpp | 30 + .../units/physical_dimensions/action.hpp | 32 + .../units/physical_dimensions/activity.hpp | 28 + .../units/physical_dimensions/amount.hpp | 49 + .../angular_acceleration.hpp | 30 + .../physical_dimensions/angular_momentum.hpp | 34 + .../physical_dimensions/angular_velocity.hpp | 30 + .../boost/units/physical_dimensions/area.hpp | 28 + .../units/physical_dimensions/capacitance.hpp | 34 + .../units/physical_dimensions/conductance.hpp | 34 + .../physical_dimensions/conductivity.hpp | 34 + .../units/physical_dimensions/current.hpp | 49 + .../physical_dimensions/dose_equivalent.hpp | 30 + .../physical_dimensions/dynamic_viscosity.hpp | 32 + .../physical_dimensions/electric_charge.hpp | 30 + .../electric_potential.hpp | 34 + .../units/physical_dimensions/energy.hpp | 32 + .../physical_dimensions/energy_density.hpp | 32 + .../boost/units/physical_dimensions/force.hpp | 32 + .../units/physical_dimensions/frequency.hpp | 28 + .../physical_dimensions/heat_capacity.hpp | 34 + .../units/physical_dimensions/illuminance.hpp | 32 + .../units/physical_dimensions/impedance.hpp | 34 + .../units/physical_dimensions/inductance.hpp | 34 + .../units/physical_dimensions/information.hpp | 44 + .../kinematic_viscosity.hpp | 30 + .../units/physical_dimensions/length.hpp | 49 + .../units/physical_dimensions/luminance.hpp | 30 + .../physical_dimensions/luminous_flux.hpp | 30 + .../luminous_intensity.hpp | 49 + .../magnetic_field_intensity.hpp | 30 + .../physical_dimensions/magnetic_flux.hpp | 34 + .../magnetic_flux_density.hpp | 32 + .../boost/units/physical_dimensions/mass.hpp | 49 + .../physical_dimensions/mass_density.hpp | 30 + .../physical_dimensions/molar_energy.hpp | 34 + .../molar_heat_capacity.hpp | 36 + .../physical_dimensions/moment_of_inertia.hpp | 32 + .../units/physical_dimensions/momentum.hpp | 32 + .../physical_dimensions/permeability.hpp | 34 + .../physical_dimensions/permittivity.hpp | 34 + .../units/physical_dimensions/plane_angle.hpp | 49 + .../boost/units/physical_dimensions/power.hpp | 32 + .../units/physical_dimensions/pressure.hpp | 32 + .../units/physical_dimensions/reluctance.hpp | 34 + .../units/physical_dimensions/resistance.hpp | 34 + .../units/physical_dimensions/resistivity.hpp | 34 + .../units/physical_dimensions/solid_angle.hpp | 49 + .../physical_dimensions/specific_energy.hpp | 30 + .../specific_heat_capacity.hpp | 32 + .../physical_dimensions/specific_volume.hpp | 30 + .../units/physical_dimensions/stress.hpp | 32 + .../physical_dimensions/surface_density.hpp | 30 + .../physical_dimensions/surface_tension.hpp | 31 + .../units/physical_dimensions/temperature.hpp | 49 + .../thermal_conductivity.hpp | 34 + .../boost/units/physical_dimensions/time.hpp | 49 + .../units/physical_dimensions/torque.hpp | 34 + .../units/physical_dimensions/velocity.hpp | 30 + .../units/physical_dimensions/volume.hpp | 28 + .../units/physical_dimensions/wavenumber.hpp | 28 + Slang/boost/units/pow.hpp | 115 + Slang/boost/units/quantity.hpp | 1280 +++++ Slang/boost/units/reduce_unit.hpp | 41 + Slang/boost/units/scale.hpp | 145 + Slang/boost/units/scaled_base_unit.hpp | 144 + Slang/boost/units/static_constant.hpp | 62 + Slang/boost/units/static_rational.hpp | 349 ++ Slang/boost/units/systems/abstract.hpp | 139 + Slang/boost/units/systems/angle/degrees.hpp | 42 + Slang/boost/units/systems/angle/gradians.hpp | 42 + .../boost/units/systems/angle/revolutions.hpp | 42 + Slang/boost/units/systems/cgs.hpp | 44 + .../boost/units/systems/cgs/acceleration.hpp | 34 + Slang/boost/units/systems/cgs/area.hpp | 36 + Slang/boost/units/systems/cgs/base.hpp | 46 + Slang/boost/units/systems/cgs/current.hpp | 33 + .../boost/units/systems/cgs/dimensionless.hpp | 30 + .../units/systems/cgs/dynamic_viscosity.hpp | 33 + Slang/boost/units/systems/cgs/energy.hpp | 34 + Slang/boost/units/systems/cgs/force.hpp | 34 + Slang/boost/units/systems/cgs/frequency.hpp | 31 + Slang/boost/units/systems/cgs/io.hpp | 50 + .../units/systems/cgs/kinematic_viscosity.hpp | 34 + Slang/boost/units/systems/cgs/length.hpp | 35 + Slang/boost/units/systems/cgs/mass.hpp | 36 + .../boost/units/systems/cgs/mass_density.hpp | 31 + Slang/boost/units/systems/cgs/momentum.hpp | 31 + Slang/boost/units/systems/cgs/power.hpp | 31 + Slang/boost/units/systems/cgs/pressure.hpp | 34 + Slang/boost/units/systems/cgs/time.hpp | 33 + Slang/boost/units/systems/cgs/velocity.hpp | 36 + Slang/boost/units/systems/cgs/volume.hpp | 36 + Slang/boost/units/systems/cgs/wavenumber.hpp | 38 + .../boost/units/systems/detail/constants.hpp | 278 + Slang/boost/units/systems/information.hpp | 20 + Slang/boost/units/systems/information/bit.hpp | 33 + .../boost/units/systems/information/byte.hpp | 45 + .../units/systems/information/hartley.hpp | 33 + Slang/boost/units/systems/information/nat.hpp | 33 + .../units/systems/information/prefixes.hpp | 45 + .../units/systems/information/shannon.hpp | 33 + Slang/boost/units/systems/si.hpp | 77 + .../boost/units/systems/si/absorbed_dose.hpp | 34 + Slang/boost/units/systems/si/acceleration.hpp | 36 + Slang/boost/units/systems/si/action.hpp | 31 + Slang/boost/units/systems/si/activity.hpp | 34 + Slang/boost/units/systems/si/amount.hpp | 33 + .../units/systems/si/angular_acceleration.hpp | 31 + .../units/systems/si/angular_momentum.hpp | 31 + .../units/systems/si/angular_velocity.hpp | 34 + Slang/boost/units/systems/si/area.hpp | 36 + Slang/boost/units/systems/si/base.hpp | 56 + Slang/boost/units/systems/si/capacitance.hpp | 34 + .../units/systems/si/catalytic_activity.hpp | 37 + .../systems/si/codata/alpha_constants.hpp | 66 + .../si/codata/atomic-nuclear_constants.hpp | 56 + .../systems/si/codata/deuteron_constants.hpp | 82 + .../si/codata/electromagnetic_constants.hpp | 75 + .../systems/si/codata/electron_constants.hpp | 106 + .../systems/si/codata/helion_constants.hpp | 78 + .../systems/si/codata/muon_constants.hpp | 84 + .../systems/si/codata/neutron_constants.hpp | 84 + .../si/codata/physico-chemical_constants.hpp | 79 + .../systems/si/codata/proton_constants.hpp | 98 + .../units/systems/si/codata/tau_constants.hpp | 72 + .../systems/si/codata/triton_constants.hpp | 80 + .../units/systems/si/codata/typedefs.hpp | 79 + .../systems/si/codata/universal_constants.hpp | 81 + .../units/systems/si/codata_constants.hpp | 19 + Slang/boost/units/systems/si/conductance.hpp | 36 + Slang/boost/units/systems/si/conductivity.hpp | 31 + Slang/boost/units/systems/si/current.hpp | 33 + .../boost/units/systems/si/dimensionless.hpp | 30 + .../units/systems/si/dose_equivalent.hpp | 34 + .../units/systems/si/dynamic_viscosity.hpp | 31 + .../units/systems/si/electric_charge.hpp | 34 + .../units/systems/si/electric_potential.hpp | 34 + Slang/boost/units/systems/si/energy.hpp | 34 + Slang/boost/units/systems/si/force.hpp | 34 + Slang/boost/units/systems/si/frequency.hpp | 33 + Slang/boost/units/systems/si/illuminance.hpp | 33 + Slang/boost/units/systems/si/impedance.hpp | 31 + Slang/boost/units/systems/si/inductance.hpp | 34 + Slang/boost/units/systems/si/io.hpp | 88 + .../units/systems/si/kinematic_viscosity.hpp | 31 + Slang/boost/units/systems/si/length.hpp | 35 + .../boost/units/systems/si/luminous_flux.hpp | 34 + .../units/systems/si/luminous_intensity.hpp | 33 + .../systems/si/magnetic_field_intensity.hpp | 31 + .../boost/units/systems/si/magnetic_flux.hpp | 34 + .../systems/si/magnetic_flux_density.hpp | 34 + Slang/boost/units/systems/si/mass.hpp | 35 + Slang/boost/units/systems/si/mass_density.hpp | 36 + .../units/systems/si/moment_of_inertia.hpp | 31 + Slang/boost/units/systems/si/momentum.hpp | 31 + Slang/boost/units/systems/si/permeability.hpp | 31 + Slang/boost/units/systems/si/permittivity.hpp | 31 + Slang/boost/units/systems/si/plane_angle.hpp | 33 + Slang/boost/units/systems/si/power.hpp | 34 + Slang/boost/units/systems/si/prefixes.hpp | 77 + Slang/boost/units/systems/si/pressure.hpp | 49 + Slang/boost/units/systems/si/reluctance.hpp | 31 + Slang/boost/units/systems/si/resistance.hpp | 34 + Slang/boost/units/systems/si/resistivity.hpp | 31 + Slang/boost/units/systems/si/solid_angle.hpp | 33 + .../units/systems/si/surface_density.hpp | 36 + .../units/systems/si/surface_tension.hpp | 34 + Slang/boost/units/systems/si/temperature.hpp | 33 + Slang/boost/units/systems/si/time.hpp | 33 + Slang/boost/units/systems/si/torque.hpp | 34 + Slang/boost/units/systems/si/velocity.hpp | 36 + Slang/boost/units/systems/si/volume.hpp | 36 + Slang/boost/units/systems/si/wavenumber.hpp | 36 + .../units/systems/temperature/celsius.hpp | 40 + .../units/systems/temperature/fahrenheit.hpp | 40 + Slang/boost/units/unit.hpp | 448 ++ Slang/boost/units/units_fwd.hpp | 73 + Slang/boost/unordered/detail/fwd.hpp | 63 + .../boost/unordered/detail/implementation.hpp | 4952 +++++++++++++++++ Slang/boost/unordered/detail/map.hpp | 67 + Slang/boost/unordered/detail/set.hpp | 66 + Slang/boost/unordered/unordered_map.hpp | 2589 +++++++++ Slang/boost/unordered/unordered_map_fwd.hpp | 64 + Slang/boost/unordered/unordered_set.hpp | 2101 +++++++ Slang/boost/unordered/unordered_set_fwd.hpp | 62 + Slang/boost/unordered_map.hpp | 19 + Slang/boost/unordered_set.hpp | 19 + Slang/boost/utility.hpp | 24 + Slang/boost/utility/addressof.hpp | 17 + Slang/boost/utility/base_from_member.hpp | 173 + Slang/boost/utility/binary.hpp | 709 +++ Slang/boost/utility/compare_pointees.hpp | 76 + Slang/boost/utility/declval.hpp | 13 + .../detail/in_place_factory_prefix.hpp | 36 + .../detail/in_place_factory_suffix.hpp | 23 + Slang/boost/utility/detail/minstd_rand.hpp | 58 + .../utility/detail/result_of_iterate.hpp | 218 + .../utility/detail/result_of_variadic.hpp | 190 + Slang/boost/utility/enable_if.hpp | 17 + .../boost/utility/explicit_operator_bool.hpp | 17 + Slang/boost/utility/identity_type.hpp | 46 + Slang/boost/utility/in_place_factory.hpp | 92 + Slang/boost/utility/result_of.hpp | 249 + Slang/boost/utility/string_ref.hpp | 516 ++ Slang/boost/utility/string_ref_fwd.hpp | 37 + Slang/boost/utility/string_view.hpp | 673 +++ Slang/boost/utility/string_view_fwd.hpp | 39 + Slang/boost/utility/swap.hpp | 17 + .../boost/utility/typed_in_place_factory.hpp | 82 + Slang/boost/utility/value_init.hpp | 247 + Slang/boost/variant.hpp | 27 + Slang/boost/variant2.hpp | 10 + Slang/boost/version.hpp | 32 + Slang/boost/visit_each.hpp | 27 + Slang/boost/wave.hpp | 23 + Slang/boost/weak_ptr.hpp | 18 + Slang/build/boost/align.hpp | 22 + Slang/build/boost/aligned_storage.hpp | 18 + Slang/build/boost/any.hpp | 344 ++ Slang/build/boost/any/bad_any_cast.hpp | 43 + Slang/build/boost/any/basic_any.hpp | 480 ++ Slang/build/boost/any/fwd.hpp | 40 + Slang/build/boost/array.hpp | 456 ++ Slang/build/boost/asio.hpp | 200 + Slang/build/boost/assert.hpp | 85 + Slang/build/boost/assign.hpp | 24 + Slang/build/boost/atomic.hpp | 27 + Slang/build/boost/beast.hpp | 21 + Slang/build/boost/bimap.hpp | 19 + Slang/build/boost/bind.hpp | 60 + Slang/build/boost/blank.hpp | 106 + Slang/build/boost/blank_fwd.hpp | 22 + Slang/build/boost/call_traits.hpp | 20 + Slang/build/boost/callable_traits.hpp | 47 + Slang/build/boost/cast.hpp | 20 + Slang/build/boost/cerrno.hpp | 15 + Slang/build/boost/checked_delete.hpp | 17 + Slang/build/boost/chrono.hpp | 20 + Slang/build/boost/circular_buffer.hpp | 65 + Slang/build/boost/circular_buffer_fwd.hpp | 43 + Slang/build/boost/compressed_pair.hpp | 20 + Slang/build/boost/compute.hpp | 44 + Slang/build/boost/concept_archetype.hpp | 670 +++ Slang/build/boost/concept_check.hpp | 1082 ++++ Slang/build/boost/config.hpp | 67 + Slang/build/boost/contract.hpp | 44 + Slang/build/boost/contract_macro.hpp | 1409 +++++ Slang/build/boost/convert.hpp | 209 + Slang/build/boost/core/addressof.hpp | 274 + Slang/build/boost/core/alloc_construct.hpp | 169 + Slang/build/boost/core/allocator_access.hpp | 601 ++ Slang/build/boost/core/bit.hpp | 592 ++ Slang/build/boost/core/checked_delete.hpp | 71 + Slang/build/boost/core/cmath.hpp | 298 + Slang/build/boost/core/default_allocator.hpp | 148 + Slang/build/boost/core/demangle.hpp | 126 + Slang/build/boost/core/detail/splitmix64.hpp | 54 + Slang/build/boost/core/detail/string_view.hpp | 1205 ++++ Slang/build/boost/core/empty_value.hpp | 155 + Slang/build/boost/core/enable_if.hpp | 128 + Slang/build/boost/core/exchange.hpp | 49 + .../boost/core/explicit_operator_bool.hpp | 163 + Slang/build/boost/core/first_scalar.hpp | 45 + Slang/build/boost/core/ignore_unused.hpp | 100 + Slang/build/boost/core/is_same.hpp | 40 + Slang/build/boost/core/lightweight_test.hpp | 591 ++ .../boost/core/lightweight_test_trait.hpp | 91 + .../boost/core/no_exceptions_support.hpp | 56 + Slang/build/boost/core/noinit_adaptor.hpp | 88 + Slang/build/boost/core/noncopyable.hpp | 63 + Slang/build/boost/core/null_deleter.hpp | 44 + Slang/build/boost/core/nvp.hpp | 57 + Slang/build/boost/core/pointer_traits.hpp | 234 + Slang/build/boost/core/quick_exit.hpp | 59 + Slang/build/boost/core/ref.hpp | 338 ++ Slang/build/boost/core/scoped_enum.hpp | 194 + Slang/build/boost/core/span.hpp | 407 ++ Slang/build/boost/core/swap.hpp | 70 + Slang/build/boost/core/type_name.hpp | 1137 ++++ Slang/build/boost/core/typeinfo.hpp | 167 + .../build/boost/core/uncaught_exceptions.hpp | 155 + Slang/build/boost/core/underlying_type.hpp | 79 + Slang/build/boost/core/use_default.hpp | 17 + Slang/build/boost/crc.hpp | 2306 ++++++++ Slang/build/boost/cregex.hpp | 43 + Slang/build/boost/cstdfloat.hpp | 58 + Slang/build/boost/cstdint.hpp | 556 ++ Slang/build/boost/cstdlib.hpp | 41 + Slang/build/boost/current_function.hpp | 75 + Slang/build/boost/cxx11_char_types.hpp | 70 + Slang/build/boost/date_time.hpp | 17 + Slang/build/boost/describe.hpp | 20 + Slang/build/boost/dll.hpp | 27 + Slang/build/boost/dynamic_bitset.hpp | 17 + Slang/build/boost/dynamic_bitset_fwd.hpp | 25 + Slang/build/boost/enable_shared_from_this.hpp | 18 + Slang/build/boost/endian.hpp | 13 + Slang/build/boost/exception_ptr.hpp | 11 + Slang/build/boost/filesystem.hpp | 24 + Slang/build/boost/flyweight.hpp | 22 + Slang/build/boost/foreach.hpp | 1134 ++++ Slang/build/boost/foreach_fwd.hpp | 51 + Slang/build/boost/format.hpp | 59 + Slang/build/boost/function.hpp | 74 + Slang/build/boost/function_equal.hpp | 28 + .../build/boost/function_output_iterator.hpp | 18 + Slang/build/boost/functional.hpp | 581 ++ Slang/build/boost/generator_iterator.hpp | 85 + Slang/build/boost/geometry.hpp | 19 + Slang/build/boost/get_pointer.hpp | 76 + Slang/build/boost/gil.hpp | 49 + Slang/build/boost/hana.hpp | 209 + Slang/build/boost/histogram.hpp | 37 + Slang/build/boost/hof.hpp | 63 + Slang/build/boost/implicit_cast.hpp | 38 + Slang/build/boost/indirect_reference.hpp | 43 + Slang/build/boost/integer.hpp | 262 + Slang/build/boost/integer_fwd.hpp | 190 + Slang/build/boost/integer_traits.hpp | 256 + Slang/build/boost/intrusive_ptr.hpp | 18 + Slang/build/boost/io_fwd.hpp | 63 + Slang/build/boost/is_placeholder.hpp | 31 + Slang/build/boost/iterator.hpp | 20 + Slang/build/boost/iterator_adaptors.hpp | 13 + Slang/build/boost/json.hpp | 46 + Slang/build/boost/lambda2.hpp | 10 + Slang/build/boost/leaf.hpp | 11 + Slang/build/boost/lexical_cast.hpp | 105 + Slang/build/boost/limits.hpp | 146 + Slang/build/boost/local_function.hpp | 459 ++ Slang/build/boost/locale.hpp | 27 + Slang/build/boost/make_default.hpp | 40 + Slang/build/boost/make_shared.hpp | 16 + Slang/build/boost/make_unique.hpp | 13 + Slang/build/boost/math_fwd.hpp | 42 + Slang/build/boost/mem_fn.hpp | 24 + Slang/build/boost/memory_order.hpp | 82 + Slang/build/boost/metaparse.hpp | 118 + Slang/build/boost/mp11.hpp | 22 + Slang/build/boost/mpi.hpp | 35 + Slang/build/boost/multi_array.hpp | 572 ++ Slang/build/boost/multi_index_container.hpp | 1578 ++++++ .../build/boost/multi_index_container_fwd.hpp | 121 + Slang/build/boost/next_prior.hpp | 195 + Slang/build/boost/non_type.hpp | 27 + Slang/build/boost/noncopyable.hpp | 17 + Slang/build/boost/nondet_random.hpp | 22 + Slang/build/boost/none.hpp | 59 + Slang/build/boost/none_t.hpp | 41 + Slang/build/boost/operators.hpp | 920 +++ Slang/build/boost/operators_v1.hpp | 951 ++++ Slang/build/boost/optional.hpp | 18 + Slang/build/boost/outcome.hpp | 33 + Slang/build/boost/parameter.hpp | 30 + Slang/build/boost/pfr.hpp | 21 + Slang/build/boost/phoenix.hpp | 13 + Slang/build/boost/pointee.hpp | 76 + Slang/build/boost/pointer_cast.hpp | 122 + Slang/build/boost/pointer_to_other.hpp | 55 + Slang/build/boost/polymorphic_cast.hpp | 126 + .../build/boost/polymorphic_pointer_cast.hpp | 78 + Slang/build/boost/predef.h | 24 + Slang/build/boost/preprocessor.hpp | 19 + Slang/build/boost/process.hpp | 42 + Slang/build/boost/program_options.hpp | 25 + Slang/build/boost/progress.hpp | 145 + Slang/build/boost/python.hpp | 75 + Slang/build/boost/qvm.hpp | 11 + Slang/build/boost/qvm_lite.hpp | 11 + Slang/build/boost/random.hpp | 92 + Slang/build/boost/range.hpp | 23 + Slang/build/boost/ratio.hpp | 14 + Slang/build/boost/rational.hpp | 1046 ++++ Slang/build/boost/ref.hpp | 17 + Slang/build/boost/regex.h | 100 + Slang/build/boost/regex.hpp | 41 + Slang/build/boost/regex_fwd.hpp | 37 + Slang/build/boost/scope_exit.hpp | 1414 +++++ Slang/build/boost/scoped_array.hpp | 15 + Slang/build/boost/scoped_ptr.hpp | 15 + Slang/build/boost/shared_array.hpp | 19 + .../build/boost/shared_container_iterator.hpp | 69 + Slang/build/boost/shared_ptr.hpp | 19 + Slang/build/boost/signals2.hpp | 23 + Slang/build/boost/smart_ptr.hpp | 26 + Slang/build/boost/spirit.hpp | 27 + Slang/build/boost/stacktrace.hpp | 19 + Slang/build/boost/static_assert.hpp | 181 + Slang/build/boost/static_string.hpp | 13 + Slang/build/boost/swap.hpp | 17 + Slang/build/boost/system.hpp | 17 + Slang/build/boost/thread.hpp | 26 + Slang/build/boost/throw_exception.hpp | 181 + Slang/build/boost/timer.hpp | 75 + Slang/build/boost/token_functions.hpp | 653 +++ Slang/build/boost/token_iterator.hpp | 131 + Slang/build/boost/tokenizer.hpp | 98 + Slang/build/boost/type.hpp | 18 + Slang/build/boost/type_index.hpp | 265 + .../boost/type_index/ctti_type_index.hpp | 213 + .../detail/compile_time_type_info.hpp | 339 ++ .../type_index/detail/ctti_register_class.hpp | 40 + .../type_index/detail/stl_register_class.hpp | 40 + Slang/build/boost/type_index/runtime_cast.hpp | 28 + .../runtime_cast/boost_shared_ptr_cast.hpp | 49 + .../runtime_cast/detail/runtime_cast_impl.hpp | 57 + .../type_index/runtime_cast/pointer_cast.hpp | 74 + .../runtime_cast/reference_cast.hpp | 66 + .../runtime_cast/register_runtime_class.hpp | 138 + .../runtime_cast/std_shared_ptr_cast.hpp | 46 + .../build/boost/type_index/stl_type_index.hpp | 278 + .../boost/type_index/type_index_facade.hpp | 297 + Slang/build/boost/type_traits.hpp | 163 + Slang/build/boost/type_traits/add_const.hpp | 52 + Slang/build/boost/type_traits/add_cv.hpp | 47 + .../type_traits/add_lvalue_reference.hpp | 33 + Slang/build/boost/type_traits/add_pointer.hpp | 67 + .../build/boost/type_traits/add_reference.hpp | 66 + .../type_traits/add_rvalue_reference.hpp | 70 + .../build/boost/type_traits/add_volatile.hpp | 46 + .../boost/type_traits/aligned_storage.hpp | 138 + .../build/boost/type_traits/alignment_of.hpp | 119 + .../boost/type_traits/alignment_traits.hpp | 15 + .../boost/type_traits/arithmetic_traits.hpp | 20 + .../build/boost/type_traits/array_traits.hpp | 15 + .../type_traits/broken_compiler_spec.hpp | 21 + Slang/build/boost/type_traits/common_type.hpp | 152 + .../boost/type_traits/composite_traits.hpp | 29 + Slang/build/boost/type_traits/conditional.hpp | 28 + Slang/build/boost/type_traits/config.hpp | 21 + Slang/build/boost/type_traits/conjunction.hpp | 40 + .../boost/type_traits/conversion_traits.hpp | 17 + Slang/build/boost/type_traits/copy_cv.hpp | 40 + Slang/build/boost/type_traits/copy_cv_ref.hpp | 31 + .../boost/type_traits/copy_reference.hpp | 35 + Slang/build/boost/type_traits/cv_traits.hpp | 24 + Slang/build/boost/type_traits/decay.hpp | 49 + Slang/build/boost/type_traits/declval.hpp | 44 + .../type_traits/detail/bool_trait_def.hpp | 179 + .../type_traits/detail/bool_trait_undef.hpp | 28 + .../detail/common_arithmetic_type.hpp | 220 + .../type_traits/detail/common_type_impl.hpp | 107 + .../detail/composite_member_pointer_type.hpp | 113 + .../detail/composite_pointer_type.hpp | 153 + .../build/boost/type_traits/detail/config.hpp | 113 + .../boost/type_traits/detail/detector.hpp | 37 + .../detail/has_binary_operator.hpp | 279 + .../detail/has_postfix_operator.hpp | 250 + .../detail/has_prefix_operator.hpp | 280 + .../boost/type_traits/detail/ice_and.hpp | 42 + .../build/boost/type_traits/detail/ice_eq.hpp | 43 + .../boost/type_traits/detail/ice_not.hpp | 38 + .../build/boost/type_traits/detail/ice_or.hpp | 41 + .../type_traits/detail/is_function_cxx_03.hpp | 108 + .../type_traits/detail/is_function_cxx_11.hpp | 676 +++ .../detail/is_function_msvc10_fix.hpp | 30 + .../detail/is_function_ptr_helper.hpp | 444 ++ .../detail/is_function_ptr_tester.hpp | 609 ++ .../type_traits/detail/is_likely_lambda.hpp | 95 + .../detail/is_mem_fun_pointer_impl.hpp | 1328 +++++ .../detail/is_mem_fun_pointer_tester.hpp | 1603 ++++++ .../is_member_function_pointer_cxx_03.hpp | 117 + .../is_member_function_pointer_cxx_11.hpp | 697 +++ .../detail/is_rvalue_reference_msvc10_fix.hpp | 43 + .../boost/type_traits/detail/mp_defer.hpp | 56 + .../detail/template_arity_spec.hpp | 16 + .../boost/type_traits/detail/yes_no_type.hpp | 26 + Slang/build/boost/type_traits/detected.hpp | 24 + Slang/build/boost/type_traits/detected_or.hpp | 25 + Slang/build/boost/type_traits/disjunction.hpp | 40 + Slang/build/boost/type_traits/enable_if.hpp | 37 + Slang/build/boost/type_traits/extent.hpp | 139 + .../type_traits/floating_point_promotion.hpp | 28 + .../boost/type_traits/function_traits.hpp | 174 + Slang/build/boost/type_traits/has_bit_and.hpp | 49 + .../boost/type_traits/has_bit_and_assign.hpp | 55 + Slang/build/boost/type_traits/has_bit_or.hpp | 49 + .../boost/type_traits/has_bit_or_assign.hpp | 55 + Slang/build/boost/type_traits/has_bit_xor.hpp | 49 + .../boost/type_traits/has_bit_xor_assign.hpp | 55 + .../boost/type_traits/has_complement.hpp | 32 + .../boost/type_traits/has_dereference.hpp | 375 ++ Slang/build/boost/type_traits/has_divides.hpp | 40 + .../boost/type_traits/has_divides_assign.hpp | 47 + .../build/boost/type_traits/has_equal_to.hpp | 52 + Slang/build/boost/type_traits/has_greater.hpp | 52 + .../boost/type_traits/has_greater_equal.hpp | 52 + .../boost/type_traits/has_left_shift.hpp | 49 + .../type_traits/has_left_shift_assign.hpp | 55 + Slang/build/boost/type_traits/has_less.hpp | 52 + .../boost/type_traits/has_less_equal.hpp | 52 + .../boost/type_traits/has_logical_and.hpp | 40 + .../boost/type_traits/has_logical_not.hpp | 32 + .../boost/type_traits/has_logical_or.hpp | 40 + Slang/build/boost/type_traits/has_minus.hpp | 158 + .../boost/type_traits/has_minus_assign.hpp | 163 + Slang/build/boost/type_traits/has_modulus.hpp | 49 + .../boost/type_traits/has_modulus_assign.hpp | 55 + .../boost/type_traits/has_multiplies.hpp | 40 + .../type_traits/has_multiplies_assign.hpp | 47 + Slang/build/boost/type_traits/has_negate.hpp | 25 + .../boost/type_traits/has_new_operator.hpp | 147 + .../boost/type_traits/has_not_equal_to.hpp | 52 + .../boost/type_traits/has_nothrow_assign.hpp | 84 + .../type_traits/has_nothrow_constructor.hpp | 73 + .../boost/type_traits/has_nothrow_copy.hpp | 82 + .../type_traits/has_nothrow_destructor.hpp | 56 + .../build/boost/type_traits/has_operator.hpp | 51 + Slang/build/boost/type_traits/has_plus.hpp | 54 + .../boost/type_traits/has_plus_assign.hpp | 161 + .../boost/type_traits/has_post_decrement.hpp | 65 + .../boost/type_traits/has_post_increment.hpp | 65 + .../boost/type_traits/has_pre_decrement.hpp | 65 + .../boost/type_traits/has_pre_increment.hpp | 66 + .../boost/type_traits/has_right_shift.hpp | 49 + .../type_traits/has_right_shift_assign.hpp | 55 + .../boost/type_traits/has_trivial_assign.hpp | 52 + .../type_traits/has_trivial_constructor.hpp | 57 + .../boost/type_traits/has_trivial_copy.hpp | 63 + .../type_traits/has_trivial_destructor.hpp | 48 + .../type_traits/has_trivial_move_assign.hpp | 73 + .../has_trivial_move_constructor.hpp | 79 + .../boost/type_traits/has_unary_minus.hpp | 25 + .../boost/type_traits/has_unary_plus.hpp | 23 + .../type_traits/has_virtual_destructor.hpp | 26 + Slang/build/boost/type_traits/ice.hpp | 20 + .../boost/type_traits/integral_constant.hpp | 97 + .../boost/type_traits/integral_promotion.hpp | 187 + Slang/build/boost/type_traits/intrinsics.hpp | 391 ++ Slang/build/boost/type_traits/is_abstract.hpp | 150 + .../build/boost/type_traits/is_arithmetic.hpp | 22 + Slang/build/boost/type_traits/is_array.hpp | 43 + .../build/boost/type_traits/is_assignable.hpp | 85 + .../boost/type_traits/is_base_and_derived.hpp | 244 + Slang/build/boost/type_traits/is_base_of.hpp | 39 + .../boost/type_traits/is_base_of_tr1.hpp | 37 + .../boost/type_traits/is_bounded_array.hpp | 42 + Slang/build/boost/type_traits/is_class.hpp | 114 + Slang/build/boost/type_traits/is_complete.hpp | 92 + Slang/build/boost/type_traits/is_complex.hpp | 25 + Slang/build/boost/type_traits/is_compound.hpp | 24 + Slang/build/boost/type_traits/is_const.hpp | 47 + .../boost/type_traits/is_constructible.hpp | 90 + .../boost/type_traits/is_convertible.hpp | 506 ++ .../boost/type_traits/is_copy_assignable.hpp | 140 + .../type_traits/is_copy_constructible.hpp | 185 + .../type_traits/is_default_constructible.hpp | 98 + .../boost/type_traits/is_destructible.hpp | 69 + Slang/build/boost/type_traits/is_detected.hpp | 29 + .../type_traits/is_detected_convertible.hpp | 29 + .../boost/type_traits/is_detected_exact.hpp | 29 + Slang/build/boost/type_traits/is_empty.hpp | 120 + Slang/build/boost/type_traits/is_enum.hpp | 166 + Slang/build/boost/type_traits/is_final.hpp | 30 + Slang/build/boost/type_traits/is_float.hpp | 20 + .../boost/type_traits/is_floating_point.hpp | 30 + Slang/build/boost/type_traits/is_function.hpp | 27 + .../boost/type_traits/is_fundamental.hpp | 26 + Slang/build/boost/type_traits/is_integral.hpp | 89 + .../type_traits/is_list_constructible.hpp | 48 + .../boost/type_traits/is_lvalue_reference.hpp | 50 + .../is_member_function_pointer.hpp | 26 + .../type_traits/is_member_object_pointer.hpp | 24 + .../boost/type_traits/is_member_pointer.hpp | 45 + .../boost/type_traits/is_noncopyable.hpp | 39 + .../is_nothrow_move_assignable.hpp | 92 + .../is_nothrow_move_constructible.hpp | 97 + .../type_traits/is_nothrow_swappable.hpp | 67 + Slang/build/boost/type_traits/is_object.hpp | 28 + Slang/build/boost/type_traits/is_pod.hpp | 59 + Slang/build/boost/type_traits/is_pointer.hpp | 47 + .../boost/type_traits/is_polymorphic.hpp | 122 + .../build/boost/type_traits/is_reference.hpp | 30 + .../boost/type_traits/is_rvalue_reference.hpp | 29 + Slang/build/boost/type_traits/is_same.hpp | 41 + Slang/build/boost/type_traits/is_scalar.hpp | 27 + .../boost/type_traits/is_scoped_enum.hpp | 26 + Slang/build/boost/type_traits/is_signed.hpp | 163 + .../build/boost/type_traits/is_stateless.hpp | 33 + .../type_traits/is_trivially_copyable.hpp | 31 + .../boost/type_traits/is_unbounded_array.hpp | 41 + Slang/build/boost/type_traits/is_union.hpp | 31 + .../boost/type_traits/is_unscoped_enum.hpp | 25 + Slang/build/boost/type_traits/is_unsigned.hpp | 163 + .../boost/type_traits/is_virtual_base_of.hpp | 146 + Slang/build/boost/type_traits/is_void.hpp | 26 + Slang/build/boost/type_traits/is_volatile.hpp | 46 + Slang/build/boost/type_traits/make_signed.hpp | 137 + .../build/boost/type_traits/make_unsigned.hpp | 136 + Slang/build/boost/type_traits/make_void.hpp | 52 + Slang/build/boost/type_traits/negation.hpp | 23 + Slang/build/boost/type_traits/nonesuch.hpp | 35 + .../build/boost/type_traits/object_traits.hpp | 33 + Slang/build/boost/type_traits/promote.hpp | 26 + Slang/build/boost/type_traits/rank.hpp | 87 + .../boost/type_traits/reference_traits.hpp | 15 + .../boost/type_traits/remove_all_extents.hpp | 41 + .../build/boost/type_traits/remove_bounds.hpp | 28 + .../build/boost/type_traits/remove_const.hpp | 39 + Slang/build/boost/type_traits/remove_cv.hpp | 45 + .../build/boost/type_traits/remove_cv_ref.hpp | 30 + .../build/boost/type_traits/remove_extent.hpp | 41 + .../boost/type_traits/remove_pointer.hpp | 84 + .../boost/type_traits/remove_reference.hpp | 59 + .../boost/type_traits/remove_volatile.hpp | 39 + Slang/build/boost/type_traits/same_traits.hpp | 15 + .../boost/type_traits/transform_traits.hpp | 21 + .../build/boost/type_traits/type_identity.hpp | 31 + .../boost/type_traits/type_with_alignment.hpp | 260 + Slang/build/boost/units/absolute.hpp | 153 + Slang/build/boost/units/base_dimension.hpp | 107 + Slang/build/boost/units/base_unit.hpp | 128 + .../units/base_units/angle/arcminute.hpp | 36 + .../units/base_units/angle/arcsecond.hpp | 37 + .../boost/units/base_units/angle/degree.hpp | 27 + .../boost/units/base_units/angle/gradian.hpp | 27 + .../boost/units/base_units/angle/radian.hpp | 48 + .../units/base_units/angle/revolution.hpp | 36 + .../units/base_units/angle/steradian.hpp | 48 + .../astronomical/astronomical_unit.hpp | 27 + .../base_units/astronomical/light_day.hpp | 39 + .../base_units/astronomical/light_hour.hpp | 39 + .../base_units/astronomical/light_minute.hpp | 39 + .../base_units/astronomical/light_second.hpp | 27 + .../base_units/astronomical/light_year.hpp | 39 + .../units/base_units/astronomical/parsec.hpp | 27 + .../build/boost/units/base_units/cgs/biot.hpp | 31 + .../boost/units/base_units/cgs/centimeter.hpp | 31 + .../build/boost/units/base_units/cgs/gram.hpp | 49 + .../units/base_units/imperial/conversions.hpp | 46 + .../units/base_units/imperial/drachm.hpp | 39 + .../units/base_units/imperial/fluid_ounce.hpp | 39 + .../boost/units/base_units/imperial/foot.hpp | 39 + .../units/base_units/imperial/furlong.hpp | 39 + .../units/base_units/imperial/gallon.hpp | 40 + .../boost/units/base_units/imperial/gill.hpp | 40 + .../boost/units/base_units/imperial/grain.hpp | 39 + .../base_units/imperial/hundredweight.hpp | 39 + .../boost/units/base_units/imperial/inch.hpp | 39 + .../units/base_units/imperial/league.hpp | 39 + .../boost/units/base_units/imperial/mile.hpp | 39 + .../boost/units/base_units/imperial/ounce.hpp | 39 + .../boost/units/base_units/imperial/pint.hpp | 29 + .../boost/units/base_units/imperial/pound.hpp | 34 + .../boost/units/base_units/imperial/quart.hpp | 40 + .../units/base_units/imperial/quarter.hpp | 39 + .../boost/units/base_units/imperial/stone.hpp | 39 + .../boost/units/base_units/imperial/thou.hpp | 39 + .../boost/units/base_units/imperial/ton.hpp | 40 + .../boost/units/base_units/imperial/yard.hpp | 32 + .../units/base_units/information/bit.hpp | 41 + .../units/base_units/information/byte.hpp | 36 + .../units/base_units/information/hartley.hpp | 30 + .../units/base_units/information/nat.hpp | 30 + .../units/base_units/information/shannon.hpp | 36 + .../units/base_units/metric/angstrom.hpp | 37 + .../boost/units/base_units/metric/are.hpp | 19 + .../units/base_units/metric/atmosphere.hpp | 19 + .../boost/units/base_units/metric/bar.hpp | 19 + .../boost/units/base_units/metric/barn.hpp | 19 + .../boost/units/base_units/metric/day.hpp | 39 + .../boost/units/base_units/metric/fermi.hpp | 36 + .../boost/units/base_units/metric/hectare.hpp | 19 + .../boost/units/base_units/metric/hour.hpp | 37 + .../boost/units/base_units/metric/knot.hpp | 19 + .../boost/units/base_units/metric/liter.hpp | 19 + .../boost/units/base_units/metric/micron.hpp | 36 + .../boost/units/base_units/metric/minute.hpp | 37 + .../boost/units/base_units/metric/mmHg.hpp | 19 + .../units/base_units/metric/nautical_mile.hpp | 36 + .../boost/units/base_units/metric/ton.hpp | 39 + .../boost/units/base_units/metric/torr.hpp | 19 + .../boost/units/base_units/metric/year.hpp | 38 + .../boost/units/base_units/si/ampere.hpp | 48 + .../boost/units/base_units/si/candela.hpp | 48 + .../boost/units/base_units/si/kelvin.hpp | 48 + .../boost/units/base_units/si/kilogram.hpp | 31 + .../build/boost/units/base_units/si/meter.hpp | 50 + .../build/boost/units/base_units/si/mole.hpp | 48 + .../boost/units/base_units/si/second.hpp | 48 + .../units/base_units/temperature/celsius.hpp | 48 + .../base_units/temperature/conversions.hpp | 42 + .../base_units/temperature/fahrenheit.hpp | 48 + Slang/build/boost/units/base_units/us/cup.hpp | 39 + .../build/boost/units/base_units/us/dram.hpp | 39 + .../boost/units/base_units/us/fluid_dram.hpp | 39 + .../boost/units/base_units/us/fluid_ounce.hpp | 39 + .../build/boost/units/base_units/us/foot.hpp | 39 + .../boost/units/base_units/us/gallon.hpp | 39 + .../build/boost/units/base_units/us/gill.hpp | 39 + .../build/boost/units/base_units/us/grain.hpp | 39 + .../units/base_units/us/hundredweight.hpp | 40 + .../build/boost/units/base_units/us/inch.hpp | 39 + Slang/build/boost/units/base_units/us/mil.hpp | 39 + .../build/boost/units/base_units/us/mile.hpp | 39 + .../build/boost/units/base_units/us/minim.hpp | 39 + .../build/boost/units/base_units/us/ounce.hpp | 39 + .../build/boost/units/base_units/us/pint.hpp | 28 + .../build/boost/units/base_units/us/pound.hpp | 32 + .../boost/units/base_units/us/pound_force.hpp | 32 + .../build/boost/units/base_units/us/quart.hpp | 39 + .../boost/units/base_units/us/tablespoon.hpp | 39 + .../boost/units/base_units/us/teaspoon.hpp | 39 + Slang/build/boost/units/base_units/us/ton.hpp | 39 + .../build/boost/units/base_units/us/yard.hpp | 32 + Slang/build/boost/units/cmath.hpp | 729 +++ Slang/build/boost/units/config.hpp | 98 + Slang/build/boost/units/conversion.hpp | 186 + Slang/build/boost/units/derived_dimension.hpp | 208 + .../boost/units/detail/absolute_impl.hpp | 104 + Slang/build/boost/units/detail/cmath_impl.hpp | 154 + .../boost/units/detail/conversion_impl.hpp | 452 ++ Slang/build/boost/units/detail/dim_impl.hpp | 90 + .../boost/units/detail/dimension_impl.hpp | 347 ++ .../boost/units/detail/dimension_list.hpp | 133 + .../boost/units/detail/dimensionless_unit.hpp | 88 + .../units/detail/heterogeneous_conversion.hpp | 309 + .../boost/units/detail/linear_algebra.hpp | 1060 ++++ Slang/build/boost/units/detail/one.hpp | 117 + Slang/build/boost/units/detail/ordinal.hpp | 49 + .../units/detail/prevent_redefinition.hpp | 56 + .../boost/units/detail/push_front_if.hpp | 48 + .../boost/units/detail/push_front_or_add.hpp | 84 + Slang/build/boost/units/detail/sort.hpp | 109 + .../units/detail/static_rational_power.hpp | 201 + Slang/build/boost/units/detail/unscale.hpp | 249 + Slang/build/boost/units/detail/utility.hpp | 57 + Slang/build/boost/units/dim.hpp | 167 + Slang/build/boost/units/dimension.hpp | 150 + .../boost/units/dimensionless_quantity.hpp | 37 + .../build/boost/units/dimensionless_type.hpp | 55 + .../build/boost/units/dimensionless_unit.hpp | 37 + Slang/build/boost/units/get_dimension.hpp | 54 + Slang/build/boost/units/get_system.hpp | 51 + .../boost/units/heterogeneous_system.hpp | 428 ++ .../build/boost/units/homogeneous_system.hpp | 105 + Slang/build/boost/units/io.hpp | 1076 ++++ Slang/build/boost/units/is_dim.hpp | 42 + Slang/build/boost/units/is_dimension_list.hpp | 47 + Slang/build/boost/units/is_dimensionless.hpp | 47 + .../boost/units/is_dimensionless_quantity.hpp | 34 + .../boost/units/is_dimensionless_unit.hpp | 34 + Slang/build/boost/units/is_quantity.hpp | 42 + .../boost/units/is_quantity_of_dimension.hpp | 42 + .../boost/units/is_quantity_of_system.hpp | 42 + Slang/build/boost/units/is_unit.hpp | 41 + .../boost/units/is_unit_of_dimension.hpp | 46 + Slang/build/boost/units/is_unit_of_system.hpp | 46 + Slang/build/boost/units/lambda.hpp | 593 ++ Slang/build/boost/units/limits.hpp | 76 + Slang/build/boost/units/make_scaled_unit.hpp | 60 + Slang/build/boost/units/make_system.hpp | 145 + Slang/build/boost/units/operators.hpp | 164 + .../build/boost/units/physical_dimensions.hpp | 90 + .../physical_dimensions/absorbed_dose.hpp | 30 + .../physical_dimensions/acceleration.hpp | 30 + .../units/physical_dimensions/action.hpp | 32 + .../units/physical_dimensions/activity.hpp | 28 + .../units/physical_dimensions/amount.hpp | 49 + .../angular_acceleration.hpp | 30 + .../physical_dimensions/angular_momentum.hpp | 34 + .../physical_dimensions/angular_velocity.hpp | 30 + .../boost/units/physical_dimensions/area.hpp | 28 + .../units/physical_dimensions/capacitance.hpp | 34 + .../units/physical_dimensions/conductance.hpp | 34 + .../physical_dimensions/conductivity.hpp | 34 + .../units/physical_dimensions/current.hpp | 49 + .../physical_dimensions/dose_equivalent.hpp | 30 + .../physical_dimensions/dynamic_viscosity.hpp | 32 + .../physical_dimensions/electric_charge.hpp | 30 + .../electric_potential.hpp | 34 + .../units/physical_dimensions/energy.hpp | 32 + .../physical_dimensions/energy_density.hpp | 32 + .../boost/units/physical_dimensions/force.hpp | 32 + .../units/physical_dimensions/frequency.hpp | 28 + .../physical_dimensions/heat_capacity.hpp | 34 + .../units/physical_dimensions/illuminance.hpp | 32 + .../units/physical_dimensions/impedance.hpp | 34 + .../units/physical_dimensions/inductance.hpp | 34 + .../units/physical_dimensions/information.hpp | 44 + .../kinematic_viscosity.hpp | 30 + .../units/physical_dimensions/length.hpp | 49 + .../units/physical_dimensions/luminance.hpp | 30 + .../physical_dimensions/luminous_flux.hpp | 30 + .../luminous_intensity.hpp | 49 + .../magnetic_field_intensity.hpp | 30 + .../physical_dimensions/magnetic_flux.hpp | 34 + .../magnetic_flux_density.hpp | 32 + .../boost/units/physical_dimensions/mass.hpp | 49 + .../physical_dimensions/mass_density.hpp | 30 + .../physical_dimensions/molar_energy.hpp | 34 + .../molar_heat_capacity.hpp | 36 + .../physical_dimensions/moment_of_inertia.hpp | 32 + .../units/physical_dimensions/momentum.hpp | 32 + .../physical_dimensions/permeability.hpp | 34 + .../physical_dimensions/permittivity.hpp | 34 + .../units/physical_dimensions/plane_angle.hpp | 49 + .../boost/units/physical_dimensions/power.hpp | 32 + .../units/physical_dimensions/pressure.hpp | 32 + .../units/physical_dimensions/reluctance.hpp | 34 + .../units/physical_dimensions/resistance.hpp | 34 + .../units/physical_dimensions/resistivity.hpp | 34 + .../units/physical_dimensions/solid_angle.hpp | 49 + .../physical_dimensions/specific_energy.hpp | 30 + .../specific_heat_capacity.hpp | 32 + .../physical_dimensions/specific_volume.hpp | 30 + .../units/physical_dimensions/stress.hpp | 32 + .../physical_dimensions/surface_density.hpp | 30 + .../physical_dimensions/surface_tension.hpp | 31 + .../units/physical_dimensions/temperature.hpp | 49 + .../thermal_conductivity.hpp | 34 + .../boost/units/physical_dimensions/time.hpp | 49 + .../units/physical_dimensions/torque.hpp | 34 + .../units/physical_dimensions/velocity.hpp | 30 + .../units/physical_dimensions/volume.hpp | 28 + .../units/physical_dimensions/wavenumber.hpp | 28 + Slang/build/boost/units/pow.hpp | 115 + Slang/build/boost/units/quantity.hpp | 1280 +++++ Slang/build/boost/units/reduce_unit.hpp | 41 + Slang/build/boost/units/scale.hpp | 145 + Slang/build/boost/units/scaled_base_unit.hpp | 144 + Slang/build/boost/units/static_constant.hpp | 62 + Slang/build/boost/units/static_rational.hpp | 349 ++ Slang/build/boost/units/systems/abstract.hpp | 139 + .../boost/units/systems/angle/degrees.hpp | 42 + .../boost/units/systems/angle/gradians.hpp | 42 + .../boost/units/systems/angle/revolutions.hpp | 42 + Slang/build/boost/units/systems/cgs.hpp | 44 + .../boost/units/systems/cgs/acceleration.hpp | 34 + Slang/build/boost/units/systems/cgs/area.hpp | 36 + Slang/build/boost/units/systems/cgs/base.hpp | 46 + .../build/boost/units/systems/cgs/current.hpp | 33 + .../boost/units/systems/cgs/dimensionless.hpp | 30 + .../units/systems/cgs/dynamic_viscosity.hpp | 33 + .../build/boost/units/systems/cgs/energy.hpp | 34 + Slang/build/boost/units/systems/cgs/force.hpp | 34 + .../boost/units/systems/cgs/frequency.hpp | 31 + Slang/build/boost/units/systems/cgs/io.hpp | 50 + .../units/systems/cgs/kinematic_viscosity.hpp | 34 + .../build/boost/units/systems/cgs/length.hpp | 35 + Slang/build/boost/units/systems/cgs/mass.hpp | 36 + .../boost/units/systems/cgs/mass_density.hpp | 31 + .../boost/units/systems/cgs/momentum.hpp | 31 + Slang/build/boost/units/systems/cgs/power.hpp | 31 + .../boost/units/systems/cgs/pressure.hpp | 34 + Slang/build/boost/units/systems/cgs/time.hpp | 33 + .../boost/units/systems/cgs/velocity.hpp | 36 + .../build/boost/units/systems/cgs/volume.hpp | 36 + .../boost/units/systems/cgs/wavenumber.hpp | 38 + .../boost/units/systems/detail/constants.hpp | 278 + .../build/boost/units/systems/information.hpp | 20 + .../boost/units/systems/information/bit.hpp | 33 + .../boost/units/systems/information/byte.hpp | 45 + .../units/systems/information/hartley.hpp | 33 + .../boost/units/systems/information/nat.hpp | 33 + .../units/systems/information/prefixes.hpp | 45 + .../units/systems/information/shannon.hpp | 33 + Slang/build/boost/units/systems/si.hpp | 77 + .../boost/units/systems/si/absorbed_dose.hpp | 34 + .../boost/units/systems/si/acceleration.hpp | 36 + Slang/build/boost/units/systems/si/action.hpp | 31 + .../build/boost/units/systems/si/activity.hpp | 34 + Slang/build/boost/units/systems/si/amount.hpp | 33 + .../units/systems/si/angular_acceleration.hpp | 31 + .../units/systems/si/angular_momentum.hpp | 31 + .../units/systems/si/angular_velocity.hpp | 34 + Slang/build/boost/units/systems/si/area.hpp | 36 + Slang/build/boost/units/systems/si/base.hpp | 56 + .../boost/units/systems/si/capacitance.hpp | 34 + .../units/systems/si/catalytic_activity.hpp | 37 + .../systems/si/codata/alpha_constants.hpp | 66 + .../si/codata/atomic-nuclear_constants.hpp | 56 + .../systems/si/codata/deuteron_constants.hpp | 82 + .../si/codata/electromagnetic_constants.hpp | 75 + .../systems/si/codata/electron_constants.hpp | 106 + .../systems/si/codata/helion_constants.hpp | 78 + .../systems/si/codata/muon_constants.hpp | 84 + .../systems/si/codata/neutron_constants.hpp | 84 + .../si/codata/physico-chemical_constants.hpp | 79 + .../systems/si/codata/proton_constants.hpp | 98 + .../units/systems/si/codata/tau_constants.hpp | 72 + .../systems/si/codata/triton_constants.hpp | 80 + .../units/systems/si/codata/typedefs.hpp | 79 + .../systems/si/codata/universal_constants.hpp | 81 + .../units/systems/si/codata_constants.hpp | 19 + .../boost/units/systems/si/conductance.hpp | 36 + .../boost/units/systems/si/conductivity.hpp | 31 + .../build/boost/units/systems/si/current.hpp | 33 + .../boost/units/systems/si/dimensionless.hpp | 30 + .../units/systems/si/dose_equivalent.hpp | 34 + .../units/systems/si/dynamic_viscosity.hpp | 31 + .../units/systems/si/electric_charge.hpp | 34 + .../units/systems/si/electric_potential.hpp | 34 + Slang/build/boost/units/systems/si/energy.hpp | 34 + Slang/build/boost/units/systems/si/force.hpp | 34 + .../boost/units/systems/si/frequency.hpp | 33 + .../boost/units/systems/si/illuminance.hpp | 33 + .../boost/units/systems/si/impedance.hpp | 31 + .../boost/units/systems/si/inductance.hpp | 34 + Slang/build/boost/units/systems/si/io.hpp | 88 + .../units/systems/si/kinematic_viscosity.hpp | 31 + Slang/build/boost/units/systems/si/length.hpp | 35 + .../boost/units/systems/si/luminous_flux.hpp | 34 + .../units/systems/si/luminous_intensity.hpp | 33 + .../systems/si/magnetic_field_intensity.hpp | 31 + .../boost/units/systems/si/magnetic_flux.hpp | 34 + .../systems/si/magnetic_flux_density.hpp | 34 + Slang/build/boost/units/systems/si/mass.hpp | 35 + .../boost/units/systems/si/mass_density.hpp | 36 + .../units/systems/si/moment_of_inertia.hpp | 31 + .../build/boost/units/systems/si/momentum.hpp | 31 + .../boost/units/systems/si/permeability.hpp | 31 + .../boost/units/systems/si/permittivity.hpp | 31 + .../boost/units/systems/si/plane_angle.hpp | 33 + Slang/build/boost/units/systems/si/power.hpp | 34 + .../build/boost/units/systems/si/prefixes.hpp | 77 + .../build/boost/units/systems/si/pressure.hpp | 49 + .../boost/units/systems/si/reluctance.hpp | 31 + .../boost/units/systems/si/resistance.hpp | 34 + .../boost/units/systems/si/resistivity.hpp | 31 + .../boost/units/systems/si/solid_angle.hpp | 33 + .../units/systems/si/surface_density.hpp | 36 + .../units/systems/si/surface_tension.hpp | 34 + .../boost/units/systems/si/temperature.hpp | 33 + Slang/build/boost/units/systems/si/time.hpp | 33 + Slang/build/boost/units/systems/si/torque.hpp | 34 + .../build/boost/units/systems/si/velocity.hpp | 36 + Slang/build/boost/units/systems/si/volume.hpp | 36 + .../boost/units/systems/si/wavenumber.hpp | 36 + .../units/systems/temperature/celsius.hpp | 40 + .../units/systems/temperature/fahrenheit.hpp | 40 + Slang/build/boost/units/unit.hpp | 448 ++ Slang/build/boost/units/units_fwd.hpp | 73 + Slang/build/boost/unordered/detail/fwd.hpp | 63 + .../boost/unordered/detail/implementation.hpp | 4952 +++++++++++++++++ Slang/build/boost/unordered/detail/map.hpp | 67 + Slang/build/boost/unordered/detail/set.hpp | 66 + Slang/build/boost/unordered/unordered_map.hpp | 2589 +++++++++ .../boost/unordered/unordered_map_fwd.hpp | 64 + Slang/build/boost/unordered/unordered_set.hpp | 2101 +++++++ .../boost/unordered/unordered_set_fwd.hpp | 62 + Slang/build/boost/unordered_map.hpp | 19 + Slang/build/boost/unordered_set.hpp | 19 + Slang/build/boost/utility.hpp | 24 + Slang/build/boost/utility/addressof.hpp | 17 + .../build/boost/utility/base_from_member.hpp | 173 + Slang/build/boost/utility/binary.hpp | 709 +++ .../build/boost/utility/compare_pointees.hpp | 76 + Slang/build/boost/utility/declval.hpp | 13 + .../detail/in_place_factory_prefix.hpp | 36 + .../detail/in_place_factory_suffix.hpp | 23 + .../boost/utility/detail/minstd_rand.hpp | 58 + .../utility/detail/result_of_iterate.hpp | 218 + .../utility/detail/result_of_variadic.hpp | 190 + Slang/build/boost/utility/enable_if.hpp | 17 + .../boost/utility/explicit_operator_bool.hpp | 17 + Slang/build/boost/utility/identity_type.hpp | 46 + .../build/boost/utility/in_place_factory.hpp | 92 + Slang/build/boost/utility/result_of.hpp | 249 + Slang/build/boost/utility/string_ref.hpp | 516 ++ Slang/build/boost/utility/string_ref_fwd.hpp | 37 + Slang/build/boost/utility/string_view.hpp | 673 +++ Slang/build/boost/utility/string_view_fwd.hpp | 39 + Slang/build/boost/utility/swap.hpp | 17 + .../boost/utility/typed_in_place_factory.hpp | 82 + Slang/build/boost/utility/value_init.hpp | 247 + Slang/build/boost/variant.hpp | 27 + Slang/build/boost/variant2.hpp | 10 + Slang/build/boost/version.hpp | 32 + Slang/build/boost/visit_each.hpp | 27 + Slang/build/boost/wave.hpp | 23 + Slang/build/boost/weak_ptr.hpp | 18 + Slang/builtin.h | 2 +- Slang/graphics.h | 2 +- Slang/strops.cpp | 2 +- Slang/strops.h | 2 +- 1517 files changed, 177219 insertions(+), 5 deletions(-) create mode 100644 Slang/boost/align.hpp create mode 100644 Slang/boost/aligned_storage.hpp create mode 100644 Slang/boost/any.hpp create mode 100644 Slang/boost/any/bad_any_cast.hpp create mode 100644 Slang/boost/any/basic_any.hpp create mode 100644 Slang/boost/any/fwd.hpp create mode 100644 Slang/boost/array.hpp create mode 100644 Slang/boost/asio.hpp create mode 100644 Slang/boost/assert.hpp create mode 100644 Slang/boost/assign.hpp create mode 100644 Slang/boost/atomic.hpp create mode 100644 Slang/boost/beast.hpp create mode 100644 Slang/boost/bimap.hpp create mode 100644 Slang/boost/bind.hpp create mode 100644 Slang/boost/blank.hpp create mode 100644 Slang/boost/blank_fwd.hpp create mode 100644 Slang/boost/call_traits.hpp create mode 100644 Slang/boost/callable_traits.hpp create mode 100644 Slang/boost/cast.hpp create mode 100644 Slang/boost/cerrno.hpp create mode 100644 Slang/boost/checked_delete.hpp create mode 100644 Slang/boost/chrono.hpp create mode 100644 Slang/boost/circular_buffer.hpp create mode 100644 Slang/boost/circular_buffer_fwd.hpp create mode 100644 Slang/boost/compressed_pair.hpp create mode 100644 Slang/boost/compute.hpp create mode 100644 Slang/boost/concept_archetype.hpp create mode 100644 Slang/boost/concept_check.hpp create mode 100644 Slang/boost/config.hpp create mode 100644 Slang/boost/contract.hpp create mode 100644 Slang/boost/contract_macro.hpp create mode 100644 Slang/boost/convert.hpp create mode 100644 Slang/boost/core/addressof.hpp create mode 100644 Slang/boost/core/alloc_construct.hpp create mode 100644 Slang/boost/core/allocator_access.hpp create mode 100644 Slang/boost/core/bit.hpp create mode 100644 Slang/boost/core/checked_delete.hpp create mode 100644 Slang/boost/core/cmath.hpp create mode 100644 Slang/boost/core/default_allocator.hpp create mode 100644 Slang/boost/core/demangle.hpp create mode 100644 Slang/boost/core/detail/splitmix64.hpp create mode 100644 Slang/boost/core/detail/string_view.hpp create mode 100644 Slang/boost/core/empty_value.hpp create mode 100644 Slang/boost/core/enable_if.hpp create mode 100644 Slang/boost/core/exchange.hpp create mode 100644 Slang/boost/core/explicit_operator_bool.hpp create mode 100644 Slang/boost/core/first_scalar.hpp create mode 100644 Slang/boost/core/ignore_unused.hpp create mode 100644 Slang/boost/core/is_same.hpp create mode 100644 Slang/boost/core/lightweight_test.hpp create mode 100644 Slang/boost/core/lightweight_test_trait.hpp create mode 100644 Slang/boost/core/no_exceptions_support.hpp create mode 100644 Slang/boost/core/noinit_adaptor.hpp create mode 100644 Slang/boost/core/noncopyable.hpp create mode 100644 Slang/boost/core/null_deleter.hpp create mode 100644 Slang/boost/core/nvp.hpp create mode 100644 Slang/boost/core/pointer_traits.hpp create mode 100644 Slang/boost/core/quick_exit.hpp create mode 100644 Slang/boost/core/ref.hpp create mode 100644 Slang/boost/core/scoped_enum.hpp create mode 100644 Slang/boost/core/span.hpp create mode 100644 Slang/boost/core/swap.hpp create mode 100644 Slang/boost/core/type_name.hpp create mode 100644 Slang/boost/core/typeinfo.hpp create mode 100644 Slang/boost/core/uncaught_exceptions.hpp create mode 100644 Slang/boost/core/underlying_type.hpp create mode 100644 Slang/boost/core/use_default.hpp create mode 100644 Slang/boost/crc.hpp create mode 100644 Slang/boost/cregex.hpp create mode 100644 Slang/boost/cstdfloat.hpp create mode 100644 Slang/boost/cstdint.hpp create mode 100644 Slang/boost/cstdlib.hpp create mode 100644 Slang/boost/current_function.hpp create mode 100644 Slang/boost/cxx11_char_types.hpp create mode 100644 Slang/boost/date_time.hpp create mode 100644 Slang/boost/describe.hpp create mode 100644 Slang/boost/dll.hpp create mode 100644 Slang/boost/dynamic_bitset.hpp create mode 100644 Slang/boost/dynamic_bitset_fwd.hpp create mode 100644 Slang/boost/enable_shared_from_this.hpp create mode 100644 Slang/boost/endian.hpp create mode 100644 Slang/boost/exception_ptr.hpp create mode 100644 Slang/boost/filesystem.hpp create mode 100644 Slang/boost/flyweight.hpp create mode 100644 Slang/boost/foreach.hpp create mode 100644 Slang/boost/foreach_fwd.hpp create mode 100644 Slang/boost/format.hpp create mode 100644 Slang/boost/function.hpp create mode 100644 Slang/boost/function_equal.hpp create mode 100644 Slang/boost/function_output_iterator.hpp create mode 100644 Slang/boost/functional.hpp create mode 100644 Slang/boost/generator_iterator.hpp create mode 100644 Slang/boost/geometry.hpp create mode 100644 Slang/boost/get_pointer.hpp create mode 100644 Slang/boost/gil.hpp create mode 100644 Slang/boost/hana.hpp create mode 100644 Slang/boost/histogram.hpp create mode 100644 Slang/boost/hof.hpp create mode 100644 Slang/boost/implicit_cast.hpp create mode 100644 Slang/boost/indirect_reference.hpp create mode 100644 Slang/boost/integer.hpp create mode 100644 Slang/boost/integer_fwd.hpp create mode 100644 Slang/boost/integer_traits.hpp create mode 100644 Slang/boost/intrusive_ptr.hpp create mode 100644 Slang/boost/io_fwd.hpp create mode 100644 Slang/boost/is_placeholder.hpp create mode 100644 Slang/boost/iterator.hpp create mode 100644 Slang/boost/iterator_adaptors.hpp create mode 100644 Slang/boost/json.hpp create mode 100644 Slang/boost/lambda2.hpp create mode 100644 Slang/boost/leaf.hpp create mode 100644 Slang/boost/lexical_cast.hpp create mode 100644 Slang/boost/limits.hpp create mode 100644 Slang/boost/local_function.hpp create mode 100644 Slang/boost/locale.hpp create mode 100644 Slang/boost/make_default.hpp create mode 100644 Slang/boost/make_shared.hpp create mode 100644 Slang/boost/make_unique.hpp create mode 100644 Slang/boost/math_fwd.hpp create mode 100644 Slang/boost/mem_fn.hpp create mode 100644 Slang/boost/memory_order.hpp create mode 100644 Slang/boost/metaparse.hpp create mode 100644 Slang/boost/mp11.hpp create mode 100644 Slang/boost/mpi.hpp create mode 100644 Slang/boost/multi_array.hpp create mode 100644 Slang/boost/multi_index_container.hpp create mode 100644 Slang/boost/multi_index_container_fwd.hpp create mode 100644 Slang/boost/next_prior.hpp create mode 100644 Slang/boost/non_type.hpp create mode 100644 Slang/boost/noncopyable.hpp create mode 100644 Slang/boost/nondet_random.hpp create mode 100644 Slang/boost/none.hpp create mode 100644 Slang/boost/none_t.hpp create mode 100644 Slang/boost/operators.hpp create mode 100644 Slang/boost/operators_v1.hpp create mode 100644 Slang/boost/optional.hpp create mode 100644 Slang/boost/outcome.hpp create mode 100644 Slang/boost/parameter.hpp create mode 100644 Slang/boost/pfr.hpp create mode 100644 Slang/boost/phoenix.hpp create mode 100644 Slang/boost/pointee.hpp create mode 100644 Slang/boost/pointer_cast.hpp create mode 100644 Slang/boost/pointer_to_other.hpp create mode 100644 Slang/boost/polymorphic_cast.hpp create mode 100644 Slang/boost/polymorphic_pointer_cast.hpp create mode 100644 Slang/boost/predef.h create mode 100644 Slang/boost/preprocessor.hpp create mode 100644 Slang/boost/process.hpp create mode 100644 Slang/boost/program_options.hpp create mode 100644 Slang/boost/progress.hpp create mode 100644 Slang/boost/python.hpp create mode 100644 Slang/boost/qvm.hpp create mode 100644 Slang/boost/qvm_lite.hpp create mode 100644 Slang/boost/random.hpp create mode 100644 Slang/boost/range.hpp create mode 100644 Slang/boost/ratio.hpp create mode 100644 Slang/boost/rational.hpp create mode 100644 Slang/boost/ref.hpp create mode 100644 Slang/boost/regex.h create mode 100644 Slang/boost/regex.hpp create mode 100644 Slang/boost/regex_fwd.hpp create mode 100644 Slang/boost/scope_exit.hpp create mode 100644 Slang/boost/scoped_array.hpp create mode 100644 Slang/boost/scoped_ptr.hpp create mode 100644 Slang/boost/shared_array.hpp create mode 100644 Slang/boost/shared_container_iterator.hpp create mode 100644 Slang/boost/shared_ptr.hpp create mode 100644 Slang/boost/signals2.hpp create mode 100644 Slang/boost/smart_ptr.hpp create mode 100644 Slang/boost/spirit.hpp create mode 100644 Slang/boost/stacktrace.hpp create mode 100644 Slang/boost/static_assert.hpp create mode 100644 Slang/boost/static_string.hpp create mode 100644 Slang/boost/swap.hpp create mode 100644 Slang/boost/system.hpp create mode 100644 Slang/boost/thread.hpp create mode 100644 Slang/boost/throw_exception.hpp create mode 100644 Slang/boost/timer.hpp create mode 100644 Slang/boost/token_functions.hpp create mode 100644 Slang/boost/token_iterator.hpp create mode 100644 Slang/boost/tokenizer.hpp create mode 100644 Slang/boost/type.hpp create mode 100644 Slang/boost/type_index.hpp create mode 100644 Slang/boost/type_index/ctti_type_index.hpp create mode 100644 Slang/boost/type_index/detail/compile_time_type_info.hpp create mode 100644 Slang/boost/type_index/detail/ctti_register_class.hpp create mode 100644 Slang/boost/type_index/detail/stl_register_class.hpp create mode 100644 Slang/boost/type_index/runtime_cast.hpp create mode 100644 Slang/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp create mode 100644 Slang/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp create mode 100644 Slang/boost/type_index/runtime_cast/pointer_cast.hpp create mode 100644 Slang/boost/type_index/runtime_cast/reference_cast.hpp create mode 100644 Slang/boost/type_index/runtime_cast/register_runtime_class.hpp create mode 100644 Slang/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp create mode 100644 Slang/boost/type_index/stl_type_index.hpp create mode 100644 Slang/boost/type_index/type_index_facade.hpp create mode 100644 Slang/boost/type_traits.hpp create mode 100644 Slang/boost/type_traits/add_const.hpp create mode 100644 Slang/boost/type_traits/add_cv.hpp create mode 100644 Slang/boost/type_traits/add_lvalue_reference.hpp create mode 100644 Slang/boost/type_traits/add_pointer.hpp create mode 100644 Slang/boost/type_traits/add_reference.hpp create mode 100644 Slang/boost/type_traits/add_rvalue_reference.hpp create mode 100644 Slang/boost/type_traits/add_volatile.hpp create mode 100644 Slang/boost/type_traits/aligned_storage.hpp create mode 100644 Slang/boost/type_traits/alignment_of.hpp create mode 100644 Slang/boost/type_traits/alignment_traits.hpp create mode 100644 Slang/boost/type_traits/arithmetic_traits.hpp create mode 100644 Slang/boost/type_traits/array_traits.hpp create mode 100644 Slang/boost/type_traits/broken_compiler_spec.hpp create mode 100644 Slang/boost/type_traits/common_type.hpp create mode 100644 Slang/boost/type_traits/composite_traits.hpp create mode 100644 Slang/boost/type_traits/conditional.hpp create mode 100644 Slang/boost/type_traits/config.hpp create mode 100644 Slang/boost/type_traits/conjunction.hpp create mode 100644 Slang/boost/type_traits/conversion_traits.hpp create mode 100644 Slang/boost/type_traits/copy_cv.hpp create mode 100644 Slang/boost/type_traits/copy_cv_ref.hpp create mode 100644 Slang/boost/type_traits/copy_reference.hpp create mode 100644 Slang/boost/type_traits/cv_traits.hpp create mode 100644 Slang/boost/type_traits/decay.hpp create mode 100644 Slang/boost/type_traits/declval.hpp create mode 100644 Slang/boost/type_traits/detail/bool_trait_def.hpp create mode 100644 Slang/boost/type_traits/detail/bool_trait_undef.hpp create mode 100644 Slang/boost/type_traits/detail/common_arithmetic_type.hpp create mode 100644 Slang/boost/type_traits/detail/common_type_impl.hpp create mode 100644 Slang/boost/type_traits/detail/composite_member_pointer_type.hpp create mode 100644 Slang/boost/type_traits/detail/composite_pointer_type.hpp create mode 100644 Slang/boost/type_traits/detail/config.hpp create mode 100644 Slang/boost/type_traits/detail/detector.hpp create mode 100644 Slang/boost/type_traits/detail/has_binary_operator.hpp create mode 100644 Slang/boost/type_traits/detail/has_postfix_operator.hpp create mode 100644 Slang/boost/type_traits/detail/has_prefix_operator.hpp create mode 100644 Slang/boost/type_traits/detail/ice_and.hpp create mode 100644 Slang/boost/type_traits/detail/ice_eq.hpp create mode 100644 Slang/boost/type_traits/detail/ice_not.hpp create mode 100644 Slang/boost/type_traits/detail/ice_or.hpp create mode 100644 Slang/boost/type_traits/detail/is_function_cxx_03.hpp create mode 100644 Slang/boost/type_traits/detail/is_function_cxx_11.hpp create mode 100644 Slang/boost/type_traits/detail/is_function_msvc10_fix.hpp create mode 100644 Slang/boost/type_traits/detail/is_function_ptr_helper.hpp create mode 100644 Slang/boost/type_traits/detail/is_function_ptr_tester.hpp create mode 100644 Slang/boost/type_traits/detail/is_likely_lambda.hpp create mode 100644 Slang/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp create mode 100644 Slang/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp create mode 100644 Slang/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp create mode 100644 Slang/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp create mode 100644 Slang/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp create mode 100644 Slang/boost/type_traits/detail/mp_defer.hpp create mode 100644 Slang/boost/type_traits/detail/template_arity_spec.hpp create mode 100644 Slang/boost/type_traits/detail/yes_no_type.hpp create mode 100644 Slang/boost/type_traits/detected.hpp create mode 100644 Slang/boost/type_traits/detected_or.hpp create mode 100644 Slang/boost/type_traits/disjunction.hpp create mode 100644 Slang/boost/type_traits/enable_if.hpp create mode 100644 Slang/boost/type_traits/extent.hpp create mode 100644 Slang/boost/type_traits/floating_point_promotion.hpp create mode 100644 Slang/boost/type_traits/function_traits.hpp create mode 100644 Slang/boost/type_traits/has_bit_and.hpp create mode 100644 Slang/boost/type_traits/has_bit_and_assign.hpp create mode 100644 Slang/boost/type_traits/has_bit_or.hpp create mode 100644 Slang/boost/type_traits/has_bit_or_assign.hpp create mode 100644 Slang/boost/type_traits/has_bit_xor.hpp create mode 100644 Slang/boost/type_traits/has_bit_xor_assign.hpp create mode 100644 Slang/boost/type_traits/has_complement.hpp create mode 100644 Slang/boost/type_traits/has_dereference.hpp create mode 100644 Slang/boost/type_traits/has_divides.hpp create mode 100644 Slang/boost/type_traits/has_divides_assign.hpp create mode 100644 Slang/boost/type_traits/has_equal_to.hpp create mode 100644 Slang/boost/type_traits/has_greater.hpp create mode 100644 Slang/boost/type_traits/has_greater_equal.hpp create mode 100644 Slang/boost/type_traits/has_left_shift.hpp create mode 100644 Slang/boost/type_traits/has_left_shift_assign.hpp create mode 100644 Slang/boost/type_traits/has_less.hpp create mode 100644 Slang/boost/type_traits/has_less_equal.hpp create mode 100644 Slang/boost/type_traits/has_logical_and.hpp create mode 100644 Slang/boost/type_traits/has_logical_not.hpp create mode 100644 Slang/boost/type_traits/has_logical_or.hpp create mode 100644 Slang/boost/type_traits/has_minus.hpp create mode 100644 Slang/boost/type_traits/has_minus_assign.hpp create mode 100644 Slang/boost/type_traits/has_modulus.hpp create mode 100644 Slang/boost/type_traits/has_modulus_assign.hpp create mode 100644 Slang/boost/type_traits/has_multiplies.hpp create mode 100644 Slang/boost/type_traits/has_multiplies_assign.hpp create mode 100644 Slang/boost/type_traits/has_negate.hpp create mode 100644 Slang/boost/type_traits/has_new_operator.hpp create mode 100644 Slang/boost/type_traits/has_not_equal_to.hpp create mode 100644 Slang/boost/type_traits/has_nothrow_assign.hpp create mode 100644 Slang/boost/type_traits/has_nothrow_constructor.hpp create mode 100644 Slang/boost/type_traits/has_nothrow_copy.hpp create mode 100644 Slang/boost/type_traits/has_nothrow_destructor.hpp create mode 100644 Slang/boost/type_traits/has_operator.hpp create mode 100644 Slang/boost/type_traits/has_plus.hpp create mode 100644 Slang/boost/type_traits/has_plus_assign.hpp create mode 100644 Slang/boost/type_traits/has_post_decrement.hpp create mode 100644 Slang/boost/type_traits/has_post_increment.hpp create mode 100644 Slang/boost/type_traits/has_pre_decrement.hpp create mode 100644 Slang/boost/type_traits/has_pre_increment.hpp create mode 100644 Slang/boost/type_traits/has_right_shift.hpp create mode 100644 Slang/boost/type_traits/has_right_shift_assign.hpp create mode 100644 Slang/boost/type_traits/has_trivial_assign.hpp create mode 100644 Slang/boost/type_traits/has_trivial_constructor.hpp create mode 100644 Slang/boost/type_traits/has_trivial_copy.hpp create mode 100644 Slang/boost/type_traits/has_trivial_destructor.hpp create mode 100644 Slang/boost/type_traits/has_trivial_move_assign.hpp create mode 100644 Slang/boost/type_traits/has_trivial_move_constructor.hpp create mode 100644 Slang/boost/type_traits/has_unary_minus.hpp create mode 100644 Slang/boost/type_traits/has_unary_plus.hpp create mode 100644 Slang/boost/type_traits/has_virtual_destructor.hpp create mode 100644 Slang/boost/type_traits/ice.hpp create mode 100644 Slang/boost/type_traits/integral_constant.hpp create mode 100644 Slang/boost/type_traits/integral_promotion.hpp create mode 100644 Slang/boost/type_traits/intrinsics.hpp create mode 100644 Slang/boost/type_traits/is_abstract.hpp create mode 100644 Slang/boost/type_traits/is_arithmetic.hpp create mode 100644 Slang/boost/type_traits/is_array.hpp create mode 100644 Slang/boost/type_traits/is_assignable.hpp create mode 100644 Slang/boost/type_traits/is_base_and_derived.hpp create mode 100644 Slang/boost/type_traits/is_base_of.hpp create mode 100644 Slang/boost/type_traits/is_base_of_tr1.hpp create mode 100644 Slang/boost/type_traits/is_bounded_array.hpp create mode 100644 Slang/boost/type_traits/is_class.hpp create mode 100644 Slang/boost/type_traits/is_complete.hpp create mode 100644 Slang/boost/type_traits/is_complex.hpp create mode 100644 Slang/boost/type_traits/is_compound.hpp create mode 100644 Slang/boost/type_traits/is_const.hpp create mode 100644 Slang/boost/type_traits/is_constructible.hpp create mode 100644 Slang/boost/type_traits/is_convertible.hpp create mode 100644 Slang/boost/type_traits/is_copy_assignable.hpp create mode 100644 Slang/boost/type_traits/is_copy_constructible.hpp create mode 100644 Slang/boost/type_traits/is_default_constructible.hpp create mode 100644 Slang/boost/type_traits/is_destructible.hpp create mode 100644 Slang/boost/type_traits/is_detected.hpp create mode 100644 Slang/boost/type_traits/is_detected_convertible.hpp create mode 100644 Slang/boost/type_traits/is_detected_exact.hpp create mode 100644 Slang/boost/type_traits/is_empty.hpp create mode 100644 Slang/boost/type_traits/is_enum.hpp create mode 100644 Slang/boost/type_traits/is_final.hpp create mode 100644 Slang/boost/type_traits/is_float.hpp create mode 100644 Slang/boost/type_traits/is_floating_point.hpp create mode 100644 Slang/boost/type_traits/is_function.hpp create mode 100644 Slang/boost/type_traits/is_fundamental.hpp create mode 100644 Slang/boost/type_traits/is_integral.hpp create mode 100644 Slang/boost/type_traits/is_list_constructible.hpp create mode 100644 Slang/boost/type_traits/is_lvalue_reference.hpp create mode 100644 Slang/boost/type_traits/is_member_function_pointer.hpp create mode 100644 Slang/boost/type_traits/is_member_object_pointer.hpp create mode 100644 Slang/boost/type_traits/is_member_pointer.hpp create mode 100644 Slang/boost/type_traits/is_noncopyable.hpp create mode 100644 Slang/boost/type_traits/is_nothrow_move_assignable.hpp create mode 100644 Slang/boost/type_traits/is_nothrow_move_constructible.hpp create mode 100644 Slang/boost/type_traits/is_nothrow_swappable.hpp create mode 100644 Slang/boost/type_traits/is_object.hpp create mode 100644 Slang/boost/type_traits/is_pod.hpp create mode 100644 Slang/boost/type_traits/is_pointer.hpp create mode 100644 Slang/boost/type_traits/is_polymorphic.hpp create mode 100644 Slang/boost/type_traits/is_reference.hpp create mode 100644 Slang/boost/type_traits/is_rvalue_reference.hpp create mode 100644 Slang/boost/type_traits/is_same.hpp create mode 100644 Slang/boost/type_traits/is_scalar.hpp create mode 100644 Slang/boost/type_traits/is_scoped_enum.hpp create mode 100644 Slang/boost/type_traits/is_signed.hpp create mode 100644 Slang/boost/type_traits/is_stateless.hpp create mode 100644 Slang/boost/type_traits/is_trivially_copyable.hpp create mode 100644 Slang/boost/type_traits/is_unbounded_array.hpp create mode 100644 Slang/boost/type_traits/is_union.hpp create mode 100644 Slang/boost/type_traits/is_unscoped_enum.hpp create mode 100644 Slang/boost/type_traits/is_unsigned.hpp create mode 100644 Slang/boost/type_traits/is_virtual_base_of.hpp create mode 100644 Slang/boost/type_traits/is_void.hpp create mode 100644 Slang/boost/type_traits/is_volatile.hpp create mode 100644 Slang/boost/type_traits/make_signed.hpp create mode 100644 Slang/boost/type_traits/make_unsigned.hpp create mode 100644 Slang/boost/type_traits/make_void.hpp create mode 100644 Slang/boost/type_traits/negation.hpp create mode 100644 Slang/boost/type_traits/nonesuch.hpp create mode 100644 Slang/boost/type_traits/object_traits.hpp create mode 100644 Slang/boost/type_traits/promote.hpp create mode 100644 Slang/boost/type_traits/rank.hpp create mode 100644 Slang/boost/type_traits/reference_traits.hpp create mode 100644 Slang/boost/type_traits/remove_all_extents.hpp create mode 100644 Slang/boost/type_traits/remove_bounds.hpp create mode 100644 Slang/boost/type_traits/remove_const.hpp create mode 100644 Slang/boost/type_traits/remove_cv.hpp create mode 100644 Slang/boost/type_traits/remove_cv_ref.hpp create mode 100644 Slang/boost/type_traits/remove_extent.hpp create mode 100644 Slang/boost/type_traits/remove_pointer.hpp create mode 100644 Slang/boost/type_traits/remove_reference.hpp create mode 100644 Slang/boost/type_traits/remove_volatile.hpp create mode 100644 Slang/boost/type_traits/same_traits.hpp create mode 100644 Slang/boost/type_traits/transform_traits.hpp create mode 100644 Slang/boost/type_traits/type_identity.hpp create mode 100644 Slang/boost/type_traits/type_with_alignment.hpp create mode 100644 Slang/boost/units/absolute.hpp create mode 100644 Slang/boost/units/base_dimension.hpp create mode 100644 Slang/boost/units/base_unit.hpp create mode 100644 Slang/boost/units/base_units/angle/arcminute.hpp create mode 100644 Slang/boost/units/base_units/angle/arcsecond.hpp create mode 100644 Slang/boost/units/base_units/angle/degree.hpp create mode 100644 Slang/boost/units/base_units/angle/gradian.hpp create mode 100644 Slang/boost/units/base_units/angle/radian.hpp create mode 100644 Slang/boost/units/base_units/angle/revolution.hpp create mode 100644 Slang/boost/units/base_units/angle/steradian.hpp create mode 100644 Slang/boost/units/base_units/astronomical/astronomical_unit.hpp create mode 100644 Slang/boost/units/base_units/astronomical/light_day.hpp create mode 100644 Slang/boost/units/base_units/astronomical/light_hour.hpp create mode 100644 Slang/boost/units/base_units/astronomical/light_minute.hpp create mode 100644 Slang/boost/units/base_units/astronomical/light_second.hpp create mode 100644 Slang/boost/units/base_units/astronomical/light_year.hpp create mode 100644 Slang/boost/units/base_units/astronomical/parsec.hpp create mode 100644 Slang/boost/units/base_units/cgs/biot.hpp create mode 100644 Slang/boost/units/base_units/cgs/centimeter.hpp create mode 100644 Slang/boost/units/base_units/cgs/gram.hpp create mode 100644 Slang/boost/units/base_units/imperial/conversions.hpp create mode 100644 Slang/boost/units/base_units/imperial/drachm.hpp create mode 100644 Slang/boost/units/base_units/imperial/fluid_ounce.hpp create mode 100644 Slang/boost/units/base_units/imperial/foot.hpp create mode 100644 Slang/boost/units/base_units/imperial/furlong.hpp create mode 100644 Slang/boost/units/base_units/imperial/gallon.hpp create mode 100644 Slang/boost/units/base_units/imperial/gill.hpp create mode 100644 Slang/boost/units/base_units/imperial/grain.hpp create mode 100644 Slang/boost/units/base_units/imperial/hundredweight.hpp create mode 100644 Slang/boost/units/base_units/imperial/inch.hpp create mode 100644 Slang/boost/units/base_units/imperial/league.hpp create mode 100644 Slang/boost/units/base_units/imperial/mile.hpp create mode 100644 Slang/boost/units/base_units/imperial/ounce.hpp create mode 100644 Slang/boost/units/base_units/imperial/pint.hpp create mode 100644 Slang/boost/units/base_units/imperial/pound.hpp create mode 100644 Slang/boost/units/base_units/imperial/quart.hpp create mode 100644 Slang/boost/units/base_units/imperial/quarter.hpp create mode 100644 Slang/boost/units/base_units/imperial/stone.hpp create mode 100644 Slang/boost/units/base_units/imperial/thou.hpp create mode 100644 Slang/boost/units/base_units/imperial/ton.hpp create mode 100644 Slang/boost/units/base_units/imperial/yard.hpp create mode 100644 Slang/boost/units/base_units/information/bit.hpp create mode 100644 Slang/boost/units/base_units/information/byte.hpp create mode 100644 Slang/boost/units/base_units/information/hartley.hpp create mode 100644 Slang/boost/units/base_units/information/nat.hpp create mode 100644 Slang/boost/units/base_units/information/shannon.hpp create mode 100644 Slang/boost/units/base_units/metric/angstrom.hpp create mode 100644 Slang/boost/units/base_units/metric/are.hpp create mode 100644 Slang/boost/units/base_units/metric/atmosphere.hpp create mode 100644 Slang/boost/units/base_units/metric/bar.hpp create mode 100644 Slang/boost/units/base_units/metric/barn.hpp create mode 100644 Slang/boost/units/base_units/metric/day.hpp create mode 100644 Slang/boost/units/base_units/metric/fermi.hpp create mode 100644 Slang/boost/units/base_units/metric/hectare.hpp create mode 100644 Slang/boost/units/base_units/metric/hour.hpp create mode 100644 Slang/boost/units/base_units/metric/knot.hpp create mode 100644 Slang/boost/units/base_units/metric/liter.hpp create mode 100644 Slang/boost/units/base_units/metric/micron.hpp create mode 100644 Slang/boost/units/base_units/metric/minute.hpp create mode 100644 Slang/boost/units/base_units/metric/mmHg.hpp create mode 100644 Slang/boost/units/base_units/metric/nautical_mile.hpp create mode 100644 Slang/boost/units/base_units/metric/ton.hpp create mode 100644 Slang/boost/units/base_units/metric/torr.hpp create mode 100644 Slang/boost/units/base_units/metric/year.hpp create mode 100644 Slang/boost/units/base_units/si/ampere.hpp create mode 100644 Slang/boost/units/base_units/si/candela.hpp create mode 100644 Slang/boost/units/base_units/si/kelvin.hpp create mode 100644 Slang/boost/units/base_units/si/kilogram.hpp create mode 100644 Slang/boost/units/base_units/si/meter.hpp create mode 100644 Slang/boost/units/base_units/si/mole.hpp create mode 100644 Slang/boost/units/base_units/si/second.hpp create mode 100644 Slang/boost/units/base_units/temperature/celsius.hpp create mode 100644 Slang/boost/units/base_units/temperature/conversions.hpp create mode 100644 Slang/boost/units/base_units/temperature/fahrenheit.hpp create mode 100644 Slang/boost/units/base_units/us/cup.hpp create mode 100644 Slang/boost/units/base_units/us/dram.hpp create mode 100644 Slang/boost/units/base_units/us/fluid_dram.hpp create mode 100644 Slang/boost/units/base_units/us/fluid_ounce.hpp create mode 100644 Slang/boost/units/base_units/us/foot.hpp create mode 100644 Slang/boost/units/base_units/us/gallon.hpp create mode 100644 Slang/boost/units/base_units/us/gill.hpp create mode 100644 Slang/boost/units/base_units/us/grain.hpp create mode 100644 Slang/boost/units/base_units/us/hundredweight.hpp create mode 100644 Slang/boost/units/base_units/us/inch.hpp create mode 100644 Slang/boost/units/base_units/us/mil.hpp create mode 100644 Slang/boost/units/base_units/us/mile.hpp create mode 100644 Slang/boost/units/base_units/us/minim.hpp create mode 100644 Slang/boost/units/base_units/us/ounce.hpp create mode 100644 Slang/boost/units/base_units/us/pint.hpp create mode 100644 Slang/boost/units/base_units/us/pound.hpp create mode 100644 Slang/boost/units/base_units/us/pound_force.hpp create mode 100644 Slang/boost/units/base_units/us/quart.hpp create mode 100644 Slang/boost/units/base_units/us/tablespoon.hpp create mode 100644 Slang/boost/units/base_units/us/teaspoon.hpp create mode 100644 Slang/boost/units/base_units/us/ton.hpp create mode 100644 Slang/boost/units/base_units/us/yard.hpp create mode 100644 Slang/boost/units/cmath.hpp create mode 100644 Slang/boost/units/config.hpp create mode 100644 Slang/boost/units/conversion.hpp create mode 100644 Slang/boost/units/derived_dimension.hpp create mode 100644 Slang/boost/units/detail/absolute_impl.hpp create mode 100644 Slang/boost/units/detail/cmath_impl.hpp create mode 100644 Slang/boost/units/detail/conversion_impl.hpp create mode 100644 Slang/boost/units/detail/dim_impl.hpp create mode 100644 Slang/boost/units/detail/dimension_impl.hpp create mode 100644 Slang/boost/units/detail/dimension_list.hpp create mode 100644 Slang/boost/units/detail/dimensionless_unit.hpp create mode 100644 Slang/boost/units/detail/heterogeneous_conversion.hpp create mode 100644 Slang/boost/units/detail/linear_algebra.hpp create mode 100644 Slang/boost/units/detail/one.hpp create mode 100644 Slang/boost/units/detail/ordinal.hpp create mode 100644 Slang/boost/units/detail/prevent_redefinition.hpp create mode 100644 Slang/boost/units/detail/push_front_if.hpp create mode 100644 Slang/boost/units/detail/push_front_or_add.hpp create mode 100644 Slang/boost/units/detail/sort.hpp create mode 100644 Slang/boost/units/detail/static_rational_power.hpp create mode 100644 Slang/boost/units/detail/unscale.hpp create mode 100644 Slang/boost/units/detail/utility.hpp create mode 100644 Slang/boost/units/dim.hpp create mode 100644 Slang/boost/units/dimension.hpp create mode 100644 Slang/boost/units/dimensionless_quantity.hpp create mode 100644 Slang/boost/units/dimensionless_type.hpp create mode 100644 Slang/boost/units/dimensionless_unit.hpp create mode 100644 Slang/boost/units/get_dimension.hpp create mode 100644 Slang/boost/units/get_system.hpp create mode 100644 Slang/boost/units/heterogeneous_system.hpp create mode 100644 Slang/boost/units/homogeneous_system.hpp create mode 100644 Slang/boost/units/io.hpp create mode 100644 Slang/boost/units/is_dim.hpp create mode 100644 Slang/boost/units/is_dimension_list.hpp create mode 100644 Slang/boost/units/is_dimensionless.hpp create mode 100644 Slang/boost/units/is_dimensionless_quantity.hpp create mode 100644 Slang/boost/units/is_dimensionless_unit.hpp create mode 100644 Slang/boost/units/is_quantity.hpp create mode 100644 Slang/boost/units/is_quantity_of_dimension.hpp create mode 100644 Slang/boost/units/is_quantity_of_system.hpp create mode 100644 Slang/boost/units/is_unit.hpp create mode 100644 Slang/boost/units/is_unit_of_dimension.hpp create mode 100644 Slang/boost/units/is_unit_of_system.hpp create mode 100644 Slang/boost/units/lambda.hpp create mode 100644 Slang/boost/units/limits.hpp create mode 100644 Slang/boost/units/make_scaled_unit.hpp create mode 100644 Slang/boost/units/make_system.hpp create mode 100644 Slang/boost/units/operators.hpp create mode 100644 Slang/boost/units/physical_dimensions.hpp create mode 100644 Slang/boost/units/physical_dimensions/absorbed_dose.hpp create mode 100644 Slang/boost/units/physical_dimensions/acceleration.hpp create mode 100644 Slang/boost/units/physical_dimensions/action.hpp create mode 100644 Slang/boost/units/physical_dimensions/activity.hpp create mode 100644 Slang/boost/units/physical_dimensions/amount.hpp create mode 100644 Slang/boost/units/physical_dimensions/angular_acceleration.hpp create mode 100644 Slang/boost/units/physical_dimensions/angular_momentum.hpp create mode 100644 Slang/boost/units/physical_dimensions/angular_velocity.hpp create mode 100644 Slang/boost/units/physical_dimensions/area.hpp create mode 100644 Slang/boost/units/physical_dimensions/capacitance.hpp create mode 100644 Slang/boost/units/physical_dimensions/conductance.hpp create mode 100644 Slang/boost/units/physical_dimensions/conductivity.hpp create mode 100644 Slang/boost/units/physical_dimensions/current.hpp create mode 100644 Slang/boost/units/physical_dimensions/dose_equivalent.hpp create mode 100644 Slang/boost/units/physical_dimensions/dynamic_viscosity.hpp create mode 100644 Slang/boost/units/physical_dimensions/electric_charge.hpp create mode 100644 Slang/boost/units/physical_dimensions/electric_potential.hpp create mode 100644 Slang/boost/units/physical_dimensions/energy.hpp create mode 100644 Slang/boost/units/physical_dimensions/energy_density.hpp create mode 100644 Slang/boost/units/physical_dimensions/force.hpp create mode 100644 Slang/boost/units/physical_dimensions/frequency.hpp create mode 100644 Slang/boost/units/physical_dimensions/heat_capacity.hpp create mode 100644 Slang/boost/units/physical_dimensions/illuminance.hpp create mode 100644 Slang/boost/units/physical_dimensions/impedance.hpp create mode 100644 Slang/boost/units/physical_dimensions/inductance.hpp create mode 100644 Slang/boost/units/physical_dimensions/information.hpp create mode 100644 Slang/boost/units/physical_dimensions/kinematic_viscosity.hpp create mode 100644 Slang/boost/units/physical_dimensions/length.hpp create mode 100644 Slang/boost/units/physical_dimensions/luminance.hpp create mode 100644 Slang/boost/units/physical_dimensions/luminous_flux.hpp create mode 100644 Slang/boost/units/physical_dimensions/luminous_intensity.hpp create mode 100644 Slang/boost/units/physical_dimensions/magnetic_field_intensity.hpp create mode 100644 Slang/boost/units/physical_dimensions/magnetic_flux.hpp create mode 100644 Slang/boost/units/physical_dimensions/magnetic_flux_density.hpp create mode 100644 Slang/boost/units/physical_dimensions/mass.hpp create mode 100644 Slang/boost/units/physical_dimensions/mass_density.hpp create mode 100644 Slang/boost/units/physical_dimensions/molar_energy.hpp create mode 100644 Slang/boost/units/physical_dimensions/molar_heat_capacity.hpp create mode 100644 Slang/boost/units/physical_dimensions/moment_of_inertia.hpp create mode 100644 Slang/boost/units/physical_dimensions/momentum.hpp create mode 100644 Slang/boost/units/physical_dimensions/permeability.hpp create mode 100644 Slang/boost/units/physical_dimensions/permittivity.hpp create mode 100644 Slang/boost/units/physical_dimensions/plane_angle.hpp create mode 100644 Slang/boost/units/physical_dimensions/power.hpp create mode 100644 Slang/boost/units/physical_dimensions/pressure.hpp create mode 100644 Slang/boost/units/physical_dimensions/reluctance.hpp create mode 100644 Slang/boost/units/physical_dimensions/resistance.hpp create mode 100644 Slang/boost/units/physical_dimensions/resistivity.hpp create mode 100644 Slang/boost/units/physical_dimensions/solid_angle.hpp create mode 100644 Slang/boost/units/physical_dimensions/specific_energy.hpp create mode 100644 Slang/boost/units/physical_dimensions/specific_heat_capacity.hpp create mode 100644 Slang/boost/units/physical_dimensions/specific_volume.hpp create mode 100644 Slang/boost/units/physical_dimensions/stress.hpp create mode 100644 Slang/boost/units/physical_dimensions/surface_density.hpp create mode 100644 Slang/boost/units/physical_dimensions/surface_tension.hpp create mode 100644 Slang/boost/units/physical_dimensions/temperature.hpp create mode 100644 Slang/boost/units/physical_dimensions/thermal_conductivity.hpp create mode 100644 Slang/boost/units/physical_dimensions/time.hpp create mode 100644 Slang/boost/units/physical_dimensions/torque.hpp create mode 100644 Slang/boost/units/physical_dimensions/velocity.hpp create mode 100644 Slang/boost/units/physical_dimensions/volume.hpp create mode 100644 Slang/boost/units/physical_dimensions/wavenumber.hpp create mode 100644 Slang/boost/units/pow.hpp create mode 100644 Slang/boost/units/quantity.hpp create mode 100644 Slang/boost/units/reduce_unit.hpp create mode 100644 Slang/boost/units/scale.hpp create mode 100644 Slang/boost/units/scaled_base_unit.hpp create mode 100644 Slang/boost/units/static_constant.hpp create mode 100644 Slang/boost/units/static_rational.hpp create mode 100644 Slang/boost/units/systems/abstract.hpp create mode 100644 Slang/boost/units/systems/angle/degrees.hpp create mode 100644 Slang/boost/units/systems/angle/gradians.hpp create mode 100644 Slang/boost/units/systems/angle/revolutions.hpp create mode 100644 Slang/boost/units/systems/cgs.hpp create mode 100644 Slang/boost/units/systems/cgs/acceleration.hpp create mode 100644 Slang/boost/units/systems/cgs/area.hpp create mode 100644 Slang/boost/units/systems/cgs/base.hpp create mode 100644 Slang/boost/units/systems/cgs/current.hpp create mode 100644 Slang/boost/units/systems/cgs/dimensionless.hpp create mode 100644 Slang/boost/units/systems/cgs/dynamic_viscosity.hpp create mode 100644 Slang/boost/units/systems/cgs/energy.hpp create mode 100644 Slang/boost/units/systems/cgs/force.hpp create mode 100644 Slang/boost/units/systems/cgs/frequency.hpp create mode 100644 Slang/boost/units/systems/cgs/io.hpp create mode 100644 Slang/boost/units/systems/cgs/kinematic_viscosity.hpp create mode 100644 Slang/boost/units/systems/cgs/length.hpp create mode 100644 Slang/boost/units/systems/cgs/mass.hpp create mode 100644 Slang/boost/units/systems/cgs/mass_density.hpp create mode 100644 Slang/boost/units/systems/cgs/momentum.hpp create mode 100644 Slang/boost/units/systems/cgs/power.hpp create mode 100644 Slang/boost/units/systems/cgs/pressure.hpp create mode 100644 Slang/boost/units/systems/cgs/time.hpp create mode 100644 Slang/boost/units/systems/cgs/velocity.hpp create mode 100644 Slang/boost/units/systems/cgs/volume.hpp create mode 100644 Slang/boost/units/systems/cgs/wavenumber.hpp create mode 100644 Slang/boost/units/systems/detail/constants.hpp create mode 100644 Slang/boost/units/systems/information.hpp create mode 100644 Slang/boost/units/systems/information/bit.hpp create mode 100644 Slang/boost/units/systems/information/byte.hpp create mode 100644 Slang/boost/units/systems/information/hartley.hpp create mode 100644 Slang/boost/units/systems/information/nat.hpp create mode 100644 Slang/boost/units/systems/information/prefixes.hpp create mode 100644 Slang/boost/units/systems/information/shannon.hpp create mode 100644 Slang/boost/units/systems/si.hpp create mode 100644 Slang/boost/units/systems/si/absorbed_dose.hpp create mode 100644 Slang/boost/units/systems/si/acceleration.hpp create mode 100644 Slang/boost/units/systems/si/action.hpp create mode 100644 Slang/boost/units/systems/si/activity.hpp create mode 100644 Slang/boost/units/systems/si/amount.hpp create mode 100644 Slang/boost/units/systems/si/angular_acceleration.hpp create mode 100644 Slang/boost/units/systems/si/angular_momentum.hpp create mode 100644 Slang/boost/units/systems/si/angular_velocity.hpp create mode 100644 Slang/boost/units/systems/si/area.hpp create mode 100644 Slang/boost/units/systems/si/base.hpp create mode 100644 Slang/boost/units/systems/si/capacitance.hpp create mode 100644 Slang/boost/units/systems/si/catalytic_activity.hpp create mode 100644 Slang/boost/units/systems/si/codata/alpha_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/atomic-nuclear_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/deuteron_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/electromagnetic_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/electron_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/helion_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/muon_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/neutron_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/physico-chemical_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/proton_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/tau_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/triton_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata/typedefs.hpp create mode 100644 Slang/boost/units/systems/si/codata/universal_constants.hpp create mode 100644 Slang/boost/units/systems/si/codata_constants.hpp create mode 100644 Slang/boost/units/systems/si/conductance.hpp create mode 100644 Slang/boost/units/systems/si/conductivity.hpp create mode 100644 Slang/boost/units/systems/si/current.hpp create mode 100644 Slang/boost/units/systems/si/dimensionless.hpp create mode 100644 Slang/boost/units/systems/si/dose_equivalent.hpp create mode 100644 Slang/boost/units/systems/si/dynamic_viscosity.hpp create mode 100644 Slang/boost/units/systems/si/electric_charge.hpp create mode 100644 Slang/boost/units/systems/si/electric_potential.hpp create mode 100644 Slang/boost/units/systems/si/energy.hpp create mode 100644 Slang/boost/units/systems/si/force.hpp create mode 100644 Slang/boost/units/systems/si/frequency.hpp create mode 100644 Slang/boost/units/systems/si/illuminance.hpp create mode 100644 Slang/boost/units/systems/si/impedance.hpp create mode 100644 Slang/boost/units/systems/si/inductance.hpp create mode 100644 Slang/boost/units/systems/si/io.hpp create mode 100644 Slang/boost/units/systems/si/kinematic_viscosity.hpp create mode 100644 Slang/boost/units/systems/si/length.hpp create mode 100644 Slang/boost/units/systems/si/luminous_flux.hpp create mode 100644 Slang/boost/units/systems/si/luminous_intensity.hpp create mode 100644 Slang/boost/units/systems/si/magnetic_field_intensity.hpp create mode 100644 Slang/boost/units/systems/si/magnetic_flux.hpp create mode 100644 Slang/boost/units/systems/si/magnetic_flux_density.hpp create mode 100644 Slang/boost/units/systems/si/mass.hpp create mode 100644 Slang/boost/units/systems/si/mass_density.hpp create mode 100644 Slang/boost/units/systems/si/moment_of_inertia.hpp create mode 100644 Slang/boost/units/systems/si/momentum.hpp create mode 100644 Slang/boost/units/systems/si/permeability.hpp create mode 100644 Slang/boost/units/systems/si/permittivity.hpp create mode 100644 Slang/boost/units/systems/si/plane_angle.hpp create mode 100644 Slang/boost/units/systems/si/power.hpp create mode 100644 Slang/boost/units/systems/si/prefixes.hpp create mode 100644 Slang/boost/units/systems/si/pressure.hpp create mode 100644 Slang/boost/units/systems/si/reluctance.hpp create mode 100644 Slang/boost/units/systems/si/resistance.hpp create mode 100644 Slang/boost/units/systems/si/resistivity.hpp create mode 100644 Slang/boost/units/systems/si/solid_angle.hpp create mode 100644 Slang/boost/units/systems/si/surface_density.hpp create mode 100644 Slang/boost/units/systems/si/surface_tension.hpp create mode 100644 Slang/boost/units/systems/si/temperature.hpp create mode 100644 Slang/boost/units/systems/si/time.hpp create mode 100644 Slang/boost/units/systems/si/torque.hpp create mode 100644 Slang/boost/units/systems/si/velocity.hpp create mode 100644 Slang/boost/units/systems/si/volume.hpp create mode 100644 Slang/boost/units/systems/si/wavenumber.hpp create mode 100644 Slang/boost/units/systems/temperature/celsius.hpp create mode 100644 Slang/boost/units/systems/temperature/fahrenheit.hpp create mode 100644 Slang/boost/units/unit.hpp create mode 100644 Slang/boost/units/units_fwd.hpp create mode 100644 Slang/boost/unordered/detail/fwd.hpp create mode 100644 Slang/boost/unordered/detail/implementation.hpp create mode 100644 Slang/boost/unordered/detail/map.hpp create mode 100644 Slang/boost/unordered/detail/set.hpp create mode 100644 Slang/boost/unordered/unordered_map.hpp create mode 100644 Slang/boost/unordered/unordered_map_fwd.hpp create mode 100644 Slang/boost/unordered/unordered_set.hpp create mode 100644 Slang/boost/unordered/unordered_set_fwd.hpp create mode 100644 Slang/boost/unordered_map.hpp create mode 100644 Slang/boost/unordered_set.hpp create mode 100644 Slang/boost/utility.hpp create mode 100644 Slang/boost/utility/addressof.hpp create mode 100644 Slang/boost/utility/base_from_member.hpp create mode 100644 Slang/boost/utility/binary.hpp create mode 100644 Slang/boost/utility/compare_pointees.hpp create mode 100644 Slang/boost/utility/declval.hpp create mode 100644 Slang/boost/utility/detail/in_place_factory_prefix.hpp create mode 100644 Slang/boost/utility/detail/in_place_factory_suffix.hpp create mode 100644 Slang/boost/utility/detail/minstd_rand.hpp create mode 100644 Slang/boost/utility/detail/result_of_iterate.hpp create mode 100644 Slang/boost/utility/detail/result_of_variadic.hpp create mode 100644 Slang/boost/utility/enable_if.hpp create mode 100644 Slang/boost/utility/explicit_operator_bool.hpp create mode 100644 Slang/boost/utility/identity_type.hpp create mode 100644 Slang/boost/utility/in_place_factory.hpp create mode 100644 Slang/boost/utility/result_of.hpp create mode 100644 Slang/boost/utility/string_ref.hpp create mode 100644 Slang/boost/utility/string_ref_fwd.hpp create mode 100644 Slang/boost/utility/string_view.hpp create mode 100644 Slang/boost/utility/string_view_fwd.hpp create mode 100644 Slang/boost/utility/swap.hpp create mode 100644 Slang/boost/utility/typed_in_place_factory.hpp create mode 100644 Slang/boost/utility/value_init.hpp create mode 100644 Slang/boost/variant.hpp create mode 100644 Slang/boost/variant2.hpp create mode 100644 Slang/boost/version.hpp create mode 100644 Slang/boost/visit_each.hpp create mode 100644 Slang/boost/wave.hpp create mode 100644 Slang/boost/weak_ptr.hpp create mode 100644 Slang/build/boost/align.hpp create mode 100644 Slang/build/boost/aligned_storage.hpp create mode 100644 Slang/build/boost/any.hpp create mode 100644 Slang/build/boost/any/bad_any_cast.hpp create mode 100644 Slang/build/boost/any/basic_any.hpp create mode 100644 Slang/build/boost/any/fwd.hpp create mode 100644 Slang/build/boost/array.hpp create mode 100644 Slang/build/boost/asio.hpp create mode 100644 Slang/build/boost/assert.hpp create mode 100644 Slang/build/boost/assign.hpp create mode 100644 Slang/build/boost/atomic.hpp create mode 100644 Slang/build/boost/beast.hpp create mode 100644 Slang/build/boost/bimap.hpp create mode 100644 Slang/build/boost/bind.hpp create mode 100644 Slang/build/boost/blank.hpp create mode 100644 Slang/build/boost/blank_fwd.hpp create mode 100644 Slang/build/boost/call_traits.hpp create mode 100644 Slang/build/boost/callable_traits.hpp create mode 100644 Slang/build/boost/cast.hpp create mode 100644 Slang/build/boost/cerrno.hpp create mode 100644 Slang/build/boost/checked_delete.hpp create mode 100644 Slang/build/boost/chrono.hpp create mode 100644 Slang/build/boost/circular_buffer.hpp create mode 100644 Slang/build/boost/circular_buffer_fwd.hpp create mode 100644 Slang/build/boost/compressed_pair.hpp create mode 100644 Slang/build/boost/compute.hpp create mode 100644 Slang/build/boost/concept_archetype.hpp create mode 100644 Slang/build/boost/concept_check.hpp create mode 100644 Slang/build/boost/config.hpp create mode 100644 Slang/build/boost/contract.hpp create mode 100644 Slang/build/boost/contract_macro.hpp create mode 100644 Slang/build/boost/convert.hpp create mode 100644 Slang/build/boost/core/addressof.hpp create mode 100644 Slang/build/boost/core/alloc_construct.hpp create mode 100644 Slang/build/boost/core/allocator_access.hpp create mode 100644 Slang/build/boost/core/bit.hpp create mode 100644 Slang/build/boost/core/checked_delete.hpp create mode 100644 Slang/build/boost/core/cmath.hpp create mode 100644 Slang/build/boost/core/default_allocator.hpp create mode 100644 Slang/build/boost/core/demangle.hpp create mode 100644 Slang/build/boost/core/detail/splitmix64.hpp create mode 100644 Slang/build/boost/core/detail/string_view.hpp create mode 100644 Slang/build/boost/core/empty_value.hpp create mode 100644 Slang/build/boost/core/enable_if.hpp create mode 100644 Slang/build/boost/core/exchange.hpp create mode 100644 Slang/build/boost/core/explicit_operator_bool.hpp create mode 100644 Slang/build/boost/core/first_scalar.hpp create mode 100644 Slang/build/boost/core/ignore_unused.hpp create mode 100644 Slang/build/boost/core/is_same.hpp create mode 100644 Slang/build/boost/core/lightweight_test.hpp create mode 100644 Slang/build/boost/core/lightweight_test_trait.hpp create mode 100644 Slang/build/boost/core/no_exceptions_support.hpp create mode 100644 Slang/build/boost/core/noinit_adaptor.hpp create mode 100644 Slang/build/boost/core/noncopyable.hpp create mode 100644 Slang/build/boost/core/null_deleter.hpp create mode 100644 Slang/build/boost/core/nvp.hpp create mode 100644 Slang/build/boost/core/pointer_traits.hpp create mode 100644 Slang/build/boost/core/quick_exit.hpp create mode 100644 Slang/build/boost/core/ref.hpp create mode 100644 Slang/build/boost/core/scoped_enum.hpp create mode 100644 Slang/build/boost/core/span.hpp create mode 100644 Slang/build/boost/core/swap.hpp create mode 100644 Slang/build/boost/core/type_name.hpp create mode 100644 Slang/build/boost/core/typeinfo.hpp create mode 100644 Slang/build/boost/core/uncaught_exceptions.hpp create mode 100644 Slang/build/boost/core/underlying_type.hpp create mode 100644 Slang/build/boost/core/use_default.hpp create mode 100644 Slang/build/boost/crc.hpp create mode 100644 Slang/build/boost/cregex.hpp create mode 100644 Slang/build/boost/cstdfloat.hpp create mode 100644 Slang/build/boost/cstdint.hpp create mode 100644 Slang/build/boost/cstdlib.hpp create mode 100644 Slang/build/boost/current_function.hpp create mode 100644 Slang/build/boost/cxx11_char_types.hpp create mode 100644 Slang/build/boost/date_time.hpp create mode 100644 Slang/build/boost/describe.hpp create mode 100644 Slang/build/boost/dll.hpp create mode 100644 Slang/build/boost/dynamic_bitset.hpp create mode 100644 Slang/build/boost/dynamic_bitset_fwd.hpp create mode 100644 Slang/build/boost/enable_shared_from_this.hpp create mode 100644 Slang/build/boost/endian.hpp create mode 100644 Slang/build/boost/exception_ptr.hpp create mode 100644 Slang/build/boost/filesystem.hpp create mode 100644 Slang/build/boost/flyweight.hpp create mode 100644 Slang/build/boost/foreach.hpp create mode 100644 Slang/build/boost/foreach_fwd.hpp create mode 100644 Slang/build/boost/format.hpp create mode 100644 Slang/build/boost/function.hpp create mode 100644 Slang/build/boost/function_equal.hpp create mode 100644 Slang/build/boost/function_output_iterator.hpp create mode 100644 Slang/build/boost/functional.hpp create mode 100644 Slang/build/boost/generator_iterator.hpp create mode 100644 Slang/build/boost/geometry.hpp create mode 100644 Slang/build/boost/get_pointer.hpp create mode 100644 Slang/build/boost/gil.hpp create mode 100644 Slang/build/boost/hana.hpp create mode 100644 Slang/build/boost/histogram.hpp create mode 100644 Slang/build/boost/hof.hpp create mode 100644 Slang/build/boost/implicit_cast.hpp create mode 100644 Slang/build/boost/indirect_reference.hpp create mode 100644 Slang/build/boost/integer.hpp create mode 100644 Slang/build/boost/integer_fwd.hpp create mode 100644 Slang/build/boost/integer_traits.hpp create mode 100644 Slang/build/boost/intrusive_ptr.hpp create mode 100644 Slang/build/boost/io_fwd.hpp create mode 100644 Slang/build/boost/is_placeholder.hpp create mode 100644 Slang/build/boost/iterator.hpp create mode 100644 Slang/build/boost/iterator_adaptors.hpp create mode 100644 Slang/build/boost/json.hpp create mode 100644 Slang/build/boost/lambda2.hpp create mode 100644 Slang/build/boost/leaf.hpp create mode 100644 Slang/build/boost/lexical_cast.hpp create mode 100644 Slang/build/boost/limits.hpp create mode 100644 Slang/build/boost/local_function.hpp create mode 100644 Slang/build/boost/locale.hpp create mode 100644 Slang/build/boost/make_default.hpp create mode 100644 Slang/build/boost/make_shared.hpp create mode 100644 Slang/build/boost/make_unique.hpp create mode 100644 Slang/build/boost/math_fwd.hpp create mode 100644 Slang/build/boost/mem_fn.hpp create mode 100644 Slang/build/boost/memory_order.hpp create mode 100644 Slang/build/boost/metaparse.hpp create mode 100644 Slang/build/boost/mp11.hpp create mode 100644 Slang/build/boost/mpi.hpp create mode 100644 Slang/build/boost/multi_array.hpp create mode 100644 Slang/build/boost/multi_index_container.hpp create mode 100644 Slang/build/boost/multi_index_container_fwd.hpp create mode 100644 Slang/build/boost/next_prior.hpp create mode 100644 Slang/build/boost/non_type.hpp create mode 100644 Slang/build/boost/noncopyable.hpp create mode 100644 Slang/build/boost/nondet_random.hpp create mode 100644 Slang/build/boost/none.hpp create mode 100644 Slang/build/boost/none_t.hpp create mode 100644 Slang/build/boost/operators.hpp create mode 100644 Slang/build/boost/operators_v1.hpp create mode 100644 Slang/build/boost/optional.hpp create mode 100644 Slang/build/boost/outcome.hpp create mode 100644 Slang/build/boost/parameter.hpp create mode 100644 Slang/build/boost/pfr.hpp create mode 100644 Slang/build/boost/phoenix.hpp create mode 100644 Slang/build/boost/pointee.hpp create mode 100644 Slang/build/boost/pointer_cast.hpp create mode 100644 Slang/build/boost/pointer_to_other.hpp create mode 100644 Slang/build/boost/polymorphic_cast.hpp create mode 100644 Slang/build/boost/polymorphic_pointer_cast.hpp create mode 100644 Slang/build/boost/predef.h create mode 100644 Slang/build/boost/preprocessor.hpp create mode 100644 Slang/build/boost/process.hpp create mode 100644 Slang/build/boost/program_options.hpp create mode 100644 Slang/build/boost/progress.hpp create mode 100644 Slang/build/boost/python.hpp create mode 100644 Slang/build/boost/qvm.hpp create mode 100644 Slang/build/boost/qvm_lite.hpp create mode 100644 Slang/build/boost/random.hpp create mode 100644 Slang/build/boost/range.hpp create mode 100644 Slang/build/boost/ratio.hpp create mode 100644 Slang/build/boost/rational.hpp create mode 100644 Slang/build/boost/ref.hpp create mode 100644 Slang/build/boost/regex.h create mode 100644 Slang/build/boost/regex.hpp create mode 100644 Slang/build/boost/regex_fwd.hpp create mode 100644 Slang/build/boost/scope_exit.hpp create mode 100644 Slang/build/boost/scoped_array.hpp create mode 100644 Slang/build/boost/scoped_ptr.hpp create mode 100644 Slang/build/boost/shared_array.hpp create mode 100644 Slang/build/boost/shared_container_iterator.hpp create mode 100644 Slang/build/boost/shared_ptr.hpp create mode 100644 Slang/build/boost/signals2.hpp create mode 100644 Slang/build/boost/smart_ptr.hpp create mode 100644 Slang/build/boost/spirit.hpp create mode 100644 Slang/build/boost/stacktrace.hpp create mode 100644 Slang/build/boost/static_assert.hpp create mode 100644 Slang/build/boost/static_string.hpp create mode 100644 Slang/build/boost/swap.hpp create mode 100644 Slang/build/boost/system.hpp create mode 100644 Slang/build/boost/thread.hpp create mode 100644 Slang/build/boost/throw_exception.hpp create mode 100644 Slang/build/boost/timer.hpp create mode 100644 Slang/build/boost/token_functions.hpp create mode 100644 Slang/build/boost/token_iterator.hpp create mode 100644 Slang/build/boost/tokenizer.hpp create mode 100644 Slang/build/boost/type.hpp create mode 100644 Slang/build/boost/type_index.hpp create mode 100644 Slang/build/boost/type_index/ctti_type_index.hpp create mode 100644 Slang/build/boost/type_index/detail/compile_time_type_info.hpp create mode 100644 Slang/build/boost/type_index/detail/ctti_register_class.hpp create mode 100644 Slang/build/boost/type_index/detail/stl_register_class.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/pointer_cast.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/reference_cast.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/register_runtime_class.hpp create mode 100644 Slang/build/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp create mode 100644 Slang/build/boost/type_index/stl_type_index.hpp create mode 100644 Slang/build/boost/type_index/type_index_facade.hpp create mode 100644 Slang/build/boost/type_traits.hpp create mode 100644 Slang/build/boost/type_traits/add_const.hpp create mode 100644 Slang/build/boost/type_traits/add_cv.hpp create mode 100644 Slang/build/boost/type_traits/add_lvalue_reference.hpp create mode 100644 Slang/build/boost/type_traits/add_pointer.hpp create mode 100644 Slang/build/boost/type_traits/add_reference.hpp create mode 100644 Slang/build/boost/type_traits/add_rvalue_reference.hpp create mode 100644 Slang/build/boost/type_traits/add_volatile.hpp create mode 100644 Slang/build/boost/type_traits/aligned_storage.hpp create mode 100644 Slang/build/boost/type_traits/alignment_of.hpp create mode 100644 Slang/build/boost/type_traits/alignment_traits.hpp create mode 100644 Slang/build/boost/type_traits/arithmetic_traits.hpp create mode 100644 Slang/build/boost/type_traits/array_traits.hpp create mode 100644 Slang/build/boost/type_traits/broken_compiler_spec.hpp create mode 100644 Slang/build/boost/type_traits/common_type.hpp create mode 100644 Slang/build/boost/type_traits/composite_traits.hpp create mode 100644 Slang/build/boost/type_traits/conditional.hpp create mode 100644 Slang/build/boost/type_traits/config.hpp create mode 100644 Slang/build/boost/type_traits/conjunction.hpp create mode 100644 Slang/build/boost/type_traits/conversion_traits.hpp create mode 100644 Slang/build/boost/type_traits/copy_cv.hpp create mode 100644 Slang/build/boost/type_traits/copy_cv_ref.hpp create mode 100644 Slang/build/boost/type_traits/copy_reference.hpp create mode 100644 Slang/build/boost/type_traits/cv_traits.hpp create mode 100644 Slang/build/boost/type_traits/decay.hpp create mode 100644 Slang/build/boost/type_traits/declval.hpp create mode 100644 Slang/build/boost/type_traits/detail/bool_trait_def.hpp create mode 100644 Slang/build/boost/type_traits/detail/bool_trait_undef.hpp create mode 100644 Slang/build/boost/type_traits/detail/common_arithmetic_type.hpp create mode 100644 Slang/build/boost/type_traits/detail/common_type_impl.hpp create mode 100644 Slang/build/boost/type_traits/detail/composite_member_pointer_type.hpp create mode 100644 Slang/build/boost/type_traits/detail/composite_pointer_type.hpp create mode 100644 Slang/build/boost/type_traits/detail/config.hpp create mode 100644 Slang/build/boost/type_traits/detail/detector.hpp create mode 100644 Slang/build/boost/type_traits/detail/has_binary_operator.hpp create mode 100644 Slang/build/boost/type_traits/detail/has_postfix_operator.hpp create mode 100644 Slang/build/boost/type_traits/detail/has_prefix_operator.hpp create mode 100644 Slang/build/boost/type_traits/detail/ice_and.hpp create mode 100644 Slang/build/boost/type_traits/detail/ice_eq.hpp create mode 100644 Slang/build/boost/type_traits/detail/ice_not.hpp create mode 100644 Slang/build/boost/type_traits/detail/ice_or.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_function_cxx_03.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_function_cxx_11.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_function_msvc10_fix.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_function_ptr_helper.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_function_ptr_tester.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_likely_lambda.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp create mode 100644 Slang/build/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp create mode 100644 Slang/build/boost/type_traits/detail/mp_defer.hpp create mode 100644 Slang/build/boost/type_traits/detail/template_arity_spec.hpp create mode 100644 Slang/build/boost/type_traits/detail/yes_no_type.hpp create mode 100644 Slang/build/boost/type_traits/detected.hpp create mode 100644 Slang/build/boost/type_traits/detected_or.hpp create mode 100644 Slang/build/boost/type_traits/disjunction.hpp create mode 100644 Slang/build/boost/type_traits/enable_if.hpp create mode 100644 Slang/build/boost/type_traits/extent.hpp create mode 100644 Slang/build/boost/type_traits/floating_point_promotion.hpp create mode 100644 Slang/build/boost/type_traits/function_traits.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_and.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_and_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_or.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_or_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_xor.hpp create mode 100644 Slang/build/boost/type_traits/has_bit_xor_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_complement.hpp create mode 100644 Slang/build/boost/type_traits/has_dereference.hpp create mode 100644 Slang/build/boost/type_traits/has_divides.hpp create mode 100644 Slang/build/boost/type_traits/has_divides_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_equal_to.hpp create mode 100644 Slang/build/boost/type_traits/has_greater.hpp create mode 100644 Slang/build/boost/type_traits/has_greater_equal.hpp create mode 100644 Slang/build/boost/type_traits/has_left_shift.hpp create mode 100644 Slang/build/boost/type_traits/has_left_shift_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_less.hpp create mode 100644 Slang/build/boost/type_traits/has_less_equal.hpp create mode 100644 Slang/build/boost/type_traits/has_logical_and.hpp create mode 100644 Slang/build/boost/type_traits/has_logical_not.hpp create mode 100644 Slang/build/boost/type_traits/has_logical_or.hpp create mode 100644 Slang/build/boost/type_traits/has_minus.hpp create mode 100644 Slang/build/boost/type_traits/has_minus_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_modulus.hpp create mode 100644 Slang/build/boost/type_traits/has_modulus_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_multiplies.hpp create mode 100644 Slang/build/boost/type_traits/has_multiplies_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_negate.hpp create mode 100644 Slang/build/boost/type_traits/has_new_operator.hpp create mode 100644 Slang/build/boost/type_traits/has_not_equal_to.hpp create mode 100644 Slang/build/boost/type_traits/has_nothrow_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_nothrow_constructor.hpp create mode 100644 Slang/build/boost/type_traits/has_nothrow_copy.hpp create mode 100644 Slang/build/boost/type_traits/has_nothrow_destructor.hpp create mode 100644 Slang/build/boost/type_traits/has_operator.hpp create mode 100644 Slang/build/boost/type_traits/has_plus.hpp create mode 100644 Slang/build/boost/type_traits/has_plus_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_post_decrement.hpp create mode 100644 Slang/build/boost/type_traits/has_post_increment.hpp create mode 100644 Slang/build/boost/type_traits/has_pre_decrement.hpp create mode 100644 Slang/build/boost/type_traits/has_pre_increment.hpp create mode 100644 Slang/build/boost/type_traits/has_right_shift.hpp create mode 100644 Slang/build/boost/type_traits/has_right_shift_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_constructor.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_copy.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_destructor.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_move_assign.hpp create mode 100644 Slang/build/boost/type_traits/has_trivial_move_constructor.hpp create mode 100644 Slang/build/boost/type_traits/has_unary_minus.hpp create mode 100644 Slang/build/boost/type_traits/has_unary_plus.hpp create mode 100644 Slang/build/boost/type_traits/has_virtual_destructor.hpp create mode 100644 Slang/build/boost/type_traits/ice.hpp create mode 100644 Slang/build/boost/type_traits/integral_constant.hpp create mode 100644 Slang/build/boost/type_traits/integral_promotion.hpp create mode 100644 Slang/build/boost/type_traits/intrinsics.hpp create mode 100644 Slang/build/boost/type_traits/is_abstract.hpp create mode 100644 Slang/build/boost/type_traits/is_arithmetic.hpp create mode 100644 Slang/build/boost/type_traits/is_array.hpp create mode 100644 Slang/build/boost/type_traits/is_assignable.hpp create mode 100644 Slang/build/boost/type_traits/is_base_and_derived.hpp create mode 100644 Slang/build/boost/type_traits/is_base_of.hpp create mode 100644 Slang/build/boost/type_traits/is_base_of_tr1.hpp create mode 100644 Slang/build/boost/type_traits/is_bounded_array.hpp create mode 100644 Slang/build/boost/type_traits/is_class.hpp create mode 100644 Slang/build/boost/type_traits/is_complete.hpp create mode 100644 Slang/build/boost/type_traits/is_complex.hpp create mode 100644 Slang/build/boost/type_traits/is_compound.hpp create mode 100644 Slang/build/boost/type_traits/is_const.hpp create mode 100644 Slang/build/boost/type_traits/is_constructible.hpp create mode 100644 Slang/build/boost/type_traits/is_convertible.hpp create mode 100644 Slang/build/boost/type_traits/is_copy_assignable.hpp create mode 100644 Slang/build/boost/type_traits/is_copy_constructible.hpp create mode 100644 Slang/build/boost/type_traits/is_default_constructible.hpp create mode 100644 Slang/build/boost/type_traits/is_destructible.hpp create mode 100644 Slang/build/boost/type_traits/is_detected.hpp create mode 100644 Slang/build/boost/type_traits/is_detected_convertible.hpp create mode 100644 Slang/build/boost/type_traits/is_detected_exact.hpp create mode 100644 Slang/build/boost/type_traits/is_empty.hpp create mode 100644 Slang/build/boost/type_traits/is_enum.hpp create mode 100644 Slang/build/boost/type_traits/is_final.hpp create mode 100644 Slang/build/boost/type_traits/is_float.hpp create mode 100644 Slang/build/boost/type_traits/is_floating_point.hpp create mode 100644 Slang/build/boost/type_traits/is_function.hpp create mode 100644 Slang/build/boost/type_traits/is_fundamental.hpp create mode 100644 Slang/build/boost/type_traits/is_integral.hpp create mode 100644 Slang/build/boost/type_traits/is_list_constructible.hpp create mode 100644 Slang/build/boost/type_traits/is_lvalue_reference.hpp create mode 100644 Slang/build/boost/type_traits/is_member_function_pointer.hpp create mode 100644 Slang/build/boost/type_traits/is_member_object_pointer.hpp create mode 100644 Slang/build/boost/type_traits/is_member_pointer.hpp create mode 100644 Slang/build/boost/type_traits/is_noncopyable.hpp create mode 100644 Slang/build/boost/type_traits/is_nothrow_move_assignable.hpp create mode 100644 Slang/build/boost/type_traits/is_nothrow_move_constructible.hpp create mode 100644 Slang/build/boost/type_traits/is_nothrow_swappable.hpp create mode 100644 Slang/build/boost/type_traits/is_object.hpp create mode 100644 Slang/build/boost/type_traits/is_pod.hpp create mode 100644 Slang/build/boost/type_traits/is_pointer.hpp create mode 100644 Slang/build/boost/type_traits/is_polymorphic.hpp create mode 100644 Slang/build/boost/type_traits/is_reference.hpp create mode 100644 Slang/build/boost/type_traits/is_rvalue_reference.hpp create mode 100644 Slang/build/boost/type_traits/is_same.hpp create mode 100644 Slang/build/boost/type_traits/is_scalar.hpp create mode 100644 Slang/build/boost/type_traits/is_scoped_enum.hpp create mode 100644 Slang/build/boost/type_traits/is_signed.hpp create mode 100644 Slang/build/boost/type_traits/is_stateless.hpp create mode 100644 Slang/build/boost/type_traits/is_trivially_copyable.hpp create mode 100644 Slang/build/boost/type_traits/is_unbounded_array.hpp create mode 100644 Slang/build/boost/type_traits/is_union.hpp create mode 100644 Slang/build/boost/type_traits/is_unscoped_enum.hpp create mode 100644 Slang/build/boost/type_traits/is_unsigned.hpp create mode 100644 Slang/build/boost/type_traits/is_virtual_base_of.hpp create mode 100644 Slang/build/boost/type_traits/is_void.hpp create mode 100644 Slang/build/boost/type_traits/is_volatile.hpp create mode 100644 Slang/build/boost/type_traits/make_signed.hpp create mode 100644 Slang/build/boost/type_traits/make_unsigned.hpp create mode 100644 Slang/build/boost/type_traits/make_void.hpp create mode 100644 Slang/build/boost/type_traits/negation.hpp create mode 100644 Slang/build/boost/type_traits/nonesuch.hpp create mode 100644 Slang/build/boost/type_traits/object_traits.hpp create mode 100644 Slang/build/boost/type_traits/promote.hpp create mode 100644 Slang/build/boost/type_traits/rank.hpp create mode 100644 Slang/build/boost/type_traits/reference_traits.hpp create mode 100644 Slang/build/boost/type_traits/remove_all_extents.hpp create mode 100644 Slang/build/boost/type_traits/remove_bounds.hpp create mode 100644 Slang/build/boost/type_traits/remove_const.hpp create mode 100644 Slang/build/boost/type_traits/remove_cv.hpp create mode 100644 Slang/build/boost/type_traits/remove_cv_ref.hpp create mode 100644 Slang/build/boost/type_traits/remove_extent.hpp create mode 100644 Slang/build/boost/type_traits/remove_pointer.hpp create mode 100644 Slang/build/boost/type_traits/remove_reference.hpp create mode 100644 Slang/build/boost/type_traits/remove_volatile.hpp create mode 100644 Slang/build/boost/type_traits/same_traits.hpp create mode 100644 Slang/build/boost/type_traits/transform_traits.hpp create mode 100644 Slang/build/boost/type_traits/type_identity.hpp create mode 100644 Slang/build/boost/type_traits/type_with_alignment.hpp create mode 100644 Slang/build/boost/units/absolute.hpp create mode 100644 Slang/build/boost/units/base_dimension.hpp create mode 100644 Slang/build/boost/units/base_unit.hpp create mode 100644 Slang/build/boost/units/base_units/angle/arcminute.hpp create mode 100644 Slang/build/boost/units/base_units/angle/arcsecond.hpp create mode 100644 Slang/build/boost/units/base_units/angle/degree.hpp create mode 100644 Slang/build/boost/units/base_units/angle/gradian.hpp create mode 100644 Slang/build/boost/units/base_units/angle/radian.hpp create mode 100644 Slang/build/boost/units/base_units/angle/revolution.hpp create mode 100644 Slang/build/boost/units/base_units/angle/steradian.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/astronomical_unit.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/light_day.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/light_hour.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/light_minute.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/light_second.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/light_year.hpp create mode 100644 Slang/build/boost/units/base_units/astronomical/parsec.hpp create mode 100644 Slang/build/boost/units/base_units/cgs/biot.hpp create mode 100644 Slang/build/boost/units/base_units/cgs/centimeter.hpp create mode 100644 Slang/build/boost/units/base_units/cgs/gram.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/conversions.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/drachm.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/fluid_ounce.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/foot.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/furlong.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/gallon.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/gill.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/grain.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/hundredweight.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/inch.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/league.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/mile.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/ounce.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/pint.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/pound.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/quart.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/quarter.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/stone.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/thou.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/ton.hpp create mode 100644 Slang/build/boost/units/base_units/imperial/yard.hpp create mode 100644 Slang/build/boost/units/base_units/information/bit.hpp create mode 100644 Slang/build/boost/units/base_units/information/byte.hpp create mode 100644 Slang/build/boost/units/base_units/information/hartley.hpp create mode 100644 Slang/build/boost/units/base_units/information/nat.hpp create mode 100644 Slang/build/boost/units/base_units/information/shannon.hpp create mode 100644 Slang/build/boost/units/base_units/metric/angstrom.hpp create mode 100644 Slang/build/boost/units/base_units/metric/are.hpp create mode 100644 Slang/build/boost/units/base_units/metric/atmosphere.hpp create mode 100644 Slang/build/boost/units/base_units/metric/bar.hpp create mode 100644 Slang/build/boost/units/base_units/metric/barn.hpp create mode 100644 Slang/build/boost/units/base_units/metric/day.hpp create mode 100644 Slang/build/boost/units/base_units/metric/fermi.hpp create mode 100644 Slang/build/boost/units/base_units/metric/hectare.hpp create mode 100644 Slang/build/boost/units/base_units/metric/hour.hpp create mode 100644 Slang/build/boost/units/base_units/metric/knot.hpp create mode 100644 Slang/build/boost/units/base_units/metric/liter.hpp create mode 100644 Slang/build/boost/units/base_units/metric/micron.hpp create mode 100644 Slang/build/boost/units/base_units/metric/minute.hpp create mode 100644 Slang/build/boost/units/base_units/metric/mmHg.hpp create mode 100644 Slang/build/boost/units/base_units/metric/nautical_mile.hpp create mode 100644 Slang/build/boost/units/base_units/metric/ton.hpp create mode 100644 Slang/build/boost/units/base_units/metric/torr.hpp create mode 100644 Slang/build/boost/units/base_units/metric/year.hpp create mode 100644 Slang/build/boost/units/base_units/si/ampere.hpp create mode 100644 Slang/build/boost/units/base_units/si/candela.hpp create mode 100644 Slang/build/boost/units/base_units/si/kelvin.hpp create mode 100644 Slang/build/boost/units/base_units/si/kilogram.hpp create mode 100644 Slang/build/boost/units/base_units/si/meter.hpp create mode 100644 Slang/build/boost/units/base_units/si/mole.hpp create mode 100644 Slang/build/boost/units/base_units/si/second.hpp create mode 100644 Slang/build/boost/units/base_units/temperature/celsius.hpp create mode 100644 Slang/build/boost/units/base_units/temperature/conversions.hpp create mode 100644 Slang/build/boost/units/base_units/temperature/fahrenheit.hpp create mode 100644 Slang/build/boost/units/base_units/us/cup.hpp create mode 100644 Slang/build/boost/units/base_units/us/dram.hpp create mode 100644 Slang/build/boost/units/base_units/us/fluid_dram.hpp create mode 100644 Slang/build/boost/units/base_units/us/fluid_ounce.hpp create mode 100644 Slang/build/boost/units/base_units/us/foot.hpp create mode 100644 Slang/build/boost/units/base_units/us/gallon.hpp create mode 100644 Slang/build/boost/units/base_units/us/gill.hpp create mode 100644 Slang/build/boost/units/base_units/us/grain.hpp create mode 100644 Slang/build/boost/units/base_units/us/hundredweight.hpp create mode 100644 Slang/build/boost/units/base_units/us/inch.hpp create mode 100644 Slang/build/boost/units/base_units/us/mil.hpp create mode 100644 Slang/build/boost/units/base_units/us/mile.hpp create mode 100644 Slang/build/boost/units/base_units/us/minim.hpp create mode 100644 Slang/build/boost/units/base_units/us/ounce.hpp create mode 100644 Slang/build/boost/units/base_units/us/pint.hpp create mode 100644 Slang/build/boost/units/base_units/us/pound.hpp create mode 100644 Slang/build/boost/units/base_units/us/pound_force.hpp create mode 100644 Slang/build/boost/units/base_units/us/quart.hpp create mode 100644 Slang/build/boost/units/base_units/us/tablespoon.hpp create mode 100644 Slang/build/boost/units/base_units/us/teaspoon.hpp create mode 100644 Slang/build/boost/units/base_units/us/ton.hpp create mode 100644 Slang/build/boost/units/base_units/us/yard.hpp create mode 100644 Slang/build/boost/units/cmath.hpp create mode 100644 Slang/build/boost/units/config.hpp create mode 100644 Slang/build/boost/units/conversion.hpp create mode 100644 Slang/build/boost/units/derived_dimension.hpp create mode 100644 Slang/build/boost/units/detail/absolute_impl.hpp create mode 100644 Slang/build/boost/units/detail/cmath_impl.hpp create mode 100644 Slang/build/boost/units/detail/conversion_impl.hpp create mode 100644 Slang/build/boost/units/detail/dim_impl.hpp create mode 100644 Slang/build/boost/units/detail/dimension_impl.hpp create mode 100644 Slang/build/boost/units/detail/dimension_list.hpp create mode 100644 Slang/build/boost/units/detail/dimensionless_unit.hpp create mode 100644 Slang/build/boost/units/detail/heterogeneous_conversion.hpp create mode 100644 Slang/build/boost/units/detail/linear_algebra.hpp create mode 100644 Slang/build/boost/units/detail/one.hpp create mode 100644 Slang/build/boost/units/detail/ordinal.hpp create mode 100644 Slang/build/boost/units/detail/prevent_redefinition.hpp create mode 100644 Slang/build/boost/units/detail/push_front_if.hpp create mode 100644 Slang/build/boost/units/detail/push_front_or_add.hpp create mode 100644 Slang/build/boost/units/detail/sort.hpp create mode 100644 Slang/build/boost/units/detail/static_rational_power.hpp create mode 100644 Slang/build/boost/units/detail/unscale.hpp create mode 100644 Slang/build/boost/units/detail/utility.hpp create mode 100644 Slang/build/boost/units/dim.hpp create mode 100644 Slang/build/boost/units/dimension.hpp create mode 100644 Slang/build/boost/units/dimensionless_quantity.hpp create mode 100644 Slang/build/boost/units/dimensionless_type.hpp create mode 100644 Slang/build/boost/units/dimensionless_unit.hpp create mode 100644 Slang/build/boost/units/get_dimension.hpp create mode 100644 Slang/build/boost/units/get_system.hpp create mode 100644 Slang/build/boost/units/heterogeneous_system.hpp create mode 100644 Slang/build/boost/units/homogeneous_system.hpp create mode 100644 Slang/build/boost/units/io.hpp create mode 100644 Slang/build/boost/units/is_dim.hpp create mode 100644 Slang/build/boost/units/is_dimension_list.hpp create mode 100644 Slang/build/boost/units/is_dimensionless.hpp create mode 100644 Slang/build/boost/units/is_dimensionless_quantity.hpp create mode 100644 Slang/build/boost/units/is_dimensionless_unit.hpp create mode 100644 Slang/build/boost/units/is_quantity.hpp create mode 100644 Slang/build/boost/units/is_quantity_of_dimension.hpp create mode 100644 Slang/build/boost/units/is_quantity_of_system.hpp create mode 100644 Slang/build/boost/units/is_unit.hpp create mode 100644 Slang/build/boost/units/is_unit_of_dimension.hpp create mode 100644 Slang/build/boost/units/is_unit_of_system.hpp create mode 100644 Slang/build/boost/units/lambda.hpp create mode 100644 Slang/build/boost/units/limits.hpp create mode 100644 Slang/build/boost/units/make_scaled_unit.hpp create mode 100644 Slang/build/boost/units/make_system.hpp create mode 100644 Slang/build/boost/units/operators.hpp create mode 100644 Slang/build/boost/units/physical_dimensions.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/absorbed_dose.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/acceleration.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/action.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/activity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/amount.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/angular_acceleration.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/angular_momentum.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/angular_velocity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/area.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/capacitance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/conductance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/conductivity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/current.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/dose_equivalent.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/dynamic_viscosity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/electric_charge.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/electric_potential.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/energy.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/energy_density.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/force.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/frequency.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/heat_capacity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/illuminance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/impedance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/inductance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/information.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/kinematic_viscosity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/length.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/luminance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/luminous_flux.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/luminous_intensity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/magnetic_field_intensity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/magnetic_flux.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/magnetic_flux_density.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/mass.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/mass_density.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/molar_energy.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/molar_heat_capacity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/moment_of_inertia.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/momentum.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/permeability.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/permittivity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/plane_angle.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/power.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/pressure.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/reluctance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/resistance.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/resistivity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/solid_angle.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/specific_energy.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/specific_heat_capacity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/specific_volume.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/stress.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/surface_density.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/surface_tension.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/temperature.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/thermal_conductivity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/time.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/torque.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/velocity.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/volume.hpp create mode 100644 Slang/build/boost/units/physical_dimensions/wavenumber.hpp create mode 100644 Slang/build/boost/units/pow.hpp create mode 100644 Slang/build/boost/units/quantity.hpp create mode 100644 Slang/build/boost/units/reduce_unit.hpp create mode 100644 Slang/build/boost/units/scale.hpp create mode 100644 Slang/build/boost/units/scaled_base_unit.hpp create mode 100644 Slang/build/boost/units/static_constant.hpp create mode 100644 Slang/build/boost/units/static_rational.hpp create mode 100644 Slang/build/boost/units/systems/abstract.hpp create mode 100644 Slang/build/boost/units/systems/angle/degrees.hpp create mode 100644 Slang/build/boost/units/systems/angle/gradians.hpp create mode 100644 Slang/build/boost/units/systems/angle/revolutions.hpp create mode 100644 Slang/build/boost/units/systems/cgs.hpp create mode 100644 Slang/build/boost/units/systems/cgs/acceleration.hpp create mode 100644 Slang/build/boost/units/systems/cgs/area.hpp create mode 100644 Slang/build/boost/units/systems/cgs/base.hpp create mode 100644 Slang/build/boost/units/systems/cgs/current.hpp create mode 100644 Slang/build/boost/units/systems/cgs/dimensionless.hpp create mode 100644 Slang/build/boost/units/systems/cgs/dynamic_viscosity.hpp create mode 100644 Slang/build/boost/units/systems/cgs/energy.hpp create mode 100644 Slang/build/boost/units/systems/cgs/force.hpp create mode 100644 Slang/build/boost/units/systems/cgs/frequency.hpp create mode 100644 Slang/build/boost/units/systems/cgs/io.hpp create mode 100644 Slang/build/boost/units/systems/cgs/kinematic_viscosity.hpp create mode 100644 Slang/build/boost/units/systems/cgs/length.hpp create mode 100644 Slang/build/boost/units/systems/cgs/mass.hpp create mode 100644 Slang/build/boost/units/systems/cgs/mass_density.hpp create mode 100644 Slang/build/boost/units/systems/cgs/momentum.hpp create mode 100644 Slang/build/boost/units/systems/cgs/power.hpp create mode 100644 Slang/build/boost/units/systems/cgs/pressure.hpp create mode 100644 Slang/build/boost/units/systems/cgs/time.hpp create mode 100644 Slang/build/boost/units/systems/cgs/velocity.hpp create mode 100644 Slang/build/boost/units/systems/cgs/volume.hpp create mode 100644 Slang/build/boost/units/systems/cgs/wavenumber.hpp create mode 100644 Slang/build/boost/units/systems/detail/constants.hpp create mode 100644 Slang/build/boost/units/systems/information.hpp create mode 100644 Slang/build/boost/units/systems/information/bit.hpp create mode 100644 Slang/build/boost/units/systems/information/byte.hpp create mode 100644 Slang/build/boost/units/systems/information/hartley.hpp create mode 100644 Slang/build/boost/units/systems/information/nat.hpp create mode 100644 Slang/build/boost/units/systems/information/prefixes.hpp create mode 100644 Slang/build/boost/units/systems/information/shannon.hpp create mode 100644 Slang/build/boost/units/systems/si.hpp create mode 100644 Slang/build/boost/units/systems/si/absorbed_dose.hpp create mode 100644 Slang/build/boost/units/systems/si/acceleration.hpp create mode 100644 Slang/build/boost/units/systems/si/action.hpp create mode 100644 Slang/build/boost/units/systems/si/activity.hpp create mode 100644 Slang/build/boost/units/systems/si/amount.hpp create mode 100644 Slang/build/boost/units/systems/si/angular_acceleration.hpp create mode 100644 Slang/build/boost/units/systems/si/angular_momentum.hpp create mode 100644 Slang/build/boost/units/systems/si/angular_velocity.hpp create mode 100644 Slang/build/boost/units/systems/si/area.hpp create mode 100644 Slang/build/boost/units/systems/si/base.hpp create mode 100644 Slang/build/boost/units/systems/si/capacitance.hpp create mode 100644 Slang/build/boost/units/systems/si/catalytic_activity.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/alpha_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/atomic-nuclear_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/deuteron_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/electromagnetic_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/electron_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/helion_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/muon_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/neutron_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/physico-chemical_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/proton_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/tau_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/triton_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/typedefs.hpp create mode 100644 Slang/build/boost/units/systems/si/codata/universal_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/codata_constants.hpp create mode 100644 Slang/build/boost/units/systems/si/conductance.hpp create mode 100644 Slang/build/boost/units/systems/si/conductivity.hpp create mode 100644 Slang/build/boost/units/systems/si/current.hpp create mode 100644 Slang/build/boost/units/systems/si/dimensionless.hpp create mode 100644 Slang/build/boost/units/systems/si/dose_equivalent.hpp create mode 100644 Slang/build/boost/units/systems/si/dynamic_viscosity.hpp create mode 100644 Slang/build/boost/units/systems/si/electric_charge.hpp create mode 100644 Slang/build/boost/units/systems/si/electric_potential.hpp create mode 100644 Slang/build/boost/units/systems/si/energy.hpp create mode 100644 Slang/build/boost/units/systems/si/force.hpp create mode 100644 Slang/build/boost/units/systems/si/frequency.hpp create mode 100644 Slang/build/boost/units/systems/si/illuminance.hpp create mode 100644 Slang/build/boost/units/systems/si/impedance.hpp create mode 100644 Slang/build/boost/units/systems/si/inductance.hpp create mode 100644 Slang/build/boost/units/systems/si/io.hpp create mode 100644 Slang/build/boost/units/systems/si/kinematic_viscosity.hpp create mode 100644 Slang/build/boost/units/systems/si/length.hpp create mode 100644 Slang/build/boost/units/systems/si/luminous_flux.hpp create mode 100644 Slang/build/boost/units/systems/si/luminous_intensity.hpp create mode 100644 Slang/build/boost/units/systems/si/magnetic_field_intensity.hpp create mode 100644 Slang/build/boost/units/systems/si/magnetic_flux.hpp create mode 100644 Slang/build/boost/units/systems/si/magnetic_flux_density.hpp create mode 100644 Slang/build/boost/units/systems/si/mass.hpp create mode 100644 Slang/build/boost/units/systems/si/mass_density.hpp create mode 100644 Slang/build/boost/units/systems/si/moment_of_inertia.hpp create mode 100644 Slang/build/boost/units/systems/si/momentum.hpp create mode 100644 Slang/build/boost/units/systems/si/permeability.hpp create mode 100644 Slang/build/boost/units/systems/si/permittivity.hpp create mode 100644 Slang/build/boost/units/systems/si/plane_angle.hpp create mode 100644 Slang/build/boost/units/systems/si/power.hpp create mode 100644 Slang/build/boost/units/systems/si/prefixes.hpp create mode 100644 Slang/build/boost/units/systems/si/pressure.hpp create mode 100644 Slang/build/boost/units/systems/si/reluctance.hpp create mode 100644 Slang/build/boost/units/systems/si/resistance.hpp create mode 100644 Slang/build/boost/units/systems/si/resistivity.hpp create mode 100644 Slang/build/boost/units/systems/si/solid_angle.hpp create mode 100644 Slang/build/boost/units/systems/si/surface_density.hpp create mode 100644 Slang/build/boost/units/systems/si/surface_tension.hpp create mode 100644 Slang/build/boost/units/systems/si/temperature.hpp create mode 100644 Slang/build/boost/units/systems/si/time.hpp create mode 100644 Slang/build/boost/units/systems/si/torque.hpp create mode 100644 Slang/build/boost/units/systems/si/velocity.hpp create mode 100644 Slang/build/boost/units/systems/si/volume.hpp create mode 100644 Slang/build/boost/units/systems/si/wavenumber.hpp create mode 100644 Slang/build/boost/units/systems/temperature/celsius.hpp create mode 100644 Slang/build/boost/units/systems/temperature/fahrenheit.hpp create mode 100644 Slang/build/boost/units/unit.hpp create mode 100644 Slang/build/boost/units/units_fwd.hpp create mode 100644 Slang/build/boost/unordered/detail/fwd.hpp create mode 100644 Slang/build/boost/unordered/detail/implementation.hpp create mode 100644 Slang/build/boost/unordered/detail/map.hpp create mode 100644 Slang/build/boost/unordered/detail/set.hpp create mode 100644 Slang/build/boost/unordered/unordered_map.hpp create mode 100644 Slang/build/boost/unordered/unordered_map_fwd.hpp create mode 100644 Slang/build/boost/unordered/unordered_set.hpp create mode 100644 Slang/build/boost/unordered/unordered_set_fwd.hpp create mode 100644 Slang/build/boost/unordered_map.hpp create mode 100644 Slang/build/boost/unordered_set.hpp create mode 100644 Slang/build/boost/utility.hpp create mode 100644 Slang/build/boost/utility/addressof.hpp create mode 100644 Slang/build/boost/utility/base_from_member.hpp create mode 100644 Slang/build/boost/utility/binary.hpp create mode 100644 Slang/build/boost/utility/compare_pointees.hpp create mode 100644 Slang/build/boost/utility/declval.hpp create mode 100644 Slang/build/boost/utility/detail/in_place_factory_prefix.hpp create mode 100644 Slang/build/boost/utility/detail/in_place_factory_suffix.hpp create mode 100644 Slang/build/boost/utility/detail/minstd_rand.hpp create mode 100644 Slang/build/boost/utility/detail/result_of_iterate.hpp create mode 100644 Slang/build/boost/utility/detail/result_of_variadic.hpp create mode 100644 Slang/build/boost/utility/enable_if.hpp create mode 100644 Slang/build/boost/utility/explicit_operator_bool.hpp create mode 100644 Slang/build/boost/utility/identity_type.hpp create mode 100644 Slang/build/boost/utility/in_place_factory.hpp create mode 100644 Slang/build/boost/utility/result_of.hpp create mode 100644 Slang/build/boost/utility/string_ref.hpp create mode 100644 Slang/build/boost/utility/string_ref_fwd.hpp create mode 100644 Slang/build/boost/utility/string_view.hpp create mode 100644 Slang/build/boost/utility/string_view_fwd.hpp create mode 100644 Slang/build/boost/utility/swap.hpp create mode 100644 Slang/build/boost/utility/typed_in_place_factory.hpp create mode 100644 Slang/build/boost/utility/value_init.hpp create mode 100644 Slang/build/boost/variant.hpp create mode 100644 Slang/build/boost/variant2.hpp create mode 100644 Slang/build/boost/version.hpp create mode 100644 Slang/build/boost/visit_each.hpp create mode 100644 Slang/build/boost/wave.hpp create mode 100644 Slang/build/boost/weak_ptr.hpp diff --git a/Slang/Main.cpp b/Slang/Main.cpp index ae07f33..5a4a9a8 100644 --- a/Slang/Main.cpp +++ b/Slang/Main.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include "./boost/any.hpp" #include #include #include diff --git a/Slang/boost/align.hpp b/Slang/boost/align.hpp new file mode 100644 index 0000000..45fe36b --- /dev/null +++ b/Slang/boost/align.hpp @@ -0,0 +1,22 @@ +/* +Copyright 2014-2015 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_ALIGN_HPP +#define BOOST_ALIGN_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/aligned_storage.hpp b/Slang/boost/aligned_storage.hpp new file mode 100644 index 0000000..f400fa9 --- /dev/null +++ b/Slang/boost/aligned_storage.hpp @@ -0,0 +1,18 @@ +//----------------------------------------------------------------------------- +// boost aligned_storage.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 +// Eric Friedman, Itay Maman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ALIGNED_STORAGE_HPP +#define BOOST_ALIGNED_STORAGE_HPP + +#include + +#endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/Slang/boost/any.hpp b/Slang/boost/any.hpp new file mode 100644 index 0000000..a4e598f --- /dev/null +++ b/Slang/boost/any.hpp @@ -0,0 +1,344 @@ +// See http://www.boost.org/libs/any for Documentation. + +#ifndef BOOST_ANY_INCLUDED +#define BOOST_ANY_INCLUDED + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +// what: variant type boost::any +// who: contributed by Kevlin Henney, +// with features contributed and bugs found by +// Antony Polukhin, Ed Brey, Mark Rodgers, +// Peter Dimov, and James Curran +// when: July 2001, April 2013 - 2020 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + class any + { + public: // structors + + BOOST_CONSTEXPR any() BOOST_NOEXCEPT + : content(0) + { + } + + template + any(const ValueType & value) + : content(new holder< + BOOST_DEDUCED_TYPENAME remove_cv::type>::type + >(value)) + { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::value, + "boost::any shall not be constructed from boost::anys::basic_any" + ); + } + + any(const any & other) + : content(other.content ? other.content->clone() : 0) + { + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move constructor + any(any&& other) BOOST_NOEXCEPT + : content(other.content) + { + other.content = 0; + } + + // Perfect forwarding of ValueType + template + any(ValueType&& value + , typename boost::disable_if >::type* = 0 // disable if value has type `any&` + , typename boost::disable_if >::type* = 0) // disable if value has type `const ValueType&&` + : content(new holder< typename decay::type >(static_cast(value))) + { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::type>::value, + "boost::any shall not be constructed from boost::anys::basic_any" + ); + } +#endif + + ~any() BOOST_NOEXCEPT + { + delete content; + } + + public: // modifiers + + any & swap(any & rhs) BOOST_NOEXCEPT + { + placeholder* tmp = content; + content = rhs.content; + rhs.content = tmp; + return *this; + } + + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES + template + any & operator=(const ValueType & rhs) + { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::value, + "boost::anys::basic_any shall not be assigned into boost::any" + ); + any(rhs).swap(*this); + return *this; + } + + any & operator=(any rhs) + { + rhs.swap(*this); + return *this; + } + +#else + any & operator=(const any& rhs) + { + any(rhs).swap(*this); + return *this; + } + + // move assignment + any & operator=(any&& rhs) BOOST_NOEXCEPT + { + rhs.swap(*this); + any().swap(rhs); + return *this; + } + + // Perfect forwarding of ValueType + template + any & operator=(ValueType&& rhs) + { + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::type>::value, + "boost::anys::basic_any shall not be assigned into boost::any" + ); + any(static_cast(rhs)).swap(*this); + return *this; + } +#endif + + public: // queries + + bool empty() const BOOST_NOEXCEPT + { + return !content; + } + + void clear() BOOST_NOEXCEPT + { + any().swap(*this); + } + + const boost::typeindex::type_info& type() const BOOST_NOEXCEPT + { + return content ? content->type() : boost::typeindex::type_id().type_info(); + } + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + private: // types +#else + public: // types (public so any_cast can be non-friend) +#endif + + class BOOST_SYMBOL_VISIBLE placeholder + { + public: // structors + + virtual ~placeholder() + { + } + + public: // queries + + virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT = 0; + + virtual placeholder * clone() const = 0; + + }; + + template + class holder +#ifndef BOOST_NO_CXX11_FINAL + final +#endif + : public placeholder + { + public: // structors + + holder(const ValueType & value) + : held(value) + { + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + holder(ValueType&& value) + : held(static_cast< ValueType&& >(value)) + { + } +#endif + public: // queries + + const boost::typeindex::type_info& type() const BOOST_NOEXCEPT BOOST_OVERRIDE + { + return boost::typeindex::type_id().type_info(); + } + + placeholder * clone() const BOOST_OVERRIDE + { + return new holder(held); + } + + public: // representation + + ValueType held; + + private: // intentionally left unimplemented + holder & operator=(const holder &); + }; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + + private: // representation + + template + friend ValueType * any_cast(any *) BOOST_NOEXCEPT; + + template + friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT; + +#else + + public: // representation (public so any_cast can be non-friend) + +#endif + + placeholder * content; + + }; + + inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT + { + lhs.swap(rhs); + } + + template + ValueType * any_cast(any * operand) BOOST_NOEXCEPT + { + return operand && operand->type() == boost::typeindex::type_id() + ? boost::addressof( + static_cast::type> *>(operand->content)->held + ) + : 0; + } + + template + inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT + { + return any_cast(const_cast(operand)); + } + + template + ValueType any_cast(any & operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; + + + nonref * result = any_cast(boost::addressof(operand)); + if(!result) + boost::throw_exception(bad_any_cast()); + + // Attempt to avoid construction of a temporary object in cases when + // `ValueType` is not a reference. Example: + // `static_cast(*result);` + // which is equal to `std::string(*result);` + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_reference::value, + ValueType, + BOOST_DEDUCED_TYPENAME boost::add_reference::type + >::type ref_type; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local! +#endif + return static_cast(*result); +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + } + + template + inline ValueType any_cast(const any & operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; + return any_cast(const_cast(operand)); + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + inline ValueType any_cast(any&& operand) + { + BOOST_STATIC_ASSERT_MSG( + boost::is_rvalue_reference::value /*true if ValueType is rvalue or just a value*/ + || boost::is_const< typename boost::remove_reference::type >::value, + "boost::any_cast shall not be used for getting nonconst references to temporary objects" + ); + return any_cast(operand); + } +#endif + + + // Note: The "unsafe" versions of any_cast are not part of the + // public interface and may be removed at any time. They are + // required where we know what type is stored in the any and can't + // use typeid() comparison, e.g., when our types may travel across + // different shared libraries. + template + inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT + { + return boost::addressof( + static_cast *>(operand->content)->held + ); + } + + template + inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT + { + return unsafe_any_cast(const_cast(operand)); + } +} + +// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. +// Copyright Antony Polukhin, 2013-2021. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#endif diff --git a/Slang/boost/any/bad_any_cast.hpp b/Slang/boost/any/bad_any_cast.hpp new file mode 100644 index 0000000..f33e1ed --- /dev/null +++ b/Slang/boost/any/bad_any_cast.hpp @@ -0,0 +1,43 @@ +// Copyright Antony Polukhin, 2020-2021. +// +// Distributed under the 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/any for Documentation. + +#ifndef BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED +#define BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#ifndef BOOST_NO_RTTI +#include +#endif + +#include + +namespace boost { + +class BOOST_SYMBOL_VISIBLE bad_any_cast : +#ifndef BOOST_NO_RTTI + public std::bad_cast +#else + public std::exception +#endif +{ +public: + const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE + { + return "boost::bad_any_cast: " + "failed conversion using boost::any_cast"; + } +}; + +} // namespace boost + + +#endif // #ifndef BOOST_ANYS_BAD_ANY_CAST_HPP_INCLUDED diff --git a/Slang/boost/any/basic_any.hpp b/Slang/boost/any/basic_any.hpp new file mode 100644 index 0000000..d5a77ef --- /dev/null +++ b/Slang/boost/any/basic_any.hpp @@ -0,0 +1,480 @@ +// Copyright Ruslan Arutyunyan, 2019-2021. +// Copyright Antony Polukhin, 2021. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Contributed by Ruslan Arutyunyan + +#ifndef BOOST_ANYS_BASIC_ANY_HPP_INCLUDED +#define BOOST_ANYS_BASIC_ANY_HPP_INCLUDED + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace anys { + + template + class basic_any + { + BOOST_STATIC_ASSERT_MSG(OptimizeForSize > 0 && OptimizeForAlignment > 0, "Size and Align shall be positive values"); + BOOST_STATIC_ASSERT_MSG(OptimizeForSize >= OptimizeForAlignment, "Size shall non less than Align"); + BOOST_STATIC_ASSERT_MSG((OptimizeForAlignment & (OptimizeForAlignment - 1)) == 0, "Align shall be a power of 2"); + BOOST_STATIC_ASSERT_MSG(OptimizeForSize % OptimizeForAlignment == 0, "Size shall be multiple of alignment"); + private: + enum operation + { + Destroy, + Move, + Copy, + AnyCast, + UnsafeCast, + Typeinfo + }; + + template + static void* small_manager(operation op, basic_any& left, const basic_any* right, const boost::typeindex::type_info* info) + { + switch (op) + { + case Destroy: + BOOST_ASSERT(!left.empty()); + reinterpret_cast(&left.content.small_value)->~ValueType(); + break; + case Move: { + BOOST_ASSERT(left.empty()); + BOOST_ASSERT(right); + BOOST_ASSERT(!right->empty()); + BOOST_ASSERT(right->type() == boost::typeindex::type_id()); + ValueType* value = reinterpret_cast(&const_cast(right)->content.small_value); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + new (&left.content.small_value) ValueType(std::move(*value)); +#else + new (&left.content.small_value) ValueType(*value); +#endif + left.man = right->man; + reinterpret_cast(&right->content.small_value)->~ValueType(); + const_cast(right)->man = 0; + + }; + break; + + case Copy: + BOOST_ASSERT(left.empty()); + BOOST_ASSERT(right); + BOOST_ASSERT(!right->empty()); + BOOST_ASSERT(right->type() == boost::typeindex::type_id()); + new (&left.content.small_value) ValueType(*reinterpret_cast(&right->content.small_value)); + left.man = right->man; + break; + case AnyCast: + BOOST_ASSERT(info); + BOOST_ASSERT(!left.empty()); + return boost::typeindex::type_id() == *info ? + reinterpret_cast::type *>(&left.content.small_value) : 0; + case UnsafeCast: + BOOST_ASSERT(!left.empty()); + return reinterpret_cast::type *>(&left.content.small_value); + case Typeinfo: + return const_cast(static_cast(&boost::typeindex::type_id().type_info())); + } + + return 0; + } + + template + static void* large_manager(operation op, basic_any& left, const basic_any* right, const boost::typeindex::type_info* info) + { + switch (op) + { + case Destroy: + BOOST_ASSERT(!left.empty()); + delete static_cast(left.content.large_value); + break; + case Move: + BOOST_ASSERT(left.empty()); + BOOST_ASSERT(right); + BOOST_ASSERT(!right->empty()); + BOOST_ASSERT(right->type() == boost::typeindex::type_id()); + left.content.large_value = right->content.large_value; + left.man = right->man; + const_cast(right)->content.large_value = 0; + const_cast(right)->man = 0; + break; + case Copy: + BOOST_ASSERT(left.empty()); + BOOST_ASSERT(right); + BOOST_ASSERT(!right->empty()); + BOOST_ASSERT(right->type() == boost::typeindex::type_id()); + left.content.large_value = new ValueType(*static_cast(right->content.large_value)); + left.man = right->man; + break; + case AnyCast: + BOOST_ASSERT(info); + BOOST_ASSERT(!left.empty()); + return boost::typeindex::type_id() == *info ? + static_cast::type *>(left.content.large_value) : 0; + case UnsafeCast: + BOOST_ASSERT(!left.empty()); + return reinterpret_cast::type *>(left.content.large_value); + case Typeinfo: + return const_cast(static_cast(&boost::typeindex::type_id().type_info())); + } + + return 0; + } + + template + struct is_small_object : boost::integral_constant::value <= OptimizeForAlignment && + boost::is_nothrow_move_constructible::value> + {}; + + template + static void create(basic_any& any, const ValueType& value, boost::true_type) + { + typedef typename boost::decay::type DecayedType; + + any.man = &small_manager; + new (&any.content.small_value) ValueType(value); + } + + template + static void create(basic_any& any, const ValueType& value, boost::false_type) + { + typedef typename boost::decay::type DecayedType; + + any.man = &large_manager; + any.content.large_value = new DecayedType(value); + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + static void create(basic_any& any, ValueType&& value, boost::true_type) + { + typedef typename boost::decay::type DecayedType; + any.man = &small_manager; + new (&any.content.small_value) DecayedType(static_cast(value)); + } + + template + static void create(basic_any& any, ValueType&& value, boost::false_type) + { + typedef typename boost::decay::type DecayedType; + any.man = &large_manager; + any.content.large_value = new DecayedType(static_cast(value)); + } +#endif + public: // non-type template parameters accessors + static BOOST_CONSTEXPR_OR_CONST std::size_t buffer_size = OptimizeForSize; + static BOOST_CONSTEXPR_OR_CONST std::size_t buffer_align = OptimizeForAlignment; + + public: // structors + + BOOST_CONSTEXPR basic_any() BOOST_NOEXCEPT + : man(0), content() + { + } + + template + basic_any(const ValueType & value) + : man(0), content() + { + BOOST_STATIC_ASSERT_MSG( + !(boost::is_same::value), + "boost::anys::basic_any shall not be constructed from boost::any" + ); + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::value, + "boost::anys::basic_any shall not be constructed from boost::anys::basic_any" + ); + create(*this, value, is_small_object()); + } + + basic_any(const basic_any & other) + : man(0), content() + { + if (other.man) + { + other.man(Copy, *this, &other, 0); + } + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move constructor + basic_any(basic_any&& other) BOOST_NOEXCEPT + : man(0), content() + { + if (other.man) + { + other.man(Move, *this, &other, 0); + } + } + + // Perfect forwarding of ValueType + template + basic_any(ValueType&& value + , typename boost::disable_if >::type* = 0 // disable if value has type `basic_any&` + , typename boost::disable_if >::type* = 0) // disable if value has type `const ValueType&&` + : man(0), content() + { + typedef typename boost::decay::type DecayedType; + BOOST_STATIC_ASSERT_MSG( + !(boost::is_same::value), + "boost::anys::basic_any shall not be constructed from boost::any" + ); + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::value, + "boost::anys::basic_any shall not be constructed from boost::anys::basic_any" + ); + create(*this, static_cast(value), is_small_object()); + } +#endif + + ~basic_any() BOOST_NOEXCEPT + { + if (man) + { + man(Destroy, *this, 0, 0); + } + } + + public: // modifiers + + basic_any & swap(basic_any & rhs) BOOST_NOEXCEPT + { + if (this == &rhs) + { + return *this; + } + + if (man && rhs.man) + { + basic_any tmp; + rhs.man(Move, tmp, &rhs, 0); + man(Move, rhs, this, 0); + tmp.man(Move, *this, &tmp, 0); + } + else if (man) + { + man(Move, rhs, this, 0); + } + else if (rhs.man) + { + rhs.man(Move, *this, &rhs, 0); + } + return *this; + } + + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES + template + basic_any & operator=(const ValueType & rhs) + { + BOOST_STATIC_ASSERT_MSG( + !(boost::is_same::value), + "boost::any shall not be assigned into boost::anys::basic_any" + ); + BOOST_STATIC_ASSERT_MSG( + !anys::detail::is_basic_any::value, + "boost::anys::basic_any shall not be assigned into boost::anys::basic_any" + ); + basic_any(rhs).swap(*this); + return *this; + } + + basic_any & operator=(basic_any rhs) + { + rhs.swap(*this); + return *this; + } + +#else + basic_any & operator=(const basic_any& rhs) + { + basic_any(rhs).swap(*this); + return *this; + } + + // move assignment + basic_any & operator=(basic_any&& rhs) BOOST_NOEXCEPT + { + rhs.swap(*this); + basic_any().swap(rhs); + return *this; + } + + // Perfect forwarding of ValueType + template + basic_any & operator=(ValueType&& rhs) + { + typedef typename boost::decay::type DecayedType; + BOOST_STATIC_ASSERT_MSG( + !(boost::is_same::value), + "boost::any shall not be assigned into boost::anys::basic_any" + ); + BOOST_STATIC_ASSERT_MSG( + (!anys::detail::is_basic_any::value || boost::is_same::value), + "boost::anys::basic_any shall not be assigned into boost::anys::basic_any" + ); + basic_any(static_cast(rhs)).swap(*this); + return *this; + } +#endif + + public: // queries + + bool empty() const BOOST_NOEXCEPT + { + return !man; + } + + void clear() BOOST_NOEXCEPT + { + basic_any().swap(*this); + } + + const boost::typeindex::type_info& type() const BOOST_NOEXCEPT + { + return man + ? *static_cast(man(Typeinfo, const_cast(*this), 0, 0)) + : boost::typeindex::type_id().type_info(); + } + + private: // representation + + template + friend ValueType * any_cast(basic_any *) BOOST_NOEXCEPT; + + template + friend ValueType * unsafe_any_cast(basic_any *) BOOST_NOEXCEPT; + + typedef void*(*manager)(operation op, basic_any& left, const basic_any* right, const boost::typeindex::type_info* info); + + manager man; + + union content { + void * large_value; + typename boost::aligned_storage::type small_value; + } content; + }; + + template + void swap(basic_any& lhs, basic_any& rhs) BOOST_NOEXCEPT + { + lhs.swap(rhs); + } + + template + ValueType * any_cast(basic_any * operand) BOOST_NOEXCEPT + { + return operand->man ? + static_cast::type *>(operand->man(basic_any::AnyCast, *operand, 0, &boost::typeindex::type_id().type_info())) + : 0; + } + + template + inline const ValueType * any_cast(const basic_any * operand) BOOST_NOEXCEPT + { + return any_cast(const_cast *>(operand)); + } + + template + ValueType any_cast(basic_any & operand) + { + typedef typename remove_reference::type nonref; + + nonref * result = any_cast(boost::addressof(operand)); + if(!result) + boost::throw_exception(bad_any_cast()); + + // Attempt to avoid construction of a temporary object in cases when + // `ValueType` is not a reference. Example: + // `static_cast(*result);` + // which is equal to `std::string(*result);` + typedef typename boost::conditional< + boost::is_reference::value, + ValueType, + typename boost::add_reference::type + >::type ref_type; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local! +#endif + return static_cast(*result); +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + } + + template + inline ValueType any_cast(const basic_any & operand) + { + typedef typename remove_reference::type nonref; + return any_cast(const_cast &>(operand)); + } + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + inline ValueType any_cast(basic_any&& operand) + { + BOOST_STATIC_ASSERT_MSG( + boost::is_rvalue_reference::value /*true if ValueType is rvalue or just a value*/ + || boost::is_const< typename boost::remove_reference::type >::value, + "boost::any_cast shall not be used for getting nonconst references to temporary objects" + ); + return any_cast(operand); + } +#endif + + + // Note: The "unsafe" versions of any_cast are not part of the + // public interface and may be removed at any time. They are + // required where we know what type is stored in the any and can't + // use typeid() comparison, e.g., when our types may travel across + // different shared libraries. + template + inline ValueType * unsafe_any_cast(basic_any * operand) BOOST_NOEXCEPT + { + return static_cast(operand->man(basic_any::UnsafeCast, *operand, 0, 0)); + } + + template + inline const ValueType * unsafe_any_cast(const basic_any * operand) BOOST_NOEXCEPT + { + return unsafe_any_cast(const_cast *>(operand)); + } + +} // namespace anys + +using boost::anys::any_cast; +using boost::anys::unsafe_any_cast; + +} // namespace boost + +#endif // #ifndef BOOST_ANYS_BASIC_ANY_HPP_INCLUDED diff --git a/Slang/boost/any/fwd.hpp b/Slang/boost/any/fwd.hpp new file mode 100644 index 0000000..78846d6 --- /dev/null +++ b/Slang/boost/any/fwd.hpp @@ -0,0 +1,40 @@ +// Copyright Antony Polukhin, 2021. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Contributed by Ruslan Arutyunyan +#ifndef BOOST_ANY_ANYS_FWD_HPP +#define BOOST_ANY_ANYS_FWD_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + + #include + +namespace boost { + +class any; + +namespace anys { + +template::value> +class basic_any; + +namespace detail { + template + struct is_basic_any: public false_type {}; + + + template + struct is_basic_any > : public true_type {}; +} // namespace detail + +} // namespace anys + +} // namespace boost + +#endif // #ifndef BOOST_ANY_ANYS_FWD_HPP diff --git a/Slang/boost/array.hpp b/Slang/boost/array.hpp new file mode 100644 index 0000000..a32d1e9 --- /dev/null +++ b/Slang/boost/array.hpp @@ -0,0 +1,456 @@ +/* The following code declares class array, + * an STL container (as wrapper) for arrays of constant size. + * + * See + * http://www.boost.org/libs/array/ + * for documentation. + * + * The original author site is at: http://www.josuttis.com/ + * + * (C) Copyright Nicolai M. Josuttis 2001. + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * 9 Jan 2013 - (mtc) Added constexpr + * 14 Apr 2012 - (mtc) Added support for boost::hash + * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. + * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. + * See or Trac issue #3168 + * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) + * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) + * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) + * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. + * 05 Aug 2001 - minor update (Nico Josuttis) + * 20 Jan 2001 - STLport fix (Beman Dawes) + * 29 Sep 2000 - Initial Revision (Nico Josuttis) + * + * Jan 29, 2004 + */ +#ifndef BOOST_ARRAY_HPP +#define BOOST_ARRAY_HPP + +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(push) +# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe +# pragma warning(disable:4510) // boost::array' : default constructor could not be generated +# pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include + +// FIXES for broken compilers +#include + + +namespace boost { + + template + class array { + public: + T elems[N]; // fixed-size array of elements of type T + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return elems; } + const_iterator begin() const { return elems; } + const_iterator cbegin() const { return elems; } + + iterator end() { return elems+N; } + const_iterator end() const { return elems+N; } + const_iterator cend() const { return elems+N; } + + // reverse iterator support +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type i) + { + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; + } + + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const + { + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; + } + + // at() with range check + reference at(size_type i) { return rangecheck(i), elems[i]; } + /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; } + + // front() and back() + reference front() + { + return elems[0]; + } + + BOOST_CONSTEXPR const_reference front() const + { + return elems[0]; + } + + reference back() + { + return elems[N-1]; + } + + BOOST_CONSTEXPR const_reference back() const + { + return elems[N-1]; + } + + // size is constant + static BOOST_CONSTEXPR size_type size() { return N; } + static BOOST_CONSTEXPR bool empty() { return false; } + static BOOST_CONSTEXPR size_type max_size() { return N; } + enum { static_size = N }; + + // swap (note: linear complexity) + void swap (array& y) { + for (size_type i = 0; i < N; ++i) + boost::swap(elems[i],y.elems[i]); + } + + // direct access to data (read-only) + const T* data() const { return elems; } + T* data() { return elems; } + + // use array as C array (direct read/write access to data) + T* c_array() { return elems; } + + // assignment with type conversion + template + array& operator= (const array& rhs) { + std::copy(rhs.begin(),rhs.end(), begin()); + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } // A synonym for fill + void fill (const T& value) + { + std::fill_n(begin(),size(),value); + } + + // check range (may be private because it is static) + static BOOST_CONSTEXPR bool rangecheck (size_type i) { + return i >= size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true; + } + + }; + + template< class T > + class array< T, 0 > { + + public: + // type definitions + typedef T value_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // iterator support + iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } + const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + + iterator end() { return begin(); } + const_iterator end() const { return begin(); } + const_iterator cend() const { return cbegin(); } + + // reverse iterator support +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // workaround for broken reverse_iterator implementations + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } + + // operator[] + reference operator[](size_type /*i*/) + { + return failed_rangecheck(); + } + + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const + { + return failed_rangecheck(); + } + + // at() with range check + reference at(size_type /*i*/) { return failed_rangecheck(); } + /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); } + + // front() and back() + reference front() + { + return failed_rangecheck(); + } + + BOOST_CONSTEXPR const_reference front() const + { + return failed_rangecheck(); + } + + reference back() + { + return failed_rangecheck(); + } + + BOOST_CONSTEXPR const_reference back() const + { + return failed_rangecheck(); + } + + // size is constant + static BOOST_CONSTEXPR size_type size() { return 0; } + static BOOST_CONSTEXPR bool empty() { return true; } + static BOOST_CONSTEXPR size_type max_size() { return 0; } + enum { static_size = 0 }; + + void swap (array& /*y*/) { + } + + // direct access to data (read-only) + const T* data() const { return 0; } + T* data() { return 0; } + + // use array as C array (direct read/write access to data) + T* c_array() { return 0; } + + // assignment with type conversion + template + array& operator= (const array& ) { + return *this; + } + + // assign one value to all elements + void assign (const T& value) { fill ( value ); } + void fill (const T& ) {} + + // check range (may be private because it is static) + static reference failed_rangecheck () { + std::out_of_range e("attempt to access element of an empty array"); + boost::throw_exception(e); +#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__)) + // + // We need to return something here to keep + // some compilers happy: however we will never + // actually get here.... + // + static T placeholder; + return placeholder; +#endif + } + }; + + // comparisons + template + bool operator== (const array& x, const array& y) { + return std::equal(x.begin(), x.end(), y.begin()); + } + template + bool operator< (const array& x, const array& y) { + return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); + } + template + bool operator!= (const array& x, const array& y) { + return !(x==y); + } + template + bool operator> (const array& x, const array& y) { + return y + bool operator<= (const array& x, const array& y) { + return !(y + bool operator>= (const array& x, const array& y) { + return !(x + inline void swap (array& x, array& y) { + x.swap(y); + } + +#if defined(__SUNPRO_CC) +// Trac ticket #4757; the Sun Solaris compiler can't handle +// syntax like 'T(&get_c_array(boost::array& arg))[N]' +// +// We can't just use this for all compilers, because the +// borland compilers can't handle this form. + namespace detail { + template struct c_array + { + typedef T type[N]; + }; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename detail::c_array::type& get_c_array(boost::array& arg) + { + return arg.elems; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename detail::c_array::type const& get_c_array(const boost::array& arg) + { + return arg.elems; + } +#else +// Specific for boost::array: simply returns its elems data member. + template + T(&get_c_array(boost::array& arg))[N] + { + return arg.elems; + } + + // Const version. + template + const T(&get_c_array(const boost::array& arg))[N] + { + return arg.elems; + } +#endif + +#if 0 + // Overload for std::array, assuming that std::array will have + // explicit conversion functions as discussed at the WG21 meeting + // in Summit, March 2009. + template + T(&get_c_array(std::array& arg))[N] + { + return static_cast(arg); + } + + // Const version. + template + const T(&get_c_array(const std::array& arg))[N] + { + return static_cast(arg); + } +#endif + + template std::size_t hash_range(It, It); + + template + std::size_t hash_value(const array& arr) + { + return boost::hash_range(arr.begin(), arr.end()); + } + + template + T &get(boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template + const T &get(const boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } + +} /* namespace boost */ + +#ifndef BOOST_NO_CXX11_HDR_ARRAY +// If we don't have std::array, I'm assuming that we don't have std::get +namespace std { + template + T &get(boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template + const T &get(const boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } +} +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(pop) +#endif + +#endif /*BOOST_ARRAY_HPP*/ diff --git a/Slang/boost/asio.hpp b/Slang/boost/asio.hpp new file mode 100644 index 0000000..b2e1c53 --- /dev/null +++ b/Slang/boost/asio.hpp @@ -0,0 +1,200 @@ +// +// asio.hpp +// ~~~~~~~~ +// +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// Distributed under the 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 www.boost.org/libs/asio for documentation. +// + +#ifndef BOOST_ASIO_HPP +#define BOOST_ASIO_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_ASIO_HPP diff --git a/Slang/boost/assert.hpp b/Slang/boost/assert.hpp new file mode 100644 index 0000000..9650d7a --- /dev/null +++ b/Slang/boost/assert.hpp @@ -0,0 +1,85 @@ +// +// boost/assert.hpp - BOOST_ASSERT(expr) +// BOOST_ASSERT_MSG(expr, msg) +// BOOST_VERIFY(expr) +// BOOST_VERIFY_MSG(expr, msg) +// BOOST_ASSERT_IS_VOID +// +// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2007, 2014 Peter Dimov +// Copyright (c) Beman Dawes 2011 +// Copyright (c) 2015 Ion Gaztanaga +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// Note: There are no include guards. This is intentional. +// +// See http://www.boost.org/libs/assert/assert.html for documentation. +// + +// +// Stop inspect complaining about use of 'assert': +// +// boostinspect:naassert_macro +// + +// +// BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID +// + +#undef BOOST_ASSERT +#undef BOOST_ASSERT_MSG +#undef BOOST_ASSERT_IS_VOID + +#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) + +# define BOOST_ASSERT(expr) ((void)0) +# define BOOST_ASSERT_MSG(expr, msg) ((void)0) +# define BOOST_ASSERT_IS_VOID + +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) + +#include // for BOOST_LIKELY +#include + +namespace boost +{ + void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined +} // namespace boost + +#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else + +# include // .h to support old libraries w/o - effect is the same + +# define BOOST_ASSERT(expr) assert(expr) +# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) +#if defined(NDEBUG) +# define BOOST_ASSERT_IS_VOID +#endif + +#endif + +// +// BOOST_VERIFY, BOOST_VERIFY_MSG +// + +#undef BOOST_VERIFY +#undef BOOST_VERIFY_MSG + +#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) + +# define BOOST_VERIFY(expr) ((void)(expr)) +# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) + +#else + +# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) +# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) + +#endif diff --git a/Slang/boost/assign.hpp b/Slang/boost/assign.hpp new file mode 100644 index 0000000..fffb7ec --- /dev/null +++ b/Slang/boost/assign.hpp @@ -0,0 +1,24 @@ +// Boost.Assign library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/assign/ +// + + +#ifndef BOOST_ASSIGN_HPP +#define BOOST_ASSIGN_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/atomic.hpp b/Slang/boost/atomic.hpp new file mode 100644 index 0000000..be239b3 --- /dev/null +++ b/Slang/boost/atomic.hpp @@ -0,0 +1,27 @@ +#ifndef BOOST_ATOMIC_HPP +#define BOOST_ATOMIC_HPP + +// Copyright (c) 2011 Helge Bahmann +// Copyright (c) 2020 Andrey Semashev +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This header includes all Boost.Atomic public headers + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif diff --git a/Slang/boost/beast.hpp b/Slang/boost/beast.hpp new file mode 100644 index 0000000..458f20a --- /dev/null +++ b/Slang/boost/beast.hpp @@ -0,0 +1,21 @@ +// +// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/boostorg/beast +// + +#ifndef BOOST_BEAST_HPP +#define BOOST_BEAST_HPP + +#include // must come first + +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/bimap.hpp b/Slang/boost/bimap.hpp new file mode 100644 index 0000000..51d726d --- /dev/null +++ b/Slang/boost/bimap.hpp @@ -0,0 +1,19 @@ +// Boost.Bimap +// +// Copyright (c) 2006-2007 Matias Capeletto +// +// Distributed under the 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 www.boost.org/libs/bimap for documentation. + +// Convenience header + +#include + +namespace boost +{ + using ::boost::bimaps::bimap; +} + diff --git a/Slang/boost/bind.hpp b/Slang/boost/bind.hpp new file mode 100644 index 0000000..48cc409 --- /dev/null +++ b/Slang/boost/bind.hpp @@ -0,0 +1,60 @@ +#ifndef BOOST_BIND_HPP_INCLUDED +#define BOOST_BIND_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// bind.hpp - binds function objects to arguments +// +// Copyright (c) 2009, 2015 Peter Dimov +// +// Distributed under the 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/bind/bind.html for documentation. +// +// For backward compatibility, this header includes +// and then imports the placeholders _1, _2, +// _3, ... into the global namespace. Definitions in the global +// namespace are not a good practice and this use is deprecated. +// Please switch to including directly, +// adding the using directive locally where appropriate. +// Alternatively, the existing behavior may be preserved by defining +// the macro BOOST_BIND_GLOBAL_PLACEHOLDERS. + +#include +#include + +#ifndef BOOST_BIND_NO_PLACEHOLDERS + +#if !defined(BOOST_BIND_GLOBAL_PLACEHOLDERS) + +BOOST_PRAGMA_MESSAGE( + "The practice of declaring the Bind placeholders (_1, _2, ...) " + "in the global namespace is deprecated. Please use " + " + using namespace boost::placeholders, " + "or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior." +) + +#endif + +#if defined(BOOST_CLANG) +# pragma clang diagnostic push +# if __has_warning("-Wheader-hygiene") +# pragma clang diagnostic ignored "-Wheader-hygiene" +# endif +#endif + +using namespace boost::placeholders; + +#if defined(BOOST_CLANG) +# pragma clang diagnostic pop +#endif + +#endif // #ifndef BOOST_BIND_NO_PLACEHOLDERS + +#endif // #ifndef BOOST_BIND_HPP_INCLUDED diff --git a/Slang/boost/blank.hpp b/Slang/boost/blank.hpp new file mode 100644 index 0000000..918723c --- /dev/null +++ b/Slang/boost/blank.hpp @@ -0,0 +1,106 @@ +//----------------------------------------------------------------------------- +// boost blank.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BLANK_HPP +#define BOOST_BLANK_HPP + +#include "boost/blank_fwd.hpp" + +#if !defined(BOOST_NO_IOSTREAM) +#include // for std::basic_ostream forward declare +#include "boost/detail/templated_streams.hpp" +#endif // BOOST_NO_IOSTREAM + +#include "boost/type_traits/integral_constant.hpp" +#include "boost/type_traits/is_empty.hpp" +#include "boost/type_traits/is_pod.hpp" +#include "boost/type_traits/is_stateless.hpp" + +namespace boost { + +struct blank +{ +}; + +// type traits specializations +// + +template <> +struct is_pod< blank > + : boost::true_type +{ +}; + +template <> +struct is_empty< blank > + : boost::true_type +{ +}; + +template <> +struct is_stateless< blank > + : boost::true_type +{ +}; + +// relational operators +// + +inline bool operator==(const blank&, const blank&) +{ + return true; +} + +inline bool operator<=(const blank&, const blank&) +{ + return true; +} + +inline bool operator>=(const blank&, const blank&) +{ + return true; +} + +inline bool operator!=(const blank&, const blank&) +{ + return false; +} + +inline bool operator<(const blank&, const blank&) +{ + return false; +} + +inline bool operator>(const blank&, const blank&) +{ + return false; +} + +// streaming support +// +#if !defined(BOOST_NO_IOSTREAM) + +BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) +inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( + BOOST_TEMPLATED_STREAM(ostream, E,T)& out + , const blank& + ) +{ + // (output nothing) + return out; +} + +#endif // BOOST_NO_IOSTREAM + +} // namespace boost + +#endif // BOOST_BLANK_HPP diff --git a/Slang/boost/blank_fwd.hpp b/Slang/boost/blank_fwd.hpp new file mode 100644 index 0000000..8bfe97c --- /dev/null +++ b/Slang/boost/blank_fwd.hpp @@ -0,0 +1,22 @@ +//----------------------------------------------------------------------------- +// boost blank_fwd.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_BLANK_FWD_HPP +#define BOOST_BLANK_FWD_HPP + +namespace boost { + +struct blank; + +} // namespace boost + +#endif // BOOST_BLANK_FWD_HPP diff --git a/Slang/boost/call_traits.hpp b/Slang/boost/call_traits.hpp new file mode 100644 index 0000000..2c1328e --- /dev/null +++ b/Slang/boost/call_traits.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// See boost/detail/call_traits.hpp +// for full copyright notices. + +#ifndef BOOST_CALL_TRAITS_HPP +#define BOOST_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#include + +#endif // BOOST_CALL_TRAITS_HPP diff --git a/Slang/boost/callable_traits.hpp b/Slang/boost/callable_traits.hpp new file mode 100644 index 0000000..87f0fa6 --- /dev/null +++ b/Slang/boost/callable_traits.hpp @@ -0,0 +1,47 @@ +/* + +@Copyright Barrett Adair 2015-2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) + +*/ + +#ifndef BOOST_CLBL_TRTS_BOOST_CLBL_TRTS_HPP +#define BOOST_CLBL_TRTS_BOOST_CLBL_TRTS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/cast.hpp b/Slang/boost/cast.hpp new file mode 100644 index 0000000..ab452bd --- /dev/null +++ b/Slang/boost/cast.hpp @@ -0,0 +1,20 @@ +// boost cast.hpp header file +// +// (C) Copyright Antony Polukhin 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/conversion for Documentation. + +// This is a DEPRECATED header file! +// Use or instead + +#ifndef BOOST_CAST_HPP +#define BOOST_CAST_HPP + +# include +# include + +#endif // BOOST_CAST_HPP diff --git a/Slang/boost/cerrno.hpp b/Slang/boost/cerrno.hpp new file mode 100644 index 0000000..2532310 --- /dev/null +++ b/Slang/boost/cerrno.hpp @@ -0,0 +1,15 @@ +// Boost cerrno.hpp header -------------------------------------------------// + +// Copyright Beman Dawes 2005. +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/system + +#ifndef BOOST_CERRNO_HPP_INCLUDED +#define BOOST_CERRNO_HPP_INCLUDED + +#include + +#endif // #ifndef BOOST_CERRNO_HPP_INCLUDED diff --git a/Slang/boost/checked_delete.hpp b/Slang/boost/checked_delete.hpp new file mode 100644 index 0000000..fb71c78 --- /dev/null +++ b/Slang/boost/checked_delete.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_CHECKED_DELETE_HPP +#define BOOST_CHECKED_DELETE_HPP + +// The header file at this path is deprecated; +// use boost/core/checked_delete.hpp instead. + +#include + +#endif diff --git a/Slang/boost/chrono.hpp b/Slang/boost/chrono.hpp new file mode 100644 index 0000000..a3a3522 --- /dev/null +++ b/Slang/boost/chrono.hpp @@ -0,0 +1,20 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Vicente J. Botet Escriba 2010. +// Distributed under the Boost +// Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or +// copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/stm for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_CHRONO_HPP +#define BOOST_CHRONO_HPP + +//----------------------------------------------------------------------------- +#include +//----------------------------------------------------------------------------- + +#endif // BOOST_CHRONO_HPP diff --git a/Slang/boost/circular_buffer.hpp b/Slang/boost/circular_buffer.hpp new file mode 100644 index 0000000..aa8a2e5 --- /dev/null +++ b/Slang/boost/circular_buffer.hpp @@ -0,0 +1,65 @@ +// Circular buffer library header file. + +// Copyright (c) 2003-2008 Jan Gaspar + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/circular_buffer for documentation. + +/*! @file +Includes +*/ + +#if !defined(BOOST_CIRCULAR_BUFFER_HPP) +#define BOOST_CIRCULAR_BUFFER_HPP + +#if defined(_MSC_VER) + #pragma once +#endif + +#include +#include +#include + +/*! Debug support control. */ +#if !defined(BOOST_CB_ENABLE_DEBUG) + #define BOOST_CB_ENABLE_DEBUG 0 +#endif + +/*! INTERNAL ONLY */ +#if BOOST_CB_ENABLE_DEBUG + #include + #define BOOST_CB_ASSERT(Expr) BOOST_ASSERT(Expr) +#else + #define BOOST_CB_ASSERT(Expr) ((void)0) +#endif + +/*! INTERNAL ONLY */ +#if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0550) || BOOST_WORKAROUND(__MWERKS__, <= 0x2407) + #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) ((void)0) +#else + #include + #include + #define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) \ + BOOST_STATIC_ASSERT((is_convertible::value_type, Type>::value)) +#endif + +/*! INTERNAL ONLY */ +#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) + #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS BOOST_STATIC_ASSERT(false); +#else + #define BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS ((void)0); +#endif + +#include +#include +#include +#include + +#undef BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS +#undef BOOST_CB_IS_CONVERTIBLE +#undef BOOST_CB_ASSERT + +#endif // #if !defined(BOOST_CIRCULAR_BUFFER_HPP) diff --git a/Slang/boost/circular_buffer_fwd.hpp b/Slang/boost/circular_buffer_fwd.hpp new file mode 100644 index 0000000..621fb95 --- /dev/null +++ b/Slang/boost/circular_buffer_fwd.hpp @@ -0,0 +1,43 @@ +// Forward declaration of the circular buffer and its adaptor. + +// Copyright (c) 2003-2008 Jan Gaspar + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/circular_buffer for documentation. + +#if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) +#define BOOST_CIRCULAR_BUFFER_FWD_HPP + +#if defined(_MSC_VER) + #pragma once +#endif + +#include +#if !defined(BOOST_NO_STD_ALLOCATOR) + #include +#else + #include +#endif + +namespace boost { + +#if !defined(BOOST_NO_STD_ALLOCATOR) + #define BOOST_CB_DEFAULT_ALLOCATOR(T) std::allocator +#else + #define BOOST_CB_DEFAULT_ALLOCATOR(T) BOOST_DEDUCED_TYPENAME std::vector::allocator_type +#endif + +template +class circular_buffer; + +template +class circular_buffer_space_optimized; + +#undef BOOST_CB_DEFAULT_ALLOCATOR + +} // namespace boost + +#endif // #if !defined(BOOST_CIRCULAR_BUFFER_FWD_HPP) diff --git a/Slang/boost/compressed_pair.hpp b/Slang/boost/compressed_pair.hpp new file mode 100644 index 0000000..a7be0f2 --- /dev/null +++ b/Slang/boost/compressed_pair.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// See boost/detail/compressed_pair.hpp +// for full copyright notices. + +#ifndef BOOST_COMPRESSED_PAIR_HPP +#define BOOST_COMPRESSED_PAIR_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#include + +#endif // BOOST_COMPRESSED_PAIR_HPP diff --git a/Slang/boost/compute.hpp b/Slang/boost/compute.hpp new file mode 100644 index 0000000..83e17ac --- /dev/null +++ b/Slang/boost/compute.hpp @@ -0,0 +1,44 @@ +//---------------------------------------------------------------------------// +// Copyright (c) 2013 Kyle Lutz +// +// Distributed under the 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_HPP +#define BOOST_COMPUTE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_COMPUTE_HAVE_HDR_CL_EXT +#include +#endif + +#endif // BOOST_COMPUTE_HPP diff --git a/Slang/boost/concept_archetype.hpp b/Slang/boost/concept_archetype.hpp new file mode 100644 index 0000000..bd57d97 --- /dev/null +++ b/Slang/boost/concept_archetype.hpp @@ -0,0 +1,670 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// +// 17 July 2001: Added const to some member functions. (Jeremy Siek) +// 05 May 2001: Removed static dummy_cons object. (Jeremy Siek) + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_ARCHETYPES_HPP +#define BOOST_CONCEPT_ARCHETYPES_HPP + +#include +#include +#include +#include // iterator tags +#include // std::ptrdiff_t + +namespace boost { + + //=========================================================================== + // Basic Archetype Classes + + namespace detail { + class dummy_constructor { }; + } + + // A type that models no concept. The template parameter + // is only there so that null_archetype types can be created + // that have different type. + template + class null_archetype { + private: + null_archetype() { } + null_archetype(const null_archetype&) { } + null_archetype& operator=(const null_archetype&) { return *this; } + public: + null_archetype(detail::dummy_constructor) { } +#ifndef __MWERKS__ + template + friend void dummy_friend(); // just to avoid warnings +#endif + }; + + // This is a helper class that provides a way to get a reference to + // an object. The get() function will never be called at run-time + // (nothing in this file will) so this seemingly very bad function + // is really quite innocent. The name of this class needs to be + // changed. + template + class static_object + { + public: + static T& get() + { +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) + return *reinterpret_cast(0); +#else + static char d[sizeof(T)]; + return *reinterpret_cast(d); +#endif + } + }; + + template > + class default_constructible_archetype : public Base { + public: + default_constructible_archetype() + : Base(static_object::get()) { } + default_constructible_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class assignable_archetype : public Base { + assignable_archetype() { } + assignable_archetype(const assignable_archetype&) { } + public: + assignable_archetype& operator=(const assignable_archetype&) { + return *this; + } + assignable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class copy_constructible_archetype : public Base { + public: + copy_constructible_archetype() + : Base(static_object::get()) { } + copy_constructible_archetype(const copy_constructible_archetype&) + : Base(static_object::get()) { } + copy_constructible_archetype(detail::dummy_constructor x) : Base(x) { } + }; + + template > + class sgi_assignable_archetype : public Base { + public: + sgi_assignable_archetype(const sgi_assignable_archetype&) + : Base(static_object::get()) { } + sgi_assignable_archetype& operator=(const sgi_assignable_archetype&) { + return *this; + } + sgi_assignable_archetype(const detail::dummy_constructor& x) : Base(x) { } + }; + + struct default_archetype_base { + default_archetype_base(detail::dummy_constructor) { } + }; + + // Careful, don't use same type for T and Base. That results in the + // conversion operator being invalid. Since T is often + // null_archetype, can't use null_archetype for Base. + template + class convertible_to_archetype : public Base { + private: + convertible_to_archetype() { } + convertible_to_archetype(const convertible_to_archetype& ) { } + convertible_to_archetype& operator=(const convertible_to_archetype&) + { return *this; } + public: + convertible_to_archetype(detail::dummy_constructor x) : Base(x) { } + operator const T&() const { return static_object::get(); } + }; + + template + class convertible_from_archetype : public Base { + private: + convertible_from_archetype() { } + convertible_from_archetype(const convertible_from_archetype& ) { } + convertible_from_archetype& operator=(const convertible_from_archetype&) + { return *this; } + public: + convertible_from_archetype(detail::dummy_constructor x) : Base(x) { } + convertible_from_archetype(const T&) { } + convertible_from_archetype& operator=(const T&) + { return *this; } + }; + + class boolean_archetype { + public: + boolean_archetype(const boolean_archetype&) { } + operator bool() const { return true; } + boolean_archetype(detail::dummy_constructor) { } + private: + boolean_archetype() { } + boolean_archetype& operator=(const boolean_archetype&) { return *this; } + }; + + template > + class equality_comparable_archetype : public Base { + public: + equality_comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator==(const equality_comparable_archetype&, + const equality_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator!=(const equality_comparable_archetype&, + const equality_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + template > + class equality_comparable2_first_archetype : public Base { + public: + equality_comparable2_first_archetype(detail::dummy_constructor x) + : Base(x) { } + }; + template > + class equality_comparable2_second_archetype : public Base { + public: + equality_comparable2_second_archetype(detail::dummy_constructor x) + : Base(x) { } + }; + template + boolean_archetype + operator==(const equality_comparable2_first_archetype&, + const equality_comparable2_second_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator!=(const equality_comparable2_first_archetype&, + const equality_comparable2_second_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + template > + class less_than_comparable_archetype : public Base { + public: + less_than_comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator<(const less_than_comparable_archetype&, + const less_than_comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + + template > + class comparable_archetype : public Base { + public: + comparable_archetype(detail::dummy_constructor x) : Base(x) { } + }; + template + boolean_archetype + operator<(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator<=(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator>(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + template + boolean_archetype + operator>=(const comparable_archetype&, + const comparable_archetype&) + { + return boolean_archetype(static_object::get()); + } + + + // The purpose of the optags is so that one can specify + // exactly which types the operator< is defined between. + // This is useful for allowing the operations: + // + // A a; B b; + // a < b + // b < a + // + // without also allowing the combinations: + // + // a < a + // b < b + // + struct optag1 { }; + struct optag2 { }; + struct optag3 { }; + +#define BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(OP, NAME) \ + template , class Tag = optag1 > \ + class NAME##_first_archetype : public Base { \ + public: \ + NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template , class Tag = optag1 > \ + class NAME##_second_archetype : public Base { \ + public: \ + NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template \ + boolean_archetype \ + operator OP (const NAME##_first_archetype&, \ + const NAME##_second_archetype&) \ + { \ + return boolean_archetype(static_object::get()); \ + } + + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(==, equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(!=, not_equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<, less_than_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<=, less_equal_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>, greater_than_op) + BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>=, greater_equal_op) + +#define BOOST_DEFINE_OPERATOR_ARCHETYPE(OP, NAME) \ + template > \ + class NAME##_archetype : public Base { \ + public: \ + NAME##_archetype(detail::dummy_constructor x) : Base(x) { } \ + NAME##_archetype(const NAME##_archetype&) \ + : Base(static_object::get()) { } \ + NAME##_archetype& operator=(const NAME##_archetype&) { return *this; } \ + }; \ + template \ + NAME##_archetype \ + operator OP (const NAME##_archetype&,\ + const NAME##_archetype&) \ + { \ + return \ + NAME##_archetype(static_object::get()); \ + } + + BOOST_DEFINE_OPERATOR_ARCHETYPE(+, addable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(-, subtractable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(*, multipliable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(/, dividable) + BOOST_DEFINE_OPERATOR_ARCHETYPE(%, modable) + + // As is, these are useless because of the return type. + // Need to invent a better way... +#define BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(OP, NAME) \ + template > \ + class NAME##_first_archetype : public Base { \ + public: \ + NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template > \ + class NAME##_second_archetype : public Base { \ + public: \ + NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \ + }; \ + \ + template \ + Return \ + operator OP (const NAME##_first_archetype&, \ + const NAME##_second_archetype&) \ + { \ + return Return(static_object::get()); \ + } + + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(+, plus_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(*, time_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(/, divide_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(-, subtract_op) + BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(%, mod_op) + + //=========================================================================== + // Function Object Archetype Classes + + template + class generator_archetype { + public: + const Return& operator()() { + return static_object::get(); + } + }; + + class void_generator_archetype { + public: + void operator()() { } + }; + + template + class unary_function_archetype { + private: + unary_function_archetype() { } + public: + unary_function_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg&) const { + return static_object::get(); + } + }; + + template + class binary_function_archetype { + private: + binary_function_archetype() { } + public: + binary_function_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg1&, const Arg2&) const { + return static_object::get(); + } + }; + + template + class unary_predicate_archetype { + typedef boolean_archetype Return; + unary_predicate_archetype() { } + public: + unary_predicate_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg&) const { + return static_object::get(); + } + }; + + template > + class binary_predicate_archetype { + typedef boolean_archetype Return; + binary_predicate_archetype() { } + public: + binary_predicate_archetype(detail::dummy_constructor) { } + const Return& operator()(const Arg1&, const Arg2&) const { + return static_object::get(); + } + }; + + //=========================================================================== + // Iterator Archetype Classes + + template + class input_iterator_archetype + { + private: + typedef input_iterator_archetype self; + public: + typedef std::input_iterator_tag iterator_category; + typedef T value_type; + struct reference { + operator const value_type&() const { return static_object::get(); } + }; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return reference(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class input_iterator_archetype_no_proxy + { + private: + typedef input_iterator_archetype_no_proxy self; + public: + typedef std::input_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + struct output_proxy { + output_proxy& operator=(const T&) { return *this; } + }; + + template + class output_iterator_archetype + { + public: + typedef output_iterator_archetype self; + public: + typedef std::output_iterator_tag iterator_category; + typedef output_proxy value_type; + typedef output_proxy reference; + typedef void pointer; + typedef void difference_type; + output_iterator_archetype(detail::dummy_constructor) { } + output_iterator_archetype(const self&) { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return output_proxy(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + private: + output_iterator_archetype() { } + }; + + template + class input_output_iterator_archetype + { + private: + typedef input_output_iterator_archetype self; + struct in_out_tag : public std::input_iterator_tag, public std::output_iterator_tag { }; + public: + typedef in_out_tag iterator_category; + typedef T value_type; + struct reference { + reference& operator=(const T&) { return *this; } + operator value_type() { return static_object::get(); } + }; + typedef const T* pointer; + typedef std::ptrdiff_t difference_type; + input_output_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return reference(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class forward_iterator_archetype + { + public: + typedef forward_iterator_archetype self; + public: + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T const* pointer; + typedef std::ptrdiff_t difference_type; + forward_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class mutable_forward_iterator_archetype + { + public: + typedef mutable_forward_iterator_archetype self; + public: + typedef std::forward_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_forward_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + }; + + template + class bidirectional_iterator_archetype + { + public: + typedef bidirectional_iterator_archetype self; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + bidirectional_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + }; + + template + class mutable_bidirectional_iterator_archetype + { + public: + typedef mutable_bidirectional_iterator_archetype self; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_bidirectional_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + }; + + template + class random_access_iterator_archetype + { + public: + typedef random_access_iterator_archetype self; + public: + typedef std::random_access_iterator_tag iterator_category; + typedef T value_type; + typedef const T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + random_access_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + reference operator[](difference_type) const + { return static_object::get(); } + self& operator+=(difference_type) { return *this; } + self& operator-=(difference_type) { return *this; } + difference_type operator-(const self&) const + { return difference_type(); } + self operator+(difference_type) const { return *this; } + self operator-(difference_type) const { return *this; } + bool operator<(const self&) const { return true; } + bool operator<=(const self&) const { return true; } + bool operator>(const self&) const { return true; } + bool operator>=(const self&) const { return true; } + }; + template + random_access_iterator_archetype + operator+(typename random_access_iterator_archetype::difference_type, + const random_access_iterator_archetype& x) + { return x; } + + + template + class mutable_random_access_iterator_archetype + { + public: + typedef mutable_random_access_iterator_archetype self; + public: + typedef std::random_access_iterator_tag iterator_category; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::ptrdiff_t difference_type; + mutable_random_access_iterator_archetype() { } + self& operator=(const self&) { return *this; } + bool operator==(const self&) const { return true; } + bool operator!=(const self&) const { return true; } + reference operator*() const { return static_object::get(); } + self& operator++() { return *this; } + self operator++(int) { return *this; } + self& operator--() { return *this; } + self operator--(int) { return *this; } + reference operator[](difference_type) const + { return static_object::get(); } + self& operator+=(difference_type) { return *this; } + self& operator-=(difference_type) { return *this; } + difference_type operator-(const self&) const + { return difference_type(); } + self operator+(difference_type) const { return *this; } + self operator-(difference_type) const { return *this; } + bool operator<(const self&) const { return true; } + bool operator<=(const self&) const { return true; } + bool operator>(const self&) const { return true; } + bool operator>=(const self&) const { return true; } + }; + template + mutable_random_access_iterator_archetype + operator+ + (typename mutable_random_access_iterator_archetype::difference_type, + const mutable_random_access_iterator_archetype& x) + { return x; } + +} // namespace boost + +#endif // BOOST_CONCEPT_ARCHETYPES_H diff --git a/Slang/boost/concept_check.hpp b/Slang/boost/concept_check.hpp new file mode 100644 index 0000000..72bd9c2 --- /dev/null +++ b/Slang/boost/concept_check.hpp @@ -0,0 +1,1082 @@ +// +// (C) Copyright Jeremy Siek 2000. +// Copyright 2002 The Trustees of Indiana University. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Revision History: +// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) +// 02 April 2001: Removed limits header altogether. (Jeremy Siek) +// 01 April 2001: Modified to use new header. (JMaddock) +// + +// See http://www.boost.org/libs/concept_check for documentation. + +#ifndef BOOST_CONCEPT_CHECKS_HPP +# define BOOST_CONCEPT_CHECKS_HPP + +# include + +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include + +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + +namespace boost +{ + + // + // Backward compatibility + // + + template + inline void function_requires(Model* = 0) + { + BOOST_CONCEPT_ASSERT((Model)); + } + template inline void ignore_unused_variable_warning(T const&) {} + +# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + +# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ + BOOST_CONCEPT_ASSERT((ns::concept)) + + + // + // Begin concept definitions + // + BOOST_concept(Integer, (T)) + { + BOOST_CONCEPT_USAGE(Integer) + { + x.error_type_must_be_an_integer_type(); + } + private: + T x; + }; + + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct Integer< ::boost::long_long_type> {}; + template <> struct Integer< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct Integer<__int64> {}; + template <> struct Integer {}; +# endif + + BOOST_concept(SignedInteger,(T)) { + BOOST_CONCEPT_USAGE(SignedInteger) { + x.error_type_must_be_a_signed_integer_type(); + } + private: + T x; + }; + template <> struct SignedInteger { }; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct SignedInteger< ::boost::long_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct SignedInteger<__int64> {}; +# endif + + BOOST_concept(UnsignedInteger,(T)) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { + x.error_type_must_be_an_unsigned_integer_type(); + } + private: + T x; + }; + + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; +# if defined(BOOST_HAS_LONG_LONG) + template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; +# elif defined(BOOST_HAS_MS_INT64) + template <> struct UnsignedInteger {}; +# endif + + //=========================================================================== + // Basic Concepts + + BOOST_concept(DefaultConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(DefaultConstructible) { + TT a; // require default constructor + ignore_unused_variable_warning(a); + } + }; + + BOOST_concept(Assignable,(TT)) + { + BOOST_CONCEPT_USAGE(Assignable) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + } + private: + void const_constraints(const TT& x) { +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#else + ignore_unused_variable_warning(x); +#endif + } + private: + TT a; + TT b; + }; + + + BOOST_concept(CopyConstructible,(TT)) + { + BOOST_CONCEPT_USAGE(CopyConstructible) { + TT a(b); // require copy constructor + TT* ptr = &a; // require address of operator + const_constraints(a); + ignore_unused_variable_warning(ptr); + } + private: + void const_constraints(const TT& a) { + TT c(a); // require const copy constructor + const TT* ptr = &a; // require const address of operator + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(ptr); + } + TT b; + }; + + // The SGI STL version of Assignable requires copy constructor and operator= + BOOST_concept(SGIAssignable,(TT)) + { + BOOST_CONCEPT_USAGE(SGIAssignable) { + TT c(a); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = b; // require assignment operator +#endif + const_constraints(b); + ignore_unused_variable_warning(c); + } + private: + void const_constraints(const TT& x) { + TT c(x); +#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL + a = x; // const required for argument to assignment +#endif + ignore_unused_variable_warning(c); + } + TT a; + TT b; + }; + + BOOST_concept(Convertible,(X)(Y)) + { + BOOST_CONCEPT_USAGE(Convertible) { + Y y = x; + ignore_unused_variable_warning(y); + } + private: + X x; + }; + + // The C++ standard requirements for many concepts talk about return + // types that must be "convertible to bool". The problem with this + // requirement is that it leaves the door open for evil proxies that + // define things like operator|| with strange return types. Two + // possible solutions are: + // 1) require the return type to be exactly bool + // 2) stay with convertible to bool, and also + // specify stuff about all the logical operators. + // For now we just test for convertible to bool. + template + void require_boolean_expr(const TT& t) { + bool x = t; + ignore_unused_variable_warning(x); + } + + BOOST_concept(EqualityComparable,(TT)) + { + BOOST_CONCEPT_USAGE(EqualityComparable) { + require_boolean_expr(a == b); + require_boolean_expr(a != b); + } + private: + TT a, b; + }; + + BOOST_concept(LessThanComparable,(TT)) + { + BOOST_CONCEPT_USAGE(LessThanComparable) { + require_boolean_expr(a < b); + } + private: + TT a, b; + }; + + // This is equivalent to SGI STL's LessThanComparable. + BOOST_concept(Comparable,(TT)) + { + BOOST_CONCEPT_USAGE(Comparable) { + require_boolean_expr(a < b); + require_boolean_expr(a > b); + require_boolean_expr(a <= b); + require_boolean_expr(a >= b); + } + private: + TT a, b; + }; + +#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + bool constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + +#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ + BOOST_concept(NAME, (Ret)(First)(Second)) \ + { \ + BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ + private: \ + Ret constraints_() { return a OP b; } \ + First a; \ + Second b; \ + } + + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); + BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); + + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); + BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); + + //=========================================================================== + // Function Object Concepts + + BOOST_concept(Generator,(Func)(Return)) + { + BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } + + private: + void test(boost::false_type) + { + // Do we really want a reference here? + const Return& r = f(); + ignore_unused_variable_warning(r); + } + + void test(boost::true_type) + { + f(); + } + + Func f; + }; + + BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } + + private: + void test(boost::false_type) + { + f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) + Return r = f(arg); + ignore_unused_variable_warning(r); + } + + void test(boost::true_type) + { + f(arg); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. + // (warning: non-static reference "const double& boost::UnaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + UnaryFunction(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } + private: + void test(boost::false_type) + { + (void) f(first,second); + Return r = f(first, second); // require operator() + (void)r; + } + + void test(boost::true_type) + { + f(first,second); + } + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. + // (warning: non-static reference "const double& boost::BinaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + BinaryFunction(); +#endif + + Func f; + First first; + Second second; + }; + + BOOST_concept(UnaryPredicate,(Func)(Arg)) + { + BOOST_CONCEPT_USAGE(UnaryPredicate) { + require_boolean_expr(f(arg)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. + // (warning: non-static reference "const double& boost::UnaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + UnaryPredicate(); +#endif + + Func f; + Arg arg; + }; + + BOOST_concept(BinaryPredicate,(Func)(First)(Second)) + { + BOOST_CONCEPT_USAGE(BinaryPredicate) { + require_boolean_expr(f(a, b)); // require operator() returning bool + } + private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. + // (warning: non-static reference "const double& boost::BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + BinaryPredicate(); +#endif + Func f; + First a; + Second b; + }; + + // use this when functor is used inside a container class like std::set + BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + const_constraints(f); + } + private: + void const_constraints(const Func& fun) { + // operator() must be a const member function + require_boolean_expr(fun(a, b)); + } +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. + // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + Const_BinaryPredicate(); +#endif + + Func f; + First a; + Second b; + }; + + BOOST_concept(AdaptableGenerator,(Func)(Return)) + : Generator + { + typedef typename Func::result_type result_type; + + BOOST_CONCEPT_USAGE(AdaptableGenerator) + { + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) + : UnaryFunction + { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableUnaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) + : BinaryFunction< + Func + , typename Func::result_type + , typename Func::first_argument_type + , typename Func::second_argument_type + > + { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableBinaryFunction() + { + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + BOOST_CONCEPT_ASSERT((Convertible)); + } + }; + + BOOST_concept(AdaptablePredicate,(Func)(Arg)) + : UnaryPredicate + , AdaptableUnaryFunction + { + }; + + BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) + : BinaryPredicate + , AdaptableBinaryFunction + { + }; + + //=========================================================================== + // Iterator Concepts + + BOOST_concept(InputIterator,(TT)) + : Assignable + , EqualityComparable + { + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::reference reference; + typedef typename std::iterator_traits::pointer pointer; + typedef typename std::iterator_traits::iterator_category iterator_category; + + BOOST_CONCEPT_USAGE(InputIterator) + { + BOOST_CONCEPT_ASSERT((SignedInteger)); + BOOST_CONCEPT_ASSERT((Convertible)); + + TT j(i); + (void)*i; // require dereference operator + ++j; // require preincrement operator + i++; // require postincrement operator + } + private: + TT i; + }; + + BOOST_concept(OutputIterator,(TT)(ValueT)) + : Assignable + { + BOOST_CONCEPT_USAGE(OutputIterator) { + + ++i; // require preincrement operator + i++; // require postincrement operator + *i++ = t; // require postincrement and assignment + } + private: + TT i, j; + ValueT t; + }; + + BOOST_concept(ForwardIterator,(TT)) + : InputIterator + { + BOOST_CONCEPT_USAGE(ForwardIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category + , std::forward_iterator_tag + >)); + + typename InputIterator::reference r = *i; + ignore_unused_variable_warning(r); + } + + private: + TT i; + }; + + BOOST_concept(Mutable_ForwardIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { + *i++ = *j; // require postincrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(BidirectionalIterator,(TT)) + : ForwardIterator + { + BOOST_CONCEPT_USAGE(BidirectionalIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::bidirectional_iterator_tag + >)); + + --i; // require predecrement operator + i--; // require postdecrement operator + } + private: + TT i; + }; + + BOOST_concept(Mutable_BidirectionalIterator,(TT)) + : BidirectionalIterator + , Mutable_ForwardIterator + { + BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) + { + *i-- = *j; // require postdecrement and assignment + } + private: + TT i, j; + }; + + BOOST_concept(RandomAccessIterator,(TT)) + : BidirectionalIterator + , Comparable + { + BOOST_CONCEPT_USAGE(RandomAccessIterator) + { + BOOST_CONCEPT_ASSERT((Convertible< + BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category + , std::random_access_iterator_tag + >)); + + i += n; // require assignment addition operator + i = i + n; i = n + i; // require addition with difference type + i -= n; // require assignment subtraction operator + i = i - n; // require subtraction with difference type + n = i - j; // require difference operator + (void)i[n]; // require element access operator + } + + private: + TT a, b; + TT i, j; + typename std::iterator_traits::difference_type n; + }; + + BOOST_concept(Mutable_RandomAccessIterator,(TT)) + : RandomAccessIterator + , Mutable_BidirectionalIterator + { + BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) + { + i[n] = *i; // require element access and assignment + } + private: + TT i; + typename std::iterator_traits::difference_type n; + }; + + //=========================================================================== + // Container s + + BOOST_concept(Container,(C)) + : Assignable + { + typedef typename C::value_type value_type; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + typedef typename C::const_pointer const_pointer; + typedef typename C::const_iterator const_iterator; + + BOOST_CONCEPT_USAGE(Container) + { + BOOST_CONCEPT_ASSERT((InputIterator)); + const_constraints(c); + } + + private: + void const_constraints(const C& cc) { + i = cc.begin(); + i = cc.end(); + n = cc.size(); + n = cc.max_size(); + b = cc.empty(); + } + C c; + bool b; + const_iterator i; + size_type n; + }; + + BOOST_concept(Mutable_Container,(C)) + : Container + { + typedef typename C::reference reference; + typedef typename C::iterator iterator; + typedef typename C::pointer pointer; + + BOOST_CONCEPT_USAGE(Mutable_Container) + { + BOOST_CONCEPT_ASSERT(( + Assignable)); + + BOOST_CONCEPT_ASSERT((InputIterator)); + + i = c.begin(); + i = c.end(); + c.swap(c2); + } + + private: + iterator i; + C c, c2; + }; + + BOOST_concept(ForwardContainer,(C)) + : Container + { + BOOST_CONCEPT_USAGE(ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + ForwardIterator< + typename ForwardContainer::const_iterator + >)); + } + }; + + BOOST_concept(Mutable_ForwardContainer,(C)) + : ForwardContainer + , Mutable_Container + { + BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) + { + BOOST_CONCEPT_ASSERT(( + Mutable_ForwardIterator< + typename Mutable_ForwardContainer::iterator + >)); + } + }; + + BOOST_concept(ReversibleContainer,(C)) + : ForwardContainer + { + typedef typename + C::const_reverse_iterator + const_reverse_iterator; + + BOOST_CONCEPT_USAGE(ReversibleContainer) + { + BOOST_CONCEPT_ASSERT(( + BidirectionalIterator< + typename ReversibleContainer::const_iterator>)); + + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reverse_iterator _i = cc.rbegin(); + _i = cc.rend(); + } + C c; + }; + + BOOST_concept(Mutable_ReversibleContainer,(C)) + : Mutable_ForwardContainer + , ReversibleContainer + { + typedef typename C::reverse_iterator reverse_iterator; + + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) + { + typedef typename Mutable_ForwardContainer::iterator iterator; + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); + + reverse_iterator i = c.rbegin(); + i = c.rend(); + } + private: + C c; + }; + + BOOST_concept(RandomAccessContainer,(C)) + : ReversibleContainer + { + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + + BOOST_CONCEPT_USAGE(RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT(( + RandomAccessIterator< + typename RandomAccessContainer::const_iterator + >)); + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reference r = cc[n]; + ignore_unused_variable_warning(r); + } + + C c; + size_type n; + }; + + BOOST_concept(Mutable_RandomAccessContainer,(C)) + : Mutable_ReversibleContainer + , RandomAccessContainer + { + private: + typedef Mutable_RandomAccessContainer self; + public: + BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) + { + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); + + typename self::reference r = c[i]; + ignore_unused_variable_warning(r); + } + + private: + typename Mutable_ReversibleContainer::size_type i; + C c; + }; + + // A Sequence is inherently mutable + BOOST_concept(Sequence,(S)) + : Mutable_ForwardContainer + // Matt Austern's book puts DefaultConstructible here, the C++ + // standard places it in Container --JGS + // ... so why aren't we following the standard? --DWA + , DefaultConstructible + { + BOOST_CONCEPT_USAGE(Sequence) + { + S + c(n, t), + c2(first, last); + + c.insert(p, t); + c.insert(p, n, t); + c.insert(p, first, last); + + c.erase(p); + c.erase(p, q); + + typename Sequence::reference r = c.front(); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& c) { + typename Sequence::const_reference r = c.front(); + ignore_unused_variable_warning(r); + } + + typename S::value_type t; + typename S::size_type n; + typename S::value_type* first, *last; + typename S::iterator p, q; + }; + + BOOST_concept(FrontInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(FrontInsertionSequence) + { + c.push_front(t); + c.pop_front(); + } + private: + S c; + typename S::value_type t; + }; + + BOOST_concept(BackInsertionSequence,(S)) + : Sequence + { + BOOST_CONCEPT_USAGE(BackInsertionSequence) + { + c.push_back(t); + c.pop_back(); + typename BackInsertionSequence::reference r = c.back(); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& cc) { + typename BackInsertionSequence::const_reference + r = cc.back(); + ignore_unused_variable_warning(r); + } + S c; + typename S::value_type t; + }; + + BOOST_concept(AssociativeContainer,(C)) + : ForwardContainer + , DefaultConstructible + { + typedef typename C::key_type key_type; + typedef typename C::key_compare key_compare; + typedef typename C::value_compare value_compare; + typedef typename C::iterator iterator; + + BOOST_CONCEPT_USAGE(AssociativeContainer) + { + i = c.find(k); + r = c.equal_range(k); + c.erase(k); + c.erase(i); + c.erase(r.first, r.second); + const_constraints(c); + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + + typedef typename AssociativeContainer::value_type value_type_; + BOOST_CONCEPT_ASSERT((BinaryPredicate)); + } + + // Redundant with the base concept, but it helps below. + typedef typename C::const_iterator const_iterator; + private: + void const_constraints(const C& cc) + { + ci = cc.find(k); + n = cc.count(k); + cr = cc.equal_range(k); + } + + C c; + iterator i; + std::pair r; + const_iterator ci; + std::pair cr; + typename C::key_type k; + typename C::size_type n; + }; + + BOOST_concept(UniqueAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) + { + C c(first, last); + + pos_flag = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + } + private: + std::pair pos_flag; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(MultipleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) + { + C c(first, last); + + pos = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(pos); + } + private: + typename C::iterator pos; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + BOOST_concept(SimpleAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + BOOST_STATIC_ASSERT((boost::is_same::value)); + } + }; + + BOOST_concept(PairAssociativeContainer,(C)) + : AssociativeContainer + { + BOOST_CONCEPT_USAGE(PairAssociativeContainer) + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + typedef typename C::mapped_type mapped_type; + typedef std::pair required_value_type; + BOOST_STATIC_ASSERT((boost::is_same::value)); + } + }; + + BOOST_concept(SortedAssociativeContainer,(C)) + : AssociativeContainer + , ReversibleContainer + { + BOOST_CONCEPT_USAGE(SortedAssociativeContainer) + { + C + c(kc), + c2(first, last), + c3(first, last, kc); + + p = c.upper_bound(k); + p = c.lower_bound(k); + r = c.equal_range(k); + + c.insert(p, t); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + const_constraints(c); + } + + void const_constraints(const C& c) + { + kc = c.key_comp(); + vc = c.value_comp(); + + cp = c.upper_bound(k); + cp = c.lower_bound(k); + cr = c.equal_range(k); + } + + private: + typename C::key_compare kc; + typename C::value_compare vc; + typename C::value_type t; + typename C::key_type k; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + + typedef SortedAssociativeContainer self; + iterator p; + const_iterator cp; + std::pair r; + std::pair cr; + typename C::value_type* first, *last; + }; + + // HashedAssociativeContainer + + BOOST_concept(Collection,(C)) + { + BOOST_CONCEPT_USAGE(Collection) + { + boost::function_requires >(); + boost::function_requires >(); + boost::function_requires >(); + const_constraints(c); + i = c.begin(); + i = c.end(); + c.swap(c); + } + + void const_constraints(const C& cc) { + ci = cc.begin(); + ci = cc.end(); + n = cc.size(); + b = cc.empty(); + } + + private: + typedef typename C::value_type value_type; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef typename C::reference reference; + typedef typename C::const_reference const_reference; + // typedef typename C::pointer pointer; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + + C c; + bool b; + iterator i; + const_iterator ci; + size_type n; + }; +} // namespace boost + +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + +# include + +#endif // BOOST_CONCEPT_CHECKS_HPP + diff --git a/Slang/boost/config.hpp b/Slang/boost/config.hpp new file mode 100644 index 0000000..f00a980 --- /dev/null +++ b/Slang/boost/config.hpp @@ -0,0 +1,67 @@ +// Boost config.hpp configuration header file ------------------------------// + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// Boost config.hpp policy and rationale documentation has been moved to +// http://www.boost.org/libs/config +// +// CAUTION: This file is intended to be completely stable - +// DO NOT MODIFY THIS FILE! +// + +#ifndef BOOST_CONFIG_HPP +#define BOOST_CONFIG_HPP + +// if we don't have a user config, then use the default location: +#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) +# define BOOST_USER_CONFIG +#if 0 +// For dependency trackers: +# include +#endif +#endif +// include it first: +#ifdef BOOST_USER_CONFIG +# include BOOST_USER_CONFIG +#endif + +// if we don't have a compiler config set, try and find one: +#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a compiler config, include it now: +#ifdef BOOST_COMPILER_CONFIG +# include BOOST_COMPILER_CONFIG +#endif + +// if we don't have a std library config set, try and find one: +#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) +# include +#endif +// if we have a std library config, include it now: +#ifdef BOOST_STDLIB_CONFIG +# include BOOST_STDLIB_CONFIG +#endif + +// if we don't have a platform config set, try and find one: +#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) +# include +#endif +// if we have a platform config, include it now: +#ifdef BOOST_PLATFORM_CONFIG +# include BOOST_PLATFORM_CONFIG +#endif + +// get config suffix code: +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif // BOOST_CONFIG_HPP diff --git a/Slang/boost/contract.hpp b/Slang/boost/contract.hpp new file mode 100644 index 0000000..535e5ed --- /dev/null +++ b/Slang/boost/contract.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_CONTRACT_HPP_ +#define BOOST_CONTRACT_HPP_ + +// Copyright (C) 2008-2018 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 (see accompanying +// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). +// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html + +/** @file +Include all header files required by this library at once (for convenience). + +All header files boost/contract/\*.hpp are independent from one another +and can be included one-by-one to reduce the amount of code to compile from this +library in user code (but this was measured to not make an appreciable +difference in compile-time so boost/contract.hpp can be included directly +in most cases). +Instead the headers boost/contract/core/\*.hpp are not independent from +other library headers and they are automatically included by the +boost/contract/\*.hpp headers (so the boost/contract/core/\*.hpp +headers are usually not directly included by programmers). + +All files under the boost/contract/detail/ directory, names within the +@c boost::contract::detail namespace, names prefixed by +@c boost_contract_detail... and @c BOOST_CONTRACT_DETAIL... (in any namesapce, +including user's code) are reserved for internal use of this library and should +never be used directly by programmers. + +@see @RefSect{getting_started, Getting Started} +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #include guard + diff --git a/Slang/boost/contract_macro.hpp b/Slang/boost/contract_macro.hpp new file mode 100644 index 0000000..2b1295a --- /dev/null +++ b/Slang/boost/contract_macro.hpp @@ -0,0 +1,1409 @@ + +#ifndef BOOST_CONTRACT_MACRO_HPP_ +#define BOOST_CONTRACT_MACRO_HPP_ + +// Copyright (C) 2008-2018 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 (see accompanying +// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). +// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html + +/** @file +Allow to disable contracts to completely remove their compile-time and run-time +overhead. +This header automatically includes all header files boost/contract/\*.hpp +necessary to use its macros. + +Almost all the macros defined in this header file are variadic macros. On +compilers that do not support variadic macros, programmers can manually code +\#ifndef BOOST_CONTRACT_NO_... statements instead (see +@RefSect{extras.disable_contract_compilation__macro_interface_, +Disable Contract Compilation}). +*/ + +// IMPORTANT: Following headers can always be #included (without any #if-guard) +// because they expand to trivial code that does not affect compile-time. These +// headers must always be #included here (without any #if-guard) because they +// define types and macros that are typically left in user code even when +// contracts are disables (these types and macros never affect run-time and +// their definitions are trivial when contracts are disabled so their impact on +// compile-time is negligible). +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef BOOST_CONTRACT_NO_CONDITIONS + #include +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program preconditions that can be completely disabled at compile-time. + + @c BOOST_CONTRACT_PRECONDITION(f) expands to code equivalent to the + following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_PRECONDITIONS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_PRECONDITIONS + .precondition(f) + #endif + @endcode + + Where: + + @arg f is the nullay functor called by this library to + check preconditions @c f(). + Assertions within this functor are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this functor indicates a contract assertion failure (and will + result in this library calling + @RefFunc{boost::contract::precondition_failure}). + This functor should capture variables by (constant) value, or better + by (constant) reference (to avoid extra copies). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.preconditions, Preconditions} + */ + #define BOOST_CONTRACT_PRECONDITION(...) +#elif !defined(BOOST_CONTRACT_NO_PRECONDITIONS) + #define BOOST_CONTRACT_PRECONDITION(...) .precondition(__VA_ARGS__) +#else + #define BOOST_CONTRACT_PRECONDITION(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program postconditions that can be completely disabled at compile-time. + + @c BOOST_CONTRACT_POSTCONDITION(f) expands to code equivalent to the + following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_POSTCONDITIONS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_POSTCONDITIONS + .postcondition(f) + #endif + @endcode + + Where: + + @arg f is the functor called by this library to check + postconditions @c f() or @c f(result). + Assertions within this functor are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this functor indicates a contract assertion failure (and will + result in this library calling + @RefFunc{boost::contract::postcondition_failure}). + This functor should capture variables by (constant) references (to + access the values they will have at function exit). + This functor takes the return value (preferably by const&) + @c result as its one single parameter @c f(result) but only for + virtual public functions and public functions overrides, otherwise + it takes no parameter @c f(). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.postconditions, Postconditions} + */ + #define BOOST_CONTRACT_POSTCONDITION(...) +#elif !defined(BOOST_CONTRACT_NO_POSTCONDITIONS) + #define BOOST_CONTRACT_POSTCONDITION(...) .postcondition(__VA_ARGS__) +#else + #define BOOST_CONTRACT_POSTCONDITION(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program exception guarantees that can be completely disabled at + compile-time. + + @c BOOST_CONTRACT_EXCEPT(f) expands to code equivalent to the following + (note that no code is generated when @RefMacro{BOOST_CONTRACT_NO_EXCEPTS} + is defined): + + @code + #ifndef BOOST_CONTRACT_NO_EXCEPTS + .except(f) + #endif + @endcode + + Where: + + @arg f is the nullary functor called by this library to + check exception guarantees @c f(). + Assertions within this functor are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this functor indicates a contract assertion failure (and will + result in this library calling + @RefFunc{boost::contract::except_failure}). + This functor should capture variables by (constant) references (to + access the values they will have at function exit). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.exception_guarantees, Exception Guarantees} + */ + #define BOOST_CONTRACT_EXCEPT(...) +#elif !defined(BOOST_CONTRACT_NO_EXCEPTS) + #define BOOST_CONTRACT_EXCEPT(...) .except(__VA_ARGS__) +#else + #define BOOST_CONTRACT_EXCEPT(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program old value copies at body that can be completely disabled at + compile-time. + + @c BOOST_CONTRACT_OLD(f) expands to code equivalent to the following (note + that no code is generated when @RefMacro{BOOST_CONTRACT_NO_OLDS} is + defined): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + .old(f) + #endif + @endcode + + Where: + + @arg f is the nullary functor called by this library + @c f() to assign old value copies just before the body is execute + but after entry invariants (when they apply) and preconditions are + checked. + Old value pointers within this functor call are usually assigned + using @RefMacro{BOOST_CONTRACT_OLDOF}. + Any exception thrown by a call to this functor will result in + this library calling @RefFunc{boost::contract::old_failure} (because + old values could not be copied to check postconditions and exception + guarantees). + This functor should capture old value pointers by references so they + can be assigned (all other variables needed to evaluate old value + expressions can be captured by (constant) value, or better by + (constant) reference to avoid extra copies). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{advanced.old_values_copied_at_body, + Old Values Copied at Body} + */ + #define BOOST_CONTRACT_OLD(...) + + /** + Program old values that can be completely disabled at compile-time for old + value types that are required to be copyable. + + This is used to program old value copies for copyable types: + + @code + class u { + public: + void f(...) { + BOOST_CONTRACT_OLD_PTR(old_type_a)(old_var_a); // Null... + BOOST_CONTRACT_OLD_PTR(old_type_b)(old_var_b, old_expr_b); // Set. + BOOST_CONTRACT_PUBLIC_FUNCTION(this) + ... + BOOST_CONTRACT_OLD([&] { + old_var_a = BOOST_CONTRACT_OLDOF(old_expr_a); // ...set. + ... + }) + ... + ; + + ... // Function body. + } + + virtual void g(..., boost::contract::virtual_* v = 0) { + BOOST_CONTRACT_OLD_PTR(old_type_a)(old_var_a); // No `v` + BOOST_CONTRACT_OLD_PTR(old_type_b)(v, old_var_b, old_expr_b); // `v` + BOOST_CONTRACT_PUBLIC_FUNCTION(v, this) + ... + BOOST_CONTRACT_OLD([&] { + old_var_a = BOOST_CONTRACT_OLDOF(v, old_expr_a); // `v` + ... + }) + ... + ; + + ... // Function body. + } + + ... + }; + @endcode + + This is an overloaded variadic macro and it can be used in the following + different ways (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_OLDS} is defined). + + 1\. BOOST_CONTRACT_OLD_PTR(old_type)(old_var) expands to code + equivalent to the following (this leaves the old value pointer null): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + // This declaration does not need to use `v`. + boost::contract::old_ptr old_var + #endif + @endcode + + 2\. BOOST_CONTRACT_OLD_PTR(old_type)(old_var, old_expr) expands to + code equivalent to the following (this initializes the pointer to the + old value copy, but not to be used for virtual public functions and + public function overrides): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + boost::contract::old_ptr old_var = + BOOST_CONTRACT_OLDOF(old_expr) + #endif + @endcode + + 3\. BOOST_CONTRACT_OLD_PTR(old_type)(v, old_var, old_expr) expands to + code equivalent to the following (this initializes the pointer to the + old value copy for virtual public functions and public function + overrides): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + boost::contract::old_ptr old_var = + BOOST_CONTRACT_OLDOF(v, old_expr) + #endif + @endcode + + Where: + + @arg old_type is the type of the pointed old value. + This type must be copyable (i.e., + boost::contract::is_old_value_copyable::value is + @c true), otherwise this pointer will always be null and this + library will generate a compile-time error when the pointer is + dereferenced (see @RefMacro{BOOST_CONTRACT_OLD_PTR_IF_COPYABLE}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + (Rationale: Template parameters like this one are specified to + this library macro interface using their own set of parenthesis + SOME_MACRO(template_params)(other_params).) + @arg v is the extra training parameter of type + @RefClass{boost::contract::virtual_}* and default value @c 0 + from the enclosing virtual public function or public function + override declaring the contract. + (This is not a variadic macro parameter but it should never contain + commas because it is an identifier.) + @arg old_var is the name of the old value pointer variable. + (This is not a variadic macro parameter but it should never contain + commas because it is an identifier.) + @arg old_expr is the expression to be evaluated and copied + in the old value pointer. + (This is not a variadic macro parameter so any comma it might + contain must be protected by round parenthesis and + BOOST_CONTRACT_OLD_PTR(old_type)(v, old_var, (old_expr)) + will always work.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.old_values, Old Values} + */ + #define BOOST_CONTRACT_OLD_PTR(...) + + /** + Program old values that can be completely disabled at compile-time for old + value types that are not required to be copyable. + + This is used to program old value copies for types that might or might not + be copyable: + + @code + template // Type `T` might or not be copyable. + class u { + public: + void f(...) { + BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type_a)(old_var_a); + BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type_b)(old_var_b, + old_expr_b); + BOOST_CONTRACT_PUBLIC_FUNCTION(this) + ... + BOOST_CONTRACT_OLD([&] { + old_var_a = BOOST_CONTRACT_OLDOF(old_expr_a); + ... + }) + ... // In postconditions or exception guarantees: + if(old_var_a) ... // Always null for non-copyable types. + if(old_var_b) ... // Always null for non-copyable types. + ... + ; + + ... // Function body. + } + + virtual void g(..., boost::contract::virtual_* v = 0) { + BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type_a)(old_var_a); + BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type_b)(v, old_var_b, + old_expr_b); + BOOST_CONTRACT_PUBLIC_FUNCTION(v, this) + ... + BOOST_CONTRACT_OLD([&] { + old_var_a = BOOST_CONTRACT_OLDOF(v, old_expr_a); + ... + }) + ... // In postconditions or exception guarantees: + if(old_var_a) ... // Always null for non-copyable types. + if(old_var_b) ... // Always null for non-copyable types. + ... + ; + + ... // Function body. + } + + ... + }; + @endcode + + This is an overloaded variadic macro and it can be used in the following + different ways (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_OLDS} is defined). + + 1\. BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type)(old_var) expands to + code equivalent to the following (this leaves the old value pointer + null): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + // This declaration does not need to use `v`. + boost::contract::old_ptr_if_copyable old_var + #endif + @endcode + + 2\. BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type)(old_var, old_expr) + expands to code equivalent to the following (this initializes the + pointer to the old value copy, but not to be used for virtual public + functions and public function overrides): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + boost::contract::old_ptr_if_copyable old_var = + BOOST_CONTRACT_OLDOF(old_expr) + #endif + @endcode + + 3\. BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type)(v, old_var, + old_expr) expands to code equivalent to the following (this + initializes the pointer to the old value copy for virtual public + functions and public function overrides): + + @code + #ifndef BOOST_CONTRACT_NO_OLDS + boost::contract::old_ptr_if_copyable old_var = + BOOST_CONTRACT_OLDOF(v, old_expr) + #endif + @endcode + + Where: + + @arg old_type is the type of the pointed old value. + If this type is not copyable (i.e., + boost::contract::is_old_value_copyable::value is + @c false), this pointer will always be null, but this library will + not generate a compile-time error when this pointer is dereferenced + (see @RefMacro{BOOST_CONTRACT_OLD_PTR}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + @arg v is the extra trailing parameter of type + @RefClass{boost::contract::virtual_}* and default value @c 0 + from the enclosing virtual public function or public function + override declaring the contract. + (This is not a variadic macro parameter but it should never contain + commas because it is an identifier.) + @arg old_var is the name of the old value pointer variable. + (This is not a variadic macro parameter but it should never contain + commas because it is an identifier.) + @arg old_expr is the expression to be evaluated and copied + in the old value pointer. + (This is not a variadic macro parameter so any comma it might + contain must be protected by round parenthesis and + BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(old_type)(v, old_var, + (old_expr)) will always work.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{extras.old_value_requirements__templates_, + Old Value Requirements} + */ + #define BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(...) +#elif !defined(BOOST_CONTRACT_NO_OLDS) + #include + #include + #include + #include + + /* PRIVATE */ + + #define BOOST_CONTRACT_OLD_VAR_1(ptr) \ + ptr + #define BOOST_CONTRACT_OLD_VAR_2(ptr, expr) \ + ptr = BOOST_CONTRACT_OLDOF(expr) + #define BOOST_CONTRACT_OLD_VAR_3(v, ptr, expr) \ + ptr = BOOST_CONTRACT_OLDOF(v, expr) + + #define BOOST_CONTRACT_OLD_VAR_(...) \ + BOOST_PP_CAT(BOOST_PP_OVERLOAD(BOOST_CONTRACT_OLD_VAR_, __VA_ARGS__) \ + (__VA_ARGS__), BOOST_PP_EMPTY()) + + /* PUBLIC */ + + #define BOOST_CONTRACT_OLD(...) .old(__VA_ARGS__) + + #define BOOST_CONTRACT_OLD_PTR(...) \ + boost::contract::old_ptr< __VA_ARGS__ > \ + BOOST_CONTRACT_OLD_VAR_ + + #define BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(...) \ + boost::contract::old_ptr_if_copyable< __VA_ARGS__ > \ + BOOST_CONTRACT_OLD_VAR_ +#else + #include + + #define BOOST_CONTRACT_OLD(...) /* nothing */ + + #define BOOST_CONTRACT_OLD_PTR(...) BOOST_PP_TUPLE_EAT(0) + + #define BOOST_CONTRACT_OLD_PTR_IF_COPYABLE(...) BOOST_PP_TUPLE_EAT(0) +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program (constant) class invariants that can be completely disabled at + compile-time. + + @c BOOST_CONTRACT_INVARIANT({ ... }) expands to code equivalent to the + following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_INVARIANTS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_INVARIANTS + void BOOST_CONTRACT_INVARIANT_FUNC() const { + ... + } + #endif + @endcode + + Where: + + @arg { ... } is the definition of the function that checks class + invariants for public functions that are not static and not volatile + (see @RefMacro{BOOST_CONTRACT_STATIC_INVARIANT} and + @RefMacro{BOOST_CONTRACT_INVARIANT_VOLATILE}). + The curly parenthesis are mandatory (rationale: this is so the + syntax of this macro resembles mote the syntax of the lambda + functions usually used to specify preconditions, etc.). + Assertions within this function are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this function indicates a contract assertion failure (and will + result in this library calling either + @RefFunc{boost::contract::entry_invariant_failure} or + @RefFunc{boost::contract::exit_invariant_failure}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.class_invariants, Class Invariants} + */ + #define BOOST_CONTRACT_INVARIANT(...) + + /** + Program volatile class invariants that can be completely disabled at + compile-time. + + @c BOOST_CONTRACT_INVARIANT_VOLATILE({ ... }) expands to code equivalent to + the following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_INVARIANTS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_INVARIANTS + void BOOST_CONTRACT_INVARIANT_FUNC() const volatile { + ... + } + #endif + @endcode + + Where: + + @arg { ... } is the definition of the function that checks class + invariants for volatile public functions + (see @RefMacro{BOOST_CONTRACT_INVARIANT} and + @RefMacro{BOOST_CONTRACT_STATIC_INVARIANT}). + The curly parenthesis are mandatory. + Assertions within this function are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this function indicates a contract assertion failure (and will + result in this library calling either + @RefFunc{boost::contract::entry_invariant_failure} or + @RefFunc{boost::contract::exit_invariant_failure}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{extras.volatile_public_functions, + Volatile Public Functions} + */ + #define BOOST_CONTRACT_INVARIANT_VOLATILE(...) + + /** + Program static class invariants that can be completely disabled at + compile-time. + + @c BOOST_CONTRACT_STATIC_INVARIANT({ ... }) expands to code equivalent to + the following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_INVARIANTS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_INVARIANTS + static void BOOST_CONTRACT_STATIC_INVARIANT_FUNC() { + ... + } + #endif + @endcode + + Where: + + @arg { ... } is the definition of the function that checks class + invariants for static public functions + (see @RefMacro{BOOST_CONTRACT_INVARIANT} and + @RefMacro{BOOST_CONTRACT_INVARIANT_VOLATILE}). + The curly parenthesis are mandatory. + Assertions within this function are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this function indicates a contract assertion failure (and will + result in this library calling either + @RefFunc{boost::contract::entry_invariant_failure} or + @RefFunc{boost::contract::exit_invariant_failure}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.class_invariants, Class Invariants} + */ + #define BOOST_CONTRACT_STATIC_INVARIANT(...) +#elif !defined(BOOST_CONTRACT_NO_INVARIANTS) + #include + + #define BOOST_CONTRACT_INVARIANT(...) \ + void BOOST_CONTRACT_INVARIANT_FUNC() const __VA_ARGS__ + + #define BOOST_CONTRACT_INVARIANT_VOLATILE(...) \ + void BOOST_CONTRACT_INVARIANT_FUNC() const volatile __VA_ARGS__ + + #define BOOST_CONTRACT_STATIC_INVARIANT(...) \ + static void BOOST_CONTRACT_STATIC_INVARIANT_FUNC() __VA_ARGS__ +#else + #define BOOST_CONTRACT_INVARIANT(...) /* nothing */ + + #define BOOST_CONTRACT_INVARIANT_VOLATILE(...) /* nothing */ + + #define BOOST_CONTRACT_STATIC_INVARIANT(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program contracts that can be completely disabled at compile-time for + constructors. + + This is used together with @RefMacro{BOOST_CONTRACT_POSTCONDITION}, + @RefMacro{BOOST_CONTRACT_EXCEPT}, and @RefMacro{BOOST_CONTRACT_OLD} to + specify postconditions, exception guarantees, and old value copies at body + that can be completely disabled at compile-time for constructors (see + @RefMacro{BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION} to specify preconditions + for constructors): + + @code + class u { + friend class boost::contract::access; + + BOOST_CONTRACT_INVARIANT({ // Optional (as for static and volatile). + BOOST_CONTRACT_ASSERT(...); + ... + }) + + public: + u(...) { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_CONSTRUCTOR(this) + // No `PRECONDITION` (use `CONSTRUCTOR_PRECONDITION` if needed). + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(old_epxr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Constructor body. + } + + ... + }; + @endcode + + For optimization, this can be omitted for constructors that do not have + postconditions and exception guarantees, within classes that have no + invariants. + + @c BOOST_CONTRACT_CONSTRUCTOR(obj) expands to code equivalent to the + following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_CONSTRUCTORS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_CONSTRUCTORS + boost::contract::check internal_var = + boost::contract::constructor(obj) + #endif + @endcode + + Where: + + @arg obj is the object @c this from the scope of the + enclosing constructor declaring the contract. + Constructors check all class invariants, including static and + volatile invariants (see @RefMacro{BOOST_CONTRACT_INVARIANT}, + @RefMacro{BOOST_CONTRACT_STATIC_INVARIANT}, and + @RefMacro{BOOST_CONTRACT_INVARIANT_VOLATILE}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.constructors, Constructors} + */ + #define BOOST_CONTRACT_CONSTRUCTOR(...) +#elif !defined(BOOST_CONTRACT_NO_CONSTRUCTORS) + #include + #include + #include + + #define BOOST_CONTRACT_CONSTRUCTOR(...) \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::constructor(__VA_ARGS__) +#else + #define BOOST_CONTRACT_CONSTRUCTOR(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program preconditions that can be disabled at compile-time for constructors. + + This is used together with @RefMacro{BOOST_CONTRACT_CONSTRUCTOR} to specify + contracts for constructors. + Constructors that do not have preconditions do not use this macro. + When at least one of the class constructors uses this macro, + @RefClass{boost::contract::constructor_precondition} must be the first and + private base of the class declaring the constructor for which preconditions + are programmed: + + @code + class u + #define BASES private boost::contract::constructor_precondition, \ + public b + : BASES + { + friend class boost::contract::access; + + typedef BOOST_CONTRACT_BASE_TYPES(BASES) base_types; + #undef BASES + + ... + + public: + explicit u(unsigned x) : + BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION(u)([&] { + BOOST_CONTRACT_ASSERT(x != 0); + }), + b(1 / x) + { + ... + } + + ... + }; + @endcode + + BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION(class_type)(f) expands + to code equivalent to the following (note that when + @RefMacro{BOOST_CONTRACT_NO_PRECONDITIONS} is defined, this macro trivially + expands to a default constructor call that is internally implemented to do + nothing so this should have minimal to no overhead): + + @code + // Guarded only by NO_PRECONDITIONS (and not also by NO_CONSTRUCTORS) + // because for constructor's preconditions (not for postconditions, etc.). + #ifndef BOOST_CONTRACT_NO_PRECONDITIONS + boost::contract::constructor_precondition(f) + #else // No-op call (likely optimized away, minimal to no overhead). + boost::contract::constructor_precondition() + #endif + + @endcode + + Where: + + @arg class_type is the type of the class containing the + constructor for which preconditions are being programmed. + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + @arg f is the nullary functor called by this library to + check constructor preconditions @c f(). + Assertions within this functor call are usually programmed using + @RefMacro{BOOST_CONTRACT_ASSERT}, but any exception thrown by a call + to this functor indicates a contract failure (and will result in + this library calling + @RefFunc{boost::contract::precondition_failure}). + This functor should capture variables by (constant) value, or better + by (constant) reference to avoid extra copies. + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.constructors, Constructors} + */ + #define BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION(...) +#elif !defined(BOOST_CONTRACT_NO_PRECONDITIONS) // Not NO_CONSTRUCTORS here. + // constructor_precondition.hpp already #included at top. + + #define BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION(...) \ + boost::contract::constructor_precondition< __VA_ARGS__ > +#else + #include + // constructor_precondition.hpp always #included at top of this file. + + #define BOOST_CONTRACT_CONSTRUCTOR_PRECONDITION(...) \ + /* always use default ctor (i.e., do nothing) */ \ + boost::contract::constructor_precondition< __VA_ARGS__ >() \ + BOOST_PP_TUPLE_EAT(0) +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program contracts that can be completely disabled at compile-time for + destructors. + + This is used together with @RefMacro{BOOST_CONTRACT_POSTCONDITION}, + @RefMacro{BOOST_CONTRACT_EXCEPT}, and @RefMacro{BOOST_CONTRACT_OLD} to + specify postconditions, exception guarantees, and old value copies at body + that can be completely disabled at compile-time for destructors (destructors + cannot have preconditions, see + @RefSect{contract_programming_overview.destructor_calls, Destructor Calls}): + + @code + class u { + friend class boost::contract::access; + + BOOST_CONTRACT_INVARIANT({ // Optional (as for static and volatile). + BOOST_CONTRACT_ASSERT(...); + ... + }) + + public: + ~u() { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_DESTRUCTOR(this) + // No `PRECONDITION` (destructors have no preconditions). + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Destructor body. + } + + ... + }; + @endcode + + For optimization, this can be omitted for destructors that do not have + postconditions and exception guarantees, within classes that have no + invariants. + + @c BOOST_CONTRACT_DESTRUCTOR(obj) expands to code equivalent to the + following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_DESTRUCTORS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_DESTRUCTORS + boost::contract::check internal_var = + boost::contract::destructor(obj) + #endif + @endcode + + Where: + + @arg obj is the object @c this from the scope of the + enclosing destructor declaring the contract. + Destructors check all class invariants, including static and + volatile invariants (see @RefSect{tutorial.class_invariants, + Class Invariants} and + @RefSect{extras.volatile_public_functions, + Volatile Public Functions}). + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.destructors, Destructors} + */ + #define BOOST_CONTRACT_DESTRUCTOR(...) +#elif !defined(BOOST_CONTRACT_NO_DESTRUCTORS) + #include + #include + #include + + #define BOOST_CONTRACT_DESTRUCTOR(...) \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::destructor(__VA_ARGS__) +#else + #define BOOST_CONTRACT_DESTRUCTOR(...) /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program contracts that can be completely disabled at compile-time for + (non-public) functions. + + This is used together with @RefMacro{BOOST_CONTRACT_PRECONDITION}, + @RefMacro{BOOST_CONTRACT_POSTCONDITION}, @RefMacro{BOOST_CONTRACT_EXCEPT}, + and @RefMacro{BOOST_CONTRACT_OLD} to specify preconditions, postconditions, + exception guarantees, and old value copies at body that can be completely + disabled at compile-time for (non-public) functions: + + @code + void f(...) { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_FUNCTION() + BOOST_CONTRACT_PRECONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Function body. + } + @endcode + + This can be used to program contracts for non-member functions but also for + private and protected functions, lambda functions, loops, arbitrary blocks + of code, etc. + For optimization, this can be omitted for code that does not have + preconditions, postconditions, and exception guarantees. + + @c BOOST_CONTRACT_FUNCTION() expands to code equivalent to the following + (note that no code is generated when @RefMacro{BOOST_CONTRACT_NO_FUNCTIONS} + is defined): + + @code + #ifndef BOOST_CONTRACT_NO_FUNCTIONS + boost::contract::check internal_var = + boost::contract::function() + #endif + @endcode + + Where: + + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.non_member_functions, Non-Member Functions}, + @RefSect{advanced.private_and_protected_functions, + Private and Protected Functions}, + @RefSect{advanced.lambdas__loops__code_blocks__and__constexpr__, + Lambdas\, Loops\, Code Blocks} + */ + #define BOOST_CONTRACT_FUNCTION() +#elif !defined(BOOST_CONTRACT_NO_FUNCTIONS) + #include + #include + #include + + #define BOOST_CONTRACT_FUNCTION() \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::function() +#else + #include + + #define BOOST_CONTRACT_FUNCTION() /* nothing */ +#endif + +#ifdef BOOST_CONTRACT_DETAIL_DOXYGEN + /** + Program contracts that can be completely disabled at compile-time for static + public functions. + + This is used together with @RefMacro{BOOST_CONTRACT_PRECONDITION}, + @RefMacro{BOOST_CONTRACT_POSTCONDITION}, @RefMacro{BOOST_CONTRACT_EXCEPT}, + and @RefMacro{BOOST_CONTRACT_OLD} to specify preconditions, postconditions, + exception guarantees, and old value copies at body that can be completely + disabled at compile-time for static public functions: + + @code + class u { + friend class boost::contract::access; + + BOOST_CONTRACT_STATIC_INVARIANT({ // Optional (as for non-static). + BOOST_CONTRACT_ASSERT(...); + ... + }) + + public: + static void f(...) { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION(u) + BOOST_CONTRACT_PRECONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Function body. + } + + ... + }; + @endcode + + For optimization, this can be omitted for static public functions that do + not have preconditions, postconditions and exception guarantees, within + classes that have no static invariants. + + @c BOOST_CONTRACT_STATIC_PUBLIC_FUNCTION(class_type) expands to code + equivalent to the following (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS} is defined): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = + boost::contract::public_function() + #endif + @endcode + + Where: + + @arg class_type is the type of the class containing the + static public function declaring the contract. + (This is a variadic macro parameter so it can contain commas not + protected by round parenthesis.) + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.static_public_functions, Static Public Functions} + */ + #define BOOST_CONTRACT_STATIC_PUBLIC_FUNCTION(...) + + /** + Program contracts that can be completely disabled at compile-time for + non-static public functions that do not override. + + This is used together with @RefMacro{BOOST_CONTRACT_PRECONDITION}, + @RefMacro{BOOST_CONTRACT_POSTCONDITION}, @RefMacro{BOOST_CONTRACT_EXCEPT}, + and @RefMacro{BOOST_CONTRACT_OLD} to specify preconditions, postconditions, + exception guarantees, and old value copies at body that can be completely + disabled at compile-time for non-static public functions (virtual or not, + void or not) that do not override: + + @code + class u { + friend class boost::contract::access; + + BOOST_CONTRACT_INVARIANT({ // Optional (as for static and volatile). + BOOST_CONTRACT_ASSERT(...); + ... + }) + + public: + // Non-virtual (same if void). + t f(...) { + t result; + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION(this) + BOOST_CONTRACT_PRECONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Function body (use `return result = return_expr`). + } + + // Virtual and void. + virtual void g(..., boost::contract::virtual_* v = 0) { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION(v, this) + ... + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(v, old_expr); + ... + }) + ... + ; // Trailing `;` is required. + + ... // Function body. + } + + // Virtual and non-void. + virtual t h(..., boost::contract::virtual_* v = 0) { + t result; + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION(v, result, this) + ... + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(v, old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] (t const& result) { // Optional + BOOST_CONTRACT_ASSERT(...); + ... + }) + ... + ; // Trailing `;` is required. + + ... // Function body (use `return result = return_expr`). + } + + ... + }; + @endcode + + For optimization, this can be omitted for non-virtual public functions that + do not have preconditions, postconditions and exception guarantees, within + classes that have no invariants. + Virtual public functions should always use + @RefMacro{BOOST_CONTRACT_PUBLIC_FUNCTION} otherwise this library will not + be able to correctly use them for subcontracting. + + This is an overloaded variadic macro and it can be used in the following + different ways (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS} is defined). + + 1\. BOOST_CONTRACT_PUBLIC_FUNCTION(obj) expands to code + equivalent to the following (for non-virtual public functions that are + not static and do not override, returning void or not): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = + boost::contract::public_function(obj) + #endif + @endcode + + 2\. BOOST_CONTRACT_PUBLIC_FUNCTION(v, obj) expands to code + equivalent to the following (for virtual public functions that do not + override, returning void): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = + boost::contract::public_function(v, obj) + #endif + @endcode + + 3\. BOOST_CONTRACT_PUBLIC_FUNCTION(v, r, obj) expands to code + equivalent to the following (for virtual public functions that do not + override, not returning void): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = + boost::contract::public_function(v, r, obj) + #endif + @endcode + + Where (these are all variadic macro parameters so they can contain commas + not protected by round parenthesis): + + @arg v is the extra parameter of type + @RefClass{boost::contract::virtual_}* and default value @c 0 + from the enclosing virtual public function declaring the contract. + @arg r is a reference to the return value of the enclosing + virtual public function declaring the contract. + This is usually a local variable declared by the enclosing virtual + public function just before the contract, but programmers must set + it to the actual value being returned by the function at each + @c return statement. + @arg obj is the object @c this from the scope of the + enclosing public function declaring the contract. + This object might be mutable, @c const, @c volatile, or + const volatile depending on the cv-qualifier of the enclosing + function (volatile public functions will check volatile class + invariants, see @RefSect{extras.volatile_public_functions, + Volatile Public Functions}). + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.public_functions, Public Functions}, + @RefSect{tutorial.virtual_public_functions, + Virtual Public Functions} + */ + #define BOOST_CONTRACT_PUBLIC_FUNCTION(...) + + /** + Program contracts that can be completely disabled at compile-time for + public function overrides. + + This is used together with @RefMacro{BOOST_CONTRACT_PRECONDITION}, + @RefMacro{BOOST_CONTRACT_POSTCONDITION}, @RefMacro{BOOST_CONTRACT_EXCEPT}, + and @RefMacro{BOOST_CONTRACT_OLD} to specify preconditions, postconditions, + exception guarantees, and old value copies at body that can be completely + disabled at compile-time for public function overrides (virtual or not): + + @code + class u + #define BASES private boost::contract::constructor_precondition, \ + public b, private w + : BASES + { + friend class boost::contract::access; + + typedef BOOST_CONTRACT_BASE_TYPES(BASES) base_types; + #undef BASES + + BOOST_CONTRACT_INVARIANT({ // Optional (as for static and volatile). + BOOST_CONTRACT_ASSERT(...); + ... + }) + + BOOST_CONTRACT_OVERRIDES(f, g) + + public: + // Override from `b::f`, and void. + void f(t_1 a_1, ..., t_n a_n, boost::contract::virtual_* v = 0) { + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(override_f)( + v, &u::f, this, a_1, ..., a_n) + BOOST_CONTRACT_PRECONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(v, old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + BOOST_CONTRACT_EXCEPT([&] { // Optional. + BOOST_CONTRACT_ASSERT(...); + ... + }) + ; // Trailing `;` is required. + + ... // Function body. + } + + // Override from `b::g`, and void. + t g(t_1 a_1, ..., t_n a_n, boost::contract::virtual_* v = 0) { + t result; + BOOST_CONTRACT_OLD_PTR(old_type)(old_var); + BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(override_g)( + v, result, &u::g, this, a_1, ..., a_n) + ... + BOOST_CONTRACT_OLD([&] { // Optional. + old_var = BOOST_CONTRACT_OLDOF(v, old_expr); + ... + }) + BOOST_CONTRACT_POSTCONDITION([&] (t const& result) { // Optional + BOOST_CONTRACT_ASSERT(...); + ... + }) + ... + ; // Trailing `;` is required. + + ... // Function body (use `return result = return_expr`). + } + + ... + }; + @endcode + + Public function overrides should always use + @RefMacro{BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE} otherwise this library + will not be able to correctly use it for subcontracting. + + This is an overloaded variadic macro and it can be used in the following + different ways (note that no code is generated when + @RefMacro{BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS} is defined). + + 1\. BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(override_type)(v, f, obj, + ...) expands to code equivalent to the following (for public + function overrides that return void): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = boost::contract:: + public_function(v, f, obj, ...) + #endif + @endcode + + 2\. BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(override_type)(v, r, f, obj, + ...) expands to code equivalent to the following (for public + function overrides that do not return void): + + @code + #ifndef BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS + boost::contract::check internal_var = boost::contract:: + public_function(v, r, f, obj, ...) + #endif + @endcode + + Where (these are all variadic macro parameters so they can contain commas + not protected by round parenthesis): + + @arg override_type is the type + override_function-name declared using the + @RefMacro{BOOST_CONTRACT_OVERRIDE} or related macros. + @arg v is the extra parameter of type + @RefClass{boost::contract::virtual_}* and default value @c 0 + from the enclosing virtual public function declaring the contract. + @arg r is a reference to the return value of the enclosing + virtual public function declaring the contract. + This is usually a local variable declared by the enclosing virtual + public function just before the contract, but programmers must set + it to the actual value being returned by the function at each + @c return statement. + @arg f is a pointer to the enclosing public function + override declaring the contract. + @arg obj is the object @c this from the scope of the + enclosing public function declaring the contract. + This object might be mutable, @c const, @c volatile, or + const volatile depending on the cv-qualifier of the enclosing + function (volatile public functions will check volatile class + invariants, see @RefSect{extras.volatile_public_functions, + Volatile Public Functions}). + @arg ... is a variadic macro parameter listing all the + arguments passed to the enclosing public function override declaring + the contract (by reference and in the order they appear in the + enclosing function declaration), but excluding the trailing + argument @c v. + @arg internal_var is a variable name internally generated + by this library (this name is unique but only on different line + numbers so this macro cannot be expanded multiple times on the same + line). + + @see @RefSect{extras.disable_contract_compilation__macro_interface_, + Disable Contract Compilation}, + @RefSect{tutorial.public_function_overrides__subcontracting_, + Public Function Overrides} + */ + #define BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(...) +#elif !defined(BOOST_CONTRACT_NO_PUBLIC_FUNCTIONS) + #include + #include + #include + + #define BOOST_CONTRACT_STATIC_PUBLIC_FUNCTION(...) \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::public_function< __VA_ARGS__ >() + + #define BOOST_CONTRACT_PUBLIC_FUNCTION(...) \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::public_function(__VA_ARGS__) + + #define BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(...) \ + boost::contract::check BOOST_CONTRACT_DETAIL_NAME2(c, __LINE__) = \ + boost::contract::public_function<__VA_ARGS__> +#else + #include + + #define BOOST_CONTRACT_STATIC_PUBLIC_FUNCTION(...) /* nothing */ + + #define BOOST_CONTRACT_PUBLIC_FUNCTION(...) /* nothing */ + + #define BOOST_CONTRACT_PUBLIC_FUNCTION_OVERRIDE(...) BOOST_PP_TUPLE_EAT(0) +#endif + +#endif // #include guard + diff --git a/Slang/boost/convert.hpp b/Slang/boost/convert.hpp new file mode 100644 index 0000000..4ff84c5 --- /dev/null +++ b/Slang/boost/convert.hpp @@ -0,0 +1,209 @@ +/// @file +// Boost.Convert +// Copyright (c) 2009-2020 Vladimir Batov. +// +// Many thanks to Julian Gonggrijp, Rob Stewart, Andrzej Krzemienski, Matus Chochlik, Jeroen Habraken, +// Hartmut Kaiser, Joel De Guzman, Thijs (M.A.) van den Berg, Roland Bock, Gavin Lambert, Paul Bristow, +// Alex Hagen-Zanker, Christopher Kormanyos for taking part in the Boost.Convert review. +// +// Special thanks to: +// +// 1. Alex Hagen-Zanker, Roland Bock, Rob Stewart for their considerable contributions to the design +// and implementation of the library; +// 2. Andrzej Krzemienski for helping to partition responsibilities and to ultimately pave +// the way for the boost::optional and future std::tr2::optional deployment; +// 3. Edward Diener the Boost Review Manager for helping with the converters' design, his continuous +// involvement, technical and administrative help, guidance and advice; +// 4. Joel De Guzman, Rob Stewart and Alex Hagen-Zanker for making sure the performance tests work +// as they should; +// 5. Paul Bristow for helping great deal with the documentation; +// 6. Kevlin Henney and Dave Abrahams for their lexical_cast-related insights and explanations. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. See http://www.boost.org/LICENSE_1_0.txt. + +#ifndef BOOST_CONVERT_HPP +#define BOOST_CONVERT_HPP + +#include +#include + +namespace boost +{ + namespace detail { enum throw_on_failure {}; } + + /// @details boost::throw_on_failure is the 'tag' object + /// to request the exception-throwing behavior. + detail::throw_on_failure const throw_on_failure = detail::throw_on_failure(0); + + namespace cnv + { + template struct reference; + struct by_default; + } + + /// @brief Boost.Convert main deployment interface + /// @param[in] value_in Value of the TypeIn type to be converted to the TypeOut type + /// @param[in] converter Converter to be used for conversion + /// @return boost::optional result of conversion together with the indication of + /// success or failure of the conversion request. + /// @details For example, + /// @code + /// boost::cnv::cstream cnv; + /// + /// boost::optional i = boost::convert("12", cnv); + /// boost::optional s = boost::convert(123.456, cnv); + /// @endcode + + template + boost::optional + convert(TypeIn const& value_in, Converter const& converter) + { + optional result; + boost::unwrap_ref(converter)(value_in, result); + return result; + } + + namespace cnv { namespace detail + { + template + struct delayed_resolution + { + static optional convert(TypeIn const& value_in) + { + return boost::convert(value_in, Converter()); + } + }; + }} + /// @brief Boost.Convert deployment interface with the default converter + /// @details For example, + /// @code + /// struct boost::cnv::by_default : boost::cnv::cstream {}; + /// + /// // boost::cnv::cstream (through boost::cnv::by_default) is deployed + /// // as the default converter when no converter is provided explicitly. + /// boost::optional i = boost::convert("12"); + /// boost::optional s = boost::convert(123.456); + /// @endcode + + template + boost::optional + convert(TypeIn const& value_in) + { + return cnv::detail::delayed_resolution::convert(value_in); + } +} + +namespace boost +{ + /// @brief Boost.Convert non-optional deployment interface + + template + TypeOut + convert(TypeIn const& value_in, Converter const& converter, boost::detail::throw_on_failure) + { + return convert(value_in, converter).value(); + } + + template + typename std::enable_if::value, TypeOut>::type + convert(TypeIn const& value_in, Converter const& converter, Fallback const& fallback) + { + return convert(value_in, converter).value_or(fallback); + } + + template + typename std::enable_if::value, TypeOut>::type + convert(TypeIn const& value_in, Converter const& converter, Fallback fallback) + { + return convert(value_in, converter).value_or_eval(fallback); + } +} + +namespace boost { namespace cnv +{ + template + struct reference + { + using this_type = reference; + + reference (Converter const& cnv) : converter_(cnv) {} + reference (Converter&& cnv) : converter_(std::move(cnv)) {} + + this_type& + value_or(TypeOut const& fallback) + { + return (fallback_ = fallback, *this); + } + + TypeOut + operator()(TypeIn const& value_in) const + { + optional result = convert(value_in, converter_); + return result ? result.get() : fallback_.value(); + } + + private: + + Converter converter_; + optional fallback_; + }; + template + struct reference + { + using this_type = reference; + + reference (Converter const& cnv) : converter_(cnv) {} + reference (Converter&& cnv) : converter_(std::move(cnv)) {} + + this_type& + value_or(TypeOut const& fallback) + { + return (fallback_ = fallback, *this); + } + + template + TypeOut + operator()(TypeIn const& value_in) const + { + optional result = convert(value_in, converter_); + return result ? result.get() : fallback_.value(); + } + + private: + + Converter converter_; + optional fallback_; + }; + + /// @brief Boost.Convert deployment interface with algorithms + /// @details For example, + /// @code + /// std::array strs = {{ " 5", "0XF", "not an int" }}; + /// std::vector ints; + /// boost::cnv::cstream cnv; + /// + /// cnv(std::hex)(std::skipws); + /// + /// std::transform( + /// strs.begin(), + /// strs.end(), + /// std::back_inserter(ints), + /// boost::cnv::apply(std::cref(cnv)).value_or(-1)); + /// @endcode + + template + reference + apply(Converter const& cnv) + { + return cnv::reference(cnv); + } + template + reference + apply(Converter const& cnv) + { + return cnv::reference(cnv); + } +}} + +#endif // BOOST_CONVERT_HPP diff --git a/Slang/boost/core/addressof.hpp b/Slang/boost/core/addressof.hpp new file mode 100644 index 0000000..5473c36 --- /dev/null +++ b/Slang/boost/core/addressof.hpp @@ -0,0 +1,274 @@ +/* +Copyright (C) 2002 Brad King (brad.king@kitware.com) + Douglas Gregor (gregod@cs.rpi.edu) + +Copyright (C) 2002, 2008, 2013 Peter Dimov + +Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@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) +*/ + +#ifndef BOOST_CORE_ADDRESSOF_HPP +#define BOOST_CORE_ADDRESSOF_HPP + +#include + +#if defined(BOOST_MSVC_FULL_VER) && BOOST_MSVC_FULL_VER >= 190024215 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(BOOST_GCC) && BOOST_GCC >= 70000 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(__has_builtin) +#if __has_builtin(__builtin_addressof) +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#endif +#endif + +#if defined(BOOST_CORE_HAS_BUILTIN_ADDRESSOF) +#if defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF +#endif + +namespace boost { + +template +BOOST_CONSTEXPR inline T* +addressof(T& o) BOOST_NOEXCEPT +{ + return __builtin_addressof(o); +} + +} /* boost */ +#else +#include +#include + +namespace boost { +namespace detail { + +template +class addrof_ref { +public: + BOOST_FORCEINLINE addrof_ref(T& o) BOOST_NOEXCEPT + : o_(o) { } + BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT { + return o_; + } +private: + addrof_ref& operator=(const addrof_ref&); + T& o_; +}; + +template +struct addrof { + static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT { + return reinterpret_cast(& + const_cast(reinterpret_cast(o))); + } + static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT { + return p; + } +}; + +#if !defined(BOOST_NO_CXX11_NULLPTR) +#if !defined(BOOST_NO_CXX11_DECLTYPE) && \ + (defined(__INTEL_COMPILER) || \ + (defined(__clang__) && !defined(_LIBCPP_VERSION))) +typedef decltype(nullptr) addrof_null_t; +#else +typedef std::nullptr_t addrof_null_t; +#endif + +template<> +struct addrof { + typedef addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; + } +}; + +template<> +struct addrof { + typedef const addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; + } +}; + +template<> +struct addrof { + typedef volatile addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; + } +}; + +template<> +struct addrof { + typedef const volatile addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; + } +}; +#endif + +} /* detail */ + +#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \ + defined(BOOST_NO_CXX11_CONSTEXPR) || \ + defined(BOOST_NO_CXX11_DECLTYPE) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF + +template +BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT +{ +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) || \ + BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120) + return boost::detail::addrof::get(o, 0); +#else + return boost::detail::addrof::get(boost::detail::addrof_ref(o), 0); +#endif +} + +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) +namespace detail { + +template +struct addrof_result { + typedef T* type; +}; + +} /* detail */ + +template +BOOST_FORCEINLINE typename boost::detail::addrof_result::type +addressof(T (&o)[N]) BOOST_NOEXCEPT +{ + return &o; +} +#endif + +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&o)[N]) BOOST_NOEXCEPT)[N] +{ + return reinterpret_cast(&o); +} + +template +BOOST_FORCEINLINE +const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N] +{ + return reinterpret_cast(&o); +} +#endif +#else +namespace detail { + +template +T addrof_declval() BOOST_NOEXCEPT; + +template +struct addrof_void { + typedef void type; +}; + +template +struct addrof_member_operator { + static constexpr bool value = false; +}; + +template +struct addrof_member_operator().operator&())>::type> { + static constexpr bool value = true; +}; + +#if BOOST_WORKAROUND(BOOST_INTEL, < 1600) +struct addrof_addressable { }; + +addrof_addressable* +operator&(addrof_addressable&) BOOST_NOEXCEPT; +#endif + +template +struct addrof_non_member_operator { + static constexpr bool value = false; +}; + +template +struct addrof_non_member_operator()))>::type> { + static constexpr bool value = true; +}; + +template +struct addrof_expression { + static constexpr bool value = false; +}; + +template +struct addrof_expression())>::type> { + static constexpr bool value = true; +}; + +template +struct addrof_is_constexpr { + static constexpr bool value = addrof_expression::value && + !addrof_member_operator::value && + !addrof_non_member_operator::value; +}; + +template +struct addrof_if { }; + +template +struct addrof_if { + typedef T* type; +}; + +template +BOOST_FORCEINLINE +typename addrof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT +{ + return addrof::get(addrof_ref(o), 0); +} + +template +constexpr BOOST_FORCEINLINE +typename addrof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT +{ + return &o; +} + +} /* detail */ + +template +constexpr BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT +{ + return boost::detail::addressof(o); +} +#endif + +} /* boost */ +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ + !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +namespace boost { + +template +const T* addressof(const T&&) = delete; + +} /* boost */ +#endif + +#endif diff --git a/Slang/boost/core/alloc_construct.hpp b/Slang/boost/core/alloc_construct.hpp new file mode 100644 index 0000000..e390730 --- /dev/null +++ b/Slang/boost/core/alloc_construct.hpp @@ -0,0 +1,169 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_ALLOC_CONSTRUCT_HPP +#define BOOST_CORE_ALLOC_CONSTRUCT_HPP + +#include + +namespace boost { + +template +inline void +alloc_destroy(A& a, T* p) +{ + boost::allocator_destroy(a, p); +} + +template +inline void +alloc_destroy_n(A& a, T* p, std::size_t n) +{ + while (n > 0) { + boost::allocator_destroy(a, p + --n); + } +} + +template +inline void +alloc_destroy(noinit_adaptor&, T* p) +{ + p->~T(); +} + +template +inline void +alloc_destroy_n(noinit_adaptor&, T* p, std::size_t n) +{ + while (n > 0) { + p[--n].~T(); + } +} + +namespace detail { + +template +class alloc_destroyer { +public: + alloc_destroyer(A& a, T* p) BOOST_NOEXCEPT + : a_(a), + p_(p), + n_(0) { } + + ~alloc_destroyer() { + boost::alloc_destroy_n(a_, p_, n_); + } + + std::size_t& size() BOOST_NOEXCEPT { + return n_; + } + +private: + alloc_destroyer(const alloc_destroyer&); + alloc_destroyer& operator=(const alloc_destroyer&); + + A& a_; + T* p_; + std::size_t n_; +}; + +} /* detail */ + +template +inline void +alloc_construct(A& a, T* p) +{ + boost::allocator_construct(a, p); +} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +inline void +alloc_construct(A& a, T* p, U&& u, V&&... v) +{ + boost::allocator_construct(a, p, std::forward(u), + std::forward(v)...); +} +#else +template +inline void +alloc_construct(A& a, T* p, U&& u) +{ + boost::allocator_construct(a, p, std::forward(u)); +} +#endif +#else +template +inline void +alloc_construct(A& a, T* p, const U& u) +{ + boost::allocator_construct(a, p, u); +} + +template +inline void +alloc_construct(A& a, T* p, U& u) +{ + boost::allocator_construct(a, p, u); +} +#endif + +template +inline void +alloc_construct_n(A& a, T* p, std::size_t n) +{ + detail::alloc_destroyer hold(a, p); + for (std::size_t& i = hold.size(); i < n; ++i) { + boost::allocator_construct(a, p + i); + } + hold.size() = 0; +} + +template +inline void +alloc_construct_n(A& a, T* p, std::size_t n, const T* l, std::size_t m) +{ + detail::alloc_destroyer hold(a, p); + for (std::size_t& i = hold.size(); i < n; ++i) { + boost::allocator_construct(a, p + i, l[i % m]); + } + hold.size() = 0; +} + +template +inline void +alloc_construct_n(A& a, T* p, std::size_t n, I b) +{ + detail::alloc_destroyer hold(a, p); + for (std::size_t& i = hold.size(); i < n; void(++i), void(++b)) { + boost::allocator_construct(a, p + i, *b); + } + hold.size() = 0; +} + +template +inline void +alloc_construct(noinit_adaptor&, T* p) +{ + ::new(static_cast(p)) T; +} + +template +inline void +alloc_construct_n(noinit_adaptor& a, T* p, std::size_t n) +{ + detail::alloc_destroyer, T> hold(a, p); + for (std::size_t& i = hold.size(); i < n; ++i) { + ::new(static_cast(p + i)) T; + } + hold.size() = 0; +} + +} /* boost */ + +#endif diff --git a/Slang/boost/core/allocator_access.hpp b/Slang/boost/core/allocator_access.hpp new file mode 100644 index 0000000..764c122 --- /dev/null +++ b/Slang/boost/core/allocator_access.hpp @@ -0,0 +1,601 @@ +/* +Copyright 2020-2021 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_ALLOCATOR_ACCESS_HPP +#define BOOST_CORE_ALLOCATOR_ACCESS_HPP + +#include +#if !defined(BOOST_NO_CXX11_ALLOCATOR) +#include +#include +#include +#endif +#include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + +#if defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH) +_LIBCPP_SUPPRESS_DEPRECATED_PUSH +#endif +#if defined(_STL_DISABLE_DEPRECATED_WARNING) +_STL_DISABLE_DEPRECATED_WARNING +#endif +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4996) +#endif + +namespace boost { + +template +struct allocator_value_type { + typedef typename A::value_type type; +}; + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_pointer { + typedef typename A::pointer type; +}; +#else +template +struct allocator_pointer { + typedef typename A::value_type* type; +}; + +namespace detail { + +template +struct alloc_void { + typedef void type; +}; + +} /* detail */ + +template +struct allocator_pointer::type> { + typedef typename A::pointer type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_const_pointer { + typedef typename A::const_pointer type; +}; +#else +template +struct allocator_const_pointer { + typedef typename pointer_traits::type>::template + rebind_to::type type; +}; + +template +struct allocator_const_pointer::type> { + typedef typename A::const_pointer type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_void_pointer { + typedef typename A::template rebind::other::pointer type; +}; +#else +template +struct allocator_void_pointer { + typedef typename pointer_traits::type>::template + rebind_to::type type; +}; + +template +struct allocator_void_pointer::type> { + typedef typename A::void_pointer type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_const_void_pointer { + typedef typename A::template rebind::other::const_pointer type; +}; +#else +template +struct allocator_const_void_pointer { + typedef typename pointer_traits::type>::template + rebind_to::type type; +}; + +template +struct allocator_const_void_pointer::type> { + typedef typename A::const_void_pointer type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_difference_type { + typedef typename A::difference_type type; +}; +#else +template +struct allocator_difference_type { + typedef typename pointer_traits::type>::difference_type type; +}; + +template +struct allocator_difference_type::type> { + typedef typename A::difference_type type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_size_type { + typedef typename A::size_type type; +}; +#else +template +struct allocator_size_type { + typedef typename std::make_unsigned::type>::type type; +}; + +template +struct allocator_size_type::type> { + typedef typename A::size_type type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +namespace detail { + +struct alloc_false { + BOOST_STATIC_CONSTEXPR bool value = false; +}; + +} /* detail */ + +template +struct allocator_propagate_on_container_copy_assignment { + typedef detail::alloc_false type; +}; +#else +template +struct allocator_propagate_on_container_copy_assignment { + typedef std::false_type type; +}; + +template +struct allocator_propagate_on_container_copy_assignment::type> { + typedef typename A::propagate_on_container_copy_assignment type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_propagate_on_container_move_assignment { + typedef detail::alloc_false type; +}; +#else +template +struct allocator_propagate_on_container_move_assignment { + typedef std::false_type type; +}; + +template +struct allocator_propagate_on_container_move_assignment::type> { + typedef typename A::propagate_on_container_move_assignment type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_propagate_on_container_swap { + typedef detail::alloc_false type; +}; +#else +template +struct allocator_propagate_on_container_swap { + typedef std::false_type type; +}; + +template +struct allocator_propagate_on_container_swap::type> { + typedef typename A::propagate_on_container_swap type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_is_always_equal { + typedef detail::alloc_false type; +}; +#else +template +struct allocator_is_always_equal { + typedef typename std::is_empty::type type; +}; + +template +struct allocator_is_always_equal::type> { + typedef typename A::is_always_equal type; +}; +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +struct allocator_rebind { + typedef typename A::template rebind::other type; +}; +#else +namespace detail { + +template +struct alloc_to { }; + +template class A, class T, class U, class... V> +struct alloc_to, T> { + typedef A type; +}; + +} /* detail */ + +template +struct allocator_rebind { + typedef typename detail::alloc_to::type type; +}; + +template +struct allocator_rebind::other>::type> { + typedef typename A::template rebind::other type; +}; +#endif + +template +inline typename allocator_pointer::type +allocator_allocate(A& a, typename allocator_size_type::type n) +{ + return a.allocate(n); +} + +template +inline void +allocator_deallocate(A& a, typename allocator_pointer::type p, + typename allocator_size_type::type n) +{ + a.deallocate(p, n); +} + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +inline typename allocator_pointer::type +allocator_allocate(A& a, typename allocator_size_type::type n, + typename allocator_const_void_pointer::type h) +{ + return a.allocate(n, h); +} +#else +namespace detail { + +struct alloc_none { }; + +template +class alloc_has_allocate { + template + static auto check(int) -> decltype(std::declval().allocate( + std::declval::type>(), + std::declval::type>())); + + template + static alloc_none check(long); + +public: + BOOST_STATIC_CONSTEXPR bool value = + !std::is_same(0)), alloc_none>::value; +}; + +} /* detail */ + +template +inline typename std::enable_if::value, + typename allocator_pointer::type>::type +allocator_allocate(A& a, typename allocator_size_type::type n, + typename allocator_const_void_pointer::type h) +{ + return a.allocate(n, h); +} + +template +inline typename std::enable_if::value, + typename allocator_pointer::type>::type +allocator_allocate(A& a, typename allocator_size_type::type n, + typename allocator_const_void_pointer::type) +{ + return a.allocate(n); +} +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +inline void +allocator_construct(A&, T* p) +{ + ::new((void*)p) T(); +} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +inline void +allocator_construct(A&, T* p, V&& v, Args&&... args) +{ + ::new((void*)p) T(std::forward(v), std::forward(args)...); +} +#else +template +inline void +allocator_construct(A&, T* p, V&& v) +{ + ::new((void*)p) T(std::forward(v)); +} +#endif +#else +template +inline void +allocator_construct(A&, T* p, const V& v) +{ + ::new((void*)p) T(v); +} + +template +inline void +allocator_construct(A&, T* p, V& v) +{ + ::new((void*)p) T(v); +} +#endif +#else +namespace detail { + +template +class alloc_has_construct { + template + static auto check(int) + -> decltype(std::declval().construct(std::declval(), + std::declval()...)); + + template + static alloc_none check(long); + +public: + BOOST_STATIC_CONSTEXPR bool value = + !std::is_same(0)), alloc_none>::value; +}; + +} /* detail */ + +template +inline typename std::enable_if::value>::type +allocator_construct(A& a, T* p, Args&&... args) +{ + a.construct(p, std::forward(args)...); +} + +template +inline typename std::enable_if::value>::type +allocator_construct(A&, T* p, Args&&... args) +{ + ::new((void*)p) T(std::forward(args)...); +} +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +inline void +allocator_destroy(A&, T* p) +{ + p->~T(); + (void)p; +} +#else +namespace detail { + +template +class alloc_has_destroy { + template + static auto check(int) + -> decltype(std::declval().destroy(std::declval())); + + template + static alloc_none check(long); + +public: + BOOST_STATIC_CONSTEXPR bool value = + !std::is_same(0)), alloc_none>::value; +}; + +} /* detail */ + +template +inline typename std::enable_if::value>::type +allocator_destroy(A& a, T* p) +{ + a.destroy(p); +} + +template +inline typename std::enable_if::value>::type +allocator_destroy(A&, T* p) +{ + p->~T(); + (void)p; +} +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +inline typename allocator_size_type::type +allocator_max_size(const A& a) +{ + return a.max_size(); +} +#else +namespace detail { + +template +class alloc_has_max_size { + template + static auto check(int) -> decltype(std::declval().max_size()); + + template + static alloc_none check(long); + +public: + BOOST_STATIC_CONSTEXPR bool value = + !std::is_same(0)), alloc_none>::value; +}; + +} /* detail */ + +template +inline typename std::enable_if::value, + typename allocator_size_type::type>::type +allocator_max_size(const A& a) +{ + return a.max_size(); +} + +template +inline typename std::enable_if::value, + typename allocator_size_type::type>::type +allocator_max_size(const A&) +{ + return (std::numeric_limits::type>::max)() / sizeof(typename A::value_type); +} +#endif + +#if defined(BOOST_NO_CXX11_ALLOCATOR) +template +inline A +allocator_select_on_container_copy_construction(const A& a) +{ + return a; +} +#else +namespace detail { + +template +class alloc_has_soccc { + template + static auto check(int) + -> decltype(std::declval().select_on_container_copy_construction()); + + template + static alloc_none check(long); + +public: + BOOST_STATIC_CONSTEXPR bool value = + !std::is_same(0)), alloc_none>::value; +}; + +} /* detail */ + +template +inline typename std::enable_if::value, A>::type +allocator_select_on_container_copy_construction(const A& a) +{ + return a.select_on_container_copy_construction(); +} + +template +inline typename std::enable_if::value, A>::type +allocator_select_on_container_copy_construction(const A& a) +{ + return a; +} +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using allocator_value_type_t = typename allocator_value_type::type; + +template +using allocator_pointer_t = typename allocator_pointer::type; + +template +using allocator_const_pointer_t = typename allocator_const_pointer::type; + +template +using allocator_void_pointer_t = typename allocator_void_pointer::type; + +template +using allocator_const_void_pointer_t = + typename allocator_const_void_pointer::type; + +template +using allocator_difference_type_t = + typename allocator_difference_type::type; + +template +using allocator_size_type_t = typename allocator_size_type::type; + +template +using allocator_propagate_on_container_copy_assignment_t = + typename allocator_propagate_on_container_copy_assignment::type; + +template +using allocator_propagate_on_container_move_assignment_t = + typename allocator_propagate_on_container_move_assignment::type; + +template +using allocator_propagate_on_container_swap_t = + typename allocator_propagate_on_container_swap::type; + +template +using allocator_is_always_equal_t = + typename allocator_is_always_equal::type; + +template +using allocator_rebind_t = typename allocator_rebind::type; +#endif + +} /* boost */ + +#if defined(_LIBCPP_SUPPRESS_DEPRECATED_POP) +_LIBCPP_SUPPRESS_DEPRECATED_POP +#endif +#if defined(_STL_RESTORE_DEPRECATED_WARNING) +_STL_RESTORE_DEPRECATED_WARNING +#endif +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + +#endif diff --git a/Slang/boost/core/bit.hpp b/Slang/boost/core/bit.hpp new file mode 100644 index 0000000..f4305b9 --- /dev/null +++ b/Slang/boost/core/bit.hpp @@ -0,0 +1,592 @@ +#ifndef BOOST_CORE_BIT_HPP_INCLUDED +#define BOOST_CORE_BIT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost/core/bit.hpp +// +// A portable version of the C++20 standard header +// +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) + +# include +# pragma intrinsic(_BitScanForward) +# pragma intrinsic(_BitScanReverse) + +# if defined(_M_X64) +# pragma intrinsic(_BitScanForward64) +# pragma intrinsic(_BitScanReverse64) +# endif + +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4244) // conversion from int to T + +#endif // defined(_MSC_VER) + +namespace boost +{ +namespace core +{ + +// bit_cast + +template +To bit_cast( From const & from ) BOOST_NOEXCEPT +{ + BOOST_STATIC_ASSERT( sizeof(To) == sizeof(From) ); + + To to; + std::memcpy( &to, &from, sizeof(To) ); + return to; +} + +// countl + +#if defined(__GNUC__) || defined(__clang__) + +namespace detail +{ + +BOOST_CONSTEXPR inline int countl_impl( unsigned char x ) BOOST_NOEXCEPT +{ + return x? __builtin_clz( x ) - ( std::numeric_limits::digits - std::numeric_limits::digits ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countl_impl( unsigned short x ) BOOST_NOEXCEPT +{ + return x? __builtin_clz( x ) - ( std::numeric_limits::digits - std::numeric_limits::digits ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countl_impl( unsigned int x ) BOOST_NOEXCEPT +{ + return x? __builtin_clz( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countl_impl( unsigned long x ) BOOST_NOEXCEPT +{ + return x? __builtin_clzl( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countl_impl( unsigned long long x ) BOOST_NOEXCEPT +{ + return x? __builtin_clzll( x ): std::numeric_limits::digits; +} + +} // namespace detail + +template +BOOST_CONSTEXPR int countl_zero( T x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countl_impl( x ); +} + +#else // defined(__GNUC__) || defined(__clang__) + +namespace detail +{ + +inline int countl_impl( boost::uint32_t x ) BOOST_NOEXCEPT +{ +#if defined(_MSC_VER) + + unsigned long r; + + if( _BitScanReverse( &r, x ) ) + { + return 31 - static_cast( r ); + } + else + { + return 32; + } + +#else + + static unsigned char const mod37[ 37 ] = { 32, 31, 6, 30, 9, 5, 0, 29, 16, 8, 2, 4, 21, 0, 19, 28, 25, 15, 0, 7, 10, 1, 17, 3, 22, 20, 26, 0, 11, 18, 23, 27, 12, 24, 13, 14, 0 }; + + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + + return mod37[ x % 37 ]; + +#endif +} + +inline int countl_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ +#if defined(_MSC_VER) && defined(_M_X64) + + unsigned long r; + + if( _BitScanReverse64( &r, x ) ) + { + return 63 - static_cast( r ); + } + else + { + return 64; + } + +#else + + return static_cast( x >> 32 ) != 0? + boost::core::detail::countl_impl( static_cast( x >> 32 ) ): + boost::core::detail::countl_impl( static_cast( x ) ) + 32; + +#endif +} + +inline int countl_impl( boost::uint8_t x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countl_impl( static_cast( x ) ) - 24; +} + +inline int countl_impl( boost::uint16_t x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countl_impl( static_cast( x ) ) - 16; +} + +} // namespace detail + +template +int countl_zero( T x ) BOOST_NOEXCEPT +{ + BOOST_STATIC_ASSERT( sizeof(T) == sizeof(boost::uint8_t) || sizeof(T) == sizeof(boost::uint16_t) || sizeof(T) == sizeof(boost::uint32_t) || sizeof(T) == sizeof(boost::uint64_t) ); + + if( sizeof(T) == sizeof(boost::uint8_t) ) + { + return boost::core::detail::countl_impl( static_cast( x ) ); + } + else if( sizeof(T) == sizeof(boost::uint16_t) ) + { + return boost::core::detail::countl_impl( static_cast( x ) ); + } + else if( sizeof(T) == sizeof(boost::uint32_t) ) + { + return boost::core::detail::countl_impl( static_cast( x ) ); + } + else + { + return boost::core::detail::countl_impl( static_cast( x ) ); + } +} + +#endif // defined(__GNUC__) || defined(__clang__) + +template +BOOST_CONSTEXPR int countl_one( T x ) BOOST_NOEXCEPT +{ + return boost::core::countl_zero( static_cast( ~x ) ); +} + +// countr + +#if defined(__GNUC__) || defined(__clang__) + +namespace detail +{ + +BOOST_CONSTEXPR inline int countr_impl( unsigned char x ) BOOST_NOEXCEPT +{ + return x? __builtin_ctz( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countr_impl( unsigned short x ) BOOST_NOEXCEPT +{ + return x? __builtin_ctz( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countr_impl( unsigned int x ) BOOST_NOEXCEPT +{ + return x? __builtin_ctz( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countr_impl( unsigned long x ) BOOST_NOEXCEPT +{ + return x? __builtin_ctzl( x ): std::numeric_limits::digits; +} + +BOOST_CONSTEXPR inline int countr_impl( unsigned long long x ) BOOST_NOEXCEPT +{ + return x? __builtin_ctzll( x ): std::numeric_limits::digits; +} + +} // namespace detail + +template +BOOST_CONSTEXPR int countr_zero( T x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countr_impl( x ); +} + +#else // defined(__GNUC__) || defined(__clang__) + +namespace detail +{ + +inline int countr_impl( boost::uint32_t x ) BOOST_NOEXCEPT +{ +#if defined(_MSC_VER) + + unsigned long r; + + if( _BitScanForward( &r, x ) ) + { + return static_cast( r ); + } + else + { + return 32; + } + +#else + + static unsigned char const mod37[ 37 ] = { 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9, 5, 20, 8, 19, 18 }; + return mod37[ ( -(boost::int32_t)x & x ) % 37 ]; + +#endif +} + +inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ +#if defined(_MSC_VER) && defined(_M_X64) + + unsigned long r; + + if( _BitScanForward64( &r, x ) ) + { + return static_cast( r ); + } + else + { + return 64; + } + +#else + + return static_cast( x ) != 0? + boost::core::detail::countr_impl( static_cast( x ) ): + boost::core::detail::countr_impl( static_cast( x >> 32 ) ) + 32; + +#endif +} + +inline int countr_impl( boost::uint8_t x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countr_impl( static_cast( x ) | 0x100 ); +} + +inline int countr_impl( boost::uint16_t x ) BOOST_NOEXCEPT +{ + return boost::core::detail::countr_impl( static_cast( x ) | 0x10000 ); +} + +} // namespace detail + +template +int countr_zero( T x ) BOOST_NOEXCEPT +{ + BOOST_STATIC_ASSERT( sizeof(T) == sizeof(boost::uint8_t) || sizeof(T) == sizeof(boost::uint16_t) || sizeof(T) == sizeof(boost::uint32_t) || sizeof(T) == sizeof(boost::uint64_t) ); + + if( sizeof(T) == sizeof(boost::uint8_t) ) + { + return boost::core::detail::countr_impl( static_cast( x ) ); + } + else if( sizeof(T) == sizeof(boost::uint16_t) ) + { + return boost::core::detail::countr_impl( static_cast( x ) ); + } + else if( sizeof(T) == sizeof(boost::uint32_t) ) + { + return boost::core::detail::countr_impl( static_cast( x ) ); + } + else + { + return boost::core::detail::countr_impl( static_cast( x ) ); + } +} + +#endif // defined(__GNUC__) || defined(__clang__) + +template +BOOST_CONSTEXPR int countr_one( T x ) BOOST_NOEXCEPT +{ + return boost::core::countr_zero( static_cast( ~x ) ); +} + +// popcount + +#if defined(__GNUC__) || defined(__clang__) + +#if defined(__clang__) && __clang_major__ * 100 + __clang_minor__ < 304 +# define BOOST_CORE_POPCOUNT_CONSTEXPR +#else +# define BOOST_CORE_POPCOUNT_CONSTEXPR BOOST_CONSTEXPR +#endif + +namespace detail +{ + +BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned char x ) BOOST_NOEXCEPT +{ + return __builtin_popcount( x ); +} + +BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned short x ) BOOST_NOEXCEPT +{ + return __builtin_popcount( x ); +} + +BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned int x ) BOOST_NOEXCEPT +{ + return __builtin_popcount( x ); +} + +BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned long x ) BOOST_NOEXCEPT +{ + return __builtin_popcountl( x ); +} + +BOOST_CORE_POPCOUNT_CONSTEXPR inline int popcount_impl( unsigned long long x ) BOOST_NOEXCEPT +{ + return __builtin_popcountll( x ); +} + +} // namespace detail + +#undef BOOST_CORE_POPCOUNT_CONSTEXPR + +template +BOOST_CONSTEXPR int popcount( T x ) BOOST_NOEXCEPT +{ + return boost::core::detail::popcount_impl( x ); +} + +#else // defined(__GNUC__) || defined(__clang__) + +namespace detail +{ + +BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint32_t x ) BOOST_NOEXCEPT +{ + x = x - ( ( x >> 1 ) & 0x55555555 ); + x = ( x & 0x33333333 ) + ( ( x >> 2 ) & 0x33333333 ); + x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F; + + return static_cast( ( x * 0x01010101 ) >> 24 ); +} + +BOOST_CXX14_CONSTEXPR inline int popcount_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ + x = x - ( ( x >> 1 ) & 0x5555555555555555 ); + x = ( x & 0x3333333333333333 ) + ( ( x >> 2 ) & 0x3333333333333333 ); + x = ( x + ( x >> 4 ) ) & 0x0F0F0F0F0F0F0F0F; + + return static_cast( ( x * 0x0101010101010101 ) >> 56 ); +} + +} // namespace detail + +template +BOOST_CXX14_CONSTEXPR int popcount( T x ) BOOST_NOEXCEPT +{ + BOOST_STATIC_ASSERT( sizeof(T) <= sizeof(boost::uint64_t) ); + + if( sizeof(T) <= sizeof(boost::uint32_t) ) + { + return boost::core::detail::popcount_impl( static_cast( x ) ); + } + else + { + return boost::core::detail::popcount_impl( static_cast( x ) ); + } +} + +#endif // defined(__GNUC__) || defined(__clang__) + +// rotating + +template +BOOST_CXX14_CONSTEXPR T rotl( T x, int s ) BOOST_NOEXCEPT +{ + unsigned const mask = std::numeric_limits::digits - 1; + return x << (s & mask) | x >> ((-s) & mask); +} + +template +BOOST_CXX14_CONSTEXPR T rotr( T x, int s ) BOOST_NOEXCEPT +{ + unsigned const mask = std::numeric_limits::digits - 1; + return x >> (s & mask) | x << ((-s) & mask); +} + +// integral powers of 2 + +template +BOOST_CONSTEXPR bool has_single_bit( T x ) BOOST_NOEXCEPT +{ + return x != 0 && ( x & ( x - 1 ) ) == 0; +} + +template +BOOST_CONSTEXPR T bit_width( T x ) BOOST_NOEXCEPT +{ + return std::numeric_limits::digits - boost::core::countl_zero( x ); +} + +template +BOOST_CONSTEXPR T bit_floor( T x ) BOOST_NOEXCEPT +{ + return x == 0? 0: T(1) << ( boost::core::bit_width( x ) - 1 ); +} + +namespace detail +{ + +BOOST_CXX14_CONSTEXPR inline boost::uint32_t bit_ceil_impl( boost::uint32_t x ) BOOST_NOEXCEPT +{ + if( x == 0 ) + { + return 0; + } + + --x; + + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + + ++x; + + return x; +} + +BOOST_CXX14_CONSTEXPR inline boost::uint64_t bit_ceil_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ + if( x == 0 ) + { + return 0; + } + + --x; + + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + x |= x >> 32; + + ++x; + + return x; +} + +} // namespace detail + +template +BOOST_CXX14_CONSTEXPR T bit_ceil( T x ) BOOST_NOEXCEPT +{ + BOOST_STATIC_ASSERT( sizeof(T) <= sizeof(boost::uint64_t) ); + + if( sizeof(T) <= sizeof(boost::uint32_t) ) + { + return static_cast( boost::core::detail::bit_ceil_impl( static_cast( x ) ) ); + } + else + { + return static_cast( boost::core::detail::bit_ceil_impl( static_cast( x ) ) ); + } +} + +// endian + +#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little + +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER =big + +#elif defined(__BYTE_ORDER__) && defined(__ORDER_PDP_ENDIAN__) && __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__ + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER + +#elif defined(__LITTLE_ENDIAN__) + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little + +#elif defined(__BIG_ENDIAN__) + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER =big + +#elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__) + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER =little + +#else + +# define BOOST_CORE_BIT_NATIVE_INITIALIZER + +#endif + +#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) + +enum class endian +{ + big, + little, + native BOOST_CORE_BIT_NATIVE_INITIALIZER +}; + +typedef endian endian_type; + +#else + +namespace endian +{ + +enum type +{ + big, + little, + native BOOST_CORE_BIT_NATIVE_INITIALIZER +}; + +} // namespace endian + +typedef endian::type endian_type; + +#endif + +#undef BOOST_CORE_BIT_NATIVE_INITIALIZER + +} // namespace core +} // namespace boost + +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + +#endif // #ifndef BOOST_CORE_BIT_HPP_INCLUDED diff --git a/Slang/boost/core/checked_delete.hpp b/Slang/boost/core/checked_delete.hpp new file mode 100644 index 0000000..6af5c14 --- /dev/null +++ b/Slang/boost/core/checked_delete.hpp @@ -0,0 +1,71 @@ +#ifndef BOOST_CORE_CHECKED_DELETE_HPP +#define BOOST_CORE_CHECKED_DELETE_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +// +// boost/checked_delete.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant +// +// Distributed under the 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/core/doc/html/core/checked_delete.html for documentation. +// + +namespace boost +{ + +// verify that types are complete for increased safety + +template inline void checked_delete(T * x) BOOST_NOEXCEPT +{ + // intentionally complex - simplification causes regressions + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) BOOST_NOEXCEPT +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const BOOST_NOEXCEPT + { + // boost:: disables ADL + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const BOOST_NOEXCEPT + { + boost::checked_array_delete(x); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP diff --git a/Slang/boost/core/cmath.hpp b/Slang/boost/core/cmath.hpp new file mode 100644 index 0000000..a18c81b --- /dev/null +++ b/Slang/boost/core/cmath.hpp @@ -0,0 +1,298 @@ +#ifndef BOOST_CORE_CMATH_HPP_INCLUDED +#define BOOST_CORE_CMATH_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost/core/cmath.hpp +// +// Floating point classification and sign manipulation functions +// Extracted from https://github.com/boostorg/lexical_cast/pull/37 +// +// Copyright 2020, 2021 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include + +#if defined(BOOST_CORE_USE_GENERIC_CMATH) || (!defined(_MSC_VER) && !defined(FP_SUBNORMAL)) + +#include +#include +#include +#include + +namespace boost +{ +namespace core +{ + +// fpclassify return values + +int const fp_zero = 0; +int const fp_subnormal = 1; +int const fp_normal = 2; +int const fp_infinite = 3; +int const fp_nan = 4; + +// Classification functions + +template bool isfinite( T x ) +{ + return x <= (std::numeric_limits::max)() && x >= -(std::numeric_limits::max)(); +} + +template bool isinf( T x ) +{ + return x > (std::numeric_limits::max)() || x < -(std::numeric_limits::max)(); +} + +template bool isnan( T x ) +{ + return !isfinite( x ) && !isinf( x ); +} + +template bool isnormal( T x ) +{ + return isfinite( x ) && ( x >= (std::numeric_limits::min)() || x <= -(std::numeric_limits::min)() ); +} + +template int fpclassify( T x ) +{ + if( x == 0 ) return fp_zero; + + if( x < 0 ) x = -x; + + if( x > (std::numeric_limits::max)() ) return fp_infinite; + + if( x >= (std::numeric_limits::min)() ) return fp_normal; + + if( x < (std::numeric_limits::min)() ) return fp_subnormal; + + return fp_nan; +} + +// Sign manipulation functions + +inline bool signbit( float x ) +{ + boost::int32_t y; + + BOOST_STATIC_ASSERT( sizeof( x ) == sizeof( y ) ); + + std::memcpy( &y, &x, sizeof( y ) ); + + return y < 0; +} + +inline bool signbit( double x ) +{ + boost::int64_t y; + + BOOST_STATIC_ASSERT( sizeof( x ) == sizeof( y ) ); + + std::memcpy( &y, &x, sizeof( y ) ); + + return y < 0; +} + +inline bool signbit( long double x ) +{ + return signbit( static_cast( x ) ); +} + +template T copysign( T x, T y ) +{ + return signbit( x ) == signbit( y )? x: -x; +} + +} // namespace core +} // namespace boost + +#else // defined(BOOST_CORE_USE_GENERIC_CMATH) + +#if defined(_MSC_VER) && _MSC_VER < 1800 +# include +#endif + +namespace boost +{ +namespace core +{ +#if defined(_MSC_VER) && _MSC_VER < 1800 + +template T copysign( T x, T y ) +{ + return static_cast( _copysign( static_cast( x ), static_cast( y ) ) ); +} + +template bool isnan( T x ) +{ + return _isnan( static_cast( x ) ) != 0; +} + +template bool isfinite( T x ) +{ + return _finite( static_cast( x ) ) != 0; +} + +template bool isinf( T x ) +{ + return ( _fpclass( static_cast( x ) ) & ( _FPCLASS_PINF | _FPCLASS_NINF ) ) != 0; +} + +inline bool isnormal( float x ) +{ + // no _fpclassf in 32 bit mode + unsigned y = reinterpret_cast< unsigned const& >( x ); + unsigned exp = ( y >> 23 ) & 0xFF; + return exp != 0 && exp != 0xFF; +} + +inline bool isnormal( double x ) +{ + return ( _fpclass( x ) & ( _FPCLASS_PN | _FPCLASS_NN ) ) != 0; +} + +inline bool isnormal( long double x ) +{ + return boost::core::isnormal( static_cast( x ) ); +} + +template bool signbit( T x ) +{ + return _copysign( 1.0, static_cast( x ) ) < 0.0; +} + +int const fp_zero = 0; +int const fp_subnormal = 1; +int const fp_normal = 2; +int const fp_infinite = 3; +int const fp_nan = 4; + +inline int fpclassify( float x ) +{ + switch( _fpclass( x ) ) + { + case _FPCLASS_SNAN: + case _FPCLASS_QNAN: + + return fp_nan; + + case _FPCLASS_NINF: + case _FPCLASS_PINF: + + return fp_infinite; + + case _FPCLASS_NZ: + case _FPCLASS_PZ: + + return fp_zero; + + default: + + return boost::core::isnormal( x )? fp_normal: fp_subnormal; + } +} + +inline int fpclassify( double x ) +{ + switch( _fpclass( x ) ) + { + case _FPCLASS_SNAN: + case _FPCLASS_QNAN: + + return fp_nan; + + case _FPCLASS_NINF: + case _FPCLASS_PINF: + + return fp_infinite; + + case _FPCLASS_NZ: + case _FPCLASS_PZ: + + return fp_zero; + + case _FPCLASS_ND: + case _FPCLASS_PD: + + return fp_subnormal; + + default: + + return fp_normal; + } +} + +inline int fpclassify( long double x ) +{ + return boost::core::fpclassify( static_cast( x ) ); +} + +#else + +using std::isfinite; +using std::isnan; +using std::isinf; +using std::isnormal; +using std::fpclassify; + +int const fp_zero = FP_ZERO; +int const fp_subnormal = FP_SUBNORMAL; +int const fp_normal = FP_NORMAL; +int const fp_infinite = FP_INFINITE; +int const fp_nan = FP_NAN; + +using std::signbit; + +// std::copysign doesn't exist in libstdc++ under -std=c++03 + +#if !defined(__GNUC__) + +template T copysign( T x, T y ) +{ + return std::copysign( x, y ); +} + +#else + +namespace detail +{ + +// ::copysignl is unreliable, use the built-ins + +inline float copysign_impl( float x, float y ) +{ + return __builtin_copysignf( x, y ); +} + +inline double copysign_impl( double x, double y ) +{ + return __builtin_copysign( x, y ); +} + +inline long double copysign_impl( long double x, long double y ) +{ + return __builtin_copysignl( x, y ); +} + +} // namespace detail + +template T copysign( T x, T y ) +{ + return boost::core::detail::copysign_impl( x, y ); +} + +#endif // !defined(__GNUC__) +#endif // #if defined(_MSC_VER) && _MSC_VER < 1800 + +} // namespace core +} // namespace boost + +#endif // defined(BOOST_CORE_USE_GENERIC_CMATH) + +#endif // #ifndef BOOST_CORE_CMATH_HPP_INCLUDED diff --git a/Slang/boost/core/default_allocator.hpp b/Slang/boost/core/default_allocator.hpp new file mode 100644 index 0000000..9e466ca --- /dev/null +++ b/Slang/boost/core/default_allocator.hpp @@ -0,0 +1,148 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_DEFAULT_ALLOCATOR_HPP +#define BOOST_CORE_DEFAULT_ALLOCATOR_HPP + +#include +#include + +namespace boost { + +#if defined(BOOST_NO_EXCEPTIONS) +BOOST_NORETURN void throw_exception(const std::exception&); +#endif + +namespace default_ { + +struct true_type { + typedef bool value_type; + typedef true_type type; + + BOOST_STATIC_CONSTANT(bool, value = true); + + BOOST_CONSTEXPR operator bool() const BOOST_NOEXCEPT { + return true; + } + + BOOST_CONSTEXPR bool operator()() const BOOST_NOEXCEPT { + return true; + } +}; + +template +struct add_reference { + typedef T& type; +}; + +template<> +struct add_reference { + typedef void type; +}; + +template<> +struct add_reference { + typedef const void type; +}; + +template +struct default_allocator { + typedef T value_type; + typedef T* pointer; + typedef const T* const_pointer; + typedef typename add_reference::type reference; + typedef typename add_reference::type const_reference; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef true_type propagate_on_container_move_assignment; + typedef true_type is_always_equal; + + template + struct rebind { + typedef default_allocator other; + }; + +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + default_allocator() = default; +#else + BOOST_CONSTEXPR default_allocator() BOOST_NOEXCEPT { } +#endif + + template + BOOST_CONSTEXPR default_allocator(const default_allocator&) + BOOST_NOEXCEPT { } + + BOOST_CONSTEXPR std::size_t max_size() const BOOST_NOEXCEPT { + return static_cast(-1) / (2 < sizeof(T) ? sizeof(T) : 2); + } + +#if !defined(BOOST_NO_EXCEPTIONS) + T* allocate(std::size_t n) { + if (n > max_size()) { + throw std::bad_alloc(); + } + return static_cast(::operator new(sizeof(T) * n)); + } + + void deallocate(T* p, std::size_t) { + ::operator delete(p); + } +#else + T* allocate(std::size_t n) { + if (n > max_size()) { + boost::throw_exception(std::bad_alloc()); + } + void* p = ::operator new(sizeof(T) * n, std::nothrow); + if (!p) { + boost::throw_exception(std::bad_alloc()); + } + return static_cast(p); + } + + void deallocate(T* p, std::size_t) { + ::operator delete(p, std::nothrow); + } +#endif + +#if (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 60000) || \ + defined(BOOST_NO_CXX11_ALLOCATOR) + template + void construct(U* p, const V& v) { + ::new(p) U(v); + } + + template + void destroy(U* p) { + p->~U(); + (void)p; + } +#endif +}; + +template +BOOST_CONSTEXPR inline bool +operator==(const default_allocator&, + const default_allocator&) BOOST_NOEXCEPT +{ + return true; +} + +template +BOOST_CONSTEXPR inline bool +operator!=(const default_allocator&, + const default_allocator&) BOOST_NOEXCEPT +{ + return false; +} + +} /* default_ */ + +using default_::default_allocator; + +} /* boost */ + +#endif diff --git a/Slang/boost/core/demangle.hpp b/Slang/boost/core/demangle.hpp new file mode 100644 index 0000000..dc714d8 --- /dev/null +++ b/Slang/boost/core/demangle.hpp @@ -0,0 +1,126 @@ +#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED +#define BOOST_CORE_DEMANGLE_HPP_INCLUDED + +// core::demangle +// +// Copyright 2014 Peter Dimov +// Copyright 2014 Andrey Semashev +// +// Distributed under the 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 +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +// __has_include is currently supported by GCC and Clang. However GCC 4.9 may have issues and +// returns 1 for 'defined( __has_include )', while '__has_include' is actually not supported: +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63662 +#if defined( __has_include ) && (!defined( BOOST_GCC ) || (__GNUC__ + 0) >= 5) +# if __has_include() +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ ) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined( BOOST_CORE_HAS_CXXABI_H ) +# include +// For some archtectures (mips, mips64, x86, x86_64) cxxabi.h in Android NDK is implemented by gabi++ library +// (https://android.googlesource.com/platform/ndk/+/master/sources/cxx-stl/gabi++/), which does not implement +// abi::__cxa_demangle(). We detect this implementation by checking the include guard here. +# if defined( __GABIXX_CXXABI_H__ ) +# undef BOOST_CORE_HAS_CXXABI_H +# else +# include +# include +# endif +#endif + +namespace boost +{ + +namespace core +{ + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT; +inline void demangle_free( char const * name ) BOOST_NOEXCEPT; + +class scoped_demangled_name +{ +private: + char const * m_p; + +public: + explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT : + m_p( demangle_alloc( name ) ) + { + } + + ~scoped_demangled_name() BOOST_NOEXCEPT + { + demangle_free( m_p ); + } + + char const * get() const BOOST_NOEXCEPT + { + return m_p; + } + + BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& )) + BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& )) +}; + + +#if defined( BOOST_CORE_HAS_CXXABI_H ) + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + int status = 0; + std::size_t size = 0; + return abi::__cxa_demangle( name, NULL, &size, &status ); +} + +inline void demangle_free( char const * name ) BOOST_NOEXCEPT +{ + std::free( const_cast< char* >( name ) ); +} + +inline std::string demangle( char const * name ) +{ + scoped_demangled_name demangled_name( name ); + char const * p = demangled_name.get(); + if( !p ) + p = name; + return p; +} + +#else + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + return name; +} + +inline void demangle_free( char const * ) BOOST_NOEXCEPT +{ +} + +inline std::string demangle( char const * name ) +{ + return name; +} + +#endif + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H + +#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED diff --git a/Slang/boost/core/detail/splitmix64.hpp b/Slang/boost/core/detail/splitmix64.hpp new file mode 100644 index 0000000..a7dc532 --- /dev/null +++ b/Slang/boost/core/detail/splitmix64.hpp @@ -0,0 +1,54 @@ +#ifndef BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED +#define BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED + +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// +// An implementation of splitmix64 for testing purposes, +// derived from Sebastiano Vigna's public domain implementation +// http://xorshift.di.unimi.it/splitmix64.c + +#include + +namespace boost +{ +namespace detail +{ + +class splitmix64 +{ +private: + + boost::uint64_t x_; + +public: + + splitmix64(): x_( 0 ) + { + } + + explicit splitmix64( boost::uint64_t seed ): x_( seed ) + { + } + + boost::uint64_t operator()() + { + x_ += 0x9e3779b97f4a7c15; + + boost::uint64_t z = x_; + + z ^= z >> 30; + z *= 0xbf58476d1ce4e5b9; + z ^= z >> 27; + z *= 0x94d049bb133111eb; + z ^= z >> 31; + + return z; + } +}; + +} // namespace detail +} // namespace boost + +#endif // #ifndef BOOST_CORE_DETAIL_SPLITMIX64_HPP_INCLUDED diff --git a/Slang/boost/core/detail/string_view.hpp b/Slang/boost/core/detail/string_view.hpp new file mode 100644 index 0000000..8b13c0f --- /dev/null +++ b/Slang/boost/core/detail/string_view.hpp @@ -0,0 +1,1205 @@ +#ifndef BOOST_CORE_STRING_VIEW_HPP_INCLUDED +#define BOOST_CORE_STRING_VIEW_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost::core::basic_string_view +// +// Copyright 2021 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) +# include +#endif + +namespace boost +{ +namespace core +{ +namespace detail +{ + +template struct sv_to_uchar +{ + typedef Ch type; +}; + +template<> struct sv_to_uchar +{ + typedef unsigned char type; +}; + +#if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ >= 406 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + +template BOOST_CXX14_CONSTEXPR std::size_t find_first_of( Ch const* p_, std::size_t n_, Ch const* s, std::size_t pos, std::size_t n ) BOOST_NOEXCEPT +{ + typedef typename sv_to_uchar::type UCh; + + unsigned char table[ 256 ] = {}; + + bool use_table = true; + + for( std::size_t j = 0; j < n; ++j ) + { + UCh ch = s[ j ]; + + if( ch >= 0 && ch < 256 ) + { + table[ ch ] = 1; + } + else + { + use_table = false; + break; + } + } + + if( use_table ) + { + for( std::size_t i = pos; i < n_; ++i ) + { + UCh ch = p_[ i ]; + if( ch >= 0 && ch < 256 && table[ ch ] ) return i; + } + } + else if( n >= 16 ) + { + for( std::size_t i = pos; i < n_; ++i ) + { + Ch ch = p_[ i ]; + if( std::char_traits::find( s, n, ch ) != 0 ) return i; + } + } + else + { + for( std::size_t i = pos; i < n_; ++i ) + { + Ch ch = p_[ i ]; + + for( std::size_t j = 0; j < n; ++j ) + { + if( s[ j ] == ch ) return i; + } + } + } + + return static_cast( -1 ); +} + +template BOOST_CXX14_CONSTEXPR std::size_t find_last_of( Ch const* p_, Ch const* s, std::size_t pos, std::size_t n ) BOOST_NOEXCEPT +{ + typedef typename sv_to_uchar::type UCh; + + unsigned char table[ 256 ] = {}; + + bool use_table = true; + + for( std::size_t j = 0; j < n; ++j ) + { + UCh ch = s[ j ]; + + if( ch >= 0 && ch < 256 ) + { + table[ ch ] = 1; + } + else + { + use_table = false; + break; + } + } + + std::size_t const npos = static_cast< std::size_t >( -1 ); + + std::size_t i = pos; + + if( use_table ) + { + do + { + UCh ch = p_[ i ]; + + if( ch >= 0 && ch < 256 && table[ ch ] ) return i; + + --i; + } + while( i != npos ); + } + else if( n >= 16 ) + { + do + { + Ch ch = p_[ i ]; + + if( std::char_traits::find( s, n, ch ) != 0 ) return i; + + --i; + } + while( i != npos ); + } + else + { + do + { + Ch ch = p_[ i ]; + + for( std::size_t j = 0; j < n; ++j ) + { + if( s[ j ] == ch ) return i; + } + + --i; + } + while( i != npos ); + } + + return npos; +} + +template BOOST_CXX14_CONSTEXPR std::size_t find_first_not_of( Ch const* p_, std::size_t n_, Ch const* s, std::size_t pos, std::size_t n ) BOOST_NOEXCEPT +{ + typedef typename sv_to_uchar::type UCh; + + unsigned char table[ 256 ] = {}; + + bool use_table = true; + + for( std::size_t j = 0; j < n; ++j ) + { + UCh ch = s[ j ]; + + if( ch >= 0 && ch < 256 ) + { + table[ ch ] = 1; + } + else + { + use_table = false; + break; + } + } + + if( use_table ) + { + for( std::size_t i = pos; i < n_; ++i ) + { + UCh ch = p_[ i ]; + if( !( ch >= 0 && ch < 256 && table[ ch ] ) ) return i; + } + } + else if( n >= 16 ) + { + for( std::size_t i = pos; i < n_; ++i ) + { + Ch ch = p_[ i ]; + if( std::char_traits::find( s, n, ch ) == 0 ) return i; + } + } + else + { + for( std::size_t i = pos; i < n_; ++i ) + { + Ch ch = p_[ i ]; + + bool r = false; + + for( std::size_t j = 0; j < n; ++j ) + { + if( s[ j ] == ch ) + { + r = true; + break; + } + } + + if( !r ) return i; + } + } + + return static_cast( -1 ); +} + +template BOOST_CXX14_CONSTEXPR std::size_t find_last_not_of( Ch const* p_, Ch const* s, std::size_t pos, std::size_t n ) BOOST_NOEXCEPT +{ + typedef typename sv_to_uchar::type UCh; + + unsigned char table[ 256 ] = {}; + + bool use_table = true; + + for( std::size_t j = 0; j < n; ++j ) + { + UCh ch = s[ j ]; + + if( ch >= 0 && ch < 256 ) + { + table[ ch ] = 1; + } + else + { + use_table = false; + break; + } + } + + std::size_t const npos = static_cast< std::size_t >( -1 ); + + std::size_t i = pos; + + if( use_table ) + { + do + { + UCh ch = p_[ i ]; + + if( !( ch >= 0 && ch < 256 && table[ ch ] ) ) return i; + + --i; + } + while( i != npos ); + } + else if( n >= 16 ) + { + do + { + Ch ch = p_[ i ]; + + if( std::char_traits::find( s, n, ch ) == 0 ) return i; + + --i; + } + while( i != npos ); + } + else + { + do + { + Ch ch = p_[ i ]; + + bool r = false; + + for( std::size_t j = 0; j < n; ++j ) + { + if( s[ j ] == ch ) + { + r = true; + break; + } + } + + if( !r ) return i; + + --i; + } + while( i != npos ); + } + + return npos; +} + +#if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ >= 406 +# pragma GCC diagnostic pop +#endif + +} // namespace detail + +template class basic_string_view +{ +private: + + Ch const* p_; + std::size_t n_; + +public: + + // types + + typedef std::char_traits traits_type; + typedef Ch value_type; + typedef Ch* pointer; + typedef Ch const* const_pointer; + typedef Ch& reference; + typedef Ch const& const_reference; + typedef Ch const* const_iterator; + typedef const_iterator iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef const_reverse_iterator reverse_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // npos + + BOOST_STATIC_CONSTEXPR size_type npos = static_cast( -1 ); + +public: + + // construction and assignment + + BOOST_CONSTEXPR basic_string_view() BOOST_NOEXCEPT: p_(), n_() + { + } + + BOOST_CONSTEXPR basic_string_view( Ch const* str ) BOOST_NOEXCEPT: p_( str ), n_( traits_type::length( str ) ) + { + } + + BOOST_CONSTEXPR basic_string_view( Ch const* str, size_type len ) BOOST_NOEXCEPT: p_( str ), n_( len ) + { + } + + template BOOST_CXX14_CONSTEXPR basic_string_view( Ch const* begin, End end, + typename boost::enable_if >::type* = 0 ) BOOST_NOEXCEPT: p_( begin ), n_( end - begin ) + { + BOOST_ASSERT( end - begin >= 0 ); + } + + template basic_string_view( std::basic_string, A> const& str ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) + { + } + +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) + + basic_string_view( std::basic_string_view > const& str ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) + { + } + +#endif + + // BOOST_CONSTEXPR basic_string_view& operator=( basic_string_view const& ) BOOST_NOEXCEPT & = default; + + // conversions + + template operator std::basic_string, A>() const + { + return std::basic_string, A>( data(), size() ); + } + +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) + + template >::type> + operator std::basic_string_view() const BOOST_NOEXCEPT + { + return std::basic_string_view( data(), size() ); + } + +#endif + + // iterator support + + BOOST_CONSTEXPR const_iterator begin() const BOOST_NOEXCEPT + { + return p_; + } + + BOOST_CONSTEXPR const_iterator end() const BOOST_NOEXCEPT + { + return p_ + n_; + } + + BOOST_CONSTEXPR const_iterator cbegin() const BOOST_NOEXCEPT + { + return p_; + } + + BOOST_CONSTEXPR const_iterator cend() const BOOST_NOEXCEPT + { + return p_ + n_; + } + + BOOST_CONSTEXPR const_reverse_iterator rbegin() const BOOST_NOEXCEPT + { + return const_reverse_iterator( end() ); + } + + BOOST_CONSTEXPR const_reverse_iterator rend() const BOOST_NOEXCEPT + { + return const_reverse_iterator( begin() ); + } + + BOOST_CONSTEXPR const_reverse_iterator crbegin() const BOOST_NOEXCEPT + { + return const_reverse_iterator( end() ); + } + + BOOST_CONSTEXPR const_reverse_iterator crend() const BOOST_NOEXCEPT + { + return const_reverse_iterator( begin() ); + } + + // capacity + + BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT + { + return n_; + } + + BOOST_CONSTEXPR size_type length() const BOOST_NOEXCEPT + { + return n_; + } + + BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT + { + return npos / sizeof( Ch ); + } + + BOOST_CONSTEXPR bool empty() const BOOST_NOEXCEPT + { + return n_ == 0; + } + + // element access + + BOOST_CXX14_CONSTEXPR const_reference operator[]( size_type pos ) const BOOST_NOEXCEPT + { + BOOST_ASSERT( pos < size() ); + return p_[ pos ]; + } + + BOOST_CXX14_CONSTEXPR const_reference at( size_type pos ) const + { + if( pos >= size() ) + { + boost::throw_exception( std::out_of_range( "basic_string_view::at" ), BOOST_CURRENT_LOCATION ); + } + + return p_[ pos ]; + } + + BOOST_CXX14_CONSTEXPR const_reference front() const BOOST_NOEXCEPT + { + BOOST_ASSERT( !empty() ); + return p_[ 0 ]; + } + + BOOST_CXX14_CONSTEXPR const_reference back() const BOOST_NOEXCEPT + { + BOOST_ASSERT( !empty() ); + return p_[ n_ - 1 ]; + } + + BOOST_CONSTEXPR const_pointer data() const BOOST_NOEXCEPT + { + return p_; + } + + // modifiers + + BOOST_CXX14_CONSTEXPR void remove_prefix( size_type n ) BOOST_NOEXCEPT + { + BOOST_ASSERT( n <= size() ); + + p_ += n; + n_ -= n; + } + + BOOST_CXX14_CONSTEXPR void remove_suffix( size_type n ) BOOST_NOEXCEPT + { + BOOST_ASSERT( n <= size() ); + + n_ -= n; + } + + BOOST_CXX14_CONSTEXPR void swap( basic_string_view& s ) BOOST_NOEXCEPT + { + std::swap( p_, s.p_ ); + std::swap( n_, s.n_ ); + } + + // string operations + + BOOST_CXX14_CONSTEXPR size_type copy( Ch* s, size_type n, size_type pos = 0 ) const + { + if( pos > size() ) + { + boost::throw_exception( std::out_of_range( "basic_string_view::copy" ), BOOST_CURRENT_LOCATION ); + } + + std::size_t rlen = std::min( n, size() - pos ); + + traits_type::copy( s, data() + pos, rlen ); + + return rlen; + } + + BOOST_CXX14_CONSTEXPR basic_string_view substr( size_type pos = 0, size_type n = npos ) const + { + if( pos > size() ) + { + boost::throw_exception( std::out_of_range( "basic_string_view::substr" ), BOOST_CURRENT_LOCATION ); + } + + std::size_t rlen = std::min( n, size() - pos ); + + return basic_string_view( data() + pos, rlen ); + } + + // compare + + BOOST_CXX14_CONSTEXPR int compare( basic_string_view str ) const BOOST_NOEXCEPT + { + std::size_t rlen = std::min( size(), str.size() ); + + int cmp = traits_type::compare( data(), str.data(), rlen ); + + if( cmp != 0 ) return cmp; + + if( size() == str.size() ) return 0; + + return size() < str.size()? -1: +1; + } + + BOOST_CONSTEXPR int compare( size_type pos1, size_type n1, basic_string_view str ) const + { + return substr( pos1, n1 ).compare( str ); + } + + BOOST_CONSTEXPR int compare( size_type pos1, size_type n1, basic_string_view str, size_type pos2, size_type n2 ) const + { + return substr( pos1, n1 ).compare( str.substr( pos2, n2 ) ); + } + + BOOST_CONSTEXPR int compare( Ch const* s ) const BOOST_NOEXCEPT + { + return compare( basic_string_view( s ) ); + } + + BOOST_CONSTEXPR int compare( size_type pos1, size_type n1, Ch const* s ) const + { + return substr( pos1, n1 ).compare( basic_string_view( s ) ); + } + + BOOST_CONSTEXPR int compare( size_type pos1, size_type n1, Ch const* s, size_type n2 ) const + { + return substr( pos1, n1 ).compare( basic_string_view( s, n2 ) ); + } + + // starts_with + + BOOST_CONSTEXPR bool starts_with( basic_string_view x ) const BOOST_NOEXCEPT + { + return size() >= x.size() && traits_type::compare( data(), x.data(), x.size() ) == 0; + } + + BOOST_CONSTEXPR bool starts_with( Ch x ) const BOOST_NOEXCEPT + { + return !empty() && front() == x; + } + + BOOST_CONSTEXPR bool starts_with( Ch const* x ) const BOOST_NOEXCEPT + { + return starts_with( basic_string_view( x ) ); + } + + // ends_with + + BOOST_CONSTEXPR bool ends_with( basic_string_view x ) const BOOST_NOEXCEPT + { + return size() >= x.size() && traits_type::compare( data() + size() - x.size(), x.data(), x.size() ) == 0; + } + + BOOST_CONSTEXPR bool ends_with( Ch x ) const BOOST_NOEXCEPT + { + return !empty() && back() == x; + } + + BOOST_CONSTEXPR bool ends_with( Ch const* x ) const BOOST_NOEXCEPT + { + return ends_with( basic_string_view( x ) ); + } + + // find + + BOOST_CONSTEXPR size_type find( basic_string_view str, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find( str.data(), pos, str.size() ); + } + + BOOST_CXX14_CONSTEXPR size_type find( Ch c, size_type pos = 0 ) const BOOST_NOEXCEPT + { + if( pos >= size() ) return npos; + + Ch const* r = traits_type::find( data() + pos, size() - pos, c ); + + return r? r - data(): npos; + } + + BOOST_CXX14_CONSTEXPR size_type find( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( n == 1 ) return find( s[0], pos ); + + if( pos + n > size() ) return npos; + if( n == 0 ) return pos; + + Ch const* p = data() + pos; + Ch const* last = data() + size() - n + 1; + + for( ;; ) + { + p = traits_type::find( p, last - p, s[0] ); + + if( p == 0 ) break; + + if( traits_type::compare( p + 1, s + 1, n - 1 ) == 0 ) return p - data(); + + ++p; + } + + return npos; + } + + BOOST_CONSTEXPR size_type find( Ch const* s, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find( s, pos, traits_type::length( s ) ); + } + + // rfind + + BOOST_CONSTEXPR size_type rfind( basic_string_view str, size_type pos = npos ) const BOOST_NOEXCEPT + { + return rfind( str.data(), pos, str.size() ); + } + + BOOST_CXX14_CONSTEXPR size_type rfind( Ch c, size_type pos = npos ) const BOOST_NOEXCEPT + { + size_type n = size(); + + if( n == 0 ) + { + return npos; + } + + if( pos > n - 1 ) + { + pos = n - 1; + } + + do + { + if( p_[ pos ] == c ) return pos; + --pos; + } + while( pos != npos ); + + return npos; + } + + BOOST_CXX14_CONSTEXPR size_type rfind( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( n > size() ) return npos; + + if( pos > size() - n ) + { + pos = size() - n; + } + + if( n == 0 ) return pos; + + for( ;; ) + { + size_type xpos = rfind( s[0], pos ); + + if( xpos == npos ) return npos; + + if( traits_type::compare( data() + xpos, s, n ) == 0 ) return xpos; + + if( xpos == 0 ) return npos; + + pos = xpos - 1; + } + } + + BOOST_CONSTEXPR size_type rfind( Ch const* s, size_type pos = npos ) const BOOST_NOEXCEPT + { + return rfind( s, pos, traits_type::length( s ) ); + } + + // find_first_of + + BOOST_CXX14_CONSTEXPR size_type find_first_of( basic_string_view str, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find_first_of( str.data(), pos, str.size() ); + } + + BOOST_CONSTEXPR size_type find_first_of( Ch c, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find( c, pos ); + } + + BOOST_CXX14_CONSTEXPR size_type find_first_of( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( n == 0 || pos >= size() ) return npos; + if( n == 1 ) return find( s[0], pos ); + + return detail::find_first_of( data(), size(), s, pos, n ); + } + + BOOST_CXX14_CONSTEXPR size_type find_first_of( Ch const* s, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find_first_of( s, pos, traits_type::length( s ) ); + } + + // find_last_of + + BOOST_CXX14_CONSTEXPR size_type find_last_of( basic_string_view str, size_type pos = npos ) const BOOST_NOEXCEPT + { + return find_last_of( str.data(), pos, str.size() ); + } + + BOOST_CONSTEXPR size_type find_last_of( Ch c, size_type pos = npos ) const BOOST_NOEXCEPT + { + return rfind( c, pos ); + } + + BOOST_CXX14_CONSTEXPR size_type find_last_of( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( n == 1 ) + { + return rfind( s[0], pos ); + } + + size_type m = size(); + + if( m == 0 ) + { + return npos; + } + + if( pos > m - 1 ) + { + pos = m - 1; + } + + return detail::find_last_of( data(), s, pos, n ); + } + + BOOST_CXX14_CONSTEXPR size_type find_last_of( Ch const* s, size_type pos = npos ) const BOOST_NOEXCEPT + { + return find_last_of( s, pos, traits_type::length( s ) ); + } + + // find_first_not_of + + BOOST_CXX14_CONSTEXPR size_type find_first_not_of( basic_string_view str, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find_first_not_of( str.data(), pos, str.size() ); + } + + BOOST_CXX14_CONSTEXPR size_type find_first_not_of( Ch c, size_type pos = 0 ) const BOOST_NOEXCEPT + { + for( std::size_t i = pos; i < n_; ++i ) + { + if( p_[ i ] != c ) return i; + } + + return npos; + } + + BOOST_CXX14_CONSTEXPR size_type find_first_not_of( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( pos >= size() ) return npos; + if( n == 1 ) return find_first_not_of( s[0], pos ); + + return detail::find_first_not_of( data(), size(), s, pos, n ); + } + + BOOST_CXX14_CONSTEXPR size_type find_first_not_of( Ch const* s, size_type pos = 0 ) const BOOST_NOEXCEPT + { + return find_first_not_of( s, pos, traits_type::length( s ) ); + } + + // find_last_not_of + + BOOST_CXX14_CONSTEXPR size_type find_last_not_of( basic_string_view str, size_type pos = npos ) const BOOST_NOEXCEPT + { + return find_last_not_of( str.data(), pos, str.size() ); + } + + BOOST_CXX14_CONSTEXPR size_type find_last_not_of( Ch c, size_type pos = npos ) const BOOST_NOEXCEPT + { + size_type m = size(); + + if( m == 0 ) + { + return npos; + } + + if( pos > m - 1 ) + { + pos = m - 1; + } + + do + { + if( p_[ pos ] != c ) return pos; + --pos; + } + while( pos != npos ); + + return npos; + } + + BOOST_CXX14_CONSTEXPR size_type find_last_not_of( Ch const* s, size_type pos, size_type n ) const BOOST_NOEXCEPT + { + if( n == 1 ) + { + return find_last_not_of( s[0], pos ); + } + + size_type m = size(); + + if( m == 0 ) + { + return npos; + } + + if( pos > m - 1 ) + { + pos = m - 1; + } + + return detail::find_last_not_of( data(), s, pos, n ); + } + + BOOST_CXX14_CONSTEXPR size_type find_last_not_of( Ch const* s, size_type pos = npos ) const BOOST_NOEXCEPT + { + return find_last_not_of( s, pos, traits_type::length( s ) ); + } + + // contains + + BOOST_CONSTEXPR bool contains( basic_string_view sv ) const BOOST_NOEXCEPT + { + return find( sv ) != npos; + } + + BOOST_CXX14_CONSTEXPR bool contains( Ch c ) const BOOST_NOEXCEPT + { + Ch const* p = data(); + size_type n = size(); + + if( n >= 16 ) + { + return traits_type::find( p, n, c ) != 0; + } + else + { + for( size_type i = 0; i < n; ++i ) + { + if( p[ i ] == c ) return true; + } + + return false; + } + } + + BOOST_CONSTEXPR bool contains( Ch const* s ) const BOOST_NOEXCEPT + { + return find( s ) != npos; + } + + // relational operators + + BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.size() == sv2.size() && traits_type::compare( sv1.data(), sv2.data(), sv1.size() ) == 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) < 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) <= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) > 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) >= 0; + } + +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) + + // "sufficient number of additional overloads" + + // against std::string_view + + BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.size() == sv2.size() && traits_type::compare( sv1.data(), sv2.data(), sv1.size() ) == 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator==( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.size() == sv2.size() && traits_type::compare( sv1.data(), sv2.data(), sv1.size() ) == 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator!=( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) < 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) < 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) <= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<=( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) <= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) > 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) > 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, std::basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) >= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>=( std::basic_string_view sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) >= 0; + } + + // against Ch const* + + BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return sv1 == basic_string_view( sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator==( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return basic_string_view( sv1 ) == sv2; + } + + BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator!=( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) < 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) > 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) <= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator<=( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) >= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) > 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) < 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, Ch const* sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) >= 0; + } + + BOOST_CXX14_CONSTEXPR friend bool operator>=( Ch const* sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) <= 0; + } + + // against std::string + + template BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return sv1.size() == sv2.size() && traits_type::compare( sv1.data(), sv2.data(), sv1.size() ) == 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator==( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv1.size() == sv2.size() && traits_type::compare( sv1.data(), sv2.data(), sv1.size() ) == 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + template BOOST_CXX14_CONSTEXPR friend bool operator!=( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return !( sv1 == sv2 ); + } + + template BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) < 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator<( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) > 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) <= 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator<=( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) >= 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) > 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator>( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) < 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, std::basic_string, A> const& sv2 ) BOOST_NOEXCEPT + { + return sv1.compare( sv2 ) >= 0; + } + + template BOOST_CXX14_CONSTEXPR friend bool operator>=( std::basic_string, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT + { + return sv2.compare( sv1 ) <= 0; + } + +#endif +}; + +// stream inserter + +template std::basic_ostream& operator<<( std::basic_ostream& os, basic_string_view str ) +{ + Ch const* p = str.data(); + std::streamsize n = str.size(); + + std::streamsize m = os.width(); + + if( n >= m ) + { + os.write( p, n ); + } + else if( ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::left ) + { + os.write( p, n ); + + os.width( m - n ); + os << ""; + } + else + { + os.width( m - n ); + os << ""; + + os.write( p, n ); + } + + os.width( 0 ); + return os; +} + +#if defined(BOOST_NO_CXX17_INLINE_VARIABLES) +template BOOST_CONSTEXPR_OR_CONST std::size_t basic_string_view::npos; +#endif + +// typedef names + +typedef basic_string_view string_view; +typedef basic_string_view wstring_view; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) +typedef basic_string_view u16string_view; +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) +typedef basic_string_view u32string_view; +#endif + +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L +typedef basic_string_view u8string_view; +#endif + +} // namespace core +} // namespace boost + +#endif // #ifndef BOOST_CORE_STRING_VIEW_HPP_INCLUDED diff --git a/Slang/boost/core/empty_value.hpp b/Slang/boost/core/empty_value.hpp new file mode 100644 index 0000000..9dfd442 --- /dev/null +++ b/Slang/boost/core/empty_value.hpp @@ -0,0 +1,155 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_EMPTY_VALUE_HPP +#define BOOST_CORE_EMPTY_VALUE_HPP + +#include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#endif + +#if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700) +#define BOOST_DETAIL_EMPTY_VALUE_BASE +#elif defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1800) +#define BOOST_DETAIL_EMPTY_VALUE_BASE +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1800) +#define BOOST_DETAIL_EMPTY_VALUE_BASE +#elif defined(BOOST_CLANG) && !defined(__CUDACC__) +#if __has_feature(is_empty) && __has_feature(is_final) +#define BOOST_DETAIL_EMPTY_VALUE_BASE +#endif +#endif + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4510) +#endif + +namespace boost { + +template +struct use_empty_value_base { + enum { +#if defined(BOOST_DETAIL_EMPTY_VALUE_BASE) + value = __is_empty(T) && !__is_final(T) +#else + value = false +#endif + }; +}; + +struct empty_init_t { }; + +namespace empty_ { + +template::value> +class empty_value { +public: + typedef T type; + +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + empty_value() = default; +#else + empty_value() { } +#endif + + empty_value(boost::empty_init_t) + : value_() { } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + empty_value(boost::empty_init_t, U&& value, Args&&... args) + : value_(std::forward(value), std::forward(args)...) { } +#else + template + empty_value(boost::empty_init_t, U&& value) + : value_(std::forward(value)) { } +#endif +#else + template + empty_value(boost::empty_init_t, const U& value) + : value_(value) { } + + template + empty_value(boost::empty_init_t, U& value) + : value_(value) { } +#endif + + const T& get() const BOOST_NOEXCEPT { + return value_; + } + + T& get() BOOST_NOEXCEPT { + return value_; + } + +private: + T value_; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template +class empty_value + : T { +public: + typedef T type; + +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) + empty_value() = default; +#else + empty_value() { } +#endif + + empty_value(boost::empty_init_t) + : T() { } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + template + empty_value(boost::empty_init_t, U&& value, Args&&... args) + : T(std::forward(value), std::forward(args)...) { } +#else + template + empty_value(boost::empty_init_t, U&& value) + : T(std::forward(value)) { } +#endif +#else + template + empty_value(boost::empty_init_t, const U& value) + : T(value) { } + + template + empty_value(boost::empty_init_t, U& value) + : T(value) { } +#endif + + const T& get() const BOOST_NOEXCEPT { + return *this; + } + + T& get() BOOST_NOEXCEPT { + return *this; + } +}; +#endif + +} /* empty_ */ + +using empty_::empty_value; + +BOOST_INLINE_CONSTEXPR empty_init_t empty_init = empty_init_t(); + +} /* boost */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + +#endif diff --git a/Slang/boost/core/enable_if.hpp b/Slang/boost/core/enable_if.hpp new file mode 100644 index 0000000..5dcef1e --- /dev/null +++ b/Slang/boost/core/enable_if.hpp @@ -0,0 +1,128 @@ +// Boost enable_if library + +// Copyright 2003 (c) The Trustees of Indiana University. + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) +// Jeremiah Willcock (jewillco at osl.iu.edu) +// Andrew Lumsdaine (lums at osl.iu.edu) + + +#ifndef BOOST_CORE_ENABLE_IF_HPP +#define BOOST_CORE_ENABLE_IF_HPP + +#include "boost/config.hpp" + +// Even the definition of enable_if causes problems on some compilers, +// so it's macroed out for all compilers that do not support SFINAE + +#ifndef BOOST_NO_SFINAE + +namespace boost +{ + template + struct enable_if_has_type + { + typedef R type; + }; + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} // namespace boost + +#else + +namespace boost { + + namespace detail { typedef void enable_if_default_T; } + + template + struct enable_if_does_not_work_on_this_compiler; + + template + struct enable_if_has_type : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if : enable_if_does_not_work_on_this_compiler + { }; + +} // namespace boost + +#endif // BOOST_NO_SFINAE + +#endif diff --git a/Slang/boost/core/exchange.hpp b/Slang/boost/core/exchange.hpp new file mode 100644 index 0000000..bc8a9fc --- /dev/null +++ b/Slang/boost/core/exchange.hpp @@ -0,0 +1,49 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_EXCHANGE_HPP +#define BOOST_CORE_EXCHANGE_HPP + +#include +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#include +#endif + +namespace boost { + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +inline T exchange(T& t, const U& u) +{ + T v = t; + t = u; + return v; +} +#else +#if BOOST_WORKAROUND(BOOST_MSVC, < 1800) +template +inline T exchange(T& t, U&& u) +{ + T v = std::move(t); + t = std::forward(u); + return v; +} +#else +template +BOOST_CXX14_CONSTEXPR inline T exchange(T& t, U&& u) +{ + T v = std::move(t); + t = std::forward(u); + return v; +} +#endif +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/core/explicit_operator_bool.hpp b/Slang/boost/core/explicit_operator_bool.hpp new file mode 100644 index 0000000..d689f11 --- /dev/null +++ b/Slang/boost/core/explicit_operator_bool.hpp @@ -0,0 +1,163 @@ +/* + * Copyright Andrey Semashev 2007 - 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) + */ + +/*! + * \file explicit_operator_bool.hpp + * \author Andrey Semashev + * \date 08.03.2009 + * + * This header defines a compatibility macro that implements an unspecified + * \c bool operator idiom, which is superseded with explicit conversion operators in + * C++11. + */ + +#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP +#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +/*! + * \brief The macro defines an explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE explicit operator bool () const\ + {\ + return !this->operator! ();\ + } + +/*! + * \brief The macro defines a noexcept explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#if !BOOST_WORKAROUND(BOOST_GCC, < 40700) + +/*! + * \brief The macro defines a constexpr explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#else + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL() BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() + +#endif + +#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) +// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it +#define BOOST_NO_UNSPECIFIED_BOOL +#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) + +#if !defined(BOOST_NO_UNSPECIFIED_BOOL) + +namespace boost { + +namespace detail { + +#if !defined(_MSC_VER) && !defined(__IBMCPP__) + + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + static void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#else + + // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#endif + +} // namespace detail + +} // namespace boost + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#else // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator bool () const\ + {\ + return !this->operator! ();\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP diff --git a/Slang/boost/core/first_scalar.hpp b/Slang/boost/core/first_scalar.hpp new file mode 100644 index 0000000..5373542 --- /dev/null +++ b/Slang/boost/core/first_scalar.hpp @@ -0,0 +1,45 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_FIRST_SCALAR_HPP +#define BOOST_CORE_FIRST_SCALAR_HPP + +#include +#include + +namespace boost { +namespace detail { + +template +struct make_scalar { + typedef T type; +}; + +template +struct make_scalar { + typedef typename make_scalar::type type; +}; + +} /* detail */ + +template +BOOST_CONSTEXPR inline T* +first_scalar(T* p) BOOST_NOEXCEPT +{ + return p; +} + +template +BOOST_CONSTEXPR inline typename detail::make_scalar::type* +first_scalar(T (*p)[N]) BOOST_NOEXCEPT +{ + return boost::first_scalar(&(*p)[0]); +} + +} /* boost */ + +#endif diff --git a/Slang/boost/core/ignore_unused.hpp b/Slang/boost/core/ignore_unused.hpp new file mode 100644 index 0000000..7c4a997 --- /dev/null +++ b/Slang/boost/core/ignore_unused.hpp @@ -0,0 +1,100 @@ +// Copyright (c) 2014 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 +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CORE_IGNORE_UNUSED_HPP +#define BOOST_CORE_IGNORE_UNUSED_HPP + +#include + +namespace boost { + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts&& ...) +{} + +#else + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...) +{} + +#endif + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&, T5&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#endif + +} // namespace boost + +#endif // BOOST_CORE_IGNORE_UNUSED_HPP diff --git a/Slang/boost/core/is_same.hpp b/Slang/boost/core/is_same.hpp new file mode 100644 index 0000000..f373c65 --- /dev/null +++ b/Slang/boost/core/is_same.hpp @@ -0,0 +1,40 @@ +#ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED +#define BOOST_CORE_IS_SAME_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// is_same::value is true when T1 == T2 +// +// Copyright 2014 Peter Dimov +// +// Distributed under the 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 + +namespace boost +{ + +namespace core +{ + +template< class T1, class T2 > struct is_same +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +template< class T > struct is_same< T, T > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +} // namespace core + +} // namespace boost + +#endif // #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED diff --git a/Slang/boost/core/lightweight_test.hpp b/Slang/boost/core/lightweight_test.hpp new file mode 100644 index 0000000..3b5df89 --- /dev/null +++ b/Slang/boost/core/lightweight_test.hpp @@ -0,0 +1,591 @@ +#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP +#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) +# pragma once +#endif + +// +// boost/core/lightweight_test.hpp - lightweight test library +// +// Copyright (c) 2002, 2009, 2014 Peter Dimov +// Copyright (2) Beman Dawes 2010, 2011 +// Copyright (3) Ion Gaztanaga 2013 +// +// Copyright 2018 Glen Joseph Fernandes +// (glenjofe@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 +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) && defined(_CPPLIB_VER) && defined(_DEBUG) +# include +#endif + +// IDE's like Visual Studio perform better if output goes to std::cout or +// some other stream, so allow user to configure output stream: +#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM +# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr +#endif + +namespace boost +{ + +namespace detail +{ + +class test_result { +public: + test_result() + : report_(false) + , errors_(0) { +#if defined(_MSC_VER) && (_MSC_VER > 1310) + // disable message boxes on assert(), abort() + ::_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); +#endif +#if defined(_MSC_VER) && defined(_CPPLIB_VER) && defined(_DEBUG) + // disable message boxes on iterator debugging violations + _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); + _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); +#endif + } + + ~test_result() { + if (!report_) { + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "main() should return report_errors()" << std::endl; + std::abort(); + } + } + + int& errors() { + return errors_; + } + + void done() { + report_ = true; + } + +private: + bool report_; + int errors_; +}; + +inline test_result& test_results() +{ + static test_result instance; + return instance; +} + +inline int& test_errors() +{ + return test_results().errors(); +} + +inline bool test_impl(char const * expr, char const * file, int line, char const * function, bool v) +{ + if( v ) + { + test_results(); + return true; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr << "' failed in function '" + << function << "'" << std::endl; + ++test_results().errors(); + return false; + } +} + +inline void error_impl(char const * msg, char const * file, int line, char const * function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): " << msg << " in function '" + << function << "'" << std::endl; + ++test_results().errors(); +} + +inline void throw_failed_impl(const char* expr, char const * excep, char const * file, int line, char const * function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): expression '" << expr << "' did not throw exception '" << excep << "' in function '" + << function << "'" << std::endl; + ++test_results().errors(); +} + +inline void no_throw_failed_impl(const char* expr, const char* file, int line, const char* function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): expression '" << expr << "' threw an exception in function '" + << function << "'" << std::endl; + ++test_results().errors(); +} + +inline void no_throw_failed_impl(const char* expr, const char* what, const char* file, int line, const char* function) +{ + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): expression '" << expr << "' threw an exception in function '" + << function << "': " << what << std::endl; + ++test_results().errors(); +} + +// In the comparisons below, it is possible that T and U are signed and unsigned integer types, which generates warnings in some compilers. +// A cleaner fix would require common_type trait or some meta-programming, which would introduce a dependency on Boost.TypeTraits. To avoid +// the dependency we just disable the warnings. +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wsign-compare") +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wsign-compare" +# endif +#elif defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable: 4389) +#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +// specialize test output for char pointers to avoid printing as cstring +template inline const T& test_output_impl(const T& v) { return v; } +inline const void* test_output_impl(const char* v) { return v; } +inline const void* test_output_impl(const unsigned char* v) { return v; } +inline const void* test_output_impl(const signed char* v) { return v; } +inline const void* test_output_impl(char* v) { return v; } +inline const void* test_output_impl(unsigned char* v) { return v; } +inline const void* test_output_impl(signed char* v) { return v; } +template inline const void* test_output_impl(T volatile* v) { return const_cast(v); } + +#if !defined( BOOST_NO_CXX11_NULLPTR ) +inline const void* test_output_impl(std::nullptr_t) { return nullptr; } +#endif + +// print chars as numeric + +inline int test_output_impl( signed char const& v ) { return v; } +inline unsigned test_output_impl( unsigned char const& v ) { return v; } + +// Whether wchar_t is signed is implementation-defined + +template struct lwt_long_type {}; +template<> struct lwt_long_type { typedef long type; }; +template<> struct lwt_long_type { typedef unsigned long type; }; + +inline lwt_long_type<(static_cast(-1) < static_cast(0))>::type test_output_impl( wchar_t const& v ) { return v; } + +#if !defined( BOOST_NO_CXX11_CHAR16_T ) +inline unsigned long test_output_impl( char16_t const& v ) { return v; } +#endif + +#if !defined( BOOST_NO_CXX11_CHAR32_T ) +inline unsigned long test_output_impl( char32_t const& v ) { return v; } +#endif + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable: 4996) +#endif + +inline std::string test_output_impl( char const& v ) +{ + if( std::isprint( static_cast( v ) ) ) + { + return std::string( 1, v ); + } + else + { + char buffer[ 8 ]; + std::sprintf( buffer, "\\x%02X", static_cast( v ) ); + + return buffer; + } +} + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + +// predicates + +struct lw_test_eq +{ + template + bool operator()(const T& t, const U& u) const { return t == u; } +}; + +struct lw_test_ne +{ + template + bool operator()(const T& t, const U& u) const { return t != u; } +}; + +struct lw_test_lt +{ + template + bool operator()(const T& t, const U& u) const { return t < u; } +}; + +struct lw_test_le +{ + template + bool operator()(const T& t, const U& u) const { return t <= u; } +}; + +struct lw_test_gt +{ + template + bool operator()(const T& t, const U& u) const { return t > u; } +}; + +struct lw_test_ge +{ + template + bool operator()(const T& t, const U& u) const { return t >= u; } +}; + +// lwt_predicate_name + +template char const * lwt_predicate_name( T const& ) +{ + return "~="; +} + +inline char const * lwt_predicate_name( lw_test_eq const& ) +{ + return "=="; +} + +inline char const * lwt_predicate_name( lw_test_ne const& ) +{ + return "!="; +} + +inline char const * lwt_predicate_name( lw_test_lt const& ) +{ + return "<"; +} + +inline char const * lwt_predicate_name( lw_test_le const& ) +{ + return "<="; +} + +inline char const * lwt_predicate_name( lw_test_gt const& ) +{ + return ">"; +} + +inline char const * lwt_predicate_name( lw_test_ge const& ) +{ + return ">="; +} + +// + +template +inline bool test_with_impl(BinaryPredicate pred, char const * expr1, char const * expr2, + char const * file, int line, char const * function, + T const & t, U const & u) +{ + if( pred(t, u) ) + { + test_results(); + return true; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr1 << " " << lwt_predicate_name(pred) << " " << expr2 + << "' ('" << test_output_impl(t) << "' " << lwt_predicate_name(pred) << " '" << test_output_impl(u) + << "') failed in function '" << function << "'" << std::endl; + ++test_results().errors(); + return false; + } +} + +inline bool test_cstr_eq_impl( char const * expr1, char const * expr2, + char const * file, int line, char const * function, char const * const t, char const * const u ) +{ + if( std::strcmp(t, u) == 0 ) + { + test_results(); + return true; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr1 << " == " << expr2 << "' ('" << t + << "' == '" << u << "') failed in function '" << function << "'" << std::endl; + ++test_results().errors(); + return false; + } +} + +inline bool test_cstr_ne_impl( char const * expr1, char const * expr2, + char const * file, int line, char const * function, char const * const t, char const * const u ) +{ + if( std::strcmp(t, u) != 0 ) + { + test_results(); + return true; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test '" << expr1 << " != " << expr2 << "' ('" << t + << "' != '" << u << "') failed in function '" << function << "'" << std::endl; + ++test_results().errors(); + return false; + } +} + +template +bool test_all_eq_impl(FormattedOutputFunction& output, + char const * file, int line, char const * function, + InputIterator1 first_begin, InputIterator1 first_end, + InputIterator2 second_begin, InputIterator2 second_end) +{ + InputIterator1 first_it = first_begin; + InputIterator2 second_it = second_begin; + typename std::iterator_traits::difference_type first_index = 0; + typename std::iterator_traits::difference_type second_index = 0; + std::size_t error_count = 0; + const std::size_t max_count = 8; + do + { + while ((first_it != first_end) && (second_it != second_end) && (*first_it == *second_it)) + { + ++first_it; + ++second_it; + ++first_index; + ++second_index; + } + if ((first_it == first_end) || (second_it == second_end)) + { + break; // do-while + } + if (error_count == 0) + { + output << file << "(" << line << "): Container contents differ in function '" << function << "':"; + } + else if (error_count >= max_count) + { + output << " ..."; + break; + } + output << " [" << first_index << "] '" << test_output_impl(*first_it) << "' != '" << test_output_impl(*second_it) << "'"; + ++first_it; + ++second_it; + ++first_index; + ++second_index; + ++error_count; + } while (first_it != first_end); + + first_index += std::distance(first_it, first_end); + second_index += std::distance(second_it, second_end); + if (first_index != second_index) + { + if (error_count == 0) + { + output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")"; + } + else + { + output << " [*] size(" << first_index << ") != size(" << second_index << ")"; + } + ++error_count; + } + + if (error_count == 0) + { + test_results(); + return true; + } + else + { + output << std::endl; + ++test_results().errors(); + return false; + } +} + +template +bool test_all_with_impl(FormattedOutputFunction& output, + char const * file, int line, char const * function, + InputIterator1 first_begin, InputIterator1 first_end, + InputIterator2 second_begin, InputIterator2 second_end, + BinaryPredicate predicate) +{ + InputIterator1 first_it = first_begin; + InputIterator2 second_it = second_begin; + typename std::iterator_traits::difference_type first_index = 0; + typename std::iterator_traits::difference_type second_index = 0; + std::size_t error_count = 0; + const std::size_t max_count = 8; + do + { + while ((first_it != first_end) && (second_it != second_end) && predicate(*first_it, *second_it)) + { + ++first_it; + ++second_it; + ++first_index; + ++second_index; + } + if ((first_it == first_end) || (second_it == second_end)) + { + break; // do-while + } + if (error_count == 0) + { + output << file << "(" << line << "): Container contents differ in function '" << function << "':"; + } + else if (error_count >= max_count) + { + output << " ..."; + break; + } + output << " [" << first_index << "]"; + ++first_it; + ++second_it; + ++first_index; + ++second_index; + ++error_count; + } while (first_it != first_end); + + first_index += std::distance(first_it, first_end); + second_index += std::distance(second_it, second_end); + if (first_index != second_index) + { + if (error_count == 0) + { + output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")"; + } + else + { + output << " [*] size(" << first_index << ") != size(" << second_index << ")"; + } + ++error_count; + } + + if (error_count == 0) + { + test_results(); + return true; + } + else + { + output << std::endl; + ++test_results().errors(); + return false; + } +} + +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wsign-compare") +# pragma clang diagnostic pop +# endif +#elif defined(_MSC_VER) +# pragma warning(pop) +#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 +# pragma GCC diagnostic pop +#endif + +} // namespace detail + +inline int report_errors() +{ + boost::detail::test_result& result = boost::detail::test_results(); + result.done(); + + int errors = result.errors(); + + if( errors == 0 ) + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << "No errors detected." << std::endl; + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << errors << " error" << (errors == 1? "": "s") << " detected." << std::endl; + } + + // `return report_errors();` from main only supports 8 bit exit codes + return errors < 256? errors: 255; +} + +} // namespace boost + +#define BOOST_TEST(expr) ( ::boost::detail::test_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (expr)? true: false) ) +#define BOOST_TEST_NOT(expr) BOOST_TEST(!(expr)) + +#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) + +#define BOOST_TEST_WITH(expr1,expr2,predicate) ( ::boost::detail::test_with_impl(predicate, #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_eq(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ne(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#define BOOST_TEST_LT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_lt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_LE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_le(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_GT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_gt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_GE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ge(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#define BOOST_TEST_CSTR_EQ(expr1,expr2) ( ::boost::detail::test_cstr_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) +#define BOOST_TEST_CSTR_NE(expr1,expr2) ( ::boost::detail::test_cstr_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) ) + +#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) ( ::boost::detail::test_all_eq_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2) ) +#define BOOST_TEST_ALL_WITH(begin1, end1, begin2, end2, predicate) ( ::boost::detail::test_all_with_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2, predicate) ) + +#ifndef BOOST_NO_EXCEPTIONS + #define BOOST_TEST_THROWS( EXPR, EXCEP ) \ + try { \ + EXPR; \ + ::boost::detail::throw_failed_impl \ + (#EXPR, #EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } \ + catch(EXCEP const&) { \ + ::boost::detail::test_results(); \ + } \ + catch(...) { \ + ::boost::detail::throw_failed_impl \ + (#EXPR, #EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } \ + // +#else + #define BOOST_TEST_THROWS( EXPR, EXCEP ) +#endif + +#ifndef BOOST_NO_EXCEPTIONS +# define BOOST_TEST_NO_THROW(EXPR) \ + try { \ + EXPR; \ + } catch (const std::exception& e) { \ + ::boost::detail::no_throw_failed_impl \ + (#EXPR, e.what(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } catch (...) { \ + ::boost::detail::no_throw_failed_impl \ + (#EXPR, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \ + } + // +#else +# define BOOST_TEST_NO_THROW(EXPR) { EXPR; } +#endif + +#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP diff --git a/Slang/boost/core/lightweight_test_trait.hpp b/Slang/boost/core/lightweight_test_trait.hpp new file mode 100644 index 0000000..77a1fcd --- /dev/null +++ b/Slang/boost/core/lightweight_test_trait.hpp @@ -0,0 +1,91 @@ +#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP +#define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) +# pragma once +#endif + +// boost/core/lightweight_test_trait.hpp +// +// BOOST_TEST_TRAIT_TRUE, BOOST_TEST_TRAIT_FALSE, BOOST_TEST_TRAIT_SAME +// +// Copyright 2014, 2021 Peter Dimov +// +// Copyright 2019 Glen Joseph Fernandes +// (glenjofe@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 + +#include +#include +#include +#include + +namespace boost +{ +namespace detail +{ + +template< class T > inline void test_trait_impl( char const * trait, void (*)( T ), + bool expected, char const * file, int line, char const * function ) +{ + if( T::value == expected ) + { + test_results(); + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): predicate '" << trait << "' [" + << boost::core::type_name() << "]" + << " test failed in function '" << function + << "' (should have been " << ( expected? "true": "false" ) << ")" + << std::endl; + + ++test_results().errors(); + } +} + +template inline bool test_trait_same_impl_( T ) +{ + return T::value; +} + +template inline void test_trait_same_impl( char const * types, + boost::core::is_same same, char const * file, int line, char const * function ) +{ + if( test_trait_same_impl_( same ) ) + { + test_results(); + } + else + { + BOOST_LIGHTWEIGHT_TEST_OSTREAM + << file << "(" << line << "): test 'is_same<" << types << ">'" + << " failed in function '" << function + << "' ('" << boost::core::type_name() + << "' != '" << boost::core::type_name() << "')" + << std::endl; + + ++test_results().errors(); + } +} + +} // namespace detail +} // namespace boost + +#define BOOST_TEST_TRAIT_TRUE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, true, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) +#define BOOST_TEST_TRAIT_FALSE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, false, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) + +#if defined(__GNUC__) +// ignoring -Wvariadic-macros with #pragma doesn't work under GCC +# pragma GCC system_header +#endif + +#define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::is_same<__VA_ARGS__>(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) + +#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP diff --git a/Slang/boost/core/no_exceptions_support.hpp b/Slang/boost/core/no_exceptions_support.hpp new file mode 100644 index 0000000..1278e85 --- /dev/null +++ b/Slang/boost/core/no_exceptions_support.hpp @@ -0,0 +1,56 @@ +#ifndef BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +//---------------------------------------------------------------------- +// (C) Copyright 2004 Pavel Vozenilek. +// 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) +// +// +// This file contains helper macros used when exception support may be +// disabled (as indicated by macro BOOST_NO_EXCEPTIONS). +// +// Before picking up these macros you may consider using RAII techniques +// to deal with exceptions - their syntax can be always the same with +// or without exception support enabled. +//---------------------------------------------------------------------- + +#include +#include + +#if !(defined BOOST_NO_EXCEPTIONS) +# define BOOST_TRY { try +# define BOOST_CATCH(x) catch(x) +# define BOOST_RETHROW throw; +# define BOOST_CATCH_END } +#else +# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) +# define BOOST_TRY { if ("") +# define BOOST_CATCH(x) else if (!"") +# elif !defined(BOOST_MSVC) || BOOST_MSVC >= 1900 +# define BOOST_TRY { if (true) +# define BOOST_CATCH(x) else if (false) +# else + // warning C4127: conditional expression is constant +# define BOOST_TRY { \ + __pragma(warning(push)) \ + __pragma(warning(disable: 4127)) \ + if (true) \ + __pragma(warning(pop)) +# define BOOST_CATCH(x) else \ + __pragma(warning(push)) \ + __pragma(warning(disable: 4127)) \ + if (false) \ + __pragma(warning(pop)) +# endif +# define BOOST_RETHROW +# define BOOST_CATCH_END } +#endif + + +#endif diff --git a/Slang/boost/core/noinit_adaptor.hpp b/Slang/boost/core/noinit_adaptor.hpp new file mode 100644 index 0000000..962b6e4 --- /dev/null +++ b/Slang/boost/core/noinit_adaptor.hpp @@ -0,0 +1,88 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_NOINIT_ADAPTOR_HPP +#define BOOST_CORE_NOINIT_ADAPTOR_HPP + +#include + +namespace boost { + +template +struct noinit_adaptor + : A { + template + struct rebind { + typedef noinit_adaptor::type> other; + }; + + noinit_adaptor() + : A() { } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + noinit_adaptor(U&& u) BOOST_NOEXCEPT + : A(std::forward(u)) { } +#else + template + noinit_adaptor(const U& u) BOOST_NOEXCEPT + : A(u) { } + + template + noinit_adaptor(U& u) BOOST_NOEXCEPT + : A(u) { } +#endif + + template + noinit_adaptor(const noinit_adaptor& u) BOOST_NOEXCEPT + : A(static_cast(u)) { } + + template + void construct(U* p) { + ::new((void*)p) U; + } + +#if defined(BOOST_NO_CXX11_ALLOCATOR) + template + void construct(U* p, const V& v) { + ::new((void*)p) U(v); + } +#endif + + template + void destroy(U* p) { + p->~U(); + (void)p; + } +}; + +template +inline bool +operator==(const noinit_adaptor& lhs, + const noinit_adaptor& rhs) BOOST_NOEXCEPT +{ + return static_cast(lhs) == static_cast(rhs); +} + +template +inline bool +operator!=(const noinit_adaptor& lhs, + const noinit_adaptor& rhs) BOOST_NOEXCEPT +{ + return !(lhs == rhs); +} + +template +inline noinit_adaptor +noinit_adapt(const A& a) BOOST_NOEXCEPT +{ + return noinit_adaptor(a); +} + +} /* boost */ + +#endif diff --git a/Slang/boost/core/noncopyable.hpp b/Slang/boost/core/noncopyable.hpp new file mode 100644 index 0000000..4a4f8ba --- /dev/null +++ b/Slang/boost/core/noncopyable.hpp @@ -0,0 +1,63 @@ +// Boost noncopyable.hpp header file --------------------------------------// + +// (C) Copyright Beman Dawes 1999-2003. Distributed under the 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/utility for documentation. + +#ifndef BOOST_CORE_NONCOPYABLE_HPP +#define BOOST_CORE_NONCOPYABLE_HPP + +#include + +namespace boost { + +// Private copy constructor and copy assignment ensure classes derived from +// class noncopyable cannot be copied. + +// Contributed by Dave Abrahams + +namespace noncopyable_ // protection from unintended ADL +{ +#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED +#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED + +// noncopyable derives from base_token to enable Type Traits to detect +// whether a type derives from noncopyable without needing the definition +// of noncopyable itself. +// +// The definition of base_token is macro-guarded so that Type Trais can +// define it locally without including this header, to avoid a dependency +// on Core. + + struct base_token {}; + +#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED + + class noncopyable: base_token + { + protected: +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) + BOOST_CONSTEXPR noncopyable() = default; + ~noncopyable() = default; +#else + noncopyable() {} + ~noncopyable() {} +#endif +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) + noncopyable( const noncopyable& ) = delete; + noncopyable& operator=( const noncopyable& ) = delete; +#else + private: // emphasize the following members are private + noncopyable( const noncopyable& ); + noncopyable& operator=( const noncopyable& ); +#endif + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} // namespace boost + +#endif // BOOST_CORE_NONCOPYABLE_HPP diff --git a/Slang/boost/core/null_deleter.hpp b/Slang/boost/core/null_deleter.hpp new file mode 100644 index 0000000..f0af590 --- /dev/null +++ b/Slang/boost/core/null_deleter.hpp @@ -0,0 +1,44 @@ +/* + * Copyright Andrey Semashev 2007 - 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) + */ +/*! + * \file null_deleter.hpp + * \author Andrey Semashev + * \date 22.04.2007 + * + * This header contains a \c null_deleter implementation. This is an empty + * function object that receives a pointer and does nothing with it. + * Such empty deletion strategy may be convenient, for example, when + * constructing shared_ptrs that point to some object that should not be + * deleted (i.e. a variable on the stack or some global singleton, like std::cout). + */ + +#ifndef BOOST_CORE_NULL_DELETER_HPP +#define BOOST_CORE_NULL_DELETER_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { + +//! A function object that does nothing and can be used as an empty deleter for \c shared_ptr +struct null_deleter +{ + //! Function object result type + typedef void result_type; + /*! + * Does nothing + */ + template< typename T > + void operator() (T*) const BOOST_NOEXCEPT {} +}; + +} // namespace boost + +#endif // BOOST_CORE_NULL_DELETER_HPP diff --git a/Slang/boost/core/nvp.hpp b/Slang/boost/core/nvp.hpp new file mode 100644 index 0000000..8826a59 --- /dev/null +++ b/Slang/boost/core/nvp.hpp @@ -0,0 +1,57 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_NVP_HPP +#define BOOST_CORE_NVP_HPP + +#include +#include + +namespace boost { +namespace serialization { + +template +class nvp { +public: + nvp(const char* n, T& v) BOOST_NOEXCEPT + : n_(n) + , v_(boost::addressof(v)) { } + + const char* name() const BOOST_NOEXCEPT { + return n_; + } + + T& value() const BOOST_NOEXCEPT { + return *v_; + } + + const T& const_value() const BOOST_NOEXCEPT { + return *v_; + } + +private: + const char* n_; + T* v_; +}; + +template +inline const nvp +make_nvp(const char* n, T& v) BOOST_NOEXCEPT +{ + return nvp(n, v); +} + +} /* serialization */ + +using serialization::nvp; +using serialization::make_nvp; + +} /* boost */ + +#define BOOST_NVP(v) boost::make_nvp(BOOST_STRINGIZE(v), v) + +#endif diff --git a/Slang/boost/core/pointer_traits.hpp b/Slang/boost/core/pointer_traits.hpp new file mode 100644 index 0000000..e66194d --- /dev/null +++ b/Slang/boost/core/pointer_traits.hpp @@ -0,0 +1,234 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_POINTER_TRAITS_HPP +#define BOOST_CORE_POINTER_TRAITS_HPP + +#include +#if !defined(BOOST_NO_CXX11_POINTER_TRAITS) +#include +#else +#include +#include +#endif + +namespace boost { + +#if !defined(BOOST_NO_CXX11_POINTER_TRAITS) +template +struct pointer_traits + : std::pointer_traits { + template + struct rebind_to { + typedef typename std::pointer_traits::template rebind type; + }; +}; + +template +struct pointer_traits + : std::pointer_traits { + template + struct rebind_to { + typedef U* type; + }; +}; +#else +namespace detail { + +template +struct ptr_void { + typedef void type; +}; + +template +struct ptr_first; + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template class T, class U, class... Args> +struct ptr_first > { + typedef U type; +}; +#else +template class T, class U> +struct ptr_first > { + typedef U type; +}; + +template class T, class U1, class U2> +struct ptr_first > { + typedef U1 type; +}; + +template class T, class U1, class U2, class U3> +struct ptr_first > { + typedef U1 type; +}; +#endif + +template +struct ptr_element { + typedef typename ptr_first::type type; +}; + +template +struct ptr_element::type> { + typedef typename T::element_type type; +}; + +template +struct ptr_difference { + typedef std::ptrdiff_t type; +}; + +template +struct ptr_difference::type> { + typedef typename T::difference_type type; +}; + +template +struct ptr_transform; + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template class T, class U, class... Args, class V> +struct ptr_transform, V> { + typedef T type; +}; +#else +template class T, class U, class V> +struct ptr_transform, V> { + typedef T type; +}; + +template class T, class U1, class U2, class V> +struct ptr_transform, V> { + typedef T type; +}; + +template class T, + class U1, class U2, class U3, class V> +struct ptr_transform, V> { + typedef T type; +}; +#endif + +template +struct ptr_rebind { + typedef typename ptr_transform::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +struct ptr_rebind >::type> { + typedef typename T::template rebind type; +}; +#endif + +template +struct ptr_value { + typedef T type; +}; + +template<> +struct ptr_value { + typedef struct { } type; +}; + +} /* detail */ + +template +struct pointer_traits { + typedef T pointer; + typedef typename detail::ptr_element::type element_type; + typedef typename detail::ptr_difference::type difference_type; + template + struct rebind_to { + typedef typename detail::ptr_rebind::type type; + }; +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + template + using rebind = typename detail::ptr_rebind::type; +#endif + static pointer + pointer_to(typename detail::ptr_value::type& v) { + return pointer::pointer_to(v); + } +}; + +template +struct pointer_traits { + typedef T* pointer; + typedef T element_type; + typedef std::ptrdiff_t difference_type; + template + struct rebind_to { + typedef U* type; + }; +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + template + using rebind = U*; +#endif + static T* + pointer_to(typename detail::ptr_value::type& v) BOOST_NOEXCEPT { + return boost::addressof(v); + } +}; +#endif + +template +BOOST_CONSTEXPR inline T* +to_address(T* v) BOOST_NOEXCEPT +{ + return v; +} + +#if !defined(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION) +namespace detail { + +template +inline T* +ptr_address(T* v, int) BOOST_NOEXCEPT +{ + return v; +} + +template +inline auto +ptr_address(const T& v, int) BOOST_NOEXCEPT +-> decltype(boost::pointer_traits::to_address(v)) +{ + return boost::pointer_traits::to_address(v); +} + +template +inline auto +ptr_address(const T& v, long) BOOST_NOEXCEPT +{ + return boost::detail::ptr_address(v.operator->(), 0); +} + +} /* detail */ + +template +inline auto +to_address(const T& v) BOOST_NOEXCEPT +{ + return boost::detail::ptr_address(v, 0); +} +#else +template +inline typename pointer_traits::element_type* +to_address(const T& v) BOOST_NOEXCEPT +{ + return boost::to_address(v.operator->()); +} +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/core/quick_exit.hpp b/Slang/boost/core/quick_exit.hpp new file mode 100644 index 0000000..40ead1d --- /dev/null +++ b/Slang/boost/core/quick_exit.hpp @@ -0,0 +1,59 @@ +#ifndef BOOST_CORE_QUICK_EXIT_HPP_INCLUDED +#define BOOST_CORE_QUICK_EXIT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost/core/quick_exit.hpp +// +// Copyright 2018 Peter Dimov +// +// Distributed under the 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 +#include + +#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) + +extern "C" _CRTIMP __cdecl __MINGW_NOTHROW void _exit (int) __MINGW_ATTRIB_NORETURN; + +#endif + +#if defined(__CYGWIN__) && __cplusplus < 201103L + +extern "C" _Noreturn void quick_exit(int); + +#endif + +namespace boost +{ + +BOOST_NORETURN void quick_exit( int code ) BOOST_NOEXCEPT +{ +#if defined(_MSC_VER) && _MSC_VER < 1900 + + ::_exit( code ); + +#elif defined(__MINGW32__) + + ::_exit( code ); + +#elif defined(__APPLE__) + + ::_Exit( code ); + +#else + + ::quick_exit( code ); + +#endif +} + +} // namespace boost + +#endif // #ifndef BOOST_CORE_QUICK_EXIT_HPP_INCLUDED diff --git a/Slang/boost/core/ref.hpp b/Slang/boost/core/ref.hpp new file mode 100644 index 0000000..a416cbd --- /dev/null +++ b/Slang/boost/core/ref.hpp @@ -0,0 +1,338 @@ +#ifndef BOOST_CORE_REF_HPP +#define BOOST_CORE_REF_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include + +// +// ref.hpp - ref/cref, useful helper functions +// +// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Copyright (C) 2001, 2002 Peter Dimov +// Copyright (C) 2002 David Abrahams +// +// Copyright (C) 2014 Glen Joseph Fernandes +// (glenjofe@gmail.com) +// +// Copyright (C) 2014 Agustin Berge +// +// Distributed under the 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/core/doc/html/core/ref.html for documentation. +// + +/** + @file +*/ + +/** + Boost namespace. +*/ +namespace boost +{ + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + struct ref_workaround_tag {}; + +#endif + +namespace detail +{ + +template< class Y, class T > struct ref_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + + static yes f( T* ); + static no f( ... ); + + enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; +}; + +struct ref_empty +{ +}; + +} // namespace detail + +// reference_wrapper + +/** + @brief Contains a reference to an object of type `T`. + + `reference_wrapper` is primarily used to "feed" references to + function templates (algorithms) that take their parameter by + value. It provides an implicit conversion to `T&`, which + usually allows the function templates to work on references + unmodified. +*/ +template class reference_wrapper +{ +public: + /** + Type `T`. + */ + typedef T type; + + /** + Constructs a `reference_wrapper` object that stores a + reference to `t`. + + @remark Does not throw. + */ + BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {} + +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + /** + @remark Construction from a temporary object is disabled. + */ + BOOST_DELETED_FUNCTION(reference_wrapper(T&& t)) +public: +#endif + + template friend class reference_wrapper; + + /** + Constructs a `reference_wrapper` object that stores the + reference stored in the compatible `reference_wrapper` `r`. + + @remark Only enabled when `Y*` is convertible to `T*`. + @remark Does not throw. + */ + template reference_wrapper( reference_wrapper r, + typename enable_if_c::value, + boost::detail::ref_empty>::type = boost::detail::ref_empty() ): t_( r.t_ ) + { + } + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE operator T& () const { return *t_; } + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T& get() const { return *t_; } + + /** + @return A pointer to the object referenced by the stored + reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + +// ref + +/** + @cond +*/ +#if defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x581) ) +# define BOOST_REF_CONST +#else +# define BOOST_REF_CONST const +#endif +/** + @endcond +*/ + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t ) +{ +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + return reference_wrapper( t, ref_workaround_tag() ); + +#else + + return reference_wrapper( t ); + +#endif +} + +// cref + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST cref( T const & t ) +{ + return reference_wrapper(t); +} + +#undef BOOST_REF_CONST + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +/** + @cond +*/ +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_REF_DELETE +#else +# define BOOST_REF_DELETE = delete +#endif +/** + @endcond +*/ + +/** + @remark Construction from a temporary object is disabled. +*/ +template void ref(T const&&) BOOST_REF_DELETE; + +/** + @remark Construction from a temporary object is disabled. +*/ +template void cref(T const&&) BOOST_REF_DELETE; + +#undef BOOST_REF_DELETE + +#endif + +// is_reference_wrapper + +/** + @brief Determine if a type `T` is an instantiation of + `reference_wrapper`. + + The value static constant will be true if the type `T` is a + specialization of `reference_wrapper`. +*/ +template struct is_reference_wrapper +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +/** + @cond +*/ +template struct is_reference_wrapper< reference_wrapper > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct is_reference_wrapper< reference_wrapper const > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper const volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + + +// unwrap_reference + +/** + @brief Find the type in a `reference_wrapper`. + + The `typedef` type is `T::type` if `T` is a + `reference_wrapper`, `T` otherwise. +*/ +template struct unwrap_reference +{ + typedef T type; +}; + +/** + @cond +*/ +template struct unwrap_reference< reference_wrapper > +{ + typedef T type; +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct unwrap_reference< reference_wrapper const > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper volatile > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper const volatile > +{ + typedef T type; +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + +// unwrap_ref + +/** + @return `unwrap_reference::type&(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE typename unwrap_reference::type& unwrap_ref( T & t ) +{ + return t; +} + +// get_pointer + +/** + @cond +*/ +template BOOST_FORCEINLINE T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} +/** + @endcond +*/ + +} // namespace boost + +#endif // #ifndef BOOST_CORE_REF_HPP diff --git a/Slang/boost/core/scoped_enum.hpp b/Slang/boost/core/scoped_enum.hpp new file mode 100644 index 0000000..56dd0ed --- /dev/null +++ b/Slang/boost/core/scoped_enum.hpp @@ -0,0 +1,194 @@ +// scoped_enum.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes, 2009 +// Copyright (C) 2011-2012 Vicente J. Botet Escriba +// Copyright (C) 2012 Anthony Williams + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CORE_SCOPED_ENUM_HPP +#define BOOST_CORE_SCOPED_ENUM_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost +{ + +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS + + /** + * Meta-function to get the native enum type associated to an enum class or its emulation. + */ + template + struct native_type + { + /** + * The member typedef type names the native enum type associated to the scoped enum, + * which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum. + */ + typedef typename EnumType::enum_type type; + }; + + /** + * Casts a scoped enum to its underlying type. + * + * This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type. + * @param v A scoped enum. + * @returns The underlying type. + * @throws No-throws. + */ + template + inline + BOOST_CONSTEXPR UnderlyingType underlying_cast(EnumType v) BOOST_NOEXCEPT + { + return v.get_underlying_value_(); + } + + /** + * Casts a scoped enum to its native enum type. + * + * This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can. + * + * EnumType the scoped enum type + * + * @param v A scoped enum. + * @returns The native enum value. + * @throws No-throws. + */ + template + inline + BOOST_CONSTEXPR typename EnumType::enum_type native_value(EnumType e) BOOST_NOEXCEPT + { + return e.get_native_value_(); + } + +#else // BOOST_NO_CXX11_SCOPED_ENUMS + + template + struct native_type + { + typedef EnumType type; + }; + + template + inline + BOOST_CONSTEXPR UnderlyingType underlying_cast(EnumType v) BOOST_NOEXCEPT + { + return static_cast(v); + } + + template + inline + BOOST_CONSTEXPR EnumType native_value(EnumType e) BOOST_NOEXCEPT + { + return e; + } + +#endif // BOOST_NO_CXX11_SCOPED_ENUMS +} + + +#ifdef BOOST_NO_CXX11_SCOPED_ENUMS + +#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS + +#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ + explicit BOOST_CONSTEXPR operator underlying_type() const BOOST_NOEXCEPT { return get_underlying_value_(); } + +#else + +#define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR + +#endif + +/** + * Start a declaration of a scoped enum. + * + * @param EnumType The new scoped enum. + * @param UnderlyingType The underlying type. + */ +#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType) \ + struct EnumType { \ + typedef void is_boost_scoped_enum_tag; \ + typedef UnderlyingType underlying_type; \ + EnumType() BOOST_NOEXCEPT {} \ + explicit BOOST_CONSTEXPR EnumType(underlying_type v) BOOST_NOEXCEPT : v_(v) {} \ + BOOST_CONSTEXPR underlying_type get_underlying_value_() const BOOST_NOEXCEPT { return v_; } \ + BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ + private: \ + underlying_type v_; \ + typedef EnumType self_type; \ + public: \ + enum enum_type + +#define BOOST_SCOPED_ENUM_DECLARE_END2() \ + BOOST_CONSTEXPR enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \ + friend BOOST_CONSTEXPR bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \ + friend BOOST_CONSTEXPR bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \ + friend BOOST_CONSTEXPR bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \ + friend BOOST_CONSTEXPR bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \ + friend BOOST_CONSTEXPR bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \ + friend BOOST_CONSTEXPR bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \ + }; + +#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \ + ; \ + BOOST_CONSTEXPR EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {} \ + BOOST_SCOPED_ENUM_DECLARE_END2() + +/** + * Starts a declaration of a scoped enum with the default int underlying type. + * + * @param EnumType The new scoped enum. + */ +#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \ + BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int) + +/** + * Name of the native enum type. + * + * @param EnumType The new scoped enum. + */ +#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type +/** + * Forward declares an scoped enum. + * + * @param EnumType The scoped enum. + */ +#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType + +#else // BOOST_NO_CXX11_SCOPED_ENUMS + +#define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType : UnderlyingType +#define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType +#define BOOST_SCOPED_ENUM_DECLARE_END2() +#define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ; + +#define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType +#define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType + +#endif // BOOST_NO_CXX11_SCOPED_ENUMS + +// Deprecated macros +#define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name) +#define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2() +#define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name) + +#endif // BOOST_CORE_SCOPED_ENUM_HPP diff --git a/Slang/boost/core/span.hpp b/Slang/boost/core/span.hpp new file mode 100644 index 0000000..54dafdb --- /dev/null +++ b/Slang/boost/core/span.hpp @@ -0,0 +1,407 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_SPAN_HPP +#define BOOST_CORE_SPAN_HPP + +#include +#include +#include +#include + +namespace boost { + +constexpr std::size_t dynamic_extent = static_cast(-1); + +template +class span; + +namespace detail { + +template +struct span_convertible { + static constexpr bool value = std::is_convertible::value; +}; + +template +struct span_capacity { + static constexpr bool value = E == boost::dynamic_extent || E == N; +}; + +template +struct span_compatible { + static constexpr bool value = span_capacity::value && + span_convertible::value; +}; + +template +struct span_uncvref { + typedef typename std::remove_cv::type>::type type; +}; + +template +struct span_is_span { + static constexpr bool value = false; +}; + +template +struct span_is_span > { + static constexpr bool value = true; +}; + +template +struct span_is_array { + static constexpr bool value = false; +}; + +template +struct span_is_array > { + static constexpr bool value = true; +}; + +template +struct span_data { }; + +template +struct span_data().data())>::value>::type> { + typedef typename std::remove_pointer().data())>::type type; +}; + +template +struct span_has_data { + static constexpr bool value = false; +}; + +template +struct span_has_data::type, T>::value>::type> { + static constexpr bool value = true; +}; + +template +struct span_has_size { + static constexpr bool value = false; +}; + +template +struct span_has_size().size()), + std::size_t>::value>::type> { + static constexpr bool value = true; +}; + +template +struct span_is_range { + static constexpr bool value = (std::is_const::value || + std::is_lvalue_reference::value) && + !span_is_span::type>::value && + !span_is_array::type>::value && + !std::is_array::type>::value && + span_has_data::value && + span_has_size::value; +}; + +template +struct span_implicit { + static constexpr bool value = E == boost::dynamic_extent || + N != boost::dynamic_extent; +}; + +template +struct span_copyable { + static constexpr bool value = (N == boost::dynamic_extent || + span_capacity::value) && span_convertible::value; +}; + +template +struct span_sub { + static constexpr std::size_t value = E == boost::dynamic_extent ? + boost::dynamic_extent : E - O; +}; + +template +struct span_store { + constexpr span_store(T* p_, std::size_t) noexcept + : p(p_) { } + static constexpr std::size_t n = E; + T* p; +}; + +template +struct span_store { + constexpr span_store(T* p_, std::size_t n_) noexcept + : p(p_) + , n(n_) { } + T* p; + std::size_t n; +}; + +template +struct span_bytes { + static constexpr std::size_t value = sizeof(T) * E; +}; + +template +struct span_bytes { + static constexpr std::size_t value = boost::dynamic_extent; +}; + +} /* detail */ + +template +class span { +public: + typedef T element_type; + typedef typename std::remove_cv::type value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef T* pointer; + typedef const T* const_pointer; + typedef T& reference; + typedef const T& const_reference; + typedef T* iterator; + typedef const T* const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + static constexpr std::size_t extent = E; + + template::type = 0> + constexpr span() noexcept + : s_(0, 0) { } + + template::value, int>::type = 0> + constexpr span(I* f, size_type c) + : s_(f, c) { } + + template::value, int>::type = 0> + explicit constexpr span(I* f, size_type c) + : s_(f, c) { } + + template::value, int>::type = 0> + constexpr span(I* f, L* l) + : s_(f, l - f) { } + + template::value, int>::type = 0> + explicit constexpr span(I* f, L* l) + : s_(f, l - f) { } + + template::value, + int>::type = 0> + constexpr span(typename std::enable_if::type (&a)[N]) noexcept + : s_(a, N) { } + + template::value, + int>::type = 0> + constexpr span(std::array& a) noexcept + : s_(a.data(), N) { } + + template::value, int>::type = 0> + constexpr span(const std::array& a) noexcept + : s_(a.data(), N) { } + + template::value, int>::type = 0> + constexpr span(R&& r) noexcept(noexcept(r.data()) && noexcept(r.size())) + : s_(r.data(), r.size()) { } + + template::value, int>::type = 0> + explicit constexpr span(R&& r) noexcept(noexcept(r.data()) && + noexcept(r.size())) + : s_(r.data(), r.size()) { } + + template::value && + detail::span_copyable::value, int>::type = 0> + constexpr span(const span& s) noexcept + : s_(s.data(), s.size()) { } + + template::value && + detail::span_copyable::value, int>::type = 0> + explicit constexpr span(const span& s) noexcept + : s_(s.data(), s.size()) { } + + template + constexpr span first() const { + static_assert(C <= E, "Count <= Extent"); + return span(s_.p, C); + } + + template + constexpr span last() const { + static_assert(C <= E, "Count <= Extent"); + return span(s_.p + (s_.n - C), C); + } + + template + constexpr typename std::enable_if::value> >::type subspan() const { + static_assert(O <= E, "Offset <= Extent"); + return span::value>(s_.p + O, s_.n - O); + } + + template + constexpr typename std::enable_if >::type subspan() const { + static_assert(O <= E && C <= E - O, + "Offset <= Extent && Count <= Extent - Offset"); + return span(s_.p + O, C); + } + + constexpr span first(size_type c) const { + return span(s_.p, c); + } + + constexpr span last(size_type c) const { + return span(s_.p + (s_.n - c), c); + } + + constexpr span subspan(size_type o, + size_type c = dynamic_extent) const { + return span(s_.p + o, + c == dynamic_extent ? s_.n - o : c); + } + + constexpr size_type size() const noexcept { + return s_.n; + } + + constexpr size_type size_bytes() const noexcept { + return s_.n * sizeof(T); + } + + constexpr bool empty() const noexcept { + return s_.n == 0; + } + + constexpr reference operator[](size_type i) const { + return s_.p[i]; + } + + constexpr reference front() const { + return *s_.p; + } + + constexpr reference back() const { + return s_.p[s_.n - 1]; + } + + constexpr pointer data() const noexcept { + return s_.p; + } + + constexpr iterator begin() const noexcept { + return s_.p; + } + + constexpr iterator end() const noexcept { + return s_.p + s_.n; + } + + constexpr reverse_iterator rbegin() const noexcept { + return reverse_iterator(s_.p + s_.n); + } + + constexpr reverse_iterator rend() const noexcept { + return reverse_iterator(s_.p); + } + + constexpr const_iterator cbegin() const noexcept { + return s_.p; + } + + constexpr const_iterator cend() const noexcept { + return s_.p + s_.n; + } + + constexpr const_reverse_iterator crbegin() const noexcept { + return const_reverse_iterator(s_.p + s_.n); + } + + constexpr const_reverse_iterator crend() const noexcept { + return const_reverse_iterator(s_.p); + } + + friend constexpr iterator begin(span s) noexcept { + return s.begin(); + } + + friend constexpr iterator end(span s) noexcept { + return s.end(); + } + +private: + detail::span_store s_; +}; + +template +constexpr std::size_t span::extent; + +#ifdef __cpp_deduction_guides +template +span(I*, L) -> span; + +template +span(T(&)[N]) -> span; + +template +span(std::array&) -> span; + +template +span(const std::array&) -> span; + +template +span(R&&) -> span::type>; + +template +span(span) -> span; +#endif + +#ifdef __cpp_lib_byte +template +inline span::value> +as_bytes(span s) noexcept +{ + return span::value>(reinterpret_cast(s.data()), + s.size_bytes()); +} + +template +inline typename std::enable_if::value, + span::value> >::type +as_writable_bytes(span s) noexcept +{ + return span::value>(reinterpret_cast(s.data()), s.size_bytes()); +} +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/core/swap.hpp b/Slang/boost/core/swap.hpp new file mode 100644 index 0000000..49e1b2d --- /dev/null +++ b/Slang/boost/core/swap.hpp @@ -0,0 +1,70 @@ +// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker +// +// Distributed under the 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_CORE_SWAP_HPP +#define BOOST_CORE_SWAP_HPP + +// Note: the implementation of this utility contains various workarounds: +// - swap_impl is put outside the boost namespace, to avoid infinite +// recursion (causing stack overflow) when swapping objects of a primitive +// type. +// - swap_impl has a using-directive, rather than a using-declaration, +// because some compilers (including MSVC 7.1, Borland 5.9.3, and +// Intel 8.1) don't do argument-dependent lookup when it has a +// using-declaration instead. +// - boost::swap has two template arguments, instead of one, to +// avoid ambiguity when swapping objects of a Boost type that does +// not have its own boost::swap overload. + +#include +#include +#if __cplusplus >= 201103L || defined(BOOST_DINKUMWARE_STDLIB) +#include // for std::swap (C++11) +#else +#include // for std::swap (C++98) +#endif +#include // for std::size_t + +namespace boost_swap_impl +{ + // we can't use type_traits here + + template struct is_const { enum _vt { value = 0 }; }; + template struct is_const { enum _vt { value = 1 }; }; + + template + BOOST_GPU_ENABLED + void swap_impl(T& left, T& right) + { + using namespace std;//use std::swap if argument dependent lookup fails + swap(left,right); + } + + template + BOOST_GPU_ENABLED + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} + +namespace boost +{ + template + BOOST_GPU_ENABLED + typename enable_if_c< !boost_swap_impl::is_const::value && !boost_swap_impl::is_const::value >::type + swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} + +#endif diff --git a/Slang/boost/core/type_name.hpp b/Slang/boost/core/type_name.hpp new file mode 100644 index 0000000..4afef1d --- /dev/null +++ b/Slang/boost/core/type_name.hpp @@ -0,0 +1,1137 @@ +#ifndef BOOST_CORE_TYPE_NAME_HPP_INCLUDED +#define BOOST_CORE_TYPE_NAME_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// std::string boost::core::type_name() +// +// Copyright 2021 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) +# include +#endif + +namespace boost +{ +namespace core +{ +namespace detail +{ + +// tn_identity + +template struct tn_identity +{ + typedef T type; +}; + +// tn_remove_prefix + +inline bool tn_remove_prefix( std::string& str, char const* prefix ) +{ + std::size_t n = std::strlen( prefix ); + + if( str.substr( 0, n ) == prefix ) + { + str = str.substr( n ); + return true; + } + else + { + return false; + } +} + +#if !defined(BOOST_NO_TYPEID) + +// typeid_name + +inline std::string fix_typeid_name( char const* n ) +{ + std::string r = boost::core::demangle( n ); + +#if defined(_MSC_VER) + + tn_remove_prefix( r, "class " ); + tn_remove_prefix( r, "struct " ); + tn_remove_prefix( r, "enum " ); + +#endif + + // libc++ inline namespace + + if( tn_remove_prefix( r, "std::__1::" ) ) + { + r = "std::" + r; + } + + // libstdc++ inline namespace + + if( tn_remove_prefix( r, "std::__cxx11::" ) ) + { + r = "std::" + r; + } + +#if defined(BOOST_MSVC) && BOOST_MSVC == 1600 + + // msvc-10.0 puts TR1 things in std::tr1 + + if( tn_remove_prefix( r, "std::tr1::" ) ) + { + r = "std::" + r; + } + +#endif + + return r; +} + +template std::string typeid_name() +{ + return fix_typeid_name( typeid(T).name() ); +} + +// template names + +template std::string class_template_name() +{ +#if defined(BOOST_GCC) + + std::string r = typeid_name(); + +#else + + std::string r = typeid_name(); + +#endif + return r.substr( 0, r.find( '<' ) ); +} + +template std::string sequence_template_name() +{ + return detail::class_template_name(); +} + +template std::string set_template_name() +{ + return detail::class_template_name(); +} + +template std::string map_template_name() +{ + return detail::class_template_name(); +} + +template std::string array_template_name() +{ + return detail::class_template_name(); +} + +#else // #if !defined(BOOST_NO_TYPEID) + +template std::string typeid_name() +{ + return "_Tp"; +} + +template std::string class_template_name() +{ + return "_Tm"; +} + +template std::string sequence_template_name() +{ + return "_Sq"; +} + +template std::string set_template_name() +{ + return "_St"; +} + +template std::string map_template_name() +{ + return "_Mp"; +} + +template std::string array_template_name() +{ + return "_Ar"; +} + +#endif + +// tn_to_string + +#if defined(BOOST_MSVC) +# pragma warning( push ) +# pragma warning( disable: 4996 ) +#endif + +inline std::string tn_to_string( std::size_t n ) +{ + char buffer[ 32 ]; + std::sprintf( buffer, "%lu", static_cast< unsigned long >( n ) ); + + return buffer; +} + +#if defined(BOOST_MSVC) +# pragma warning( pop ) +#endif + +// tn_holder + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return typeid_name() + suffix; + } +}; + +// integrals + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "bool" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "char" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "signed char" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "unsigned char" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "short" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "unsigned short" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "int" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "unsigned" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "long" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "unsigned long" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "long long" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "unsigned long long" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "wchar_t" + suffix; + } +}; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "char16_t" + suffix; + } +}; + +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "char32_t" + suffix; + } +}; + +#endif + +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "char8_t" + suffix; + } +}; + +#endif + +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::byte" + suffix; + } +}; + +#endif + +// floating point + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "float" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "double" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "long double" + suffix; + } +}; + +// void + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "void" + suffix; + } +}; + +// nullptr_t + +#if !defined(BOOST_NO_CXX11_NULLPTR) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::nullptr_t" + suffix; + } +}; + +#endif + +// cv + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( " const" + suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( " volatile" + suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( " const volatile" + suffix ); + } +}; + +// refs + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( "&" + suffix ); + } +}; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( "&&" + suffix ); + } +}; + +#endif + +// function types + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +// tn_add_each + +template int tn_add_each_impl( std::string& st ) +{ + if( !st.empty() ) st += ", "; + st += tn_holder::type_name( "" ); + return 0; +} + +template std::string tn_add_each() +{ + std::string st; + + typedef int A[ sizeof...(T) + 1 ]; + (void)A{ 0, tn_add_each_impl( st )... }; + + return st; +} + +template std::string function_type_name( tn_identity, std::string const& trailer, std::string const& suffix ) +{ + std::string r = tn_holder::type_name( "" ); + + if( !suffix.empty() ) + { + r += '('; + + if( suffix[ 0 ] == ' ' ) + { + r += suffix.substr( 1 ); + } + else + { + r += suffix; + } + + r += ')'; + } + + r += '(' + tn_add_each() + ')'; + r += trailer; + + return r; +} + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), "", suffix ); + } +}; + +#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900 + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile", suffix ); + } +}; + +#endif + +#if !defined(BOOST_NO_CXX11_REF_QUALIFIERS) + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " &", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const &", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile &", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile &", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " &&", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const &&", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile &&", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile &&", suffix ); + } +}; + +#endif + +#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " & noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const & noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile & noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile & noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " && noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const && noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile && noexcept", suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile && noexcept", suffix ); + } +}; + +#endif + +#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +// pointers + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( "*" + suffix ); + } +}; + +// arrays + +template std::pair array_prefix_suffix( tn_identity ) +{ + return std::pair( tn_holder::type_name( "" ), "" ); +} + +template std::pair array_prefix_suffix( tn_identity ) +{ + std::pair r = detail::array_prefix_suffix( tn_identity() ); + + r.second = '[' + tn_to_string( N ) + ']' + r.second; + + return r; +} + +template std::string array_type_name( tn_identity, std::string const& suffix ) +{ + std::pair r = detail::array_prefix_suffix( tn_identity() ); + + if( suffix.empty() ) + { + return r.first + "[]" + r.second; + } + else + { + return r.first + '(' + suffix + ")[]" + r.second; + } +} + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template std::string array_type_name( tn_identity, std::string const& suffix ) +{ + std::pair r = detail::array_prefix_suffix( tn_identity() ); + + if( suffix.empty() ) + { + return r.first + r.second; + } + else + { + return r.first + '(' + suffix + ")" + r.second; + } +} + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::array_type_name( tn_identity(), suffix ); + } +}; + +// pointers to members + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return tn_holder::type_name( ' ' + tn_holder::type_name( "" ) + "::*" + suffix ); + } +}; + +#if defined(BOOST_MSVC) && BOOST_MSVC < 1900 && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), "", ' ' + tn_holder::type_name( "" ) + "::*" + suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const", ' ' + tn_holder::type_name( "" ) + "::*" + suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " volatile", ' ' + tn_holder::type_name( "" ) + "::*" + suffix ); + } +}; + +template struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return detail::function_type_name( tn_identity(), " const volatile", ' ' + tn_holder::type_name( "" ) + "::*" + suffix ); + } +}; + +#endif + +// strings + +template class L, class Ch> struct tn_holder< L, std::allocator > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = sequence_template_name< L, std::allocator > >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::string" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::wstring" + suffix; + } +}; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u16string" + suffix; + } +}; + +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u32string" + suffix; + } +}; + +#endif + +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + +template<> struct tn_holder< std::basic_string > +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u8string" + suffix; + } +}; + +#endif + +// string views (et al) + +template class L, class Ch> struct tn_holder< L > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = sequence_template_name< L > >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +// needed for libstdc++ +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::ostream" + suffix; + } +}; + +#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::string_view" + suffix; + } +}; + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::wstring_view" + suffix; + } +}; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u16string_view" + suffix; + } +}; + +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + +template<> struct tn_holder +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u32string_view" + suffix; + } +}; + +#endif + +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + +template<> struct tn_holder< std::basic_string_view > +{ + static std::string type_name( std::string const& suffix ) + { + return "std::u8string_view" + suffix; + } +}; + +#endif + +#endif + +// class templates + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +template class L, class... T> struct tn_holder< L > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::class_template_name< L >(); + std::string st = tn_add_each(); + + return tn + '<' + st + '>' + suffix; + } +}; + +#else + +template class L, class T1> struct tn_holder< L > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::class_template_name< L >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +template class L, class T1, class T2> struct tn_holder< L > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::class_template_name< L >(); + return tn + '<' + tn_holder::type_name( "" ) + ", " + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +#endif + +// sequence containers + +template class L, class T> struct tn_holder< L > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::sequence_template_name< L > >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +// set + +template class L, class T> struct tn_holder< L, std::allocator > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::set_template_name< L, std::allocator > >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +// map + +template class L, class T, class U> struct tn_holder< L, std::allocator > > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::map_template_name< L, std::allocator > > >(); + return tn + '<' + tn_holder::type_name( "" ) + ", " + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +#if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) + +// unordered_set + +template class L, class T> struct tn_holder< L, std::equal_to, std::allocator > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::set_template_name< L, std::equal_to, std::allocator > >(); + return tn + '<' + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +// unordered_map + +template class L, class T, class U> struct tn_holder< L, std::equal_to, std::allocator > > > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::map_template_name< L, std::equal_to, std::allocator > > >(); + return tn + '<' + tn_holder::type_name( "" ) + ", " + tn_holder::type_name( "" ) + '>' + suffix; + } +}; + +#endif + +// array + +template class L, class T, std::size_t N> struct tn_holder< L > +{ + static std::string type_name( std::string const& suffix ) + { + std::string tn = detail::array_template_name< L >(); + return tn + '<' + tn_holder::type_name( "" ) + ", " + tn_to_string( N ) + '>' + suffix; + } +}; + +} // namespace detail + +template std::string type_name() +{ + return core::detail::tn_holder::type_name( "" ); +} + +} // namespace core +} // namespace boost + +#endif // #ifndef BOOST_CORE_TYPE_NAME_HPP_INCLUDED diff --git a/Slang/boost/core/typeinfo.hpp b/Slang/boost/core/typeinfo.hpp new file mode 100644 index 0000000..d33d29b --- /dev/null +++ b/Slang/boost/core/typeinfo.hpp @@ -0,0 +1,167 @@ +#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED +#define BOOST_CORE_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// core::typeinfo, BOOST_CORE_TYPEID +// +// Copyright 2007, 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +#if defined( BOOST_NO_TYPEID ) + +#include +#include +#include + +namespace boost +{ + +namespace core +{ + +class typeinfo +{ +private: + + typeinfo( typeinfo const& ); + typeinfo& operator=( typeinfo const& ); + + char const * name_; + void (*lib_id_)(); + +public: + + typeinfo( char const * name, void (*lib_id)() ): name_( name ), lib_id_( lib_id ) + { + } + + bool operator==( typeinfo const& rhs ) const + { +#if ( defined(_WIN32) || defined(__CYGWIN__) ) && ( defined(__GNUC__) || defined(__clang__) ) && !defined(BOOST_DISABLE_CURRENT_FUNCTION) + + return lib_id_ == rhs.lib_id_? this == &rhs: std::strcmp( name_, rhs.name_ ) == 0; + +#else + + return this == &rhs; + +#endif + } + + bool operator!=( typeinfo const& rhs ) const + { + return !( *this == rhs ); + } + + bool before( typeinfo const& rhs ) const + { +#if ( defined(_WIN32) || defined(__CYGWIN__) ) && ( defined(__GNUC__) || defined(__clang__) ) && !defined(BOOST_DISABLE_CURRENT_FUNCTION) + + return lib_id_ == rhs.lib_id_? std::less< typeinfo const* >()( this, &rhs ): std::strcmp( name_, rhs.name_ ) < 0; + +#else + + return std::less< typeinfo const* >()( this, &rhs ); + +#endif + } + + char const* name() const + { + return name_; + } +}; + +inline char const * demangled_name( core::typeinfo const & ti ) +{ + return ti.name(); +} + +} // namespace core + +namespace detail +{ + +template struct BOOST_SYMBOL_VISIBLE core_typeid_ +{ + static boost::core::typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } +}; + +BOOST_SYMBOL_VISIBLE inline void core_typeid_lib_id() +{ +} + +template boost::core::typeinfo core_typeid_< T >::ti_( core_typeid_< T >::name(), &core_typeid_lib_id ); + +template struct core_typeid_< T & >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T volatile >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const volatile >: core_typeid_< T > +{ +}; + +} // namespace detail + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_::ti_) + +#else + +#include +#include + +namespace boost +{ + +namespace core +{ + +#if defined( BOOST_NO_STD_TYPEINFO ) + +typedef ::type_info typeinfo; + +#else + +typedef std::type_info typeinfo; + +#endif + +inline std::string demangled_name( core::typeinfo const & ti ) +{ + return core::demangle( ti.name() ); +} + +} // namespace core + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) typeid(T) + +#endif + +#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED diff --git a/Slang/boost/core/uncaught_exceptions.hpp b/Slang/boost/core/uncaught_exceptions.hpp new file mode 100644 index 0000000..380e81c --- /dev/null +++ b/Slang/boost/core/uncaught_exceptions.hpp @@ -0,0 +1,155 @@ +/* + * Copyright Andrey Semashev 2018 - 2020. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * https://www.boost.org/LICENSE_1_0.txt) + */ +/*! + * \file uncaught_exceptions.hpp + * \author Andrey Semashev + * \date 2018-11-10 + * + * \brief This header provides an `uncaught_exceptions` function implementation, which was introduced in C++17. + * + * The code in this file is based on the implementation by Evgeny Panasyuk: + * + * https://github.com/panaseleus/stack_unwinding/blob/master/boost/exception/uncaught_exception_count.hpp + */ + +#ifndef BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ +#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ + +#include +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411) +#if defined(__APPLE__) +#include +// Apple systems only support std::uncaught_exceptions starting with specific versions: +// - Mac OS >= 10.12 +// - iOS >= 10.0 +// - tvOS >= 10.0 +// - watchOS >= 3.0 +// https://github.com/boostorg/core/issues/80 +#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif +#else +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif // defined(__APPLE__) +// Visual Studio 14.0 supports N4152 std::uncaught_exceptions() but doesn't define __cpp_lib_uncaught_exceptions +#elif (defined(_MSC_VER) && _MSC_VER >= 1900) +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif + +#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + +// cxxabi.h availability macro +#if defined(__has_include) && (!defined(BOOST_GCC) || (__GNUC__ >= 5)) +# if __has_include() +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined(__GLIBCXX__) || defined(__GLIBCPP__) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined(BOOST_CORE_HAS_CXXABI_H) +// MinGW GCC 4.4 seem to not work the same way the newer GCC versions do. As a result, __cxa_get_globals based implementation will always return 0. +// Just disable it for now and fall back to std::uncaught_exception(). +// On AIX, xlclang++ does have cxxabi.h but doesn't have __cxa_get_globals (https://github.com/boostorg/core/issues/78). +#if !( \ + (defined(__MINGW32__) && (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 405)) || \ + defined(__ibmxl__) \ + ) +#include +#include +#define BOOST_CORE_HAS_CXA_GET_GLOBALS +// At least on MinGW and Linux, only GCC since 4.7 declares __cxa_get_globals() in cxxabi.h. Older versions of GCC do not expose this function but it's there. +// On OpenBSD, it seems, the declaration is also missing. +// Note that at least on FreeBSD 11, cxxabi.h declares __cxa_get_globals with a different exception specification, so we can't declare the function unconditionally. +// On Linux with clang and libc++ and on OS X, there is a version of cxxabi.h from libc++abi that doesn't declare __cxa_get_globals, but provides __cxa_uncaught_exceptions. +// The function only appeared in version _LIBCPPABI_VERSION >= 1002 of the library. Unfortunately, there are linking errors about undefined reference to __cxa_uncaught_exceptions +// on Ubuntu Trusty and OS X, so we avoid using it and forward-declare __cxa_get_globals instead. +// On QNX SDP 7.0 (QCC 5.4.0), there are multiple cxxabi.h, one from glibcxx from gcc and another from libc++abi from LLVM. Which one is included will be determined by the qcc +// command line arguments (-V and/or -Y; http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html). The LLVM libc++abi is missing the declaration +// of __cxa_get_globals but it is also patched by QNX developers to not define _LIBCPPABI_VERSION. Older QNX SDP versions, up to and including 6.6, don't provide LLVM and libc++abi. +// See https://github.com/boostorg/core/issues/59. +#if !defined(__FreeBSD__) && \ + ( \ + (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 407) || \ + defined(__OpenBSD__) || \ + (defined(__QNXNTO__) && !defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || \ + defined(_LIBCPPABI_VERSION) \ + ) +namespace __cxxabiv1 { +struct __cxa_eh_globals; +#if defined(__OpenBSD__) +extern "C" __cxa_eh_globals* __cxa_get_globals(); +#else +extern "C" __cxa_eh_globals* __cxa_get_globals() BOOST_NOEXCEPT_OR_NOTHROW __attribute__((__const__)); +#endif +} // namespace __cxxabiv1 +#endif +#endif +#endif // defined(BOOST_CORE_HAS_CXXABI_H) + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#include +#define BOOST_CORE_HAS_GETPTD +namespace boost { +namespace core { +namespace detail { +extern "C" void* _getptd(); +} // namespace detail +} // namespace core +} // namespace boost +#endif // defined(_MSC_VER) && _MSC_VER >= 1400 + +#endif // !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + +#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) && !defined(BOOST_CORE_HAS_CXA_GET_GLOBALS) && !defined(BOOST_CORE_HAS_GETPTD) +//! This macro is defined when `uncaught_exceptions` is not guaranteed to return values greater than 1 if multiple exceptions are pending +#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_EMULATED +#endif + +namespace boost { + +namespace core { + +//! Returns the number of currently pending exceptions +inline unsigned int uncaught_exceptions() BOOST_NOEXCEPT +{ +#if defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + // C++17 implementation + return static_cast< unsigned int >(std::uncaught_exceptions()); +#elif defined(BOOST_CORE_HAS_CXA_GET_GLOBALS) + // Tested on {clang 3.2,GCC 3.5.6,GCC 4.1.2,GCC 4.4.6,GCC 4.4.7}x{x32,x64} + unsigned int count; + std::memcpy(&count, reinterpret_cast< const unsigned char* >(::abi::__cxa_get_globals()) + sizeof(void*), sizeof(count)); // __cxa_eh_globals::uncaughtExceptions, x32 offset - 0x4, x64 - 0x8 + return count; +#elif defined(BOOST_CORE_HAS_GETPTD) + // MSVC specific. Tested on {MSVC2005SP1,MSVC2008SP1,MSVC2010SP1,MSVC2012}x{x32,x64}. + unsigned int count; + std::memcpy(&count, static_cast< const unsigned char* >(boost::core::detail::_getptd()) + (sizeof(void*) == 8u ? 0x100 : 0x90), sizeof(count)); // _tiddata::_ProcessingThrow, x32 offset - 0x90, x64 - 0x100 + return count; +#else + // Portable C++03 implementation. Does not allow to detect multiple nested exceptions. + return static_cast< unsigned int >(std::uncaught_exception()); +#endif +} + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H +#undef BOOST_CORE_HAS_CXA_GET_GLOBALS +#undef BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#undef BOOST_CORE_HAS_GETPTD + +#endif // BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ diff --git a/Slang/boost/core/underlying_type.hpp b/Slang/boost/core/underlying_type.hpp new file mode 100644 index 0000000..7ecba31 --- /dev/null +++ b/Slang/boost/core/underlying_type.hpp @@ -0,0 +1,79 @@ +// underlying_type.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes, 2009 +// Copyright (C) 2011-2012 Vicente J. Botet Escriba +// Copyright (C) 2012 Anthony Williams +// Copyright (C) 2014 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_CORE_UNDERLYING_TYPE_HPP +#define BOOST_CORE_UNDERLYING_TYPE_HPP + +#include + +// GCC 4.7 and later seem to provide std::underlying_type +#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || (defined(BOOST_GCC) && BOOST_GCC >= 40700 && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#include +#define BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { + +namespace detail { + +template< typename EnumType, typename Void = void > +struct underlying_type_impl; + +#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) + +// Support for boost/core/scoped_enum.hpp +template< typename EnumType > +struct underlying_type_impl< EnumType, typename EnumType::is_boost_scoped_enum_tag > +{ + /** + * The member typedef type names the underlying type of EnumType. It is EnumType::underlying_type when the EnumType is an emulated scoped enum, + */ + typedef typename EnumType::underlying_type type; +}; + +#endif + +#if defined(BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE) + +template< typename EnumType, typename Void > +struct underlying_type_impl +{ + typedef typename std::underlying_type< EnumType >::type type; +}; + +#endif + +} // namespace detail + +#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_DETAIL_HAS_STD_UNDERLYING_TYPE) +#define BOOST_NO_UNDERLYING_TYPE +#endif + +/** + * Meta-function to get the underlying type of a scoped enum. + * + * Requires EnumType must be an enum type or the emulation of a scoped enum. + * If BOOST_NO_UNDERLYING_TYPE is defined, the implementation will not be able + * to deduce the underlying type of enums. The user is expected to specialize + * this trait in this case. + */ +template< typename EnumType > +struct underlying_type : + public detail::underlying_type_impl< EnumType > +{ +}; + +} // namespace boost + +#endif // BOOST_CORE_UNDERLYING_TYPE_HPP diff --git a/Slang/boost/core/use_default.hpp b/Slang/boost/core/use_default.hpp new file mode 100644 index 0000000..9d9be79 --- /dev/null +++ b/Slang/boost/core/use_default.hpp @@ -0,0 +1,17 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_USE_DEFAULT_HPP +#define BOOST_CORE_USE_DEFAULT_HPP + +namespace boost { + +struct use_default { }; + +} /* boost */ + +#endif diff --git a/Slang/boost/crc.hpp b/Slang/boost/crc.hpp new file mode 100644 index 0000000..edd66b0 --- /dev/null +++ b/Slang/boost/crc.hpp @@ -0,0 +1,2306 @@ +// Boost CRC library crc.hpp header file -----------------------------------// + +// Copyright 2001, 2004, 2011 Daryle Walker. +// Distributed under the Boost Software License, Version 1.0. (See the +// accompanying file LICENSE_1_0.txt or a copy at +// .) + +// See for the library's home page. + +/** \file + \brief A collection of function templates and class templates that compute + various forms of Cyclic Redundancy Codes (CRCs). + + \author Daryle Walker + + \version 1.5 + + \copyright Boost Software License, version 1.0 + + Contains the declarations (and definitions) of various kinds of CRC + computation functions, function object types, and encapsulated policy types. + + \warning The sample CRC-computer types were just checked against the + Catalogue of + parametrised CRC algorithms. New type aliases were added where I got + a standard wrong. However, the mistaken typedefs are still + there for backwards compatibility. + \note There are references to the Rocksoft™ Model CRC + Algorithm, as described within \"A Painless Guide to CRC Error + Detection Algorithms,\" linked from \"CRC: A Paper On CRCs\" by + Ross Williams. It will be abbreviated \"RMCA\" in other documentation + blocks. + */ + +#ifndef BOOST_CRC_HPP +#define BOOST_CRC_HPP + +#include // for boost::array +#include // for BOOST_STATIC_CONSTANT, etc. +#include // for UINTMAX_C, boost::uintmax_t +#include // for boost::uint_t +#include +#include + +#include // for CHAR_BIT, etc. +#include // for std::size_t + +#include // for std::numeric_limits + + +// The type of CRC parameters that can go in a template should be related +// on the CRC's bit count. This macro expresses that type in a compact +// form, but also allows an alternate type for compilers that don't support +// dependent types (in template value-parameters). +#if !(defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS)) +#define BOOST_CRC_PARM_TYPE typename ::boost::uint_t::fast +#else +#define BOOST_CRC_PARM_TYPE unsigned long +#endif + +namespace boost +{ + + +// Forward declarations ----------------------------------------------------// + +//! Bit-wise CRC computer +template < std::size_t Bits > + class crc_basic; + +//! Table-driven CRC computer, usable as a function object +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly = 0u, + BOOST_CRC_PARM_TYPE InitRem = 0u, + BOOST_CRC_PARM_TYPE FinalXor = 0u, bool ReflectIn = false, + bool ReflectRem = false > + class crc_optimal; + +//! Compute the (unaugmented) CRC of a memory block +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > + typename uint_t::fast crc( void const *buffer, + std::size_t byte_count); + +//! Compute the CRC of a memory block, with any augmentation provided by user +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > + typename uint_t::fast augmented_crc( void const *buffer, + std::size_t byte_count, + typename uint_t::fast initial_remainder = 0u); + +//! Computation type for ARC|CRC-16|CRC-IBM|CRC-16/ARC|CRC-16/LHA standard +typedef crc_optimal<16, 0x8005, 0, 0, true, true> crc_16_type; +//! Computation type for CRC-16/CCITT-FALSE standard +typedef crc_optimal<16, 0x1021, 0xFFFF, 0, false, false> crc_ccitt_false_t; +//! Computation type for the CRC mistakenly called the CCITT standard +typedef crc_ccitt_false_t crc_ccitt_type; +//! Computation type for the actual +//! KERMIT|CRC-16/CCITT|CRC-16/CCITT-TRUE|CRC-CCITT standard +typedef crc_optimal<16, 0x1021, 0, 0, true, true> crc_ccitt_true_t; +//! Computation type that I mistakenly called the XMODEM standard; it inverts +//! both reflection parameters and reflects the truncated divisor (Don't use?!) +typedef crc_optimal<16, 0x8408, 0, 0, true, true> crc_xmodem_type; +//! Computation type for the actual XMODEM|ZMODEM|CRC-16/ACORN standard +typedef crc_optimal<16, 0x1021, 0, 0, false, false> crc_xmodem_t; + +//! Computation type for CRC-32|CRC-32/ADCCP|PKZIP standard +typedef crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true, true> + crc_32_type; + + +// Forward declarations for implementation detail stuff --------------------// +// (Just for the stuff that will be needed for the next two sections) + +//! \cond +namespace detail +{ + //! Mix-in class to add a possibly-reflecting member function + template < int BitLength, bool DoIt, int Id = 0 > + class possible_reflector; + + //! Mix-in class for byte-fed, table-driven CRC algorithms + template < int Order, boost::uintmax_t TruncatedPolynomial, bool Reflect, + int Id = 0 > + class crc_driver; + +} // namespace detail +//! \endcond + + +// Simple cyclic redundancy code (CRC) class declaration -------------------// + +/** Objects of this type compute the CRC checksum of submitted data, where said + data can be entered piecemeal through several different kinds of groupings. + Modulo-2 polynomial division steps are always performed bit-wise, without + the use of pre-computation tables. Said division uses the altered + algorithm, so any data has to be unaugmented. + + \pre 0 \< \a Bits \<= \c std\::numeric_limits\\::digits + + \tparam Bits The order of the modulo-2 polynomial divisor. (\e Width from + the RMCA) + */ +template < std::size_t Bits > +class crc_basic +{ +public: + // Type + /** \brief The register type used for computations + + This type is used for CRC calculations and is the type for any returned + checksums and returned or submitted remainders, (truncated) divisors, or + XOR masks. It is a built-in unsigned integer type. + */ + typedef typename boost::uint_t::fast value_type; + + // Constant for the template parameter + //! A copy of \a Bits provided for meta-programming purposes + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + + // Constructor (use the automatic copy-ctr, move-ctr, and dtr) + //! Create a computer, separately listing each needed parameter + explicit crc_basic( value_type truncated_polynomial, + value_type initial_remainder = 0, value_type final_xor_value = 0, + bool reflect_input = false, bool reflect_remainder = false ); + + // Internal Operations + //! Return the (truncated) polynomial divisor + value_type get_truncated_polynominal() const; + //! Return what the polynomial remainder was set to during construction + value_type get_initial_remainder() const; + //! Return the XOR-mask used during output processing + value_type get_final_xor_value() const; + //! Check if input-bytes will be reflected before processing + bool get_reflect_input() const; + //! Check if the remainder will be reflected during output processing + bool get_reflect_remainder() const; + + //! Return the remainder based from already-processed bits + value_type get_interim_remainder() const; + //! Change the interim remainder to a new value + void reset( value_type new_rem ); + //! Change the interim remainder back to the initial value + void reset(); + + // External Operations + //! Submit a single bit for input processing + void process_bit( bool bit ); + //! Submit the lowest \a bit_length bits of a byte for input processing + void process_bits( unsigned char bits, std::size_t bit_length ); + //! Submit a single byte for input processing + void process_byte( unsigned char byte ); + //! Submit a memory block for input processing, iterator-pair style + void process_block( void const *bytes_begin, void const *bytes_end ); + //! Submit a memory block for input processing, pointer-and-size style + void process_bytes( void const *buffer, std::size_t byte_count ); + + //! Return the checksum of the already-processed bits + value_type checksum() const; + +private: + // Member data + value_type rem_; + value_type poly_, init_, final_; // non-const to allow assignability + bool rft_in_, rft_out_; // non-const to allow assignability + +}; // boost::crc_basic + + +// Optimized cyclic redundancy code (CRC) class declaration ----------------// + +/** Objects of this type compute the CRC checksum of submitted data, where said + data can be entered piecemeal through several different kinds of groupings. + Modulo-2 polynomial division steps are performed byte-wise, aided by the use + of pre-computation tables. Said division uses the altered algorithm, so any + data has to be unaugmented. + + \pre 0 \< \a Bits \<= \c std\::numeric_limits\\::digits + + \tparam Bits The order of the modulo-2 polynomial divisor. (\e Width from + the RMCA) + \tparam TruncPoly The lowest coefficients of the divisor polynomial. The + highest-order coefficient is omitted and always assumed to be 1. Defaults + to \c 0, i.e. the only non-zero term is the implicit one for + xBits. (\e Poly from the RMCA) + \tparam InitRem The (unaugmented) initial state of the polynomial + remainder. Defaults to \c 0 if omitted. (\e Init from the RMCA) + \tparam FinalXor The (XOR) bit-mask to be applied to the output remainder, + after possible reflection but before returning. Defaults to \c 0 (i.e. no + bit changes) if omitted. (\e XorOut from the RMCA) + \tparam ReflectIn If \c true, input bytes are read lowest-order bit first, + otherwise highest-order bit first. Defaults to \c false if omitted. + (\e RefIn from the RMCA) + \tparam ReflectRem If \c true, the output remainder is reflected before the + XOR-mask. Defaults to \c false if omitted. (\e RefOut from the RMCA) + + \todo Get rid of the default value for \a TruncPoly. Choosing a divisor is + an important decision with many factors, so a default is never useful, + especially a bad one. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +class crc_optimal +{ +public: + // Type + //! \copydoc boost::crc_basic::value_type + typedef typename boost::uint_t::fast value_type; + + // Constants for the template parameters + //! \copydoc boost::crc_basic::bit_count + BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); + //! A copy of \a TruncPoly provided for meta-programming purposes + BOOST_STATIC_CONSTANT( value_type, truncated_polynominal = TruncPoly ); + //! A copy of \a InitRem provided for meta-programming purposes + BOOST_STATIC_CONSTANT( value_type, initial_remainder = InitRem ); + //! A copy of \a FinalXor provided for meta-programming purposes + BOOST_STATIC_CONSTANT( value_type, final_xor_value = FinalXor ); + //! A copy of \a ReflectIn provided for meta-programming purposes + BOOST_STATIC_CONSTANT( bool, reflect_input = ReflectIn ); + //! A copy of \a ReflectRem provided for meta-programming purposes + BOOST_STATIC_CONSTANT( bool, reflect_remainder = ReflectRem ); + + // Constructor (use the automatic copy-ctr, move-ctr, and dtr) + //! Create a computer, giving an initial remainder if desired + explicit crc_optimal( value_type init_rem = initial_remainder ); + + // Internal Operations + //! \copybrief boost::crc_basic::get_truncated_polynominal + value_type get_truncated_polynominal() const; + //! \copybrief boost::crc_basic::get_initial_remainder + value_type get_initial_remainder() const; + //! \copybrief boost::crc_basic::get_final_xor_value + value_type get_final_xor_value() const; + //! \copybrief boost::crc_basic::get_reflect_input + bool get_reflect_input() const; + //! \copybrief boost::crc_basic::get_reflect_remainder + bool get_reflect_remainder() const; + + //! \copybrief boost::crc_basic::get_interim_remainder + value_type get_interim_remainder() const; + //! Change the interim remainder to either a given value or the initial one + void reset( value_type new_rem = initial_remainder ); + + // External Operations + //! \copybrief boost::crc_basic::process_byte + void process_byte( unsigned char byte ); + //! \copybrief boost::crc_basic::process_block + void process_block( void const *bytes_begin, void const *bytes_end ); + //! \copybrief boost::crc_basic::process_bytes + void process_bytes( void const *buffer, std::size_t byte_count ); + + //! \copybrief boost::crc_basic::checksum + value_type checksum() const; + + // Operators + //! Submit a single byte for input processing, suitable for the STL + void operator ()( unsigned char byte ); + //! Return the checksum of the already-processed bits, suitable for the STL + value_type operator ()() const; + +private: + // Implementation types + // (Processing for reflected input gives reflected remainders, so you only + // have to apply output-reflection if Reflect-Remainder doesn't match + // Reflect-Input.) + typedef detail::possible_reflector reflect_i_type; + typedef detail::crc_driver crc_table_type; + typedef detail::possible_reflector + reflect_o_type; + + // Member data + value_type rem_; + +}; // boost::crc_optimal + + +// Implementation detail stuff ---------------------------------------------// + +//! \cond +namespace detail +{ + /** \brief Meta-programming integral constant for a single-bit bit-mask + + Generates a compile-time constant for a bit-mask that affects a single + bit. The \c value will be 2BitIndex. The \c type + will be the smallest built-in unsigned integer type that can contain the + value, unless there's a built-in type that the system can handle easier, + then the \c type will be smallest fast-handled unsigned integer type. + + \pre 0 \<= BitIndex \< \c std\::numeric_limits\\::digits + + \tparam BitIndex The place of the sole set bit. + */ + template < int BitIndex > + struct high_bit_mask_c + : boost::integral_constant::fast, + ( UINTMAX_C(1) << BitIndex )> + {}; + + /** \brief Meta-programming integral constant for a lowest-bits bit-mask + + Generates a compile-time constant for a bit-mask that affects the lowest + bits. The \c value will be 2BitCount - 1. The + \c type will be the smallest built-in unsigned integer type that can + contain the value, unless there's a built-in type that the system can + handle easier, then the \c type will be smallest fast-handled unsigned + integer type. + + \pre 0 \<= BitCount \<= \c std\::numeric_limits\\::digits + + \tparam BitCount The number of lowest-placed bits set. + */ + template < int BitCount > + struct low_bits_mask_c + : boost::integral_constant::fast, ( + BitCount ? (( (( UINTMAX_C(1) << (BitCount - 1) ) - 1u) << 1 ) | + UINTMAX_C( 1 )) : 0u )> + {}; + + /** \brief Reflects the bits of a number + + Reverses the order of the given number of bits within a value. For + instance, if the given reflect count is 5, then the bit values for the + 16- and 1-place will switch and the 8- and 2-place will switch, leaving + the other bits alone. (The 4-place bit is in the middle, so it wouldn't + change.) + + \pre \a Unsigned is a built-in unsigned integer type + \pre 0 \< word_length \<= \c std\::numeric_limits\\::digits + + \tparam Unsigned The type of \a x. + + \param x The value to be (partially) reflected. + \param word_length The number of low-order bits to reflect. Defaults + to the total number of value bits in \a Unsigned. + + \return The (partially) reflected value. + + \todo Check if this is the fastest way. + */ + template < typename Unsigned > + Unsigned reflect_unsigned( Unsigned x, int word_length + = std::numeric_limits::digits ) + { + for ( Unsigned l = 1u, h = l << (word_length - 1) ; h > l ; h >>= 1, l + <<= 1 ) + { + Unsigned const m = h | l, t = x & m; + + if ( (t == h) || (t == l) ) + x ^= m; + } + + return x; + } + + /** \brief Make a byte-to-byte-reflection map + + Creates a mapping array so the results can be cached. Uses + #reflect_unsigned to generate the element values. + + \return An array a such that, for a given byte value + i, a[ i ] resolves to + the reflected value of i. + */ + boost::array< unsigned char, (UINTMAX_C( 1 ) << CHAR_BIT) > + inline make_byte_reflection_table() + { + boost::array result; + unsigned char i = 0u; + + do + result[ i ] = reflect_unsigned( i ); + while ( ++i ); + return result; + } + + /** \brief Reflects the bits of a single byte + + Reverses the order of all the bits within a value. For instance, the + bit values for the 2CHAR_BIT - 1- and 1-place + will switch and the 2CHAR_BIT - 2- and 2-place + will switch, etc. + + \param x The byte value to be reflected. + + \return The reflected value. + + \note Since this could be the most common type of reflection, and the + number of states is relatively small, the implementation pre-computes + and uses a table of all the results. + */ + inline unsigned char reflect_byte( unsigned char x ) + { + static boost::array const + table = make_byte_reflection_table(); + + return table[ x ]; + } + + /** \brief Reflects some bits within a single byte + + Like #reflect_unsigned, except it takes advantage of any (long-term) + speed gains #reflect_byte may bring. + + \pre 0 \< \a word_length \<= \c CHAR_BIT + + \param x The value to be (partially) reflected. + \param word_length The number of low-order bits to reflect. + + \return The (partially) reflected value. + */ + inline unsigned char reflect_sub_byte( unsigned char x, int word_length ) + { return reflect_byte(x) >> (CHAR_BIT - word_length); } + + /** \brief Possibly reflects the bits of a number + + Reverses the order of the given number of bits within a value. For + instance, if the given reflect count is 5, then the bit values for the + 16- and 1-place will switch and the 8- and 2-place will switch, leaving + the other bits alone. (The 4-place bit is in the middle, so it wouldn't + change.) This variant function allows the reflection be controlled by + an extra parameter, in case the decision to use reflection is made at + run-time. + + \pre \a Unsigned is a built-in unsigned integer type + \pre 0 \< word_length \<= \c std\::numeric_limits\\::digits + + \tparam Unsigned The type of \a x. + + \param x The value to be (partially) reflected. + \param reflect Controls whether \a x is actually reflected (\c true) or + left alone (\c false). + \param word_length The number of low-order bits to reflect. Defaults + to the total number of value bits in \a Unsigned. + + \return The possibly (partially) reflected value. + */ + template < typename Unsigned > + inline + Unsigned reflect_optionally( Unsigned x, bool reflect, int word_length + = std::numeric_limits::digits ) + { return reflect ? reflect_unsigned(x, word_length) : x; } + + /** \brief Possibly reflects the bits of a single byte + + Uses #reflect_byte (if \a reflect is \c true). + + \param x The byte value to be (possibly) reflected. + \param reflect Whether (\c true) or not (\c false) \a x is reflected. + + \return reflect ? reflect_byte(x) : + x + */ + inline + unsigned char reflect_byte_optionally( unsigned char x, bool reflect ) + { return reflect ? reflect_byte(x) : x; } + + /** \brief Update a CRC remainder by several bits, assuming a non-augmented + message + + Performs several steps of division required by the CRC algorithm, giving + a new remainder polynomial based on the divisor polynomial and the + synthesized dividend polynomial (from the old remainder and the + newly-provided input). The computations assume that the CRC is directly + exposed from the remainder, without any zero-valued bits augmented to + the message bits. + + \pre \a Register and \a Word are both built-in unsigned integer types + \pre 0 \< \a register_length \<= std\::numeric_limits\<\a Register\> + \::digits + \pre 0 \< \a word_length \<= std\::numeric_limits\<\a Word\>\::digits + + \tparam Register The type used for representing the remainder and + divisor modulo-2 polynomials. The bit at 2i + is used as the coefficient of xi. + \tparam Word The type used for storing the incoming terms of the + dividend modulo-2 polynomial. The bit at 2i + is used as the coefficient of xi when \a reflect is + \c false, and the coefficient of xword_length - 1 - + i otherwise. + + \param[in] register_length The number of significant low-order bits + to be used from \a Register values. It is the order of the modulo-2 + polynomial remainder and one less than the divisor's order. + \param[in,out] remainder The upper part of the dividend polynomial + before division, and the remainder polynomial after. + \param[in] new_dividend_bits The coefficients for the next + \a word_length lowest terms of the dividend polynomial. + \param[in] truncated_divisor The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \param[in] word_length The number of lowest-order bits to read from + \a new_dividend_bits. + \param[in] reflect If \c false, read from the highest-order marked + bit from \a new_dividend_bits and go down, as normal. Otherwise, + proceed from the lowest-order bit and go up. + + \note This routine performs a modulo-2 polynomial division variant. + The exclusive-or operations are applied in a different order, since + that kind of operation is commutative and associative. It also + assumes that the zero-valued augment string was applied before this + step, which means that the updated remainder can be directly used as + the final CRC. + */ + template < typename Register, typename Word > + void crc_modulo_word_update( int register_length, Register &remainder, Word + new_dividend_bits, Register truncated_divisor, int word_length, bool + reflect ) + { + // Create this masking constant outside the loop. + Register const high_bit_mask = UINTMAX_C(1) << (register_length - 1); + + // The natural reading order for division is highest digit/bit first. + // The "reflect" parameter switches this. However, building a bit mask + // for the lowest bit is the easiest.... + new_dividend_bits = reflect_optionally( new_dividend_bits, !reflect, + word_length ); + + // Perform modulo-2 division for each new dividend input bit + for ( int i = word_length ; i ; --i, new_dividend_bits >>= 1 ) + { + // compare the new bit with the remainder's highest + remainder ^= ( new_dividend_bits & 1u ) ? high_bit_mask : 0u; + + // perform modulo-2 division + bool const quotient = remainder & high_bit_mask; + + remainder <<= 1; + remainder ^= quotient ? truncated_divisor : 0u; + + // The quotient isn't used for anything, so don't keep it. + } + } + + /** \brief Update a CRC remainder by a single bit, assuming a non-augmented + message + + Performs the next step of division required by the CRC algorithm, giving + a new remainder polynomial based on the divisor polynomial and the + synthesized dividend polynomial (from the old remainder and the + newly-provided input). The computations assume that the CRC is directly + exposed from the remainder, without any zero-valued bits augmented to + the message bits. + + \pre \a Register is a built-in unsigned integer type + \pre 0 \< \a register_length \<= std\::numeric_limits\<\a Register\> + \::digits + + \tparam Register The type used for representing the remainder and + divisor modulo-2 polynomials. The bit at 2i + is used as the coefficient of xi. + + \param[in] register_length The number of significant low-order bits + to be used from \a Register values. It is the order of the modulo-2 + polynomial remainder and one less than the divisor's order. + \param[in,out] remainder The upper part of the dividend polynomial + before division, and the remainder polynomial after. + \param[in] new_dividend_bit The coefficient for the constant term + of the dividend polynomial. + \param[in] truncated_divisor The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + + \note This routine performs a modulo-2 polynomial division variant. + The exclusive-or operations are applied in a different order, since + that kind of operation is commutative and associative. It also + assumes that the zero-valued augment string was applied before this + step, which means that the updated remainder can be directly used as + the final CRC. + */ + template < typename Register > + inline void crc_modulo_update( int register_length, Register &remainder, + bool new_dividend_bit, Register truncated_divisor ) + { + crc_modulo_word_update( register_length, remainder, + static_cast(new_dividend_bit), truncated_divisor, 1, false ); + } + + /** \brief Update a CRC remainder by several bits, assuming an augmented + message + + Performs several steps of division required by the CRC algorithm, giving + a new remainder polynomial based on the divisor polynomial and the + synthesized dividend polynomial (from the old remainder and the + newly-provided input). The computations assume that a zero-valued + string of bits will be appended to the message before extracting the + CRC. + + \pre \a Register and \a Word are both built-in unsigned integer types + \pre 0 \< \a register_length \<= std\::numeric_limits\<\a Register\> + \::digits + \pre 0 \< \a word_length \<= std\::numeric_limits\<\a Word\>\::digits + + \tparam Register The type used for representing the remainder and + divisor modulo-2 polynomials. The bit at 2i + is used as the coefficient of xi. + \tparam Word The type used for storing the incoming terms of the + dividend modulo-2 polynomial. The bit at 2i + is used as the coefficient of xi when \a reflect is + \c false, and the coefficient of xword_length - 1 - + i otherwise. + + \param[in] register_length The number of significant low-order bits + to be used from \a Register values. It is the order of the modulo-2 + polynomial remainder and one less than the divisor's order. + \param[in,out] remainder The upper part of the dividend polynomial + before division, and the remainder polynomial after. + \param[in] new_dividend_bits The coefficients for the next + \a word_length lowest terms of the dividend polynomial. + \param[in] truncated_divisor The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \param[in] word_length The number of lowest-order bits to read from + \a new_dividend_bits. + \param[in] reflect If \c false, read from the highest-order marked + bit from \a new_dividend_bits and go down, as normal. Otherwise, + proceed from the lowest-order bit and go up. + + \note This routine performs straight-forward modulo-2 polynomial + division. It assumes that an augment string will be processed at the + end of the message bits before doing CRC analysis. + \todo Use this function somewhere so I can test it. + */ + template < typename Register, typename Word > + void augmented_crc_modulo_word_update( int register_length, Register + &remainder, Word new_dividend_bits, Register truncated_divisor, int + word_length, bool reflect ) + { + // Create this masking constant outside the loop. + Register const high_bit_mask = UINTMAX_C(1) << (register_length - 1); + + // The natural reading order for division is highest digit/bit first. + // The "reflect" parameter switches this. However, building a bit mask + // for the lowest bit is the easiest.... + new_dividend_bits = reflect_optionally( new_dividend_bits, not reflect, + word_length ); + + // Perform modulo-2 division for each new dividend input bit + for ( int i = word_length ; i ; --i, new_dividend_bits >>= 1 ) + { + bool const quotient = remainder & high_bit_mask; + + remainder <<= 1; + remainder |= new_dividend_bits & 1u; + remainder ^= quotient ? truncated_divisor : 0u; + + // The quotient isn't used for anything, so don't keep it. + } + } + + /** \brief Update a CRC remainder by a single bit, assuming an augmented + message + + Performs the next step of division required by the CRC algorithm, giving + a new remainder polynomial based on the divisor polynomial and the + synthesized dividend polynomial (from the old remainder and the + newly-provided input). The computations assume that a zero-valued + string of bits will be appended to the message before extracting the + CRC. + + \pre \a Register is a built-in unsigned integer type + \pre 0 \< \a register_length \<= std\::numeric_limits\<\a Register\> + \::digits + + \tparam Register The type used for representing the remainder and + divisor modulo-2 polynomials. The bit at 2i + is used as the coefficient of xi. + + \param[in] register_length The number of significant low-order bits + to be used from \a Register values. It is the order of the modulo-2 + polynomial remainder and one less than the divisor's order. + \param[in,out] remainder The upper part of the dividend polynomial + before division, and the remainder polynomial after. + \param[in] new_dividend_bit The coefficient for the constant term + of the dividend polynomial. + \param[in] truncated_divisor The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + + \note This routine performs straight-forward modulo-2 polynomial + division. It assumes that an augment string will be processed at the + end of the message bits before doing CRC analysis. + \todo Use this function somewhere so I can test it. + */ + template < typename Register > + inline void augmented_crc_modulo_update( int register_length, Register + &remainder, bool new_dividend_bit, Register truncated_divisor ) + { + augmented_crc_modulo_word_update( register_length, remainder, + static_cast(new_dividend_bit), truncated_divisor, 1, false ); + } + + /** \brief A mix-in class that returns its argument + + This class template makes a function object that returns its argument + as-is. It's one case for #possible_reflector. + + \pre 0 \< \a BitLength \<= \c std\::numeric_limits\ + \::digits + + \tparam BitLength How many significant bits arguments have. + */ + template < int BitLength > + class non_reflector + { + public: + /** \brief The type to check for specialization + + This is a Boost integral constant indicating that this class + does not reflect its input values. + */ + typedef boost::false_type is_reflecting_type; + /** \brief The type to check for register bit length + + This is a Boost integral constant indicating how many + significant bits won't actually be reflected. + */ + typedef boost::integral_constant< int, BitLength > width_c; + /** \brief The type of (not-)reflected values + + This type is the input and output type for the (possible-) + reflection function, which does nothing here. + */ + typedef typename boost::uint_t< BitLength >::fast value_type; + + /** \brief Does nothing + + Returns the given value, not reflecting any part of it. + + \param x The value to not be reflected. + + \return \a x + */ + inline static value_type reflect_q( value_type x ) + { return x; } + }; + + /** \brief A mix-in class that reflects (the lower part of) its argument, + generally for types larger than a byte + + This class template makes a function object that returns its argument + after reflecting its lower-order bits. It's one sub-case for + #possible_reflector. + + \pre \c CHAR_BIT \< \a BitLength \<= \c std\::numeric_limits\\::digits + + \tparam BitLength How many significant bits arguments have. + */ + template < int BitLength > + class super_byte_reflector + { + public: + /** \brief The type to check for specialization + + This is a Boost integral constant indicating that this class + does reflect its input values. + */ + typedef boost::true_type is_reflecting_type; + /** \brief The type to check for register bit length + + This is a Boost integral constant indicating how many + significant bits will be reflected. + */ + typedef boost::integral_constant< int, BitLength > width_c; + /** \brief The type of reflected values + + This is both the input and output type for the reflection function. + */ + typedef typename boost::uint_t< BitLength >::fast value_type; + + /** \brief Reflect (part of) the given value + + Reverses the order of the given number of bits within a value, + using #reflect_unsigned. + + \param x The value to be (partially) reflected. + + \return ( x & + ~(2width_c\::value - 1) ) | REFLECT( + x & (2width_c\::value - + 1) ) + */ + inline static value_type reflect_q( value_type x ) + { return reflect_unsigned(x, width_c::value); } + }; + + /** \brief A mix-in class that reflects (the lower part of) its argument, + generally for bytes + + This class template makes a function object that returns its argument + after reflecting its lower-order bits. It's one sub-case for + #possible_reflector. + + \pre 0 \< \a BitLength \<= \c CHAR_BIT + + \tparam BitLength How many significant bits arguments have. + */ + template < int BitLength > + class sub_type_reflector + { + public: + /** \brief The type to check for specialization + + This is a Boost integral constant indicating that this class + does reflect its input values. + */ + typedef boost::true_type is_reflecting_type; + /** \brief The type to check for register bit length + + This is a Boost integral constant indicating how many + significant bits will be reflected. + */ + typedef boost::integral_constant< int, BitLength > width_c; + /** \brief The type of reflected values + + This is both the input and output type for the reflection function. + */ + typedef unsigned char value_type; + + /** \brief Reflect (part of) the given value + + Reverses the order of the given number of bits within a value, + using #reflect_sub_byte. + + \param x The value to be (partially) reflected. + + \return ( x & + ~(2width_c\::value - 1) ) | REFLECT( + x & (2width_c\::value - + 1) ) + */ + inline static value_type reflect_q( value_type x ) + { return reflect_sub_byte(x, width_c::value); } + }; + + /** \brief A mix-in class that reflects (the lower part of) its argument + + This class template makes a function object that returns its argument + after reflecting its lower-order bits. It's one case for + #possible_reflector. + + \pre 0 \< \a BitLength \<= \c std\::numeric_limits\ + \::digits + + \tparam BitLength How many significant bits arguments have. + */ + template < int BitLength > + class reflector + : public boost::conditional< (BitLength > CHAR_BIT), + super_byte_reflector, sub_type_reflector >::type + { }; + + /** This class template adds a member function #reflect_q that will + conditionally reflect its first argument, controlled by a compile-time + parameter. + + \pre 0 \< \a BitLength \<= \c std\::numeric_limits\ + \::digits + + \tparam BitLength How many significant bits arguments have. + \tparam DoIt \c true if #reflect_q will reflect, \c false if it should + return its argument unchanged. + \tparam Id An extra differentiator if multiple copies of this class + template are mixed-in as base classes. Defaults to 0 if omitted. + */ + template < int BitLength, bool DoIt, int Id > + class possible_reflector + : public boost::conditional< DoIt, reflector, + non_reflector >::type + { + public: + /** \brief The type to check for ID + + This is a Boost integral constant indicating what ID number this + instantiation used. + */ + typedef boost::integral_constant id_type; + }; + + /** \brief Find the composite remainder update effect from a fixed bit + sequence, for each potential sequence combination. + + For each value between 0 and 2SubOrder - 1, + computes the XOR mask corresponding to the composite effect they update + the incoming remainder, which is the upper part of the dividend that + gets (partially) pushed out of its register by the incoming value's + bits. The composite value merges the \"partial products\" from each bit + of the value being updated individually. + + \pre \a Register is a built-in unsigned integer type + \pre 0 \< \a SubOrder \<= \a register_length \<= + std\::numeric_limits\<\a Register\>\::digits + + \tparam SubOrder The number of low-order significant bits of the trial + new dividends. + \tparam Register The type used for representing the remainder and + divisor modulo-2 polynomials. The bit at 2i + is used as the coefficient of xi. + + \param[in] register_length The number of significant low-order bits + to be used from \a Register values. It is the order of the modulo-2 + polynomial remainder and one less than the divisor's order. + \param[in] truncated_divisor The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \param[in] reflect If \c false, read from the highest-order marked + bit from a new dividend's bits and go down, as normal. Otherwise, + proceed from the lowest-order bit and go up. + + \return An array such that the element at index i is the + composite effect XOR mask for value i. + + \note This routine performs a modulo-2 polynomial division variant. + The exclusive-or operations are applied in a different order, since + that kind of operation is commutative and associative. It also + assumes that the zero-valued augment string was applied before this + step, which means that the updated remainder can be directly used as + the final CRC. + \todo Check that using the unaugmented-CRC division routines give the + same composite mask table as using augmented-CRC routines. + */ + template < int SubOrder, typename Register > + boost::array< Register, (UINTMAX_C( 1 ) << SubOrder) > + make_partial_xor_products_table( int register_length, Register + truncated_divisor, bool reflect ) + { + boost::array result; + + // Loop over every possible dividend value + for ( typename boost::uint_t::fast dividend = 0u; + dividend < result.size() ; ++dividend ) + { + Register remainder = 0u; + + crc_modulo_word_update( register_length, remainder, dividend, + truncated_divisor, SubOrder, false ); + result[ reflect_optionally(dividend, reflect, SubOrder) ] = + reflect_optionally( remainder, reflect, register_length ); + } + return result; + } + + /** \brief A mix-in class for the table of table-driven CRC algorithms + + Encapsulates the parameters need to make a global (technically, + class-static) table usuable in CRC algorithms, and generates said + table. + + \pre 0 \< \a SubOrder \<= Order \<= + std\::numeric_limits\\::digits + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam SubOrder The number of low-order significant bits of the trial + new dividends. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \tparam Reflect If \c false, read from the highest-order marked + bit from a new dividend's bits and go down, as normal. Otherwise, + proceed from the lowest-order bit and go up. + */ + template < int Order, int SubOrder, boost::uintmax_t TruncatedPolynomial, + bool Reflect > + class crc_table_t + { + public: + /** \brief The type to check for register bit length + + This is a Boost integral constant indicating how many + significant bits are in the remainder and (truncated) divisor. + */ + typedef boost::integral_constant< int, Order > width_c; + /** \brief The type to check for index-unit bit length + + This is a Boost integral constant indicating how many + significant bits are in the trial new dividends. + */ + typedef boost::integral_constant< int, SubOrder > unit_width_c; + /** \brief The type of registers + + This is the output type for the partial-product map. + */ + typedef typename boost::uint_t< Order >::fast value_type; + /** \brief The type to check the divisor + + This is a Boost integral constant representing the (truncated) + divisor. + */ + typedef boost::integral_constant< value_type, TruncatedPolynomial > + poly_c; + /** \brief The type to check for reflection + + This is a Boost integral constant representing whether input + units should be read in reverse order. + */ + typedef boost::integral_constant< bool, Reflect > refin_c; + /** \brief The type to check for map size + + This is a Boost integral constant representing the number of + elements in the partial-product map, based on the unit size. + */ + typedef high_bit_mask_c< SubOrder > table_size_c; + /** \brief The type of the unit TO partial-product map + + This is the array type that takes units as the index and said unit's + composite partial-product mask as the element. + */ + typedef boost::array array_type; + /** \brief Create a global array for the mapping table + + Creates an instance of a partial-product array with this class's + parameters. + + \return A reference to a immutable array giving the partial-product + update XOR map for each potential sub-unit value. + */ + static array_type const & get_table() + { + static array_type const table = + make_partial_xor_products_table( + width_c::value, poly_c::value, refin_c::value ); + + return table; + } + }; + + /** \brief A mix-in class that handles direct (i.e. non-reflected) byte-fed + table-driven CRC algorithms + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes aren't + reflected before processing. + + \pre \c CHAR_BIT \<= \a Order \<= \c std\::numeric_limits\ + \::digits + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial > + class direct_byte_table_driven_crcs + : public crc_table_t + { + typedef crc_table_t + base_type; + + public: + typedef typename base_type::value_type value_type; + typedef typename base_type::array_type array_type; + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + augmented-CRC updates byte-wise. + + \param remainder The pre-update remainder + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated remainder + */ + static value_type augmented_crc_update( value_type remainder, unsigned + char const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Locates the merged partial product based on the leading byte + unsigned char const index = ( remainder >> (Order - CHAR_BIT) ) + & UCHAR_MAX; + + // Complete the multi-bit modulo-2 polynomial division + remainder <<= CHAR_BIT; + remainder |= *new_dividend_bytes++; + remainder ^= table.elems[ index ]; + } + + return remainder; + } + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + unaugmented-CRC updates byte-wise. + + \param remainder The pre-update remainder + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated remainder + */ + static value_type crc_update( value_type remainder, unsigned char + const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Locates the merged partial product based on comparing the + // leading and incoming bytes + unsigned char const index = ( (remainder >> ( Order - CHAR_BIT + )) & UCHAR_MAX ) ^ *new_dividend_bytes++; + + // Complete the multi-bit altered modulo-2 polynomial division + remainder <<= CHAR_BIT; + remainder ^= table.elems[ index ]; + } + + return remainder; + } + }; + + /** \brief A mix-in class that handles reflected byte-fed, table-driven CRC + algorithms + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes are + reflected before processing. + + \pre \c CHAR_BIT \<= \a Order \<= \c std\::numeric_limits\ + \::digits + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial > + class reflected_byte_table_driven_crcs + : public crc_table_t + { + typedef crc_table_t + base_type; + + public: + typedef typename base_type::value_type value_type; + typedef typename base_type::array_type array_type; + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + reflecting augmented-CRC updates byte-wise. + + \param remainder The pre-update remainder; since the bytes are + being reflected, this remainder also has to be reflected + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated, reflected remainder + */ + static value_type augmented_crc_update( value_type remainder, unsigned + char const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Locates the merged partial product based on the leading byte + // (which is at the low-order end for reflected remainders) + unsigned char const index = remainder & UCHAR_MAX; + + // Complete the multi-bit reflected modulo-2 polynomial division + remainder >>= CHAR_BIT; + remainder |= static_cast( *new_dividend_bytes++ ) + << ( Order - CHAR_BIT ); + remainder ^= table.elems[ index ]; + } + + return remainder; + } + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + reflected unaugmented-CRC updates byte-wise. + + \param remainder The pre-update remainder; since the bytes are + being reflected, this remainder also has to be reflected + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated, reflected remainder + */ + static value_type crc_update( value_type remainder, unsigned char + const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Locates the merged partial product based on comparing the + // leading and incoming bytes + unsigned char const index = ( remainder & UCHAR_MAX ) ^ + *new_dividend_bytes++; + + // Complete the multi-bit reflected altered modulo-2 polynomial + // division + remainder >>= CHAR_BIT; + remainder ^= table.elems[ index ]; + } + + return remainder; + } + }; + + /** \brief Mix-in class for byte-fed, table-driven CRC algorithms with + parameter values at least a byte in width + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes may be + reflected before processing, controlled by a compile-time parameter. + + \pre \c CHAR_BIT \<= \a Order \<= \c std\::numeric_limits\ + \::digits + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \tparam Reflect If \c false, read from the highest-order bit from a new + input byte and go down, as normal. Otherwise, proceed from the + lowest-order bit and go up. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial, bool Reflect > + class byte_table_driven_crcs + : public boost::conditional< Reflect, + reflected_byte_table_driven_crcs, + direct_byte_table_driven_crcs >::type + { }; + + /** \brief A mix-in class that handles direct (i.e. non-reflected) byte-fed + CRC algorithms for sub-byte parameters + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes aren't + reflected before processing. + + \pre 0 \< \a Order \< \c CHAR_BIT + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial > + class direct_sub_byte_crcs + : public crc_table_t + { + typedef crc_table_t + base_type; + + public: + typedef typename base_type::width_c width_c; + typedef typename base_type::value_type value_type; + typedef typename base_type::poly_c poly_c; + typedef typename base_type::array_type array_type; + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + augmented-CRC updates byte-wise. + + \param remainder The pre-update remainder + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated remainder + + \todo Use this function somewhere so I can test it. + */ + static value_type augmented_crc_update( value_type remainder, unsigned + char const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + //static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Without a table, process each byte explicitly + augmented_crc_modulo_word_update( width_c::value, remainder, + *new_dividend_bytes++, poly_c::value, CHAR_BIT, false ); + } + + return remainder; + } + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + unaugmented-CRC updates byte-wise. + + \param remainder The pre-update remainder + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated remainder + */ + static value_type crc_update( value_type remainder, unsigned char + const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + //static array_type const & table = base_type::get_table(); + + while ( new_dividend_byte_count-- ) + { + // Without a table, process each byte explicitly + crc_modulo_word_update( width_c::value, remainder, + *new_dividend_bytes++, poly_c::value, CHAR_BIT, false ); + } + + return remainder; + } + }; + + /** \brief A mix-in class that handles reflected byte-fed, CRC algorithms + for sub-byte parameters + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes are + reflected before processing. + + \pre 0 \< \a Order \< \c CHAR_BIT + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial > + class reflected_sub_byte_crcs + : public crc_table_t + { + typedef crc_table_t + base_type; + + public: + typedef typename base_type::width_c width_c; + typedef typename base_type::value_type value_type; + typedef typename base_type::poly_c poly_c; + typedef typename base_type::array_type array_type; + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + reflecting augmented-CRC updates byte-wise. + + \param remainder The pre-update remainder; since the bytes are + being reflected, this remainder also has to be reflected + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated, reflected remainder + + \todo Use this function somewhere so I can test it. + */ + static value_type augmented_crc_update( value_type remainder, unsigned + char const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + //static array_type const & table = base_type::get_table(); + + remainder = reflect_sub_byte( remainder, width_c::value ); + while ( new_dividend_byte_count-- ) + { + // Without a table, process each byte explicitly + augmented_crc_modulo_word_update( width_c::value, remainder, + *new_dividend_bytes++, poly_c::value, CHAR_BIT, true ); + } + remainder = reflect_sub_byte( remainder, width_c::value ); + + return remainder; + } + + /** \brief Compute the updated remainder after reading some bytes + + The implementation reads from a table to speed-up applying + reflected unaugmented-CRC updates byte-wise. + + \param remainder The pre-update remainder; since the bytes are + being reflected, this remainder also has to be reflected + \param new_dividend_bytes The address where the new bytes start + \param new_dividend_byte_count The number of new bytes to read + + \return The updated, reflected remainder + */ + static value_type crc_update( value_type remainder, unsigned char + const *new_dividend_bytes, std::size_t new_dividend_byte_count) + { + //static array_type const & table = base_type::get_table(); + + remainder = reflect_sub_byte( remainder, width_c::value ); + while ( new_dividend_byte_count-- ) + { + // Without a table, process each byte explicitly + crc_modulo_word_update( width_c::value, remainder, + *new_dividend_bytes++, poly_c::value, CHAR_BIT, true ); + } + remainder = reflect_sub_byte( remainder, width_c::value ); + + return remainder; + } + }; + + /** \brief Mix-in class for byte-fed, table-driven CRC algorithms with + sub-byte parameters + + This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes may be + reflected before processing, controlled by a compile-time parameter. + + \pre 0 \< \a Order \< \c CHAR_BIT + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \tparam Reflect If \c false, read from the highest-order bit from a new + input byte and go down, as normal. Otherwise, proceed from the + lowest-order bit and go up. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial, bool Reflect > + class sub_byte_crcs + : public boost::conditional< Reflect, + reflected_sub_byte_crcs, + direct_sub_byte_crcs >::type + { }; + + /** This class template adds member functions #augmented_crc_update and + #crc_update to update remainders from new input bytes. The bytes may be + reflected before processing, controlled by a compile-time parameter. + + \pre 0 \< \a Order \<= \c std\::numeric_limits\\::digits + + \tparam Order The order of the modulo-2 polynomial remainder and one + less than the divisor's order. + \tparam TruncatedPolynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always + assumed to be 1. + \tparam Reflect If \c false, read from the highest-order bit from a new + input byte and go down, as normal. Otherwise, proceed from the + lowest-order bit and go up. + \tparam Id An extra differentiator if multiple copies of this class + template are mixed-in as base classes. Defaults to 0 if omitted. + */ + template < int Order, boost::uintmax_t TruncatedPolynomial, bool Reflect, + int Id > + class crc_driver + : public boost::conditional< (Order < CHAR_BIT), sub_byte_crcs, byte_table_driven_crcs >::type + { + public: + /** \brief The type to check for ID + + This is a Boost integral constant indicating what ID number this + instantiation used. + */ + typedef boost::integral_constant id_type; + }; + + +} // namespace detail +//! \endcond + + +// Simple CRC class function definitions -----------------------------------// + +/** Constructs a \c crc_basic object with at least the required parameters to a + particular CRC formula to be processed upon receiving input. + + \param[in] truncated_polynomial The lowest coefficients of the divisor + polynomial. The highest-order coefficient is omitted and always assumed + to be 1. (\e Poly from the RMCA) + \param[in] initial_remainder The (unaugmented) initial state of the + polynomial remainder. Defaults to \c 0 if omitted. (\e Init from the + RMCA) + \param[in] final_xor_value The (XOR) bit-mask to be applied to the output + remainder, after possible reflection but before returning. Defaults to + \c 0 (i.e. no bit changes) if omitted. (\e XorOut from the RMCA) + \param[in] reflect_input If \c true, input bytes are read lowest-order bit + first, otherwise highest-order bit first. Defaults to \c false if + omitted. (\e RefIn from the RMCA) + \param[in] reflect_remainder If \c true, the output remainder is reflected + before the XOR-mask. Defaults to \c false if omitted. (\e RefOut from + the RMCA) + + \post truncated_polynomial == + this->get_truncated_polynominal() + \post initial_remainder == + this->get_initial_remainder() + \post final_xor_value == + this->get_final_xor_value() + \post reflect_input == + this->get_reflect_input() + \post reflect_remainder == + this->get_reflect_remainder() + \post initial_remainder == + this->get_interim_remainder() + \post (reflect_remainder ? + REFLECT(initial_remainder) : initial_remainder) ^ + final_xor_value == this->checksum() + */ +template < std::size_t Bits > +inline +crc_basic::crc_basic +( + value_type truncated_polynomial, + value_type initial_remainder, // = 0 + value_type final_xor_value, // = 0 + bool reflect_input, // = false + bool reflect_remainder // = false +) + : rem_( initial_remainder ), poly_( truncated_polynomial ) + , init_( initial_remainder ), final_( final_xor_value ) + , rft_in_( reflect_input ), rft_out_( reflect_remainder ) +{ +} + +/** Returns a representation of the polynomial divisor. The value of the + 2i bit is the value of the coefficient of the polynomial's + xi term. The omitted bit for x(#bit_count) term is + always 1. + + \return The bit-packed list of coefficients. If the bit-length of + #value_type exceeds #bit_count, the values of higher-placed bits should be + ignored (even any for x(#bit_count)) since they're unregulated. + */ +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_truncated_polynominal +( +) const +{ + return poly_; +} + +/** Returns a representation of the polynomial remainder before any input has + been submitted. The value of the 2i bit is the value of the + coefficient of the polynomial's xi term. + + \return The bit-packed list of coefficients. If the bit-length of + #value_type exceeds #bit_count, the values of higher-placed bits should be + ignored since they're unregulated. + */ +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_initial_remainder +( +) const +{ + return init_; +} + +/** Returns the mask to be used during creation of a checksum. The mask is used + for an exclusive-or (XOR) operation applied bit-wise to the interim + remainder representation (after any reflection, if #get_reflect_remainder() + returns \c true). + + \return The bit-mask. If the bit-length of #value_type exceeds #bit_count, + the values of higher-placed bits should be ignored since they're + unregulated. + */ +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_final_xor_value +( +) const +{ + return final_; +} + +/** Returns a whether or not a submitted byte will be \"reflected\" before it is + used to update the interim remainder. Only the byte-wise operations + #process_byte, #process_block, and #process_bytes are affected. + + \retval true Input bytes will be read starting from the lowest-order bit. + \retval false Input bytes will be read starting from the highest-order bit. + */ +template < std::size_t Bits > +inline +bool +crc_basic::get_reflect_input +( +) const +{ + return rft_in_; +} + +/** Indicates if the interim remainder will be \"reflected\" before it is passed + to the XOR-mask stage when returning a checksum. + + \retval true The interim remainder is reflected before further work. + \retval false The interim remainder is applied to the XOR-mask as-is. + */ +template < std::size_t Bits > +inline +bool +crc_basic::get_reflect_remainder +( +) const +{ + return rft_out_; +} + +/** Returns a representation of the polynomial remainder after all the input + submissions since construction or the last #reset call. The value of the + 2i bit is the value of the coefficient of the polynomial's + xi term. If CRC processing gets interrupted here, retain the + value returned, and use it to start up the next CRC computer where you left + off (with #reset(value_type) or construction). The next computer has to + have its other parameters compatible with this computer. + + \return The bit-packed list of coefficients. If the bit-length of + #value_type exceeds #bit_count, the values of higher-placed bits should be + ignored since they're unregulated. No output processing (reflection or + XOR mask) has been applied to the value. + */ +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::get_interim_remainder +( +) const +{ + return rem_ & detail::low_bits_mask_c::value; +} + +/** Changes the interim polynomial remainder to \a new_rem, purging any + influence previously submitted input has had. The value of the + 2i bit is the value of the coefficient of the polynomial's + xi term. + + \param[in] new_rem The (unaugmented) state of the polynomial remainder + starting from this point, with no output processing applied. + + \post new_rem == this->get_interim_remainder() + \post ((this->get_reflect_remainder() ? + REFLECT(new_rem) : new_rem) ^ + this->get_final_xor_value()) == this->checksum() + */ +template < std::size_t Bits > +inline +void +crc_basic::reset +( + value_type new_rem +) +{ + rem_ = new_rem; +} + +/** Changes the interim polynomial remainder to the initial remainder given + during construction, purging any influence previously submitted input has + had. The value of the 2i bit is the value of the coefficient of + the polynomial's xi term. + + \post this->get_initial_remainder() == + this->get_interim_remainder() + \post ((this->get_reflect_remainder() ? + REFLECT(this->get_initial_remainder()) : + this->get_initial_remainder()) ^ this->get_final_xor_value()) + == this->checksum() + */ +template < std::size_t Bits > +inline +void +crc_basic::reset +( +) +{ + this->reset( this->get_initial_remainder() ); +} + +/** Updates the interim remainder with a single altered-CRC-division step. + + \param[in] bit The new input bit. + + \post The interim remainder is updated though a modulo-2 polynomial + division, where the division steps are altered for unaugmented CRCs. + */ +template < std::size_t Bits > +inline +void +crc_basic::process_bit +( + bool bit +) +{ + detail::crc_modulo_update( bit_count, rem_, bit, poly_ ); +} + +/** Updates the interim remainder with several altered-CRC-division steps. Each + bit is processed separately, starting from the one at the + 2bit_length - 1 place, then proceeding down to the + lowest-placed bit. Any order imposed by + this->get_reflect_input() is ignored. + + \pre 0 \< \a bit_length \<= \c CHAR_BIT + + \param[in] bits The byte containing the new input bits. + \param[in] bit_length The number of bits in the byte to be read. + + \post The interim remainder is updated though \a bit_length modulo-2 + polynomial divisions, where the division steps are altered for unaugmented + CRCs. + */ +template < std::size_t Bits > +void +crc_basic::process_bits +( + unsigned char bits, + std::size_t bit_length +) +{ + // ignore the bits above the ones we want + bits <<= CHAR_BIT - bit_length; + + // compute the CRC for each bit, starting with the upper ones + unsigned char const high_bit_mask = 1u << ( CHAR_BIT - 1u ); + for ( std::size_t i = bit_length ; i > 0u ; --i, bits <<= 1u ) + { + process_bit( static_cast(bits & high_bit_mask) ); + } +} + +/** Updates the interim remainder with a byte's worth of altered-CRC-division + steps. The bits within the byte are processed from the highest place down + if this->get_reflect_input() is \c false, and lowest place + up otherwise. + + \param[in] byte The new input byte. + + \post The interim remainder is updated though \c CHAR_BIT modulo-2 + polynomial divisions, where the division steps are altered for unaugmented + CRCs. + */ +template < std::size_t Bits > +inline +void +crc_basic::process_byte +( + unsigned char byte +) +{ + process_bits( (rft_in_ ? detail::reflect_byte( byte ) : byte), CHAR_BIT ); +} + +/** Updates the interim remainder with several bytes' worth of + altered-CRC-division steps. The bits within each byte are processed from + the highest place down if this->get_reflect_input() is + \c false, and lowest place up otherwise. The bytes themselves are processed + starting from the one pointed by \a bytes_begin until \a bytes_end is + reached through forward iteration, treating the two pointers as if they + point to unsigned char objects. + + \pre \a bytes_end has to equal \a bytes_begin if the latter is \c NULL or + otherwise doesn't point to a valid buffer. + \pre \a bytes_end, if not equal to \a bytes_begin, has to point within or + one-byte-past the same buffer \a bytes_begin points into. + \pre \a bytes_end has to be reachable from \a bytes_begin through a finite + number of forward byte-pointer increments. + + \param[in] bytes_begin The address where the memory block begins. + \param[in] bytes_end Points to one-byte past the address of the memory + block's last byte, or \a bytes_begin if no bytes are to be read. + + \post The interim remainder is updated though CHAR_BIT * (((unsigned + char const *) bytes_end) - ((unsigned char const *) bytes_begin)) + modulo-2 polynomial divisions, where the division steps are altered for + unaugmented CRCs. + */ +template < std::size_t Bits > +void +crc_basic::process_block +( + void const * bytes_begin, + void const * bytes_end +) +{ + for ( unsigned char const * p + = static_cast(bytes_begin) ; p < bytes_end ; ++p ) + { + process_byte( *p ); + } +} + +/** Updates the interim remainder with several bytes' worth of + altered-CRC-division steps. The bits within each byte are processed from + the highest place down if this->get_reflect_input() is + \c false, and lowest place up otherwise. The bytes themselves are processed + starting from the one pointed by \a buffer, forward-iterated (as if the + pointed-to objects were of unsigned char) until \a byte_count + bytes are read. + + \pre \a byte_count has to equal 0 if \a buffer is \c NULL or otherwise + doesn't point to valid memory. + \pre If \a buffer points within valid memory, then that block has to have + at least \a byte_count more valid bytes allocated from that point. + + \param[in] buffer The address where the memory block begins. + \param[in] byte_count The number of bytes in the memory block. + + \post The interim remainder is updated though CHAR_BIT * + byte_count modulo-2 polynomial divisions, where the + division steps are altered for unaugmented CRCs. + */ +template < std::size_t Bits > +inline +void +crc_basic::process_bytes +( + void const * buffer, + std::size_t byte_count +) +{ + unsigned char const * const b = static_cast( + buffer ); + + process_block( b, b + byte_count ); +} + +/** Computes the checksum of all the submitted bits since construction or the + last call to #reset. The checksum will be the raw checksum, i.e. the + (interim) remainder after all the modulo-2 polynomial division, plus any + output processing. + + \return (this->get_reflect_remainder() ? + REFLECT(this->get_interim_remainder()) : + this->get_interim_remainder()) ^ this->get_final_xor_value() + + \note Since checksums are meant to be compared, any higher-placed bits + (when the bit-length of #value_type exceeds #bit_count) will be set to 0. + */ +template < std::size_t Bits > +inline +typename crc_basic::value_type +crc_basic::checksum +( +) const +{ + return ( (rft_out_ ? detail::reflect_unsigned( rem_, bit_count ) : + rem_) ^ final_ ) & detail::low_bits_mask_c::value; +} + + +// Optimized CRC class function definitions --------------------------------// + +// Macro to compact code +#define BOOST_CRC_OPTIMAL_NAME crc_optimal + +/** Constructs a \c crc_optimal object with a particular CRC formula to be + processed upon receiving input. The initial remainder may be overridden. + + \param[in] init_rem The (unaugmented) initial state of the polynomial + remainder. Defaults to #initial_remainder if omitted. + + \post #truncated_polynominal == + this->get_truncated_polynominal() + \post #initial_remainder == this->get_initial_remainder() + \post #final_xor_value == this->get_final_xor_value() + \post #reflect_input == this->get_reflect_input() + \post #reflect_remainder == this->get_reflect_remainder() + \post init_rem == this->get_interim_remainder() + \post (#reflect_remainder ? REFLECT(init_rem) : + init_rem) ^ #final_xor_value == this->checksum() + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +BOOST_CRC_OPTIMAL_NAME::crc_optimal +( + value_type init_rem // = initial_remainder +) + : rem_( reflect_i_type::reflect_q(init_rem) ) +{ +} + +//! \copydetails boost::crc_basic::get_truncated_polynominal +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_truncated_polynominal +( +) const +{ + return truncated_polynominal; +} + +//! \copydetails boost::crc_basic::get_initial_remainder +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_initial_remainder +( +) const +{ + return initial_remainder; +} + +//! \copydetails boost::crc_basic::get_final_xor_value +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_final_xor_value +( +) const +{ + return final_xor_value; +} + +//! \copydetails boost::crc_basic::get_reflect_input +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +bool +BOOST_CRC_OPTIMAL_NAME::get_reflect_input +( +) const +{ + return reflect_input; +} + +//! \copydetails boost::crc_basic::get_reflect_remainder +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +bool +BOOST_CRC_OPTIMAL_NAME::get_reflect_remainder +( +) const +{ + return reflect_remainder; +} + +//! \copydetails boost::crc_basic::get_interim_remainder +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::get_interim_remainder +( +) const +{ + // Interim remainder should be _un_-reflected, so we have to undo it. + return reflect_i_type::reflect_q( rem_ ) & + detail::low_bits_mask_c::value; +} + +/** Changes the interim polynomial remainder to \a new_rem, purging any + influence previously submitted input has had. The value of the + 2i bit is the value of the coefficient of the polynomial's + xi term. + + \param[in] new_rem The (unaugmented) state of the polynomial remainder + starting from this point, with no output processing applied. Defaults to + this->get_initial_remainder() if omitted. + + \post new_rem == this->get_interim_remainder() + \post ((this->get_reflect_remainder() ? + REFLECT(new_rem) : new_rem) ^ + this->get_final_xor_value()) == this->checksum() + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::reset +( + value_type new_rem // = initial_remainder +) +{ + rem_ = reflect_i_type::reflect_q( new_rem ); +} + +/** \copydetails boost::crc_basic::process_byte + + \note Any modulo-2 polynomial divisions may use a table of pre-computed + remainder changes (as XOR masks) to speed computation when reading data + byte-wise. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::process_byte +( + unsigned char byte +) +{ + process_bytes( &byte, sizeof(byte) ); +} + +/** \copydetails boost::crc_basic::process_block + + \note Any modulo-2 polynomial divisions may use a table of pre-computed + remainder changes (as XOR masks) to speed computation when reading data + byte-wise. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::process_block +( + void const * bytes_begin, + void const * bytes_end +) +{ + process_bytes( bytes_begin, static_cast(bytes_end) - + static_cast(bytes_begin) ); +} + +/** \copydetails boost::crc_basic::process_bytes + + \note Any modulo-2 polynomial divisions may use a table of pre-computed + remainder changes (as XOR masks) to speed computation when reading data + byte-wise. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::process_bytes +( + void const * buffer, + std::size_t byte_count +) +{ + rem_ = crc_table_type::crc_update( rem_, static_cast(buffer), byte_count ); +} + +//! \copydetails boost::crc_basic::checksum +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::checksum +( +) const +{ + return ( reflect_o_type::reflect_q(rem_) ^ get_final_xor_value() ) + & detail::low_bits_mask_c::value; +} + +/** Updates the interim remainder with a byte's worth of altered-CRC-division + steps. The bits within the byte are processed from the highest place down + if this->get_reflect_input() is \c false, and lowest place + up otherwise. This function is meant to present a function-object interface + to code that wants to process a stream of bytes with + std::for_each or similar range-processing algorithms. Since + some of these algorithms takes their function object by value, make sure to + copy back the result to this object so the updates can be remembered. + + \param[in] byte The new input byte. + + \post The interim remainder is updated though \c CHAR_BIT modulo-2 + polynomial divisions, where the division steps are altered for unaugmented + CRCs. + + \note Any modulo-2 polynomial divisions may use a table of pre-computed + remainder changes (as XOR masks) to speed computation when reading data + byte-wise. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +void +BOOST_CRC_OPTIMAL_NAME::operator () +( + unsigned char byte +) +{ + process_byte( byte ); +} + +/** Computes the checksum of all the submitted bits since construction or the + last call to #reset. The checksum will be the raw checksum, i.e. the + (interim) remainder after all the modulo-2 polynomial division, plus any + output processing. This function is meant to present a function-object + interface to code that wants to receive data like + std::generate_n or similar data-processing algorithms. Note + that if this object is used as a generator multiple times without an + intervening mutating operation, the same value will always be returned. + + \return (this->get_reflect_remainder() ? + REFLECT(this->get_interim_remainder()) : + this->get_interim_remainder()) ^ this->get_final_xor_value() + + \note Since checksums are meant to be compared, any higher-placed bits + (when the bit-length of #value_type exceeds #bit_count) will be set to 0. + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename BOOST_CRC_OPTIMAL_NAME::value_type +BOOST_CRC_OPTIMAL_NAME::operator () +( +) const +{ + return checksum(); +} + + +// CRC computation function definition -------------------------------------// + +/** Computes the polynomial remainder of a CRC run, assuming that \a buffer and + \a byte_count describe a memory block representing the polynomial dividend. + The division steps are altered so the result directly gives a checksum, + without need to augment the memory block with scratch-space bytes. The + first byte is considered the highest order, going down for subsequent bytes. + + \pre 0 \< \a Bits \<= \c std\::numeric_limits\\::digits + + \tparam Bits The order of the modulo-2 polynomial divisor. (\e Width from + the RMCA) + \tparam TruncPoly The lowest coefficients of the divisor polynomial. The + highest-order coefficient is omitted and always assumed to be 1. + (\e Poly from the RMCA) + \tparam InitRem The (unaugmented) initial state of the polynomial + remainder. (\e Init from the RMCA) + \tparam FinalXor The (XOR) bit-mask to be applied to the output remainder, + after possible reflection but before returning. (\e XorOut from the RMCA) + \tparam ReflectIn If \c True, input bytes are read lowest-order bit first, + otherwise highest-order bit first. (\e RefIn from the RMCA) + \tparam ReflectRem If \c True, the output remainder is reflected before the + XOR-mask. (\e RefOut from the RMCA) + + \param[in] buffer The address where the memory block begins. + \param[in] byte_count The number of bytes in the memory block. + + \return The checksum, which is the last (interim) remainder plus any output + processing. + + \note Unaugmented-style CRC runs perform modulo-2 polynomial division in + an altered order. The trailing \a Bits number of zero-valued bits needed + to extracted an (unprocessed) checksum is virtually moved to near the + beginning of the message. This is OK since the XOR operation is + commutative and associative. It also means that you can get a checksum + anytime. Since data is being read byte-wise, a table of pre-computed + remainder changes (as XOR masks) can be used to speed computation. + + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, + BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, + bool ReflectIn, bool ReflectRem > +inline +typename uint_t::fast +crc +( + void const * buffer, + std::size_t byte_count +) +{ + BOOST_CRC_OPTIMAL_NAME computer; + computer.process_bytes( buffer, byte_count ); + return computer.checksum(); +} + + +// Augmented-message CRC computation function definition -------------------// + +/** Computes the polynomial remainder of a CRC run, assuming that \a buffer and + \a byte_count describe a memory block representing the polynomial dividend. + The first byte is considered the highest order, going down for subsequent + bytes. Within a byte, the highest-order bit is read first (corresponding to + \e RefIn = \c False in the RMCA). Check the other parts of this function's + documentation to see how a checksum can be gained and/or used. + + \pre 0 \< \a Bits \<= \c std\::numeric_limit\\::digits + + \tparam Bits The order of the modulo-2 polynomial divisor. (\e Width from + the RMCA) + \tparam TruncPoly The lowest coefficients of the divisor polynomial. The + highest-order coefficient is omitted and always assumed to be 1. + (\e Poly from the RMCA) + + \param[in] buffer The address where the memory block begins. + \param[in] byte_count The number of bytes in the memory block. + \param[in] initial_remainder The initial state of the polynomial + remainder, defaulting to zero if omitted. If you are reading a memory + block in multiple runs, put the return value of the previous run here. + (Note that initial-remainders given by RMCA parameter lists, as + \e Init, assume that the initial remainder is in its \b unaugmented state, + so you would need to convert the value to make it suitable for this + function. I currently don't provide a conversion routine.) + + \return The interim remainder, if no augmentation is used. A special value + if augmentation is used (see the notes). No output processing is done on + the value. (In RMCA terms, \e RefOut is \c False and \e XorOut is \c 0.) + + \note Augmented-style CRC runs use straight-up modulo-2 polynomial + division. Since data is being read byte-wise, a table of pre-computed + remainder changes (as XOR masks) can be used to speed computation. + \note Reading just a memory block will yield an interim remainder, and not + the final checksum. To get that checksum, allocate \a Bits / \c CHAR_BIT + bytes directly after the block and fill them with zero values, then extend + \a byte_count to include those extra bytes. A data block is corrupt if + the return value doesn't equal your separately given checksum. + \note Another way to perform a check is use the zero-byte extension method, + but replace the zero values with your separately-given checksum. The + checksum must be loaded in big-endian order. Here corruption, in either + the data block or the given checksum, is confirmed if the return value is + not zero. + \note The two checksum techniques assume the CRC-run is performed bit-wise, + while this function works byte-wise. That means that the techniques can + be used only if \c CHAR_BIT divides \a Bits evenly! + */ +template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > +typename uint_t::fast +augmented_crc +( + void const * buffer, + std::size_t byte_count, + typename uint_t::fast initial_remainder // = 0u +) +{ + return detail::low_bits_mask_c::value & + detail::byte_table_driven_crcs:: + augmented_crc_update( initial_remainder, static_cast(buffer), byte_count ); +} + + +} // namespace boost + + +// Undo header-private macros +#undef BOOST_CRC_OPTIMAL_NAME +#undef BOOST_CRC_PARM_TYPE + + +#endif // BOOST_CRC_HPP + diff --git a/Slang/boost/cregex.hpp b/Slang/boost/cregex.hpp new file mode 100644 index 0000000..78012dd --- /dev/null +++ b/Slang/boost/cregex.hpp @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for most recent version. + * FILE cregex.cpp + * VERSION see + * DESCRIPTION: Declares POSIX API functions + * + boost::RegEx high level wrapper. + */ + +#ifndef BOOST_RE_CREGEX_HPP +#define BOOST_RE_CREGEX_HPP + +#ifndef BOOST_REGEX_CONFIG_HPP +#include +#endif + +#ifdef BOOST_REGEX_CXX03 +#include +#else +#include +#endif + +#endif /* include guard */ + + + + + + + + + + diff --git a/Slang/boost/cstdfloat.hpp b/Slang/boost/cstdfloat.hpp new file mode 100644 index 0000000..2814bb0 --- /dev/null +++ b/Slang/boost/cstdfloat.hpp @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright Christopher Kormanyos 2014. +// Copyright John Maddock 2014. +// Copyright Paul Bristow 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) +// + +// implements floating-point typedefs having +// specified widths, as described in N3626 (proposed for C++14). +// See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf + +#ifndef BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_ + #define BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_ + + // Include the floating-point type definitions. + #include + + // Support a specialization of std::numeric_limits<> for the wrapped quadmath library (if available). + #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS) + #include + #endif + + // Support functions for the wrapped quadmath library (if available). + #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH) + #include + #endif + + // Support I/O stream operations for the wrapped quadmath library (if available). + #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM) + #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH) + #error You can not use with BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH defined. + #endif + #include + #endif + + // Support a specialization of std::complex<> for the wrapped quadmath library (if available). + #if !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_COMPLEX) + #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS) + #error You can not use with BOOST_CSTDFLOAT_NO_LIBQUADMATH_LIMITS defined. + #endif + #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH) + #error You can not use with BOOST_CSTDFLOAT_NO_LIBQUADMATH_CMATH defined. + #endif + #if defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM) + #error You can not use with BOOST_CSTDFLOAT_NO_LIBQUADMATH_IOSTREAM defined. + #endif + #include + #endif + + + // Undefine BOOST_NO_FLOAT128_T because this constant is not meant for public use. + #if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) + #undef BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T + #endif + +#endif // BOOST_MATH_CSTDFLOAT_2014_01_09_HPP_ diff --git a/Slang/boost/cstdint.hpp b/Slang/boost/cstdint.hpp new file mode 100644 index 0000000..967aacf --- /dev/null +++ b/Slang/boost/cstdint.hpp @@ -0,0 +1,556 @@ +// boost cstdint.hpp header file ------------------------------------------// + +// (C) Copyright Beman Dawes 1999. +// (C) Copyright Jens Mauer 2001 +// (C) Copyright John Maddock 2001 +// Distributed under the 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/integer for documentation. + +// Revision History +// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) +// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) +// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) +// 12 Nov 00 Merged (Jens Maurer) +// 23 Sep 00 Added INTXX_C macro support (John Maddock). +// 22 Sep 00 Better 64-bit support (John Maddock) +// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost +// 8 Aug 99 Initial version (Beman Dawes) + + +#ifndef BOOST_CSTDINT_HPP +#define BOOST_CSTDINT_HPP + +// +// Since we always define the INT#_C macros as per C++0x, +// define __STDC_CONSTANT_MACROS so that does the right +// thing if possible, and so that the user knows that the macros +// are actually defined as per C99. +// +#ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS +#endif + +#include +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// See also https://github.com/boostorg/config/issues/190 +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +// +// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not +// depending upon what headers happen to have been included first... +// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. +// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 +// +#if defined(BOOST_HAS_STDINT_H) \ + && (!defined(__GLIBC__) \ + || defined(__GLIBC_HAVE_LONG_LONG) \ + || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) + +// The following #include is an implementation artifact; not part of interface. +# ifdef __hpux +// HP-UX has a vaguely nice in a non-standard location +# include +# ifdef __STDC_32_MODE__ + // this is triggered with GCC, because it defines __cplusplus < 199707L +# define BOOST_NO_INT64_T +# endif +# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) +# include +# else +# include + +// There is a bug in Cygwin two _C macros +# if defined(INTMAX_C) && defined(__CYGWIN__) +# undef INTMAX_C +# undef UINTMAX_C +# define INTMAX_C(c) c##LL +# define UINTMAX_C(c) c##ULL +# endif + +# endif + +#if defined(__QNX__) && defined(__EXT_QNX) + +// QNX (Dinkumware stdlib) defines these as non-standard names. +// Reflect to the standard names. + +typedef ::intleast8_t int_least8_t; +typedef ::intfast8_t int_fast8_t; +typedef ::uintleast8_t uint_least8_t; +typedef ::uintfast8_t uint_fast8_t; + +typedef ::intleast16_t int_least16_t; +typedef ::intfast16_t int_fast16_t; +typedef ::uintleast16_t uint_least16_t; +typedef ::uintfast16_t uint_fast16_t; + +typedef ::intleast32_t int_least32_t; +typedef ::intfast32_t int_fast32_t; +typedef ::uintleast32_t uint_least32_t; +typedef ::uintfast32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + +typedef ::intleast64_t int_least64_t; +typedef ::intfast64_t int_fast64_t; +typedef ::uintleast64_t uint_least64_t; +typedef ::uintfast64_t uint_fast64_t; + +# endif + +#endif + +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + +# endif + + using ::intmax_t; + using ::uintmax_t; + +} // namespace boost + +#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) +// FreeBSD and Tru64 have an that contains much of what we need. +# include + +namespace boost { + + using ::int8_t; + typedef int8_t int_least8_t; + typedef int8_t int_fast8_t; + using ::uint8_t; + typedef uint8_t uint_least8_t; + typedef uint8_t uint_fast8_t; + + using ::int16_t; + typedef int16_t int_least16_t; + typedef int16_t int_fast16_t; + using ::uint16_t; + typedef uint16_t uint_least16_t; + typedef uint16_t uint_fast16_t; + + using ::int32_t; + typedef int32_t int_least32_t; + typedef int32_t int_fast32_t; + using ::uint32_t; + typedef uint32_t uint_least32_t; + typedef uint32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + typedef int64_t int_least64_t; + typedef int64_t int_fast64_t; + using ::uint64_t; + typedef uint64_t uint_least64_t; + typedef uint64_t uint_fast64_t; + + typedef int64_t intmax_t; + typedef uint64_t uintmax_t; + +# else + + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; + +# endif + +} // namespace boost + +#else // BOOST_HAS_STDINT_H + +# include // implementation artifact; not part of interface +# include // needed for limits macros + + +namespace boost +{ + +// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit +// platforms. For other systems, they will have to be hand tailored. +// +// Because the fast types are assumed to be the same as the undecorated types, +// it may be possible to hand tailor a more efficient implementation. Such +// an optimization may be illusionary; on the Intel x86-family 386 on, for +// example, byte arithmetic and load/stores are as fast as "int" sized ones. + +// 8-bit types ------------------------------------------------------------// + +# if UCHAR_MAX == 0xff + typedef signed char int8_t; + typedef signed char int_least8_t; + typedef signed char int_fast8_t; + typedef unsigned char uint8_t; + typedef unsigned char uint_least8_t; + typedef unsigned char uint_fast8_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 16-bit types -----------------------------------------------------------// + +# if USHRT_MAX == 0xffff +# if defined(__crayx1) + // The Cray X1 has a 16-bit short, however it is not recommend + // for use in performance critical code. + typedef short int16_t; + typedef short int_least16_t; + typedef int int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned int uint_fast16_t; +# else + typedef short int16_t; + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# endif +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) + // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + // MTA / XMT does support the following non-standard integer types + typedef __short16 int16_t; + typedef __short16 int_least16_t; + typedef __short16 int_fast16_t; + typedef unsigned __short16 uint16_t; + typedef unsigned __short16 uint_least16_t; + typedef unsigned __short16 uint_fast16_t; +# elif (USHRT_MAX == 0xffffffff) && defined(CRAY) + // no 16-bit types on Cray: + typedef short int_least16_t; + typedef short int_fast16_t; + typedef unsigned short uint_least16_t; + typedef unsigned short uint_fast16_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 32-bit types -----------------------------------------------------------// + +# if UINT_MAX == 0xffffffff + typedef int int32_t; + typedef int int_least32_t; + typedef int int_fast32_t; + typedef unsigned int uint32_t; + typedef unsigned int uint_least32_t; + typedef unsigned int uint_fast32_t; +# elif (USHRT_MAX == 0xffffffff) + typedef short int32_t; + typedef short int_least32_t; + typedef short int_fast32_t; + typedef unsigned short uint32_t; + typedef unsigned short uint_least32_t; + typedef unsigned short uint_fast32_t; +# elif ULONG_MAX == 0xffffffff + typedef long int32_t; + typedef long int_least32_t; + typedef long int_fast32_t; + typedef unsigned long uint32_t; + typedef unsigned long uint_least32_t; + typedef unsigned long uint_fast32_t; +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) + // Integers are 64 bits on the MTA / XMT + typedef __int32 int32_t; + typedef __int32 int_least32_t; + typedef __int32 int_fast32_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int32 uint_least32_t; + typedef unsigned __int32 uint_fast32_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// + +# if defined(BOOST_HAS_LONG_LONG) && \ + !defined(BOOST_MSVC) && !defined(BOOST_BORLANDC) && \ + (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) + // 2**64 - 1 +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + + typedef ::boost::long_long_type intmax_t; + typedef ::boost::ulong_long_type uintmax_t; + typedef ::boost::long_long_type int64_t; + typedef ::boost::long_long_type int_least64_t; + typedef ::boost::long_long_type int_fast64_t; + typedef ::boost::ulong_long_type uint64_t; + typedef ::boost::ulong_long_type uint_least64_t; + typedef ::boost::ulong_long_type uint_fast64_t; + +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 + typedef long intmax_t; + typedef unsigned long uintmax_t; + typedef long int64_t; + typedef long int_least64_t; + typedef long int_fast64_t; + typedef unsigned long uint64_t; + typedef unsigned long uint_least64_t; + typedef unsigned long uint_fast64_t; +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) + __extension__ typedef long long intmax_t; + __extension__ typedef unsigned long long uintmax_t; + __extension__ typedef long long int64_t; + __extension__ typedef long long int_least64_t; + __extension__ typedef long long int_fast64_t; + __extension__ typedef unsigned long long uint64_t; + __extension__ typedef unsigned long long uint_least64_t; + __extension__ typedef unsigned long long uint_fast64_t; +# elif defined(BOOST_HAS_MS_INT64) + // + // we have Borland/Intel/Microsoft __int64: + // + typedef __int64 intmax_t; + typedef unsigned __int64 uintmax_t; + typedef __int64 int64_t; + typedef __int64 int_least64_t; + typedef __int64 int_fast64_t; + typedef unsigned __int64 uint64_t; + typedef unsigned __int64 uint_least64_t; + typedef unsigned __int64 uint_fast64_t; +# else // assume no 64-bit integers +# define BOOST_NO_INT64_T + typedef int32_t intmax_t; + typedef uint32_t uintmax_t; +# endif + +} // namespace boost + + +#endif // BOOST_HAS_STDINT_H + +// intptr_t/uintptr_t are defined separately because they are optional and not universally available +#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) +// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h +#include +#endif + +#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ + || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ + || defined(__CYGWIN__) || defined(__VXWORKS__) \ + || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ + || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX) + +namespace boost { + using ::intptr_t; + using ::uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +// Clang pretends to be GCC, so it'll match this condition +#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) + +namespace boost { + typedef __INTPTR_TYPE__ intptr_t; + typedef __UINTPTR_TYPE__ uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +#endif + +#endif // BOOST_CSTDINT_HPP + + +/**************************************************** + +Macro definition section: + +Added 23rd September 2000 (John Maddock). +Modified 11th September 2001 to be excluded when +BOOST_HAS_STDINT_H is defined (John Maddock). +Modified 11th Dec 2009 to always define the +INT#_C macros if they're not already defined (John Maddock). + +******************************************************/ + +#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ + (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) +// +// Undef the macros as a precaution, since we may get here if has failed +// to define them all, see https://svn.boost.org/trac/boost/ticket/12786 +// +#undef INT8_C +#undef INT16_C +#undef INT32_C +#undef INT64_C +#undef INTMAX_C +#undef UINT8_C +#undef UINT16_C +#undef UINT32_C +#undef UINT64_C +#undef UINTMAX_C + +#include +# define BOOST__STDC_CONSTANT_MACROS_DEFINED +# if defined(BOOST_HAS_MS_INT64) +// +// Borland/Intel/Microsoft compilers have width specific suffixes: +// +#ifndef INT8_C +# define INT8_C(value) value##i8 +#endif +#ifndef INT16_C +# define INT16_C(value) value##i16 +#endif +#ifndef INT32_C +# define INT32_C(value) value##i32 +#endif +#ifndef INT64_C +# define INT64_C(value) value##i64 +#endif +# ifdef BOOST_BORLANDC + // Borland bug: appending ui8 makes the type a signed char +# define UINT8_C(value) static_cast(value##u) +# else +# define UINT8_C(value) value##ui8 +# endif +#ifndef UINT16_C +# define UINT16_C(value) value##ui16 +#endif +#ifndef UINT32_C +# define UINT32_C(value) value##ui32 +#endif +#ifndef UINT64_C +# define UINT64_C(value) value##ui64 +#endif +#ifndef INTMAX_C +# define INTMAX_C(value) value##i64 +# define UINTMAX_C(value) value##ui64 +#endif + +# else +// do it the old fashioned way: + +// 8-bit types ------------------------------------------------------------// + +# if (UCHAR_MAX == 0xff) && !defined(INT8_C) +# define INT8_C(value) static_cast(value) +# define UINT8_C(value) static_cast(value##u) +# endif + +// 16-bit types -----------------------------------------------------------// + +# if (USHRT_MAX == 0xffff) && !defined(INT16_C) +# define INT16_C(value) static_cast(value) +# define UINT16_C(value) static_cast(value##u) +# endif + +// 32-bit types -----------------------------------------------------------// +#ifndef INT32_C +# if (UINT_MAX == 0xffffffff) +# define INT32_C(value) value +# define UINT32_C(value) value##u +# elif ULONG_MAX == 0xffffffff +# define INT32_C(value) value##L +# define UINT32_C(value) value##uL +# endif +#endif + +// 64-bit types + intmax_t and uintmax_t ----------------------------------// +#ifndef INT64_C +# if defined(BOOST_HAS_LONG_LONG) && \ + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) + +# if defined(__hpux) + // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ + (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ + (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) + +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif ULONG_MAX != 0xffffffff + +# if ULONG_MAX == 18446744073709551615U // 2**64 - 1 +# define INT64_C(value) value##L +# define UINT64_C(value) value##uL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# elif defined(BOOST_HAS_LONG_LONG) + // Usual macros not defined, work things out for ourselves: +# if(~0uLL == 18446744073709551615ULL) +# define INT64_C(value) value##LL +# define UINT64_C(value) value##uLL +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif +# else +# error defaults not correct; you must hand modify boost/cstdint.hpp +# endif + +# ifdef BOOST_NO_INT64_T +# define INTMAX_C(value) INT32_C(value) +# define UINTMAX_C(value) UINT32_C(value) +# else +# define INTMAX_C(value) INT64_C(value) +# define UINTMAX_C(value) UINT64_C(value) +# endif +#endif +# endif // Borland/Microsoft specific width suffixes + +#endif // INT#_C macros. + + + + diff --git a/Slang/boost/cstdlib.hpp b/Slang/boost/cstdlib.hpp new file mode 100644 index 0000000..6322146 --- /dev/null +++ b/Slang/boost/cstdlib.hpp @@ -0,0 +1,41 @@ +// boost/cstdlib.hpp header ------------------------------------------------// + +// Copyright Beman Dawes 2001. Distributed under the 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/utility/cstdlib.html for documentation. + +// Revision History +// 26 Feb 01 Initial version (Beman Dawes) + +#ifndef BOOST_CSTDLIB_HPP +#define BOOST_CSTDLIB_HPP + +#include + +namespace boost +{ + // The intent is to propose the following for addition to namespace std + // in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and + // EXIT_FAILURE. As an implementation detail, this header defines the + // new constants in terms of EXIT_SUCCESS and EXIT_FAILURE. In a new + // standard, the constants would be implementation-defined, although it + // might be worthwhile to "suggest" (which a standard is allowed to do) + // values of 0 and 1 respectively. + + // Rationale for having multiple failure values: some environments may + // wish to distinguish between different classes of errors. + // Rationale for choice of values: programs often use values < 100 for + // their own error reporting. Values > 255 are sometimes reserved for + // system detected errors. 200/201 were suggested to minimize conflict. + + const int exit_success = EXIT_SUCCESS; // implementation-defined value + const int exit_failure = EXIT_FAILURE; // implementation-defined value + const int exit_exception_failure = 200; // otherwise uncaught exception + const int exit_test_failure = 201; // report_error or + // report_critical_error called. +} + +#endif + diff --git a/Slang/boost/current_function.hpp b/Slang/boost/current_function.hpp new file mode 100644 index 0000000..731d1b1 --- /dev/null +++ b/Slang/boost/current_function.hpp @@ -0,0 +1,75 @@ +#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED +#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/current_function.hpp - BOOST_CURRENT_FUNCTION +// +// Copyright 2002-2018 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// http://www.boost.org/libs/assert +// + +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ + +#if defined( BOOST_DISABLE_CURRENT_FUNCTION ) + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) || defined(__clang__) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__DMC__) && (__DMC__ >= 0x810) + +# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ + +#elif defined(__FUNCSIG__) + +# define BOOST_CURRENT_FUNCTION __FUNCSIG__ + +#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) + +# define BOOST_CURRENT_FUNCTION __FUNCTION__ + +#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) + +# define BOOST_CURRENT_FUNCTION __FUNC__ + +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) + +# define BOOST_CURRENT_FUNCTION __func__ + +#elif defined(__cplusplus) && (__cplusplus >= 201103) + +# define BOOST_CURRENT_FUNCTION __func__ + +#else + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#endif + +} + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED diff --git a/Slang/boost/cxx11_char_types.hpp b/Slang/boost/cxx11_char_types.hpp new file mode 100644 index 0000000..71b9b70 --- /dev/null +++ b/Slang/boost/cxx11_char_types.hpp @@ -0,0 +1,70 @@ +// boost cxx11_char_types.hpp --------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +//--------------------------------------------------------------------------------------// +// // +// The purpose of this header is to emulate the C++11 char16_t and char32_t // +// character and string types so that they can be used in both C++11 and C++03 // +// programs. // +// // +// The emulation names use char16/char32 rather than char16_t/char32_t to avoid use // +// of names that are keywords in C++11. // +// // +// The emulation names are placed in namespace boost, as is usual for Boost C++11 // +// emulation names such as those in header . // +// // +// An alternative would would have been to place the C++11 emulation names at global // +// scope, and put the C++11 string types in namespace std. That is the approach taken // +// by Microsoft Visual Studio 2010, but is controversion with some Boost users and // +// developers, and runs counter to usual Boost practice. // +// // +// Thanks to Mathias Gaunard and others for discussions leading to the final form // +// of these typedefs. // +// // +// Boost C++11 C++03 // +// ---------------- -------------- -------------------------------- // +// boost::char16 char16_t uint16_t // +// boost::char32 char32_t uint32_t // +// boost::u16string std::u16string std::basic_string // +// boost::u32string std::u32string std::basic_string // +// // +// Uses the typedefs provided by Microsoft Visual C++ 2010 if present // +// // +// Thanks to Mathias Gaunard and others for discussions leading to the final form // +// of these typedefs. // +// // +//--------------------------------------------------------------------------------------// + +#if !defined(BOOST_CXX11_CHAR_TYPES_HPP) +# define BOOST_CXX11_CHAR_TYPES_HPP + +# include +# include +# include + +namespace boost +{ + +# if defined(BOOST_NO_CXX11_CHAR16_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 + typedef boost::uint_least16_t char16; + typedef std::basic_string u16string; +# else + typedef char16_t char16; + typedef std::u16string u16string; +# endif + +# if defined(BOOST_NO_CXX11_CHAR32_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 + typedef boost::uint_least32_t char32; + typedef std::basic_string u32string; +# else + typedef char32_t char32; + typedef std::u32string u32string; +# endif + +} // namespace boost + +#endif // !defined(BOOST_CXX11_CHAR_TYPES_HPP) diff --git a/Slang/boost/date_time.hpp b/Slang/boost/date_time.hpp new file mode 100644 index 0000000..51628cd --- /dev/null +++ b/Slang/boost/date_time.hpp @@ -0,0 +1,17 @@ +#ifndef BOOST_DATE_TIME_ALL_HPP___ +#define BOOST_DATE_TIME_ALL_HPP___ + +/* Copyright (c) 2006 CrystalClear Software, Inc. + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + * Author: Jeff Garland + * $Date$ + */ + + // See www.boost.org/libs/date_time for documentation. + +//gregorian and posix time included by indirectly +#include "boost/date_time/local_time/local_time.hpp" + +#endif // BOOST_DATE_TIME_ALL_HPP___ diff --git a/Slang/boost/describe.hpp b/Slang/boost/describe.hpp new file mode 100644 index 0000000..fea997e --- /dev/null +++ b/Slang/boost/describe.hpp @@ -0,0 +1,20 @@ +#ifndef BOOST_DESCRIBE_HPP_INCLUDED +#define BOOST_DESCRIBE_HPP_INCLUDED + +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef BOOST_DESCRIBE_HPP_INCLUDED diff --git a/Slang/boost/dll.hpp b/Slang/boost/dll.hpp new file mode 100644 index 0000000..1cfc0db --- /dev/null +++ b/Slang/boost/dll.hpp @@ -0,0 +1,27 @@ +// Copyright 2014 Renato Tegon Forti, Antony Polukhin. +// Copyright 2015-2021 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) + + +#ifndef BOOST_DLL_DLL_HPP +#define BOOST_DLL_DLL_HPP + +/// \file boost/dll.hpp +/// \brief Includes all the non-experimental headers of the Boost.DLL library. + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#endif // BOOST_DLL_DLL_HPP + diff --git a/Slang/boost/dynamic_bitset.hpp b/Slang/boost/dynamic_bitset.hpp new file mode 100644 index 0000000..29e1038 --- /dev/null +++ b/Slang/boost/dynamic_bitset.hpp @@ -0,0 +1,17 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004, 2008 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_HPP +#define BOOST_DYNAMIC_BITSET_HPP + +#include "boost/dynamic_bitset/dynamic_bitset.hpp" + +#endif // include guard diff --git a/Slang/boost/dynamic_bitset_fwd.hpp b/Slang/boost/dynamic_bitset_fwd.hpp new file mode 100644 index 0000000..7bb6e89 --- /dev/null +++ b/Slang/boost/dynamic_bitset_fwd.hpp @@ -0,0 +1,25 @@ +// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2004 Gennaro Prota +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DYNAMIC_BITSET_FWD_HPP +#define BOOST_DYNAMIC_BITSET_FWD_HPP + +#include + +namespace boost { + +template > +class dynamic_bitset; + +} + +#endif // include guard diff --git a/Slang/boost/enable_shared_from_this.hpp b/Slang/boost/enable_shared_from_this.hpp new file mode 100644 index 0000000..18b938d --- /dev/null +++ b/Slang/boost/enable_shared_from_this.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED +#define BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED + +// +// enable_shared_from_this.hpp +// +// Copyright (c) 2002 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. +// + +#include + +#endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED diff --git a/Slang/boost/endian.hpp b/Slang/boost/endian.hpp new file mode 100644 index 0000000..c1afa7a --- /dev/null +++ b/Slang/boost/endian.hpp @@ -0,0 +1,13 @@ +#ifndef BOOST_ENDIAN_HPP_INCLUDED +#define BOOST_ENDIAN_HPP_INCLUDED + +// Copyright 2019 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +#endif // #ifndef BOOST_ENDIAN_HPP_INCLUDED diff --git a/Slang/boost/exception_ptr.hpp b/Slang/boost/exception_ptr.hpp new file mode 100644 index 0000000..9f8e8b3 --- /dev/null +++ b/Slang/boost/exception_ptr.hpp @@ -0,0 +1,11 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_EXCEPTION_FA5836A2CADA11DC8CD47C8555D89593 +#define BOOST_EXCEPTION_FA5836A2CADA11DC8CD47C8555D89593 + +#include + +#endif diff --git a/Slang/boost/filesystem.hpp b/Slang/boost/filesystem.hpp new file mode 100644 index 0000000..3078e0c --- /dev/null +++ b/Slang/boost/filesystem.hpp @@ -0,0 +1,24 @@ +// boost/filesystem.hpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// + +#ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP +#define BOOST_FILESYSTEM_FILESYSTEM_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_FILESYSTEM_FILESYSTEM_HPP diff --git a/Slang/boost/flyweight.hpp b/Slang/boost/flyweight.hpp new file mode 100644 index 0000000..852ea8e --- /dev/null +++ b/Slang/boost/flyweight.hpp @@ -0,0 +1,22 @@ +/* Copyright 2006-2008 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/flyweight for library home page. + */ + +#ifndef BOOST_FLYWEIGHT_HPP +#define BOOST_FLYWEIGHT_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/foreach.hpp b/Slang/boost/foreach.hpp new file mode 100644 index 0000000..33b6921 --- /dev/null +++ b/Slang/boost/foreach.hpp @@ -0,0 +1,1134 @@ +/////////////////////////////////////////////////////////////////////////////// +// foreach.hpp header file +// +// Copyright 2004 Eric Niebler. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// See http://www.boost.org/libs/foreach for documentation +// +// Credits: +// Anson Tsao - for the initial inspiration and several good suggestions. +// Thorsten Ottosen - for Boost.Range, and for suggesting a way to detect +// const-qualified rvalues at compile time on VC7.1+ +// Russell Hind - For help porting to Borland +// Alisdair Meredith - For help porting to Borland +// Stefan Slapeta - For help porting to Intel +// David Jenkins - For help finding a Microsoft Code Analysis bug +// mimomorin@... - For a patch to use rvalue refs on supporting compilers + +#ifndef BOOST_FOREACH + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include // for std::pair + +#include +#include + +// Define a compiler generic null pointer value +#if defined(BOOST_NO_NULLPTR) +#define BOOST_FOREACH_NULL 0 +#else +#define BOOST_FOREACH_NULL nullptr +#endif + +// Some compilers let us detect even const-qualified rvalues at compile-time +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ + || defined(BOOST_MSVC) && !defined(_PREFAST_) \ + || (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) && \ + !defined(BOOST_CLANG)) \ + || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) && \ + !defined(BOOST_CLANG)) +# define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION +#else +// Some compilers allow temporaries to be bound to non-const references. +// These compilers make it impossible to for BOOST_FOREACH to detect +// temporaries and avoid reevaluation of the collection expression. +# if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x593) \ + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \ + || BOOST_WORKAROUND(__DECCXX_VER, <= 60590042) +# define BOOST_FOREACH_NO_RVALUE_DETECTION +# endif +// Some compilers do not correctly implement the lvalue/rvalue conversion +// rules of the ternary conditional operator. +# if defined(BOOST_FOREACH_NO_RVALUE_DETECTION) \ + || defined(BOOST_NO_SFINAE) \ + || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1400)) \ + || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 3) && defined(__APPLE_CC__)) \ + || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100) \ + || BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x590)) +# define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION +# else +# define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +# endif +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +# include +# include +# include +# include +#endif + +namespace boost +{ + +// forward declarations for iterator_range +template +class iterator_range; + +// forward declarations for sub_range +template +class sub_range; + +namespace foreach +{ + /////////////////////////////////////////////////////////////////////////////// + // in_range + // + template + inline std::pair in_range(T begin, T end) + { + return std::make_pair(begin, end); + } + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_lightweight_proxy + // Specialize this for user-defined collection types if they are inexpensive to copy. + // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. + template + struct is_lightweight_proxy + : boost::mpl::false_ + { + }; + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_noncopyable + // Specialize this for user-defined collection types if they cannot be copied. + // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. + template + struct is_noncopyable + #if !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) && !defined(BOOST_NO_IS_ABSTRACT) + : boost::mpl::or_< + boost::is_abstract + , boost::is_base_and_derived + > + #elif !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) + : boost::is_base_and_derived + #elif !defined(BOOST_NO_IS_ABSTRACT) + : boost::is_abstract + #else + : boost::mpl::false_ + #endif + { + }; + +} // namespace foreach + +} // namespace boost + +// vc6/7 needs help ordering the following overloads +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +# define BOOST_FOREACH_TAG_DEFAULT ... +#else +# define BOOST_FOREACH_TAG_DEFAULT boost::foreach::tag +#endif + +/////////////////////////////////////////////////////////////////////////////// +// boost_foreach_is_lightweight_proxy +// Another customization point for the is_lightweight_proxy optimization, +// this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy +// at the global namespace for your type. +template +inline boost::foreach::is_lightweight_proxy * +boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(std::pair *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; } + +/////////////////////////////////////////////////////////////////////////////// +// boost_foreach_is_noncopyable +// Another customization point for the is_noncopyable trait, +// this one works on legacy compilers. Overload boost_foreach_is_noncopyable +// at the global namespace for your type. +template +inline boost::foreach::is_noncopyable * +boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } + +namespace boost +{ + +namespace foreach_detail_ +{ + +/////////////////////////////////////////////////////////////////////////////// +// Define some utilities for assessing the properties of expressions +// +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::not_ *not_(Bool1 *) { return 0; } + +template +inline boost::is_array *is_array_(T const &) { return 0; } + +template +inline boost::is_const *is_const_(T &) { return 0; } + +#ifndef BOOST_FOREACH_NO_RVALUE_DETECTION +template +inline boost::mpl::true_ *is_const_(T const &) { return 0; } +#endif + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES +template +inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } + +template +inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } +#else +template +inline boost::is_rvalue_reference *is_rvalue_(T &&, int) { return 0; } +#endif + +/////////////////////////////////////////////////////////////////////////////// +// auto_any_t/auto_any +// General utility for putting an object of any type into automatic storage +struct auto_any_base +{ + // auto_any_base must evaluate to false in boolean context so that + // they can be declared in if() statements. + operator bool() const + { + return false; + } +}; + +template +struct auto_any : auto_any_base +{ + explicit auto_any(T const &t) + : item(t) + { + } + + // temporaries of type auto_any will be bound to const auto_any_base + // references, but we still want to be able to mutate the stored + // data, so declare it as mutable. + mutable T item; +}; + +typedef auto_any_base const &auto_any_t; + +template +inline BOOST_DEDUCED_TYPENAME boost::mpl::if_::type &auto_any_cast(auto_any_t a) +{ + return static_cast const &>(a).item; +} + +typedef boost::mpl::true_ const_; + +/////////////////////////////////////////////////////////////////////////////// +// type2type +// +template +struct type2type + : boost::mpl::if_ +{ +}; + +template +struct wrap_cstr +{ + typedef T type; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char *iterator; + typedef char *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char const *iterator; + typedef char const *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t *iterator; + typedef wchar_t *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t const *iterator; + typedef wchar_t const *const_iterator; +}; + +template +struct is_char_array + : mpl::and_< + is_array + , mpl::or_< + is_convertible + , is_convertible + > + > +{}; + +template +struct foreach_iterator +{ + // **** READ THIS IF YOUR COMPILE BREAKS HERE **** + // + // There is an ambiguity about how to iterate over arrays of char and wchar_t. + // Should the last array element be treated as a null terminator to be skipped, or + // is it just like any other element in the array? To fix the problem, you must + // say which behavior you want. + // + // To treat the container as a null-terminated string, merely cast it to a + // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... + // + // To treat the container as an array, use boost::as_array() in , + // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... + BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); + + // If the type is a pointer to a null terminated string (as opposed + // to an array type), there is no ambiguity. + typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< + C + , range_const_iterator + , range_mutable_iterator + >::type type; +}; + + +template +struct foreach_reverse_iterator +{ + // **** READ THIS IF YOUR COMPILE BREAKS HERE **** + // + // There is an ambiguity about how to iterate over arrays of char and wchar_t. + // Should the last array element be treated as a null terminator to be skipped, or + // is it just like any other element in the array? To fix the problem, you must + // say which behavior you want. + // + // To treat the container as a null-terminated string, merely cast it to a + // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... + // + // To treat the container as an array, use boost::as_array() in , + // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... + BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); + + // If the type is a pointer to a null terminated string (as opposed + // to an array type), there is no ambiguity. + typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< + C + , range_reverse_iterator + , range_reverse_iterator + >::type type; +}; + +template +struct foreach_reference + : iterator_reference::type> +{ +}; + +/////////////////////////////////////////////////////////////////////////////// +// encode_type +// +template +inline type2type *encode_type(T &, boost::false_type*) { return 0; } + +template +inline type2type *encode_type(T const &, boost::true_type*) { return 0; } + +template +inline type2type *encode_type(T &, boost::mpl::false_*) { return 0; } + +template +inline type2type *encode_type(T const &, boost::mpl::true_*) { return 0; } + +/////////////////////////////////////////////////////////////////////////////// +// set_false +// +inline bool set_false(bool &b) +{ + b = false; + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// to_ptr +// +template +inline T *&to_ptr(T const &) +{ + static T *t = 0; + return t; +} + +// Borland needs a little extra help with arrays +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) +template +inline T (*&to_ptr(T (&)[N]))[N] +{ + static T (*t)[N] = 0; + return t; +} + +/////////////////////////////////////////////////////////////////////////////// +// derefof +// +template +inline T &derefof(T *t) +{ + // This is a work-around for a compiler bug in Borland. If T* is a pointer to array type U(*)[N], + // then dereferencing it results in a U* instead of U(&)[N]. The cast forces the issue. + return reinterpret_cast( + *const_cast( + reinterpret_cast(t) + ) + ); +} + +# define BOOST_FOREACH_DEREFOF(T) boost::foreach_detail_::derefof(*T) +#else +# define BOOST_FOREACH_DEREFOF(T) (*T) +#endif + +#if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ + && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +/////////////////////////////////////////////////////////////////////////////// +// Rvalue references makes it drop-dead simple to detect at compile time +// whether an expression is an rvalue. +/////////////////////////////////////////////////////////////////////////////// + +# define BOOST_FOREACH_IS_RVALUE(COL) \ + boost::foreach_detail_::is_rvalue_((COL), 0) + +#elif defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ + && defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +/////////////////////////////////////////////////////////////////////////////// +// Detect at compile-time whether an expression yields an rvalue or +// an lvalue. This is rather non-standard, but some popular compilers +// accept it. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// rvalue_probe +// +template +struct rvalue_probe +{ + struct private_type_ {}; + // can't ever return an array by value + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + operator value_type() { return *reinterpret_cast(this); } // never called + operator T &() const { return *reinterpret_cast(const_cast(this)); } // never called +}; + +template +rvalue_probe const make_probe(T const &) +{ + return rvalue_probe(); +} + +# define BOOST_FOREACH_IS_RVALUE(COL) \ + boost::foreach_detail_::and_( \ + boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(COL)) \ + , (true ? 0 : boost::foreach_detail_::is_rvalue_( \ + (true ? boost::foreach_detail_::make_probe(COL) : (COL)), 0))) + +#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// Detect at run-time whether an expression yields an rvalue +// or an lvalue. This is 100% standard C++, but not all compilers +// accept it. Also, it causes FOREACH to break when used with non- +// copyable collection types. +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// rvalue_probe +// +template +struct rvalue_probe +{ + rvalue_probe(T &t, bool &b) + : value(t) + , is_rvalue(b) + { + } + + struct private_type_ {}; + // can't ever return an array or an abstract type by value + #ifdef BOOST_NO_IS_ABSTRACT + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_array, private_type_, T + >::type value_type; + #else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + #endif + + operator value_type() + { + this->is_rvalue = true; + return this->value; + } + + operator T &() const + { + return this->value; + } + +private: + T &value; + bool &is_rvalue; +}; + +template +rvalue_probe make_probe(T &t, bool &b) { return rvalue_probe(t, b); } + +template +rvalue_probe make_probe(T const &t, bool &b) { return rvalue_probe(t, b); } + +/////////////////////////////////////////////////////////////////////////////// +// simple_variant +// holds either a T or a T const* +template +struct simple_variant +{ + simple_variant(T const *t) + : is_rvalue(false) + { + *static_cast(this->data.address()) = t; + } + + simple_variant(T const &t) + : is_rvalue(true) + { + ::new(this->data.address()) T(t); + } + + simple_variant(simple_variant const &that) + : is_rvalue(that.is_rvalue) + { + if(this->is_rvalue) + ::new(this->data.address()) T(*that.get()); + else + *static_cast(this->data.address()) = that.get(); + } + + ~simple_variant() + { + if(this->is_rvalue) + this->get()->~T(); + } + + T const *get() const + { + if(this->is_rvalue) + return static_cast(this->data.address()); + else + return *static_cast(this->data.address()); + } + +private: + enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) }; + simple_variant &operator =(simple_variant const &); + bool const is_rvalue; + aligned_storage data; +}; + +// If the collection is an array or is noncopyable, it must be an lvalue. +// If the collection is a lightweight proxy, treat it as an rvalue +// BUGBUG what about a noncopyable proxy? +template +inline BOOST_DEDUCED_TYPENAME boost::enable_if, IsProxy>::type * +should_copy_impl(LValue *, IsProxy *, bool *) +{ + return 0; +} + +// Otherwise, we must determine at runtime whether it's an lvalue or rvalue +inline bool * +should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue) +{ + return is_rvalue; +} + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// contain +// +template +inline auto_any contain(T const &t, boost::mpl::true_ *) // rvalue +{ + return auto_any(t); +} + +template +inline auto_any contain(T &t, boost::mpl::false_ *) // lvalue +{ + // Cannot seem to get sunpro to handle addressof() with array types. + #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x570)) + return auto_any(&t); + #else + return auto_any(boost::addressof(t)); + #endif +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any > +contain(T const &t, bool *rvalue) +{ + return auto_any >(*rvalue ? simple_variant(t) : simple_variant(&t)); +} +#endif + +///////////////////////////////////////////////////////////////////////////// +// begin +// +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::begin(auto_any_cast(col))); +} + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::begin(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +begin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::begin(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any +begin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any(auto_any_cast(col)); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// end +// +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::end(auto_any_cast(col))); +} + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::end(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +end(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::end(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any +end(auto_any_t, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any(0); // not used +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// done +// +template +inline bool done(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline bool done(auto_any_t cur, auto_any_t, type2type *) // null-terminated C-style strings +{ + return ! *auto_any_cast(cur); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// next +// +template +inline void next(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + ++auto_any_cast(cur); +} + +/////////////////////////////////////////////////////////////////////////////// +// deref +// +template +inline BOOST_DEDUCED_TYPENAME foreach_reference::type +deref(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; + return *auto_any_cast(cur); +} + +///////////////////////////////////////////////////////////////////////////// +// rbegin +// +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::rbegin(auto_any_cast(col))); +} + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rbegin(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rbegin(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any > +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + T *p = auto_any_cast(col); + while(0 != *p) + ++p; + return auto_any >(reverse_iterator(p)); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// rend +// +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue +{ + return auto_any::type>( + boost::rend(auto_any_cast(col))); +} + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue +{ + typedef BOOST_DEDUCED_TYPENAME type2type::type type; + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rend(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); +} + +#ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION +template +inline auto_any::type> +rend(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rend(*auto_any_cast, boost::mpl::false_>(col).get())); +} +#endif + +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +template +inline auto_any > +rend(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings +{ + return auto_any >( + reverse_iterator(auto_any_cast(col))); +} +#endif + +/////////////////////////////////////////////////////////////////////////////// +// rdone +// +template +inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + +/////////////////////////////////////////////////////////////////////////////// +// rnext +// +template +inline void rnext(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + ++auto_any_cast(cur); +} + +/////////////////////////////////////////////////////////////////////////////// +// rderef +// +template +inline BOOST_DEDUCED_TYPENAME foreach_reference::type +rderef(auto_any_t cur, type2type *) +{ + typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; + return *auto_any_cast(cur); +} + +} // namespace foreach_detail_ +} // namespace boost + +// Suppress a bogus code analysis warning on vc8+ +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# define BOOST_FOREACH_SUPPRESS_WARNINGS() __pragma(warning(suppress:6001)) +#else +# define BOOST_FOREACH_SUPPRESS_WARNINGS() +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Define a macro for giving hidden variables a unique name. Not strictly +// needed, but eliminates some warnings on some compilers. +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) +// With some versions of MSVC, use of __LINE__ to create unique identifiers +// can fail when the Edit-and-Continue debug flag is used. +# define BOOST_FOREACH_ID(x) x +#else +# define BOOST_FOREACH_ID(x) BOOST_PP_CAT(x, __LINE__) +#endif + +// A sneaky way to get the type of the collection without evaluating the expression +#define BOOST_FOREACH_TYPEOF(COL) \ + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL))) + +// returns true_* if the type is noncopyable +#define BOOST_FOREACH_IS_NONCOPYABLE(COL) \ + boost_foreach_is_noncopyable( \ + boost::foreach_detail_::to_ptr(COL) \ + , boost_foreach_argument_dependent_lookup_hack_value) + +// returns true_* if the type is a lightweight proxy (and is not noncopyable) +#define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ + boost::foreach_detail_::and_( \ + boost::foreach_detail_::not_(BOOST_FOREACH_IS_NONCOPYABLE(COL)) \ + , boost_foreach_is_lightweight_proxy( \ + boost::foreach_detail_::to_ptr(COL) \ + , boost_foreach_argument_dependent_lookup_hack_value)) + +#if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// R-values and const R-values supported here with zero runtime overhead +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ + BOOST_FOREACH_IS_RVALUE(COL) \ + , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) + +#elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// R-values and const R-values supported here +/////////////////////////////////////////////////////////////////////////////// + +// Declare a variable to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() \ + if (bool BOOST_FOREACH_ID(_foreach_is_rvalue) = false) {} else + +// Evaluate the collection expression, and detect if it is an lvalue or and rvalue +# define BOOST_FOREACH_EVALUATE(COL) \ + (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL)) + +// The rvalue/lvalue-ness of the collection expression is determined dynamically, unless +// the type is an array or is noncopyable or is non-const, in which case we know it's an lvalue. +// If the type happens to be a lightweight proxy, always make a copy. +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (boost::foreach_detail_::should_copy_impl( \ + true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ + boost::foreach_detail_::is_array_(COL) \ + , BOOST_FOREACH_IS_NONCOPYABLE(COL) \ + , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(COL))) \ + , true ? BOOST_FOREACH_NULL : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ + , &BOOST_FOREACH_ID(_foreach_is_rvalue))) + +#elif !defined(BOOST_FOREACH_NO_RVALUE_DETECTION) +/////////////////////////////////////////////////////////////////////////////// +// R-values supported here, const R-values NOT supported here +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +// Determine whether the collection expression is an lvalue or an rvalue. +// NOTE: this gets the answer wrong for const rvalues. +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? BOOST_FOREACH_NULL : boost::foreach_detail_::or_( \ + boost::foreach_detail_::is_rvalue_((COL), 0) \ + , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) + +#else +/////////////////////////////////////////////////////////////////////////////// +// R-values NOT supported here +/////////////////////////////////////////////////////////////////////////////// + +// No variable is needed to track the rvalue-ness of the collection expression +# define BOOST_FOREACH_PREAMBLE() \ + BOOST_FOREACH_SUPPRESS_WARNINGS() + +// Evaluate the collection expression +# define BOOST_FOREACH_EVALUATE(COL) \ + (COL) + +// Can't use rvalues with BOOST_FOREACH (unless they are lightweight proxies) +# define BOOST_FOREACH_SHOULD_COPY(COL) \ + (true ? BOOST_FOREACH_NULL : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)) + +#endif + +#define BOOST_FOREACH_CONTAIN(COL) \ + boost::foreach_detail_::contain( \ + BOOST_FOREACH_EVALUATE(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_BEGIN(COL) \ + boost::foreach_detail_::begin( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_END(COL) \ + boost::foreach_detail_::end( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_DONE(COL) \ + boost::foreach_detail_::done( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_ID(_foreach_end) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_NEXT(COL) \ + boost::foreach_detail_::next( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_DEREF(COL) \ + boost::foreach_detail_::deref( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RBEGIN(COL) \ + boost::foreach_detail_::rbegin( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_REND(COL) \ + boost::foreach_detail_::rend( \ + BOOST_FOREACH_ID(_foreach_col) \ + , BOOST_FOREACH_TYPEOF(COL) \ + , BOOST_FOREACH_SHOULD_COPY(COL)) + +#define BOOST_FOREACH_RDONE(COL) \ + boost::foreach_detail_::rdone( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_ID(_foreach_end) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RNEXT(COL) \ + boost::foreach_detail_::rnext( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +#define BOOST_FOREACH_RDEREF(COL) \ + boost::foreach_detail_::rderef( \ + BOOST_FOREACH_ID(_foreach_cur) \ + , BOOST_FOREACH_TYPEOF(COL)) + +/////////////////////////////////////////////////////////////////////////////// +// BOOST_FOREACH +// +// For iterating over collections. Collections can be +// arrays, null-terminated strings, or STL containers. +// The loop variable can be a value or reference. For +// example: +// +// std::list int_list(/*stuff*/); +// BOOST_FOREACH(int &i, int_list) +// { +// /* +// * loop body goes here. +// * i is a reference to the int in int_list. +// */ +// } +// +// Alternately, you can declare the loop variable first, +// so you can access it after the loop finishes. Obviously, +// if you do it this way, then the loop variable cannot be +// a reference. +// +// int i; +// BOOST_FOREACH(i, int_list) +// { ... } +// +#define BOOST_FOREACH(VAR, COL) \ + BOOST_FOREACH_PREAMBLE() \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else \ + for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ + BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL); \ + BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0) \ + if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ + for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) + +/////////////////////////////////////////////////////////////////////////////// +// BOOST_REVERSE_FOREACH +// +// For iterating over collections in reverse order. In +// all other respects, BOOST_REVERSE_FOREACH is like +// BOOST_FOREACH. +// +#define BOOST_REVERSE_FOREACH(VAR, COL) \ + BOOST_FOREACH_PREAMBLE() \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_RBEGIN(COL)) {} else \ + if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_REND(COL)) {} else \ + for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ + BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_RDONE(COL); \ + BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_RNEXT(COL) : (void)0) \ + if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ + for (VAR = BOOST_FOREACH_RDEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) + +#endif diff --git a/Slang/boost/foreach_fwd.hpp b/Slang/boost/foreach_fwd.hpp new file mode 100644 index 0000000..4e0bb37 --- /dev/null +++ b/Slang/boost/foreach_fwd.hpp @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// foreach.hpp header file +// +// Copyright 2010 Eric Niebler. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// See http://www.boost.org/libs/foreach for documentation +// +// Credits: +// Kazutoshi Satoda: for suggesting the need for a _fwd header for foreach's +// customization points. + +#ifndef BOOST_FOREACH_FWD_HPP +#define BOOST_FOREACH_FWD_HPP + +// This must be at global scope, hence the uglified name +enum boost_foreach_argument_dependent_lookup_hack +{ + boost_foreach_argument_dependent_lookup_hack_value +}; + +namespace boost +{ + +namespace foreach +{ + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::tag + // + typedef boost_foreach_argument_dependent_lookup_hack tag; + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_lightweight_proxy + // Specialize this for user-defined collection types if they are inexpensive to copy. + // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. + template + struct is_lightweight_proxy; + + /////////////////////////////////////////////////////////////////////////////// + // boost::foreach::is_noncopyable + // Specialize this for user-defined collection types if they cannot be copied. + // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. + template + struct is_noncopyable; + +} // namespace foreach + +} // namespace boost + +#endif diff --git a/Slang/boost/format.hpp b/Slang/boost/format.hpp new file mode 100644 index 0000000..73464a8 --- /dev/null +++ b/Slang/boost/format.hpp @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------- +// format.hpp : primary header +// ---------------------------------------------------------------------------- + +// Copyright Samuel Krempp 2003. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/format for library home page + + +// ---------------------------------------------------------------------------- + +#ifndef BOOST_FORMAT_HPP +#define BOOST_FORMAT_HPP + +#include +#include +#include +#include + +#ifndef BOOST_NO_STD_LOCALE +#include +#endif + +// *** Compatibility framework +#include + +#ifdef BOOST_NO_LOCALE_ISIDIGIT +#include // we'll use the non-locale 's std::isdigit(int) +#endif + +// **** Forward declarations ---------------------------------- +#include // basic_format, and other frontends +#include // misc forward declarations for internal use + +// **** Auxiliary structs (stream_format_state , and format_item ) +#include + +// **** Format class interface -------------------------------- +#include + +// **** Exceptions ----------------------------------------------- +#include + +// **** Implementation ------------------------------------------- +#include // member functions +#include // class for grouping arguments +#include // argument-feeding functions +#include // format-string parsing (member-)functions + +// **** Implementation of the free functions ---------------------- +#include + + +// *** Undefine 'local' macros : +#include + +#endif // BOOST_FORMAT_HPP diff --git a/Slang/boost/function.hpp b/Slang/boost/function.hpp new file mode 100644 index 0000000..ef907e0 --- /dev/null +++ b/Slang/boost/function.hpp @@ -0,0 +1,74 @@ +// Boost.Function library + +// Copyright Douglas Gregor 2001-2003. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org/libs/function + +// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the +// design of this library. + +#ifndef BOOST_FUNCTION_MAX_ARGS +# define BOOST_FUNCTION_MAX_ARGS 10 +#endif // BOOST_FUNCTION_MAX_ARGS + +#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS) + +#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) +#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0 +#endif + +#include // unary_function, binary_function + +#include +#include + +// Include the prologue here so that the use of file-level iteration +// in anything that may be included by function_template.hpp doesn't break +#include + +// Older Visual Age C++ version do not handle the file iteration well +#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800) +# if BOOST_FUNCTION_MAX_ARGS >= 0 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 1 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 2 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 3 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 4 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 5 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 6 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 7 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 8 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 9 +# include +# endif +# if BOOST_FUNCTION_MAX_ARGS >= 10 +# include +# endif +#else +// What is the '3' for? +# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,)) +# include BOOST_PP_ITERATE() +# undef BOOST_PP_ITERATION_PARAMS_1 +#endif + +#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS) diff --git a/Slang/boost/function_equal.hpp b/Slang/boost/function_equal.hpp new file mode 100644 index 0000000..2d76c75 --- /dev/null +++ b/Slang/boost/function_equal.hpp @@ -0,0 +1,28 @@ +// Copyright Douglas Gregor 2004. +// Copyright 2005 Peter Dimov + +// Use, modification and distribution is subject to +// the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org +#ifndef BOOST_FUNCTION_EQUAL_HPP +#define BOOST_FUNCTION_EQUAL_HPP + +namespace boost { + +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } + +// function_equal_impl needs to be unqualified to pick +// user overloads on two-phase compilers + +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } + +} // end namespace boost + +#endif // BOOST_FUNCTION_EQUAL_HPP diff --git a/Slang/boost/function_output_iterator.hpp b/Slang/boost/function_output_iterator.hpp new file mode 100644 index 0000000..1584d9c --- /dev/null +++ b/Slang/boost/function_output_iterator.hpp @@ -0,0 +1,18 @@ +// (C) Copyright Andrey Semashev 2017. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_FUNCTION_OUTPUT_ITERATOR_HPP +#define BOOST_FUNCTION_OUTPUT_ITERATOR_HPP + +// This is a deprecated header left for backward compatibility. +// Use boost/iterator/function_output_iterator.hpp instead. + +#include + +BOOST_HEADER_DEPRECATED("") + +#include + +#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP diff --git a/Slang/boost/functional.hpp b/Slang/boost/functional.hpp new file mode 100644 index 0000000..6443078 --- /dev/null +++ b/Slang/boost/functional.hpp @@ -0,0 +1,581 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2000 Cadenza New Zealand Ltd +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// ------------------------------------------------------------------------------ +// Boost functional.hpp header file +// See http://www.boost.org/libs/functional for documentation. +// ------------------------------------------------------------------------------ +// $Id$ +// ------------------------------------------------------------------------------ + +#ifndef BOOST_FUNCTIONAL_HPP +#define BOOST_FUNCTIONAL_HPP + +#include +#include +#include + +namespace boost +{ + namespace functional + { + namespace detail { +#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC + // std::unary_function and std::binary_function were both removed + // in C++17. + + template + struct unary_function + { + typedef Arg1 argument_type; + typedef Result result_type; + }; + + template + struct binary_function + { + typedef Arg1 first_argument_type; + typedef Arg2 second_argument_type; + typedef Result result_type; + }; +#else + // Use the standard objects when we have them. + + using std::unary_function; + using std::binary_function; +#endif + } + } + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // -------------------------------------------------------------------------- + // The following traits classes allow us to avoid the need for ptr_fun + // because the types of arguments and the result of a function can be + // deduced. + // + // In addition to the standard types defined in unary_function and + // binary_function, we add + // + // - function_type, the type of the function or function object itself. + // + // - param_type, the type that should be used for passing the function or + // function object as an argument. + // -------------------------------------------------------------------------- + namespace detail + { + template + struct unary_traits_imp; + + template + struct unary_traits_imp + { + typedef Operation function_type; + typedef const function_type & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::argument_type argument_type; + }; + + template + struct unary_traits_imp + { + typedef R (*function_type)(A); + typedef R (*param_type)(A); + typedef R result_type; + typedef A argument_type; + }; + + template + struct binary_traits_imp; + + template + struct binary_traits_imp + { + typedef Operation function_type; + typedef const function_type & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::first_argument_type first_argument_type; + typedef typename Operation::second_argument_type second_argument_type; + }; + + template + struct binary_traits_imp + { + typedef R (*function_type)(A1,A2); + typedef R (*param_type)(A1,A2); + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + }; + } // namespace detail + + template + struct unary_traits + { + typedef typename detail::unary_traits_imp::function_type function_type; + typedef typename detail::unary_traits_imp::param_type param_type; + typedef typename detail::unary_traits_imp::result_type result_type; + typedef typename detail::unary_traits_imp::argument_type argument_type; + }; + + template + struct unary_traits + { + typedef R (*function_type)(A); + typedef R (*param_type)(A); + typedef R result_type; + typedef A argument_type; + }; + + template + struct binary_traits + { + typedef typename detail::binary_traits_imp::function_type function_type; + typedef typename detail::binary_traits_imp::param_type param_type; + typedef typename detail::binary_traits_imp::result_type result_type; + typedef typename detail::binary_traits_imp::first_argument_type first_argument_type; + typedef typename detail::binary_traits_imp::second_argument_type second_argument_type; + }; + + template + struct binary_traits + { + typedef R (*function_type)(A1,A2); + typedef R (*param_type)(A1,A2); + typedef R result_type; + typedef A1 first_argument_type; + typedef A2 second_argument_type; + }; +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // -------------------------------------------------------------------------- + // If we have no partial specialisation available, decay to a situation + // that is no worse than in the Standard, i.e., ptr_fun will be required. + // -------------------------------------------------------------------------- + + template + struct unary_traits + { + typedef Operation function_type; + typedef const Operation& param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::argument_type argument_type; + }; + + template + struct binary_traits + { + typedef Operation function_type; + typedef const Operation & param_type; + typedef typename Operation::result_type result_type; + typedef typename Operation::first_argument_type first_argument_type; + typedef typename Operation::second_argument_type second_argument_type; + }; +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + // -------------------------------------------------------------------------- + // unary_negate, not1 + // -------------------------------------------------------------------------- + template + class unary_negate + : public boost::functional::detail::unary_function::argument_type,bool> + { + public: + explicit unary_negate(typename unary_traits::param_type x) + : + pred(x) + {} + bool operator()(typename call_traits::argument_type>::param_type x) const + { + return !pred(x); + } + private: + typename unary_traits::function_type pred; + }; + + template + unary_negate not1(const Predicate &pred) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return unary_negate((typename unary_traits::param_type)pred); + } + + template + unary_negate not1(Predicate &pred) + { + return unary_negate(pred); + } + + // -------------------------------------------------------------------------- + // binary_negate, not2 + // -------------------------------------------------------------------------- + template + class binary_negate + : public boost::functional::detail::binary_function< + typename binary_traits::first_argument_type, + typename binary_traits::second_argument_type, + bool> + { + public: + explicit binary_negate(typename binary_traits::param_type x) + : + pred(x) + {} + bool operator()(typename call_traits::first_argument_type>::param_type x, + typename call_traits::second_argument_type>::param_type y) const + { + return !pred(x,y); + } + private: + typename binary_traits::function_type pred; + }; + + template + binary_negate not2(const Predicate &pred) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binary_negate((typename binary_traits::param_type)pred); + } + + template + binary_negate not2(Predicate &pred) + { + return binary_negate(pred); + } + + // -------------------------------------------------------------------------- + // binder1st, bind1st + // -------------------------------------------------------------------------- + template + class binder1st + : public boost::functional::detail::unary_function< + typename binary_traits::second_argument_type, + typename binary_traits::result_type> + { + public: + binder1st(typename binary_traits::param_type x, + typename call_traits::first_argument_type>::param_type y) + : + op(x), value(y) + {} + + typename binary_traits::result_type + operator()(typename call_traits::second_argument_type>::param_type x) const + { + return op(value, x); + } + + protected: + typename binary_traits::function_type op; + typename binary_traits::first_argument_type value; + }; + + template + inline binder1st bind1st(const Operation &op, + typename call_traits< + typename binary_traits::first_argument_type + >::param_type x) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binder1st((typename binary_traits::param_type)op, x); + } + + template + inline binder1st bind1st(Operation &op, + typename call_traits< + typename binary_traits::first_argument_type + >::param_type x) + { + return binder1st(op, x); + } + + // -------------------------------------------------------------------------- + // binder2nd, bind2nd + // -------------------------------------------------------------------------- + template + class binder2nd + : public boost::functional::detail::unary_function< + typename binary_traits::first_argument_type, + typename binary_traits::result_type> + { + public: + binder2nd(typename binary_traits::param_type x, + typename call_traits::second_argument_type>::param_type y) + : + op(x), value(y) + {} + + typename binary_traits::result_type + operator()(typename call_traits::first_argument_type>::param_type x) const + { + return op(x, value); + } + + protected: + typename binary_traits::function_type op; + typename binary_traits::second_argument_type value; + }; + + template + inline binder2nd bind2nd(const Operation &op, + typename call_traits< + typename binary_traits::second_argument_type + >::param_type x) + { + // The cast is to placate Borland C++Builder in certain circumstances. + // I don't think it should be necessary. + return binder2nd((typename binary_traits::param_type)op, x); + } + + template + inline binder2nd bind2nd(Operation &op, + typename call_traits< + typename binary_traits::second_argument_type + >::param_type x) + { + return binder2nd(op, x); + } + + // -------------------------------------------------------------------------- + // mem_fun, etc + // -------------------------------------------------------------------------- + template + class mem_fun_t : public boost::functional::detail::unary_function + { + public: + explicit mem_fun_t(S (T::*p)()) + : + ptr(p) + {} + S operator()(T* p) const + { + return (p->*ptr)(); + } + private: + S (T::*ptr)(); + }; + + template + class mem_fun1_t : public boost::functional::detail::binary_function + { + public: + explicit mem_fun1_t(S (T::*p)(A)) + : + ptr(p) + {} + S operator()(T* p, typename call_traits::param_type x) const + { + return (p->*ptr)(x); + } + private: + S (T::*ptr)(A); + }; + + template + class const_mem_fun_t : public boost::functional::detail::unary_function + { + public: + explicit const_mem_fun_t(S (T::*p)() const) + : + ptr(p) + {} + S operator()(const T* p) const + { + return (p->*ptr)(); + } + private: + S (T::*ptr)() const; + }; + + template + class const_mem_fun1_t : public boost::functional::detail::binary_function + { + public: + explicit const_mem_fun1_t(S (T::*p)(A) const) + : + ptr(p) + {} + S operator()(const T* p, typename call_traits::param_type x) const + { + return (p->*ptr)(x); + } + private: + S (T::*ptr)(A) const; + }; + + template + inline mem_fun_t mem_fun(S (T::*f)()) + { + return mem_fun_t(f); + } + + template + inline mem_fun1_t mem_fun(S (T::*f)(A)) + { + return mem_fun1_t(f); + } + +#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST + template + inline const_mem_fun_t mem_fun(S (T::*f)() const) + { + return const_mem_fun_t(f); + } + + template + inline const_mem_fun1_t mem_fun(S (T::*f)(A) const) + { + return const_mem_fun1_t(f); + } +#endif // BOOST_NO_POINTER_TO_MEMBER_CONST + + // -------------------------------------------------------------------------- + // mem_fun_ref, etc + // -------------------------------------------------------------------------- + template + class mem_fun_ref_t : public boost::functional::detail::unary_function + { + public: + explicit mem_fun_ref_t(S (T::*p)()) + : + ptr(p) + {} + S operator()(T& p) const + { + return (p.*ptr)(); + } + private: + S (T::*ptr)(); + }; + + template + class mem_fun1_ref_t : public boost::functional::detail::binary_function + { + public: + explicit mem_fun1_ref_t(S (T::*p)(A)) + : + ptr(p) + {} + S operator()(T& p, typename call_traits::param_type x) const + { + return (p.*ptr)(x); + } + private: + S (T::*ptr)(A); + }; + + template + class const_mem_fun_ref_t : public boost::functional::detail::unary_function + { + public: + explicit const_mem_fun_ref_t(S (T::*p)() const) + : + ptr(p) + {} + + S operator()(const T &p) const + { + return (p.*ptr)(); + } + private: + S (T::*ptr)() const; + }; + + template + class const_mem_fun1_ref_t : public boost::functional::detail::binary_function + { + public: + explicit const_mem_fun1_ref_t(S (T::*p)(A) const) + : + ptr(p) + {} + + S operator()(const T& p, typename call_traits::param_type x) const + { + return (p.*ptr)(x); + } + private: + S (T::*ptr)(A) const; + }; + + template + inline mem_fun_ref_t mem_fun_ref(S (T::*f)()) + { + return mem_fun_ref_t(f); + } + + template + inline mem_fun1_ref_t mem_fun_ref(S (T::*f)(A)) + { + return mem_fun1_ref_t(f); + } + +#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST + template + inline const_mem_fun_ref_t mem_fun_ref(S (T::*f)() const) + { + return const_mem_fun_ref_t(f); + } + + template + inline const_mem_fun1_ref_t mem_fun_ref(S (T::*f)(A) const) + { + return const_mem_fun1_ref_t(f); + } +#endif // BOOST_NO_POINTER_TO_MEMBER_CONST + + // -------------------------------------------------------------------------- + // ptr_fun + // -------------------------------------------------------------------------- + template + class pointer_to_unary_function : public boost::functional::detail::unary_function + { + public: + explicit pointer_to_unary_function(Result (*f)(Arg)) + : + func(f) + {} + + Result operator()(typename call_traits::param_type x) const + { + return func(x); + } + + private: + Result (*func)(Arg); + }; + + template + inline pointer_to_unary_function ptr_fun(Result (*f)(Arg)) + { + return pointer_to_unary_function(f); + } + + template + class pointer_to_binary_function : public boost::functional::detail::binary_function + { + public: + explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2)) + : + func(f) + {} + + Result operator()(typename call_traits::param_type x, typename call_traits::param_type y) const + { + return func(x,y); + } + + private: + Result (*func)(Arg1, Arg2); + }; + + template + inline pointer_to_binary_function ptr_fun(Result (*f)(Arg1, Arg2)) + { + return pointer_to_binary_function(f); + } +} // namespace boost + +#endif diff --git a/Slang/boost/generator_iterator.hpp b/Slang/boost/generator_iterator.hpp new file mode 100644 index 0000000..0fe1569 --- /dev/null +++ b/Slang/boost/generator_iterator.hpp @@ -0,0 +1,85 @@ +// (C) Copyright Jens Maurer 2001. +// Distributed under the 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: + +// 15 Nov 2001 Jens Maurer +// created. + +// See http://www.boost.org/libs/utility/iterator_adaptors.htm for documentation. + +#ifndef BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP +#define BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP + +#include +#include + +namespace boost { +namespace iterators { + +template +class generator_iterator + : public iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > +{ + typedef iterator_facade< + generator_iterator + , typename Generator::result_type + , single_pass_traversal_tag + , typename Generator::result_type const& + > super_t; + + public: + generator_iterator() {} + generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {} + + void increment() + { + m_value = (*m_g)(); + } + + const typename Generator::result_type& + dereference() const + { + return m_value; + } + + bool equal(generator_iterator const& y) const + { + return this->m_g == y.m_g && this->m_value == y.m_value; + } + + private: + Generator* m_g; + typename Generator::result_type m_value; +}; + +template +struct generator_iterator_generator +{ + typedef generator_iterator type; +}; + +template +inline generator_iterator +make_generator_iterator(Generator & gen) +{ + typedef generator_iterator result_t; + return result_t(&gen); +} + +} // namespace iterators + +using iterators::generator_iterator; +using iterators::generator_iterator_generator; +using iterators::make_generator_iterator; + +} // namespace boost + +#endif // BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP diff --git a/Slang/boost/geometry.hpp b/Slang/boost/geometry.hpp new file mode 100644 index 0000000..a4756e7 --- /dev/null +++ b/Slang/boost/geometry.hpp @@ -0,0 +1,19 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) + +// Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2011 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2011 Mateusz Loskot, London, UK. + +// 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_HPP +#define BOOST_GEOMETRY_HPP + +#include + +#endif // BOOST_GEOMETRY_HPP diff --git a/Slang/boost/get_pointer.hpp b/Slang/boost/get_pointer.hpp new file mode 100644 index 0000000..36e2cd7 --- /dev/null +++ b/Slang/boost/get_pointer.hpp @@ -0,0 +1,76 @@ +// Copyright Peter Dimov and David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef GET_POINTER_DWA20021219_HPP +#define GET_POINTER_DWA20021219_HPP + +#include + +// In order to avoid circular dependencies with Boost.TR1 +// we make sure that our include of doesn't try to +// pull in the TR1 headers: that's why we use this header +// rather than including directly: +#include // std::auto_ptr + +namespace boost { + +// get_pointer(p) extracts a ->* capable pointer from p + +template T * get_pointer(T * p) +{ + return p; +} + +// get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp + +#if !defined( BOOST_NO_AUTO_PTR ) + +#if defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) +#if defined( BOOST_GCC ) +#if BOOST_GCC >= 40600 +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // BOOST_GCC >= 40600 +#elif defined( __clang__ ) && defined( __has_warning ) +#if __has_warning("-Wdeprecated-declarations") +#define BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif // __has_warning("-Wdeprecated-declarations") +#endif +#endif // defined( __GNUC__ ) && (defined( __GXX_EXPERIMENTAL_CXX0X__ ) || (__cplusplus >= 201103L)) + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +// Disable libstdc++ warnings about std::auto_ptr being deprecated in C++11 mode +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#define BOOST_CORE_DETAIL_DISABLED_DEPRECATED_WARNINGS +#endif + +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} + +#if defined( BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS ) +#pragma GCC diagnostic pop +#undef BOOST_CORE_DETAIL_DISABLE_LIBSTDCXX_DEPRECATED_WARNINGS +#endif + +#endif // !defined( BOOST_NO_AUTO_PTR ) + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + +template T * get_pointer( std::unique_ptr const& p ) +{ + return p.get(); +} + +template T * get_pointer( std::shared_ptr const& p ) +{ + return p.get(); +} + +#endif + +} // namespace boost + +#endif // GET_POINTER_DWA20021219_HPP diff --git a/Slang/boost/gil.hpp b/Slang/boost/gil.hpp new file mode 100644 index 0000000..5fc7d15 --- /dev/null +++ b/Slang/boost/gil.hpp @@ -0,0 +1,49 @@ +// +// Copyright 2018 Stefan Seefeld +// Copyright 2005-2007 Adobe Systems Incorporated +// +// Distributed under the Boost Software License, Version 1.0 +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +#ifndef BOOST_GIL_HPP +#define BOOST_GIL_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/hana.hpp b/Slang/boost/hana.hpp new file mode 100644 index 0000000..a8ad041 --- /dev/null +++ b/Slang/boost/hana.hpp @@ -0,0 +1,209 @@ +/*! +@file +Includes all the library components except the adapters for external +libraries. + +@copyright Louis Dionne 2013-2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_HANA_HPP +#define BOOST_HANA_HPP + +//! @defgroup group-concepts Concepts +//! Concepts provided by the library. + +//! @defgroup group-datatypes Data types +//! General purpose data types provided by the library. + +//! @defgroup group-functional Functional +//! General purpose function objects. + +//! @defgroup group-core Core +//! Core utilities of the library. + +//! @defgroup group-experimental Experimental features +//! Experimental features that may or may not make it into the library. +//! These features should not expected to be stable. + +//! @defgroup group-ext External adapters +//! Adapters for external libraries. + +//! @defgroup group-config Configuration options +//! Configurable options to tweak the global behavior of the library. + +//! @defgroup group-assertions Assertions +//! Macros to perform different kinds of assertions. + +//! @defgroup group-details Details +//! Implementation details. Do not rely on anything here, even if it is +//! documented. + +// Include config.hpp first, so that warning messages about compiler support +// appear as soon as possible. +#include + + +#ifdef BOOST_HANA_DOXYGEN_INVOKED +namespace boost { + //! Namespace containing everything in the library. + namespace hana { + //! Namespace containing C++14 user-defined literals provided by Hana. + namespace literals {} + } +} +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // !BOOST_HANA_HPP diff --git a/Slang/boost/histogram.hpp b/Slang/boost/histogram.hpp new file mode 100644 index 0000000..8b91ce2 --- /dev/null +++ b/Slang/boost/histogram.hpp @@ -0,0 +1,37 @@ +// Copyright 2015-2018 Hans Dembinski +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_HISTOGRAM_HPP +#define BOOST_HISTOGRAM_HPP + +/** + \file boost/histogram.hpp + Includes all standard headers of the Boost.Histogram library. + + Extra headers not automatically included are: + - [boost/histogram/ostream.hpp][1] + - [boost/histogram/axis/ostream.hpp][2] + - [boost/histogram/accumulators/ostream.hpp][3] + - [boost/histogram/serialization.hpp][4] + + [1]: histogram/reference.html#header.boost.histogram.ostream_hpp + [2]: histogram/reference.html#header.boost.histogram.axis.ostream_hpp + [3]: histogram/reference.html#header.boost.histogram.accumulators.ostream_hpp + [4]: histogram/reference.html#header.boost.histogram.serialization_hpp +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/hof.hpp b/Slang/boost/hof.hpp new file mode 100644 index 0000000..391349b --- /dev/null +++ b/Slang/boost/hof.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2016 Paul Fultz II + boost/hof.hpp + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_HOF_GUARD_BOOST_HOF_HPP +#define BOOST_HOF_GUARD_BOOST_HOF_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { namespace hof { + +}} // namespace boost::hof + +#endif diff --git a/Slang/boost/implicit_cast.hpp b/Slang/boost/implicit_cast.hpp new file mode 100644 index 0000000..09e5f45 --- /dev/null +++ b/Slang/boost/implicit_cast.hpp @@ -0,0 +1,38 @@ +// Copyright David Abrahams 2003. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_IMPLICIT_CAST_DWA200356_HPP +#define BOOST_IMPLICIT_CAST_DWA200356_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { + +namespace detail { + +template struct icast_identity +{ + typedef T type; +}; + +} // namespace detail + +// implementation originally suggested by C. Green in +// http://lists.boost.org/MailArchives/boost/msg00886.php + +// The use of identity creates a non-deduced form, so that the +// explicit template argument must be supplied +template +BOOST_CONSTEXPR inline T implicit_cast (typename boost::detail::icast_identity::type x) { + return x; +} + +} // namespace boost + + +#endif // BOOST_IMPLICIT_CAST_DWA200356_HPP diff --git a/Slang/boost/indirect_reference.hpp b/Slang/boost/indirect_reference.hpp new file mode 100644 index 0000000..3279cd0 --- /dev/null +++ b/Slang/boost/indirect_reference.hpp @@ -0,0 +1,43 @@ +#ifndef INDIRECT_REFERENCE_DWA200415_HPP +# define INDIRECT_REFERENCE_DWA200415_HPP + +// +// Copyright David Abrahams 2004. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// typename indirect_reference

::type provides the type of *p. +// +// http://www.boost.org/libs/iterator/doc/pointee.html +// + +# include +# include +# include +# include +# include + +namespace boost { + +namespace detail +{ + template + struct smart_ptr_reference + { + typedef typename boost::pointee

::type& type; + }; +} + +template +struct indirect_reference + : mpl::eval_if< + detail::is_incrementable

+ , iterator_reference

+ , detail::smart_ptr_reference

+ > +{ +}; + +} // namespace boost + +#endif // INDIRECT_REFERENCE_DWA200415_HPP diff --git a/Slang/boost/integer.hpp b/Slang/boost/integer.hpp new file mode 100644 index 0000000..ad7945a --- /dev/null +++ b/Slang/boost/integer.hpp @@ -0,0 +1,262 @@ +// boost integer.hpp header file -------------------------------------------// + +// Copyright Beman Dawes and Daryle Walker 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) + +// See https://www.boost.org/libs/integer for documentation. + +// Revision History +// 22 Sep 01 Added value-based integer templates. (Daryle Walker) +// 01 Apr 01 Modified to use new header. (John Maddock) +// 30 Jul 00 Add typename syntax fix (Jens Maurer) +// 28 Aug 99 Initial version + +#ifndef BOOST_INTEGER_HPP +#define BOOST_INTEGER_HPP + +#include // self include + +#include // for boost::::boost::integer_traits +#include // for ::std::numeric_limits +#include // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T +#include + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// boost/integer.hpp:77:30: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost +{ + + // Helper templates ------------------------------------------------------// + + // fast integers from least integers + // int_fast_t<> works correctly for unsigned too, in spite of the name. + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; // imps may specialize + + namespace detail{ + + // convert category to type + template< int Category > struct int_least_helper {}; // default is empty + template< int Category > struct uint_least_helper {}; // default is empty + + // specializatons: 1=long, 2=int, 3=short, 4=signed char, + // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char + // no specializations for 0 and 5: requests for a type > long are in error +#ifdef BOOST_HAS_LONG_LONG + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct int_least_helper<1> { typedef __int64 least; }; +#endif + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; +#ifdef BOOST_HAS_LONG_LONG + template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; +#elif defined(BOOST_HAS_MS_INT64) + template<> struct uint_least_helper<1> { typedef unsigned __int64 least; }; +#endif + template<> struct uint_least_helper<2> { typedef unsigned long least; }; + template<> struct uint_least_helper<3> { typedef unsigned int least; }; + template<> struct uint_least_helper<4> { typedef unsigned short least; }; + template<> struct uint_least_helper<5> { typedef unsigned char least; }; + + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; +#if USHRT_MAX != UCHAR_MAX + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; +#endif +#if UINT_MAX != USHRT_MAX + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; +#endif +#if ULONG_MAX != UINT_MAX && ( !defined __TI_COMPILER_VERSION__ || \ + ( __TI_COMPILER_VERSION__ >= 7000000 && !defined __TI_40BIT_LONG__ ) ) + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; +#endif +#if defined(BOOST_HAS_LONG_LONG) &&\ + ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\ + (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\ + (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\ + (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX))) + template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; + template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; +#endif + + + } // namespace detail + + // integer templates specifying number of bits ---------------------------// + + // signed + template< int Bits > // bits (including sign) required + struct int_t : public boost::detail::exact_signed_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT), + "No suitable signed integer type with the requested number of bits is available."); + typedef typename boost::detail::int_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned + template< int Bits > // bits required + struct uint_t : public boost::detail::exact_unsigned_base_helper + { + BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT), + "No suitable unsigned integer type with the requested number of bits is available."); +#if (defined(BOOST_BORLANDC) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) + // It's really not clear why this workaround should be needed... shrug I guess! JM + BOOST_STATIC_CONSTANT(int, s = + 6 + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits)); + typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; +#else + typedef typename boost::detail::uint_least_helper + < +#ifdef BOOST_HAS_LONG_LONG + (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + +#else + 1 + +#endif + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; +#endif + typedef typename int_fast_t::type fast; + // int_fast_t<> works correctly for unsigned too, in spite of the name. + }; + + // integer templates specifying extreme value ----------------------------// + + // signed +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t + { + typedef typename boost::detail::int_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MinValue >= ::boost::integer_traits::const_min) + +#else + 1 + +#endif + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + + // unsigned +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // minimum value to require support +#else + template< unsigned long MaxValue > // minimum value to require support +#endif + struct uint_value_t + { +#if (defined(BOOST_BORLANDC) || defined(__CODEGEAR__)) + // It's really not clear why this workaround should be needed... shrug I guess! JM +#if defined(BOOST_NO_INTEGRAL_INT64_T) + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#else // BOOST_NO_INTEGRAL_INT64_T + BOOST_STATIC_CONSTANT(unsigned, which = + 1 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::uint_least_helper< ::boost::uint_value_t::which>::least least; +#endif // BOOST_NO_INTEGRAL_INT64_T +#else + typedef typename boost::detail::uint_least_helper + < +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + (MaxValue <= ::boost::integer_traits::const_max) + +#else + 1 + +#endif + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; +#endif + typedef typename int_fast_t::type fast; + }; + + +} // namespace boost + +#endif // BOOST_INTEGER_HPP diff --git a/Slang/boost/integer_fwd.hpp b/Slang/boost/integer_fwd.hpp new file mode 100644 index 0000000..6eac5aa --- /dev/null +++ b/Slang/boost/integer_fwd.hpp @@ -0,0 +1,190 @@ +// Boost integer_fwd.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) + +// See https://www.boost.org/libs/integer for documentation. + +#ifndef BOOST_INTEGER_FWD_HPP +#define BOOST_INTEGER_FWD_HPP + +#include // for UCHAR_MAX, etc. +#include // for std::size_t + +#include // for BOOST_NO_INTRINSIC_WCHAR_T +#include // for std::numeric_limits +#include // For intmax_t + + +namespace boost +{ + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_log2_argument_type; + typedef int static_log2_result_type; + typedef long static_min_max_signed_type; + typedef unsigned long static_min_max_unsigned_type; +#else + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +#endif + +// From ------------------------------------------------// + +// Only has typedefs or using statements, with #conditionals + + +// From -----------------------------------------// + +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template < > + class integer_traits< wchar_t >; +#endif + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) +template < > +class integer_traits< ::boost::long_long_type>; + +template < > +class integer_traits< ::boost::ulong_long_type >; +#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) +template < > +class integer_traits<__int64>; + +template < > +class integer_traits; +#endif + + +// From ------------------------------------------------// + +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MaxValue > // maximum value to require support +#else + template< long MaxValue > // maximum value to require support +#endif + struct int_max_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::long_long_type MinValue > // minimum value to require support +#else + template< long MinValue > // minimum value to require support +#endif + struct int_min_value_t; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) + template< boost::ulong_long_type MaxValue > // maximum value to require support +#else + template< unsigned long MaxValue > // maximum value to require support +#endif + struct uint_value_t; + + +// From -----------------------------------// + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + +// From ------------------------------------// + +template + struct static_log2; + +template <> struct static_log2<0u>; + + +// From ---------------------------------// + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + + +namespace integer +{ +// From + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_gcd_type; +#else + typedef boost::uintmax_t static_gcd_type; +#endif + +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_gcd; +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_lcm; + + +// From + +template < typename IntegerType > + class gcd_evaluator; +template < typename IntegerType > + class lcm_evaluator; + +} // namespace integer + +} // namespace boost + + +#endif // BOOST_INTEGER_FWD_HPP diff --git a/Slang/boost/integer_traits.hpp b/Slang/boost/integer_traits.hpp new file mode 100644 index 0000000..c2d4897 --- /dev/null +++ b/Slang/boost/integer_traits.hpp @@ -0,0 +1,256 @@ +/* boost integer_traits.hpp header file + * + * Copyright Jens Maurer 2000 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * https://www.boost.org/LICENSE_1_0.txt) + * + * $Id$ + * + * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers + */ + +// See https://www.boost.org/libs/integer for documentation. + + +#ifndef BOOST_INTEGER_TRAITS_HPP +#define BOOST_INTEGER_TRAITS_HPP + +#include +#include + +// These are an implementation detail and not part of the interface +#include +// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it, +// and some may have but not ... +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) +#include +#endif + +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = false); +}; + +namespace detail { +template +class integer_traits_base +{ +public: + BOOST_STATIC_CONSTANT(bool, is_integral = true); + BOOST_STATIC_CONSTANT(T, const_min = min_val); + BOOST_STATIC_CONSTANT(T, const_max = max_val); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; +#endif + +} // namespace detail + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> +class integer_traits + : public std::numeric_limits, + // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native + // library: they are wrong! +#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__) + public detail::integer_traits_base +#elif defined(BOOST_BORLANDC) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) + // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: + public detail::integer_traits_base +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ + || (defined __APPLE__)\ + || (defined(__OpenBSD__) && defined(__GNUC__))\ + || (defined(__NetBSD__) && defined(__GNUC__))\ + || (defined(__FreeBSD__) && defined(__GNUC__))\ + || (defined(__DragonFly__) && defined(__GNUC__))\ + || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library + // - gcc on FreeBSD, OpenBSD and NetBSD + public detail::integer_traits_base +#else +#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. +#endif +{ }; +#endif // BOOST_NO_INTRINSIC_WCHAR_T + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) +#if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX> +{ }; + +#elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ }; +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX> +{ }; + +#elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX> +{ }; + +#elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG) + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX> +{ }; + +#elif defined(BOOST_HAS_LONG_LONG) +// +// we have long long but no constants, this happens for example with gcc in -ansi mode, +// we'll just have to work out the values for ourselves (assumes 2's compliment representation): +// +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1)), ~(1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1))> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> +{ }; + +#elif defined(BOOST_HAS_MS_INT64) + +template<> +class integer_traits< __int64> + : public std::numeric_limits< __int64>, + public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> +{ }; + +template<> +class integer_traits< unsigned __int64> + : public std::numeric_limits< unsigned __int64>, + public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> +{ }; + +#endif +#endif + +} // namespace boost + +#endif /* BOOST_INTEGER_TRAITS_HPP */ + + + diff --git a/Slang/boost/intrusive_ptr.hpp b/Slang/boost/intrusive_ptr.hpp new file mode 100644 index 0000000..c43adbd --- /dev/null +++ b/Slang/boost/intrusive_ptr.hpp @@ -0,0 +1,18 @@ +#ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED +#define BOOST_INTRUSIVE_PTR_HPP_INCLUDED + +// +// intrusive_ptr.hpp +// +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. +// + +#include + +#endif // #ifndef BOOST_INTRUSIVE_PTR_HPP_INCLUDED diff --git a/Slang/boost/io_fwd.hpp b/Slang/boost/io_fwd.hpp new file mode 100644 index 0000000..2594d4e --- /dev/null +++ b/Slang/boost/io_fwd.hpp @@ -0,0 +1,63 @@ +/* +Copyright 2002 Daryle Walker + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_IO_FWD_HPP +#define BOOST_IO_FWD_HPP + +#include + +namespace boost { +namespace io { + +class ios_flags_saver; +class ios_precision_saver; +class ios_width_saver; +class ios_base_all_saver; + +template > +class basic_ios_iostate_saver; + +template > +class basic_ios_exception_saver; + +template > +class basic_ios_tie_saver; + +template > +class basic_ios_rdbuf_saver; + +template > +class basic_ios_fill_saver; + +template > +class basic_ios_locale_saver; + +template > +class basic_ios_all_saver; + +typedef basic_ios_iostate_saver ios_iostate_saver; +typedef basic_ios_iostate_saver wios_iostate_saver; +typedef basic_ios_exception_saver ios_exception_saver; +typedef basic_ios_exception_saver wios_exception_saver; +typedef basic_ios_tie_saver ios_tie_saver; +typedef basic_ios_tie_saver wios_tie_saver; +typedef basic_ios_rdbuf_saver ios_rdbuf_saver; +typedef basic_ios_rdbuf_saver wios_rdbuf_saver; +typedef basic_ios_fill_saver ios_fill_saver; +typedef basic_ios_fill_saver wios_fill_saver; +typedef basic_ios_locale_saver ios_locale_saver; +typedef basic_ios_locale_saver wios_locale_saver; +typedef basic_ios_all_saver ios_all_saver; +typedef basic_ios_all_saver wios_all_saver; + +class ios_iword_saver; +class ios_pword_saver; +class ios_all_word_saver; + +} /* io */ +} /* boost */ + +#endif diff --git a/Slang/boost/is_placeholder.hpp b/Slang/boost/is_placeholder.hpp new file mode 100644 index 0000000..5f1b544 --- /dev/null +++ b/Slang/boost/is_placeholder.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) +# pragma once +#endif + + +// is_placeholder.hpp - TR1 is_placeholder metafunction +// +// Copyright (c) 2006 Peter Dimov +// +// Distributed under the 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 boost +{ + +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; + +} // namespace boost + +#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/Slang/boost/iterator.hpp b/Slang/boost/iterator.hpp new file mode 100644 index 0000000..c9c6197 --- /dev/null +++ b/Slang/boost/iterator.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Beman Dawes 2000. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ITERATOR_HPP +#define BOOST_ITERATOR_HPP + +// This header is obsolete and will be deprecated. + +#include +#include // std::ptrdiff_t + +namespace boost +{ + +using std::iterator; + +} // namespace boost + +#endif // BOOST_ITERATOR_HPP diff --git a/Slang/boost/iterator_adaptors.hpp b/Slang/boost/iterator_adaptors.hpp new file mode 100644 index 0000000..ed9579c --- /dev/null +++ b/Slang/boost/iterator_adaptors.hpp @@ -0,0 +1,13 @@ +// Copyright David Abrahams 2004. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/iterator for documentation. + +#ifndef ITERATOR_ADAPTORS_DWA2004725_HPP +# define ITERATOR_ADAPTORS_DWA2004725_HPP + +#define BOOST_ITERATOR_ADAPTORS_VERSION 0x0200 +#include + +#endif // ITERATOR_ADAPTORS_DWA2004725_HPP diff --git a/Slang/boost/json.hpp b/Slang/boost/json.hpp new file mode 100644 index 0000000..ee3945e --- /dev/null +++ b/Slang/boost/json.hpp @@ -0,0 +1,46 @@ +// +// Copyright (c) 2019 Vinnie Falco (vinnie.falco@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) +// +// Official repository: https://github.com/boostorg/json +// + +#ifndef BOOST_JSON_HPP +#define BOOST_JSON_HPP + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Intentionally excluded +//#include + +#endif diff --git a/Slang/boost/lambda2.hpp b/Slang/boost/lambda2.hpp new file mode 100644 index 0000000..6b8022b --- /dev/null +++ b/Slang/boost/lambda2.hpp @@ -0,0 +1,10 @@ +#ifndef BOOST_LAMBDA2_HPP_INCLUDED +#define BOOST_LAMBDA2_HPP_INCLUDED + +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include + +#endif // #ifndef BOOST_LAMBDA2_HPP_INCLUDED diff --git a/Slang/boost/leaf.hpp b/Slang/boost/leaf.hpp new file mode 100644 index 0000000..dd62976 --- /dev/null +++ b/Slang/boost/leaf.hpp @@ -0,0 +1,11 @@ +#ifndef BOOST_LEAF_HPP_INCLUDED +#define BOOST_LEAF_HPP_INCLUDED + +// Copyright (c) 2018-2021 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 + +#endif diff --git a/Slang/boost/lexical_cast.hpp b/Slang/boost/lexical_cast.hpp new file mode 100644 index 0000000..ff17df0 --- /dev/null +++ b/Slang/boost/lexical_cast.hpp @@ -0,0 +1,105 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2021. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_INCLUDED +#define BOOST_LEXICAL_CAST_INCLUDED + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include + +namespace boost +{ + template + inline Target lexical_cast(const Source &arg) + { + Target result = Target(); + + if (!boost::conversion::detail::try_lexical_convert(arg, result)) { + boost::conversion::detail::throw_bad_cast(); + } + + return result; + } + + template + inline Target lexical_cast(const char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + + template + inline Target lexical_cast(const unsigned char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + + template + inline Target lexical_cast(const signed char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + inline Target lexical_cast(const wchar_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T + template + inline Target lexical_cast(const char16_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + template + inline Target lexical_cast(const char32_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif + +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_INCLUDED + diff --git a/Slang/boost/limits.hpp b/Slang/boost/limits.hpp new file mode 100644 index 0000000..47d8155 --- /dev/null +++ b/Slang/boost/limits.hpp @@ -0,0 +1,146 @@ + +// (C) Copyright John maddock 1999. +// (C) David Abrahams 2002. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// use this header as a workaround for missing + +// See http://www.boost.org/libs/compatibility/index.html for documentation. + +#ifndef BOOST_LIMITS +#define BOOST_LIMITS + +#include + +#ifdef BOOST_NO_LIMITS +# error "There is no std::numeric_limits suppport available." +#else +# include +#endif + +#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ + || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) +// Add missing specializations for numeric_limits: +#ifdef BOOST_HAS_MS_INT64 +# define BOOST_LLT __int64 +# define BOOST_ULLT unsigned __int64 +#else +# define BOOST_LLT ::boost::long_long_type +# define BOOST_ULLT ::boost::ulong_long_type +#endif + +#include // for CHAR_BIT + +namespace std +{ + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } +#elif defined(LLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } +#elif defined(LONGLONG_MAX) + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } +#else + static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } + static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = true); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_LLT epsilon() throw() { return 0; }; + static BOOST_LLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_LLT infinity() throw() { return 0; }; + static BOOST_LLT quiet_NaN() throw() { return 0; }; + static BOOST_LLT signaling_NaN() throw() { return 0; }; + static BOOST_LLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; + + template<> + class numeric_limits + { + public: + + BOOST_STATIC_CONSTANT(bool, is_specialized = true); +#ifdef BOOST_HAS_MS_INT64 + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } +#elif defined(ULLONG_MAX) && defined(ULLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } +#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } +#else + static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } + static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } +#endif + BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); + BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); + BOOST_STATIC_CONSTANT(bool, is_signed = false); + BOOST_STATIC_CONSTANT(bool, is_integer = true); + BOOST_STATIC_CONSTANT(bool, is_exact = true); + BOOST_STATIC_CONSTANT(int, radix = 2); + static BOOST_ULLT epsilon() throw() { return 0; }; + static BOOST_ULLT round_error() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(int, min_exponent = 0); + BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); + BOOST_STATIC_CONSTANT(int, max_exponent = 0); + BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); + + BOOST_STATIC_CONSTANT(bool, has_infinity = false); + BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); + BOOST_STATIC_CONSTANT(bool, has_denorm = false); + BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); + static BOOST_ULLT infinity() throw() { return 0; }; + static BOOST_ULLT quiet_NaN() throw() { return 0; }; + static BOOST_ULLT signaling_NaN() throw() { return 0; }; + static BOOST_ULLT denorm_min() throw() { return 0; }; + + BOOST_STATIC_CONSTANT(bool, is_iec559 = false); + BOOST_STATIC_CONSTANT(bool, is_bounded = true); + BOOST_STATIC_CONSTANT(bool, is_modulo = true); + + BOOST_STATIC_CONSTANT(bool, traps = false); + BOOST_STATIC_CONSTANT(bool, tinyness_before = false); + BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); + + }; +} +#endif + +#endif + diff --git a/Slang/boost/local_function.hpp b/Slang/boost/local_function.hpp new file mode 100644 index 0000000..548bbbb --- /dev/null +++ b/Slang/boost/local_function.hpp @@ -0,0 +1,459 @@ + +// Copyright (C) 2009-2012 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 +// (see accompanying file LICENSE_1_0.txt or a copy at +// http://www.boost.org/LICENSE_1_0.txt) +// Home at http://www.boost.org/libs/local_function + +#ifndef BOOST_LOCAL_FUNCTION_HPP_ +#define BOOST_LOCAL_FUNCTION_HPP_ + +#ifndef DOXYGEN + +#include +#include +#include +#include +#include +#include +#include + +// PUBLIC // + +#ifdef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_LOCAL_FUNCTION_ID(id, declarations) \ + BOOST_LOCAL_FUNCTION_AUX_DECL(id, 0 /* not within template */, \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST( \ + declarations))) +# define BOOST_LOCAL_FUNCTION(declarations) \ + BOOST_LOCAL_FUNCTION_ID( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, declarations) +# define BOOST_LOCAL_FUNCTION_ID_TPL(id, declarations) \ + BOOST_LOCAL_FUNCTION_AUX_DECL(id, 1 /* within template */, \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST( \ + declarations))) +# define BOOST_LOCAL_FUNCTION_TPL(declarations) \ + BOOST_LOCAL_FUNCTION_ID_TPL( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, declarations) +#else // VARIADIC +# define BOOST_LOCAL_FUNCTION_ID(id, ...) \ + BOOST_LOCAL_FUNCTION_AUX_DECL(id, 0 /* not within template */, \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(__VA_ARGS__))) +# define BOOST_LOCAL_FUNCTION(...) \ + BOOST_LOCAL_FUNCTION_ID( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, __VA_ARGS__) +# define BOOST_LOCAL_FUNCTION_ID_TPL(id, ...) \ + BOOST_LOCAL_FUNCTION_AUX_DECL(id, 1 /* within template */, \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_VOID_LIST(__VA_ARGS__))) +# define BOOST_LOCAL_FUNCTION_TPL(...) \ + BOOST_LOCAL_FUNCTION_ID_TPL( \ + BOOST_LOCAL_FUNCTION_DETAIL_PP_LINE_COUNTER, __VA_ARGS__) +#endif // VARIADIC + +#define BOOST_LOCAL_FUNCTION_NAME(qualified_name) \ + BOOST_LOCAL_FUNCTION_AUX_NAME(0 /* not within template */, qualified_name) +#define BOOST_LOCAL_FUNCTION_NAME_TPL(qualified_name) \ + BOOST_LOCAL_FUNCTION_AUX_NAME(1 /* within template */, qualified_name) + +#define BOOST_LOCAL_FUNCTION_TYPEOF(bound_variable_name) \ + BOOST_LOCAL_FUNCTION_AUX_TYPEOF_TYPE(bound_variable_name) + +// DOCUMENTATION // + +#else // DOXYGEN + +/** @file +@brief Local functions allow to program functions locally, within other +functions, and directly within the scope where they are needed. +*/ + +/** +@brief This macro is used to start a local function declaration. + +This macro must be used within a declarative context, it must follow the local +function result type, it must be followed by the local function body code, and +then by the @RefMacro{BOOST_LOCAL_FUNCTION_NAME} macro (see the +@RefSect{tutorial, Tutorial} and @RefSect{advanced_topics, Advanced Topics} +sections): +@code +{ // Some declarative context. + ... + result_type BOOST_LOCAL_FUNCTION(declarations) { + ... // Body code. + } BOOST_LOCAL_FUNCTION_NAME(qualified_name) + ... +} +@endcode + +As usual, exceptions specifications can be optionally programmed just after the +macro and before the body code block { ... } (but the exception +specifications will only apply to the body code and not to the library code +automatically generated by the macro expansion, see the +@RefSect{advanced_topics, Advanced Topics} section). + +Within templates, the special macros @RefMacro{BOOST_LOCAL_FUNCTION_TPL} +and @RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL} must be used. + +@Params +@Param{declarations, +On compilers that support variadic macros\, the parameter declarations are +defined by the following grammar: +@code + declarations: + void | declaration_tuple | declaration_sequence + declaration_tuple: + declaration\, declaration\, ... + declaration_sequence: + (declaration) (declaration) ... + declaration: + bound_variable | parameter | default_value | result_type + bound_variable: + [const] bind [(variable_type)] [&] variable_name + parameter: + [auto | register] parameter_type parameter_name + default_value: + default parameter_default_value + result_type: + return function_result_type +@endcode +On compilers that do not support variadic macros\, declaration_tuple +cannot be used: +@code + declarations: + void | declaration_sequence +@endcode + +(Lexical conventions: token1 | token2 means either token1 or +token2; [token] means either token or nothing; +{expression} means the token resulting from the expression.) +} +@EndParams + +Note that on compilers that support variadic macros, commas can be used to +separate the declarations resembling more closely the usual C++ function +declaration syntax (this is the preferred syntax). +However, for portability, on all C++ compilers (with and without variadic +macros) the same library macros also accept parameter declarations specified as +a Boost.Preprocessor sequence separated by round parenthesis (). + +When binding the object this, the special symbol this_ needs to +be used instead of this as the name of the variable to bind and also +within the local function body to access the object. +(Mistakenly using this instead of this_ might not always result in a compiler error and will in general result in undefined behaviour.) + +The result type must either be specified just before the macro or within the +macro declarations prefixed by return (but not in both places). + +Within the local function body it possible to access the result type using result_type, the type of the first parameter using arg1_type, the type of the second parameter using arg2_type, etc. +The bound variable types can be accessed using @RefMacro{BOOST_LOCAL_FUNCTION_TYPEOF}. + +This macro cannot be portably expanded multiple times on the same line. +In these cases, use the @RefMacro{BOOST_LOCAL_FUNCTION_ID} macro instead. + +The maximum number of local function parameters (excluding bound variables) is +specified by the configuration macro +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX}. +The maximum number of bound variables is specified by the configuration macro +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX}. +The configuration macro +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS} can be used to force +optimizations that reduce the local function call run-time overhead. + +@Note Local functions are functors so they can be assigned to other functors +like boost::function (see Boost.Function). + +@See @RefSect{tutorial, Tutorial} section, +@RefSect{advanced_topics, Advanced Topics} section, +@RefMacro{BOOST_LOCAL_FUNCTION_NAME}, @RefMacro{BOOST_LOCAL_FUNCTION_TPL}, +@RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL}, +@RefMacro{BOOST_LOCAL_FUNCTION_TYPEOF}, @RefMacro{BOOST_LOCAL_FUNCTION_ID}, +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_ARITY_MAX}, +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_BIND_MAX}, +@RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS}. +*/ +#define BOOST_LOCAL_FUNCTION(declarations) + +/** +@brief This macro is used to start a local function declaration within +templates. + +This macro must be used instead of @RefMacro{BOOST_LOCAL_FUNCTION} when +declaring a local function within a template. +A part from that, this macro has the exact same syntax a +@RefMacro{BOOST_LOCAL_FUNCTION} (see @RefMacro{BOOST_LOCAL_FUNCTION} for more +information): +@code +{ // Some declarative context within a template. + ... + result_type BOOST_LOCAL_FUNCTION_TPL(declarations) { + ... // Body code. + } BOOST_LOCAL_FUNCTION_NAME_TPL(qualified_name) + ... +} +@endcode + +Note that @RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL} must be used with this +macro instead of @RefMacro{BOOST_LOCAL_FUNCTION_NAME}. + +This macro cannot be portably expanded multiple times on the same line. +In these cases, use the @RefMacro{BOOST_LOCAL_FUNCTION_ID_TPL} macro instead. + +@Note C++03 does not allow to use typename outside templates. +This library internally manipulates types, these operations require +typename but only within templates. +This macro is used to indicate to the library when the enclosing scope is a +template so the library can correctly use typename. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_LOCAL_FUNCTION}, +@RefMacro{BOOST_LOCAL_FUNCTION_ID_TPL}, +@RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL}. +*/ +#define BOOST_LOCAL_FUNCTION_TPL(declarations) + +/** +@brief This macro allows to declare multiple local functions on the same line. + +This macro is equivalent to @RefMacro{BOOST_LOCAL_FUNCTION} but it can be +expanded multiple times on the same line if different identifiers id are +provided for each expansion (see the +@RefSect{advanced_topics, Advanced Topics} section). + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, local_function_number_1_on_line_123\, etc). +} +@Param{declarations, +Same as the declarations parameter of the +@RefMacro{BOOST_LOCAL_FUNCTION} macro. +} +@EndParams + +The @RefMacro{BOOST_LOCAL_FUNCTION_NAME} macro should be used to end each one +of the multiple local function declarations as usual (and it will specify a +unique name for each local function). + +Within templates, the special macros @RefMacro{BOOST_LOCAL_FUNCTION_ID_TPL} +must be used. + +@Note This macro can be useful when the local function macros are expanded +within user-defined macros (because macros all expand on the same line). +On some compilers (e.g., MSVC which supports the non-standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro when expanding multiple local function macros on the same +line is always necessary to ensure portability (this is because this library +can only portably use __LINE__ to internally generate unique +identifiers). + +@See @RefSect{advanced_topics, Advanced Topics} section, +@RefMacro{BOOST_LOCAL_FUNCTION}, @RefMacro{BOOST_LOCAL_FUNCTION_NAME}, +@RefMacro{BOOST_LOCAL_FUNCTION_ID_TPL}. +*/ +#define BOOST_LOCAL_FUNCTION_ID(id, declarations) + +/** +@brief This macro allows to declare multiple local functions on the same line +within templates. + +This macro must be used instead of @RefMacro{BOOST_LOCAL_FUNCTION_TPL} when +declaring multiple local functions on the same line within a template. +A part from that, this macro has the exact same syntax as +@RefMacro{BOOST_LOCAL_FUNCTION_TPL} (see @RefMacro{BOOST_LOCAL_FUNCTION_TPL} +for more information). + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, local_function_number_1_on_line_123\, etc). +} +@Param{declarations, +Same as the declarations parameter of the +@RefMacro{BOOST_LOCAL_FUNCTION_TPL} macro. +} +@EndParams + +The @RefMacro{BOOST_LOCAL_FUNCTION_NAME} macro should be used to end each one +of the multiple local function declarations as usual (and it will specify a +unique name for each local function). + +Outside template, the macro @RefMacro{BOOST_LOCAL_FUNCTION_ID} should be used +to declare multiple local functions on the same line. + +@Note This macro can be useful when the local function macros are expanded +within user-defined macros (because macros all expand on the same line). +On some compilers (e.g., MSVC which supports the non-standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro when expanding multiple local function macros on the same +line is always necessary to ensure portability (this is because this library +can only portably use __LINE__ to internally generate unique +identifiers). + +@See @RefSect{advanced_topics, Advanced Topics} section, +@RefMacro{BOOST_LOCAL_FUNCTION_TPL}, @RefMacro{BOOST_LOCAL_FUNCTION_NAME}, +@RefMacro{BOOST_LOCAL_FUNCTION_ID}. +*/ +#define BOOST_LOCAL_FUNCTION_ID_TPL(id, declarations) + +/** +@brief This macro is used to end a local function declaration specifying its +name. + +This macro must follow the local function body code block { ... }: +@code +{ // Some declarative context. + ... + result_type BOOST_LOCAL_FUNCTION(declarations) { + ... // Body code. + } BOOST_LOCAL_FUNCTION_NAME(qualified_name) + ... +} +@endcode + +Within templates, the special macros @RefMacro{BOOST_LOCAL_FUNCTION_TPL} and +@RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL} must be used. + +@Params +@Param{qualified_name, +The name of the local function optionally qualified as follow: +@code + name: + [inline] [recursive] local_function_name +@endcode +(Lexical conventions: token1 | token2 means either token1 or +token2; [token] means either token or nothing; +{expression} means the token resulting from the expression.) +} +@EndParams + +The local function name can be qualified by prefixing it with the keyword +inline (see the @RefSect{advanced_topics, Advanced Topics} section): +@code + BOOST_LOCAL_FUNCTION_NAME(inline local_function_name) +@endcode +This increases the chances that the compiler will be able to inline the local +function calls (thus reducing run-time). +However, inline local functions cannot be passed as template parameters (e.g., to std::for_each) or assigned to other functors (e.g., to +boost::function). +That is true on C++03 compilers but inline local functions can instead be +passed as template parameters on C++11 compilers. +On C++11 compilers, there is no need to declare a local function lined because +this library will automatically use C++11 specific features to inline the local +function while always allowing to pass it as a template parameter. +This optimization is automatically enabled when the Boost.Config macro +BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS is not defined but it also be +forced using @RefMacro{BOOST_LOCAL_FUNCTION_CONFIG_LOCALS_AS_TPARAMS}. + +The local function name can also be qualified by prefixing it with the +"keyword" recursive (see the +@RefSect{advanced_topics, Advanced Topics} section): +@code + BOOST_LOCAL_FUNCTION_NAME(recursive local_function_name) +@endcode +This allows the local function to recursively call itself from its body (as +usual in C++). +However, recursive local functions should only be called within their +declaration scope (otherwise the result is undefined behaviour). +Finally, compilers have not been observed to be able to inline recursive local +function calls, not even when the recursive local function is also declared +inline: +@code + BOOST_LOCAL_FUNCTION(inline recursive local_function_name) +@endcode + +@Note The local function name cannot be the name of an operator +operator... and it cannot be the same name of another local function +declared within the same enclosing scope (but boost::overloaded_function +can be used to overload local functions, see +Boost.Functional/OverloadedFunction and the +@RefSect{advanced_topics, Advanced Topics} section). + +@See @RefSect{tutorial, Tutorial} section, +@RefSect{advanced_topics, Advanced Topics} section, +@RefMacro{BOOST_LOCAL_FUNCTION}, +@RefMacro{BOOST_LOCAL_FUNCTION_NAME_TPL}. +*/ +#define BOOST_LOCAL_FUNCTION_NAME(qualified_name) + +/** +@brief This macro is used to end a local function declaration specifying its +name within templates. + +This macro must be used instead of @RefMacro{BOOST_LOCAL_FUNCTION_NAME} when +declaring a local function within a template. +A part from that, this macro has the exact same syntax a +@RefMacro{BOOST_LOCAL_FUNCTION_NAME} (see @RefMacro{BOOST_LOCAL_FUNCTION_NAME} +for more information): +@code +{ // Some declarative context within a template. + ... + result_type BOOST_LOCAL_FUNCTION_TPL(declarations) { + ... // Body code. + } BOOST_LOCAL_FUNCTION_NAME_TPL(qualified_name) + ... +} +@endcode + +Note that @RefMacro{BOOST_LOCAL_FUNCTION_TPL} must be used with this macro +instead of @RefMacro{BOOST_LOCAL_FUNCTION}. + +@Note C++03 does not allow to use typename outside templates. +This library internally manipulates types, these operations require +typename but only within templates. +This macro is used to indicate to the library when the enclosing scope is a +template so the library can correctly use typename. + +@See @RefSect{tutorial, Tutorial} section, +@RefMacro{BOOST_LOCAL_FUNCTION_NAME}, @RefMacro{BOOST_LOCAL_FUNCTION_TPL}. +*/ +#define BOOST_LOCAL_FUNCTION_NAME_TPL(name) + +/** +@brief This macro expands to the type of the specified bound variable. + +This macro can be used within the local functions body to refer to the bound +variable types so to declare local variables, check concepts (using +Boost.ConceptCheck), etc (see the @RefSect{advanced_topics, Advanced Topics} +section). +This way the local function can be programmed entirely without explicitly +specifying the bound variable types thus facilitating maintenance (e.g., if +the type of a bound variable changes in the enclosing scope, the local function +code does not have to change). + +@Params +@Param{bound_variable_name, +The name of one of the local function's bound variables. +} +@EndParams + +The type returned by the macro is fully qualified in that it contains the extra +constant and reference qualifiers when the specified variable is bound by +constant and by reference. +For example, if a variable named t of type T is: +@li Bound by value using bind t then +BOOST_LOCAL_FUNCTION_TYPEOF(t) is T. +@li Bound by constant value using const bind t then +BOOST_LOCAL_FUNCTION_TYPEOF(t) is const T. +@li Bound by reference using bind& t then +BOOST_LOCAL_FUNCTION_TYPEOF(t) is T&. +@li Bound by constant reference using const bind& t then +BOOST_LOCAL_FUNCTION_TYPEOF(t) is const T&. + +This macro must be prefixed by typename when used within templates. + +@Note It is best to use this macro instead of Boost.Typeof so to reduce the +number of times Boost.Typeof is used to deduce types (see the +@RefSect{advanced_topics, Advanced Topics} section). + +@See @RefSect{advanced_topics, Advanced Topics} section, +@RefMacro{BOOST_LOCAL_FUNCTION}. +*/ +#define BOOST_LOCAL_FUNCTION_TYPEOF(bound_variable_name) + +#endif // DOXYGEN + +#endif // #include guard + diff --git a/Slang/boost/locale.hpp b/Slang/boost/locale.hpp new file mode 100644 index 0000000..989bba6 --- /dev/null +++ b/Slang/boost/locale.hpp @@ -0,0 +1,27 @@ +// +// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef BOOST_LOCALE_HPP_INCLUDED +#define BOOST_LOCALE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/Slang/boost/make_default.hpp b/Slang/boost/make_default.hpp new file mode 100644 index 0000000..641ffd6 --- /dev/null +++ b/Slang/boost/make_default.hpp @@ -0,0 +1,40 @@ +/// @file +// Copyright (c) 2009-2020 Vladimir Batov. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. See http://www.boost.org/LICENSE_1_0.txt. + +#ifndef BOOST_MAKE_DEFAULT_HPP +#define BOOST_MAKE_DEFAULT_HPP + +namespace boost +{ + /// @details A considerable number of libraries require an instance of a class + /// provided (storage created and initialized). For example, + /// @code + /// Type result; + /// ... + /// istream >> result; + /// @endcode + /// In generic code that results in the Default Constructibility requirement imposed + /// on every type 'Type' to be used with the respective code. Inevitably, that requirement + /// a) either excludes all the classes that for various reasons do not meet that requirement or + /// b) imposes certain (not necessarily desirable) design/implementation onto respective classes. + /// + /// Deployment of boost::make_default() eliminates the Default Constructibility requirement with + /// @code + /// Type result = boost::make_default(); + /// ... + /// istream >> result; + /// @endcode + /// Classes with no default constructor can now be included via a boost::make_default() specialization: + /// @code + /// namespace boost + /// { + /// template<> inline Type make_default() { return Type(parameters); } + /// } + /// @endcode + + template T make_default() { return T(); } +} + +#endif // BOOST_MAKE_DEFAULT_HPP diff --git a/Slang/boost/make_shared.hpp b/Slang/boost/make_shared.hpp new file mode 100644 index 0000000..588fbfd --- /dev/null +++ b/Slang/boost/make_shared.hpp @@ -0,0 +1,16 @@ +#ifndef BOOST_MAKE_SHARED_HPP_INCLUDED +#define BOOST_MAKE_SHARED_HPP_INCLUDED + +// make_shared.hpp +// +// Copyright (c) 2007, 2008 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. + +#include + +#endif // #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED diff --git a/Slang/boost/make_unique.hpp b/Slang/boost/make_unique.hpp new file mode 100644 index 0000000..7189d6e --- /dev/null +++ b/Slang/boost/make_unique.hpp @@ -0,0 +1,13 @@ +/* +Copyright 2014 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_MAKE_UNIQUE_HPP_INCLUDED +#define BOOST_MAKE_UNIQUE_HPP_INCLUDED + +#include + +#endif diff --git a/Slang/boost/math_fwd.hpp b/Slang/boost/math_fwd.hpp new file mode 100644 index 0000000..cb04471 --- /dev/null +++ b/Slang/boost/math_fwd.hpp @@ -0,0 +1,42 @@ +// Boost math_fwd.hpp header file ------------------------------------------// + +// (C) Copyright Hubert Holin and Daryle Walker 2001-2002. Distributed under the 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/math for documentation. + +#ifndef BOOST_MATH_FWD_HPP +#define BOOST_MATH_FWD_HPP + +namespace boost +{ +namespace math +{ + + +// From ----------------------------------------// + +template < typename T > + class quaternion; + +// Also has many function templates (including operators) + + +// From ------------------------------------------// + +template < typename T > + class octonion; + +template < > + class octonion< float >; +template < > + class octonion< double >; +template < > + class octonion< long double >; + +} // namespace math +} // namespace boost + + +#endif // BOOST_MATH_FWD_HPP diff --git a/Slang/boost/mem_fn.hpp b/Slang/boost/mem_fn.hpp new file mode 100644 index 0000000..3bcd2c5 --- /dev/null +++ b/Slang/boost/mem_fn.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_MEM_FN_HPP_INCLUDED +#define BOOST_MEM_FN_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// mem_fn.hpp - a generalization of std::mem_fun[_ref] +// +// Copyright (c) 2009 Peter Dimov +// +// Distributed under the 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/bind/mem_fn.html for documentation. +// + +#include + +#endif // #ifndef BOOST_MEM_FN_HPP_INCLUDED diff --git a/Slang/boost/memory_order.hpp b/Slang/boost/memory_order.hpp new file mode 100644 index 0000000..ba7d1cd --- /dev/null +++ b/Slang/boost/memory_order.hpp @@ -0,0 +1,82 @@ +// boost/memory_order.hpp +// +// Defines enum boost::memory_order per the C++0x working draft +// +// Copyright (c) 2008, 2009 Peter Dimov +// Copyright (c) 2018 Andrey Semashev +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED +#define BOOST_MEMORY_ORDER_HPP_INCLUDED + +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +namespace boost +{ + +// +// Enum values are chosen so that code that needs to insert +// a trailing fence for acquire semantics can use a single +// test such as: +// +// if( mo & memory_order_acquire ) { ...fence... } +// +// For leading fences one can use: +// +// if( mo & memory_order_release ) { ...fence... } +// +// Architectures such as Alpha that need a fence on consume +// can use: +// +// if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... } +// +// The values are also in the order of increasing "strength" +// of the fences so that success/failure orders can be checked +// efficiently in compare_exchange methods. +// + +#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) + +enum class memory_order : unsigned int +{ + relaxed = 0, + consume = 1, + acquire = 2, + release = 4, + acq_rel = 6, // acquire | release + seq_cst = 14 // acq_rel | 8 +}; + +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_relaxed = memory_order::relaxed; +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_consume = memory_order::consume; +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_acquire = memory_order::acquire; +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_release = memory_order::release; +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_acq_rel = memory_order::acq_rel; +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST memory_order memory_order_seq_cst = memory_order::seq_cst; + +#undef BOOST_MEMORY_ORDER_INLINE_VARIABLE + +#else // !defined(BOOST_NO_CXX11_SCOPED_ENUMS) + +enum memory_order +{ + memory_order_relaxed = 0, + memory_order_consume = 1, + memory_order_acquire = 2, + memory_order_release = 4, + memory_order_acq_rel = 6, // acquire | release + memory_order_seq_cst = 14 // acq_rel | 8 +}; + +#endif // !defined(BOOST_NO_CXX11_SCOPED_ENUMS) + +} // namespace boost + +#endif // #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED diff --git a/Slang/boost/metaparse.hpp b/Slang/boost/metaparse.hpp new file mode 100644 index 0000000..d6efecc --- /dev/null +++ b/Slang/boost/metaparse.hpp @@ -0,0 +1,118 @@ +// Copyright Abel Sinkovics (abel@sinkovics.hu) 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + diff --git a/Slang/boost/mp11.hpp b/Slang/boost/mp11.hpp new file mode 100644 index 0000000..5e45939 --- /dev/null +++ b/Slang/boost/mp11.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_MP11_HPP_INCLUDED +#define BOOST_MP11_HPP_INCLUDED + +// Copyright 2015 Peter Dimov. +// +// Distributed under the 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef BOOST_MP11_HPP_INCLUDED diff --git a/Slang/boost/mpi.hpp b/Slang/boost/mpi.hpp new file mode 100644 index 0000000..d9ed0c1 --- /dev/null +++ b/Slang/boost/mpi.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2006 Douglas Gregor . + +// 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) + +// Message Passing Interface + +// See www.boost.org/libs/mpi for documentation. + +/** @file mpi.hpp + * + * This file is a top-level convenience header that includes all of + * the Boost.MPI library headers. Users concerned about compile time + * may wish to include only specific headers from the Boost.MPI + * library. + * + */ +#ifndef BOOST_MPI_HPP +#define BOOST_MPI_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_MPI_HPP diff --git a/Slang/boost/multi_array.hpp b/Slang/boost/multi_array.hpp new file mode 100644 index 0000000..c9ed215 --- /dev/null +++ b/Slang/boost/multi_array.hpp @@ -0,0 +1,572 @@ +// Copyright 2002 The Trustees of Indiana University. + +// Copyright 2018 Glen Joseph Fernandes +// (glenjofe@gmail.com) + +// 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) + +// Boost.MultiArray Library +// Authors: Ronald Garcia +// Jeremy Siek +// Andrew Lumsdaine +// See http://www.boost.org/libs/multi_array for documentation. + +#ifndef BOOST_MULTI_ARRAY_HPP +#define BOOST_MULTI_ARRAY_HPP + +// +// multi_array.hpp - contains the multi_array class template +// declaration and definition +// + +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wshadow" +#endif + +#include "boost/multi_array/base.hpp" +#include "boost/multi_array/collection_concept.hpp" +#include "boost/multi_array/copy_array.hpp" +#include "boost/multi_array/iterator.hpp" +#include "boost/multi_array/subarray.hpp" +#include "boost/multi_array/multi_array_ref.hpp" +#include "boost/multi_array/algorithm.hpp" +#include "boost/core/alloc_construct.hpp" +#include "boost/core/empty_value.hpp" +#include "boost/array.hpp" +#include "boost/mpl/if.hpp" +#include "boost/type_traits.hpp" +#include +#include +#include +#include +#include + + + +namespace boost { + namespace detail { + namespace multi_array { + + struct populate_index_ranges { + multi_array_types::index_range + // RG: underscore on extent_ to stifle strange MSVC warning. + operator()(multi_array_types::index base, + multi_array_types::size_type extent_) { + return multi_array_types::index_range(base,base+extent_); + } + }; + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +// +// Compilers that don't support partial ordering may need help to +// disambiguate multi_array's templated constructors. Even vc6/7 are +// capable of some limited SFINAE, so we take the most-general version +// out of the overload set with disable_multi_array_impl. +// +template +char is_multi_array_impl_help(const_multi_array_view&); +template +char is_multi_array_impl_help(const_sub_array&); +template +char is_multi_array_impl_help(const_multi_array_ref&); + +char ( &is_multi_array_impl_help(...) )[2]; + +template +struct is_multi_array_impl +{ + static T x; + BOOST_STATIC_CONSTANT(bool, value = sizeof((is_multi_array_impl_help)(x)) == 1); + + typedef mpl::bool_ type; +}; + +template +struct disable_multi_array_impl_impl +{ + typedef int type; +}; + +template <> +struct disable_multi_array_impl_impl +{ + // forming a pointer to a reference triggers SFINAE + typedef int& type; +}; + + +template +struct disable_multi_array_impl : + disable_multi_array_impl_impl::value> +{ }; + + +template <> +struct disable_multi_array_impl +{ + typedef int type; +}; + + +#endif + + } //namespace multi_array + } // namespace detail + +template +class multi_array : + public multi_array_ref, + private boost::empty_value +{ + typedef boost::empty_value alloc_base; + typedef multi_array_ref super_type; +public: + typedef typename super_type::value_type value_type; + typedef typename super_type::reference reference; + typedef typename super_type::const_reference const_reference; + typedef typename super_type::iterator iterator; + typedef typename super_type::const_iterator const_iterator; + typedef typename super_type::reverse_iterator reverse_iterator; + typedef typename super_type::const_reverse_iterator const_reverse_iterator; + typedef typename super_type::element element; + typedef typename super_type::size_type size_type; + typedef typename super_type::difference_type difference_type; + typedef typename super_type::index index; + typedef typename super_type::extent_range extent_range; + + + template + struct const_array_view { + typedef boost::detail::multi_array::const_multi_array_view type; + }; + + template + struct array_view { + typedef boost::detail::multi_array::multi_array_view type; + }; + + explicit multi_array(const Allocator& alloc = Allocator()) : + super_type((T*)initial_base_,c_storage_order(), + /*index_bases=*/0, /*extents=*/0), + alloc_base(boost::empty_init_t(),alloc) { + allocate_space(); + } + + template + explicit multi_array( + ExtentList const& extents, + const Allocator& alloc = Allocator() +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + , typename mpl::if_< + detail::multi_array::is_multi_array_impl, + int&,int>::type* = 0 +#endif + ) : + super_type((T*)initial_base_,extents), + alloc_base(boost::empty_init_t(),alloc) { + boost::function_requires< + detail::multi_array::CollectionConcept >(); + allocate_space(); + } + + + template + explicit multi_array(ExtentList const& extents, + const general_storage_order& so) : + super_type((T*)initial_base_,extents,so), + alloc_base(boost::empty_init_t()) { + boost::function_requires< + detail::multi_array::CollectionConcept >(); + allocate_space(); + } + + template + explicit multi_array(ExtentList const& extents, + const general_storage_order& so, + Allocator const& alloc) : + super_type((T*)initial_base_,extents,so), + alloc_base(boost::empty_init_t(),alloc) { + boost::function_requires< + detail::multi_array::CollectionConcept >(); + allocate_space(); + } + + + explicit multi_array(const detail::multi_array + ::extent_gen& ranges, + const Allocator& alloc = Allocator()) : + super_type((T*)initial_base_,ranges), + alloc_base(boost::empty_init_t(),alloc) { + + allocate_space(); + } + + + explicit multi_array(const detail::multi_array + ::extent_gen& ranges, + const general_storage_order& so) : + super_type((T*)initial_base_,ranges,so), + alloc_base(boost::empty_init_t()) { + + allocate_space(); + } + + + explicit multi_array(const detail::multi_array + ::extent_gen& ranges, + const general_storage_order& so, + Allocator const& alloc) : + super_type((T*)initial_base_,ranges,so), + alloc_base(boost::empty_init_t(),alloc) { + + allocate_space(); + } + + multi_array(const multi_array& rhs) : + super_type(rhs), + alloc_base(static_cast(rhs)) { + allocate_space(); + boost::detail::multi_array::copy_n(rhs.base_,rhs.num_elements(),base_); + } + + + // + // A multi_array is constructible from any multi_array_ref, subarray, or + // array_view object. The following constructors ensure that. + // + + // Due to limited support for partial template ordering, + // MSVC 6&7 confuse the following with the most basic ExtentList + // constructor. +#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + template + multi_array(const const_multi_array_ref& rhs, + const general_storage_order& so = c_storage_order(), + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + // Warning! storage order may change, hence the following copy technique. + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + template + multi_array(const detail::multi_array:: + const_sub_array& rhs, + const general_storage_order& so = c_storage_order(), + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + + template + multi_array(const detail::multi_array:: + const_multi_array_view& rhs, + const general_storage_order& so = c_storage_order(), + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + +#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + // More limited support for MSVC + + + multi_array(const const_multi_array_ref& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + // Warning! storage order may change, hence the following copy technique. + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const const_multi_array_ref& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + // Warning! storage order may change, hence the following copy technique. + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const detail::multi_array:: + const_sub_array& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const detail::multi_array:: + const_sub_array& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + + multi_array(const detail::multi_array:: + const_multi_array_view& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const detail::multi_array:: + const_multi_array_view& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + +#endif // !BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + // Thes constructors are necessary because of more exact template matches. + multi_array(const multi_array_ref& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + // Warning! storage order may change, hence the following copy technique. + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const multi_array_ref& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + // Warning! storage order may change, hence the following copy technique. + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + + multi_array(const detail::multi_array:: + sub_array& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const detail::multi_array:: + sub_array& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + + multi_array(const detail::multi_array:: + multi_array_view& rhs, + const Allocator& alloc = Allocator()) + : super_type(0,c_storage_order(),rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + multi_array(const detail::multi_array:: + multi_array_view& rhs, + const general_storage_order& so, + const Allocator& alloc = Allocator()) + : super_type(0,so,rhs.index_bases(),rhs.shape()), + alloc_base(boost::empty_init_t(),alloc) + { + allocate_space(); + std::copy(rhs.begin(),rhs.end(),this->begin()); + } + + // Since assignment is a deep copy, multi_array_ref + // contains all the necessary code. + template + multi_array& operator=(const ConstMultiArray& other) { + super_type::operator=(other); + return *this; + } + + multi_array& operator=(const multi_array& other) { + if (&other != this) { + super_type::operator=(other); + } + return *this; + } + + + template + multi_array& resize(const ExtentList& extents) { + boost::function_requires< + detail::multi_array::CollectionConcept >(); + + typedef detail::multi_array::extent_gen gen_type; + gen_type ranges; + + for (int i=0; i != NumDims; ++i) { + typedef typename gen_type::range range_type; + ranges.ranges_[i] = range_type(0,extents[i]); + } + + return this->resize(ranges); + } + + + + multi_array& resize(const detail::multi_array + ::extent_gen& ranges) { + + + // build a multi_array with the specs given + multi_array new_array(ranges,this->storage_order(),allocator()); + + + // build a view of tmp with the minimum extents + + // Get the minimum extents of the arrays. + boost::array min_extents; + + const size_type& (*min)(const size_type&, const size_type&) = + std::min; + std::transform(new_array.extent_list_.begin(),new_array.extent_list_.end(), + this->extent_list_.begin(), + min_extents.begin(), + min); + + + // typedef boost::array index_list; + // Build index_gen objects to create views with the same shape + + // these need to be separate to handle non-zero index bases + typedef detail::multi_array::index_gen index_gen; + index_gen old_idxes; + index_gen new_idxes; + + std::transform(new_array.index_base_list_.begin(), + new_array.index_base_list_.end(), + min_extents.begin(),new_idxes.ranges_.begin(), + detail::multi_array::populate_index_ranges()); + + std::transform(this->index_base_list_.begin(), + this->index_base_list_.end(), + min_extents.begin(),old_idxes.ranges_.begin(), + detail::multi_array::populate_index_ranges()); + + // Build same-shape views of the two arrays + typename + multi_array::BOOST_NESTED_TEMPLATE array_view::type view_old = (*this)[old_idxes]; + typename + multi_array::BOOST_NESTED_TEMPLATE array_view::type view_new = new_array[new_idxes]; + + // Set the right portion of the new array + view_new = view_old; + + using std::swap; + // Swap the internals of these arrays. + swap(this->super_type::base_,new_array.super_type::base_); + swap(this->allocator(),new_array.allocator()); + swap(this->storage_,new_array.storage_); + swap(this->extent_list_,new_array.extent_list_); + swap(this->stride_list_,new_array.stride_list_); + swap(this->index_base_list_,new_array.index_base_list_); + swap(this->origin_offset_,new_array.origin_offset_); + swap(this->directional_offset_,new_array.directional_offset_); + swap(this->num_elements_,new_array.num_elements_); + swap(this->base_,new_array.base_); + swap(this->allocated_elements_,new_array.allocated_elements_); + + return *this; + } + + + ~multi_array() { + deallocate_space(); + } + +private: + friend inline bool operator==(const multi_array& a, const multi_array& b) { + return a.base() == b.base(); + } + + friend inline bool operator!=(const multi_array& a, const multi_array& b) { + return !(a == b); + } + + const super_type& base() const { + return *this; + } + + const Allocator& allocator() const { + return alloc_base::get(); + } + + Allocator& allocator() { + return alloc_base::get(); + } + + void allocate_space() { + base_ = allocator().allocate(this->num_elements()); + this->set_base_ptr(base_); + allocated_elements_ = this->num_elements(); + boost::alloc_construct_n(allocator(),base_,allocated_elements_); + } + + void deallocate_space() { + if(base_) { + boost::alloc_destroy_n(allocator(),base_,allocated_elements_); + allocator().deallocate(base_,allocated_elements_); + } + } + + typedef boost::array size_list; + typedef boost::array index_list; + + T* base_; + size_type allocated_elements_; + enum {initial_base_ = 0}; +}; + +} // namespace boost + +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406) +# pragma GCC diagnostic pop +#endif + +#endif diff --git a/Slang/boost/multi_index_container.hpp b/Slang/boost/multi_index_container.hpp new file mode 100644 index 0000000..9840a65 --- /dev/null +++ b/Slang/boost/multi_index_container.hpp @@ -0,0 +1,1578 @@ +/* Multiply indexed container. + * + * Copyright 2003-2021 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/multi_index for library home page. + */ + +#ifndef BOOST_MULTI_INDEX_HPP +#define BOOST_MULTI_INDEX_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include /* keep it first to prevent nasty warns in MSVC */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) +#include +#endif + +#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) +#include +#include +#include +#include +#include +#include +#include +#endif + +#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING) +#include +#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x) \ + detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \ + detail::make_obj_guard(x,&multi_index_container::check_invariant_); \ + BOOST_JOIN(check_invariant_,__LINE__).touch(); +#define BOOST_MULTI_INDEX_CHECK_INVARIANT \ + BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(*this) +#else +#define BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x) +#define BOOST_MULTI_INDEX_CHECK_INVARIANT +#endif + +namespace boost{ + +namespace multi_index{ + +namespace detail{ + +struct unequal_alloc_move_ctor_tag{}; + +} /* namespace multi_index::detail */ + +#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500)) +#pragma warning(push) +#pragma warning(disable:4522) /* spurious warning on multiple operator=()'s */ +#endif + +template +class multi_index_container: + private ::boost::base_from_member< + typename detail::rebind_alloc_for< + Allocator, + typename detail::multi_index_node_type< + Value,IndexSpecifierList,Allocator>::type + >::type + >, + BOOST_MULTI_INDEX_PRIVATE_IF_MEMBER_TEMPLATE_FRIENDS detail::header_holder< + typename detail::allocator_traits< + typename detail::rebind_alloc_for< + Allocator, + typename detail::multi_index_node_type< + Value,IndexSpecifierList,Allocator>::type + >::type + >::pointer, + multi_index_container >, + public detail::multi_index_base_type< + Value,IndexSpecifierList,Allocator>::type +{ +#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\ + BOOST_WORKAROUND(__MWERKS__,<=0x3003) +/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the + * lifetime of const references bound to temporaries --precisely what + * scopeguards are. + */ + +#pragma parse_mfunc_templ off +#endif + +private: + BOOST_COPYABLE_AND_MOVABLE(multi_index_container) + +#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + template friend class detail::index_base; + template friend struct detail::header_holder; + template friend struct detail::converter; +#endif + + typedef typename detail::multi_index_base_type< + Value,IndexSpecifierList,Allocator>::type super; + typedef typename detail::rebind_alloc_for< + Allocator, + typename super::index_node_type + >::type node_allocator; + typedef detail::allocator_traits node_alloc_traits; + typedef typename node_alloc_traits::pointer node_pointer; + typedef ::boost::base_from_member< + node_allocator> bfm_allocator; + typedef detail::header_holder< + node_pointer, + multi_index_container> bfm_header; + +public: + /* All types are inherited from super, a few are explicitly + * brought forward here to save us some typename's. + */ + + typedef typename super::ctor_args_list ctor_args_list; + typedef IndexSpecifierList index_specifier_type_list; + + typedef typename super::index_type_list index_type_list; + + typedef typename super::iterator_type_list iterator_type_list; + typedef typename super::const_iterator_type_list const_iterator_type_list; + typedef typename super::value_type value_type; + typedef typename super::final_allocator_type allocator_type; + typedef typename super::size_type size_type; + typedef typename super::iterator iterator; + typedef typename super::const_iterator const_iterator; + + BOOST_STATIC_ASSERT( + detail::no_duplicate_tags_in_index_list::value); + + /* global project() needs to see this publicly */ + + typedef typename super::final_node_type final_node_type; + + /* construct/copy/destroy */ + + multi_index_container(): + bfm_allocator(allocator_type()), + super(ctor_args_list(),bfm_allocator::member), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } + + explicit multi_index_container( + const ctor_args_list& args_list, + +#if BOOST_WORKAROUND(__IBMCPP__,<=600) + /* VisualAge seems to have an ETI issue with the default value for + * argument al. + */ + + const allocator_type& al= + typename mpl::identity::type:: + allocator_type()): +#else + const allocator_type& al=allocator_type()): +#endif + + bfm_allocator(al), + super(args_list,bfm_allocator::member), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } + + explicit multi_index_container(const allocator_type& al): + bfm_allocator(al), + super(ctor_args_list(),bfm_allocator::member), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } + + template + multi_index_container( + InputIterator first,InputIterator last, + +#if BOOST_WORKAROUND(__IBMCPP__,<=600) + /* VisualAge seems to have an ETI issue with the default values + * for arguments args_list and al. + */ + + const ctor_args_list& args_list= + typename mpl::identity::type:: + ctor_args_list(), + const allocator_type& al= + typename mpl::identity::type:: + allocator_type()): +#else + const ctor_args_list& args_list=ctor_args_list(), + const allocator_type& al=allocator_type()): +#endif + + bfm_allocator(al), + super(args_list,bfm_allocator::member), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + BOOST_TRY{ + iterator hint=super::end(); + for(;first!=last;++first){ + hint=super::make_iterator( + insert_ref_(*first,hint.get_node()).first); + ++hint; + } + } + BOOST_CATCH(...){ + clear_(); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + multi_index_container( + std::initializer_list list, + const ctor_args_list& args_list=ctor_args_list(), + const allocator_type& al=allocator_type()): + bfm_allocator(al), + super(args_list,bfm_allocator::member), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + BOOST_TRY{ + typedef const Value* init_iterator; + + iterator hint=super::end(); + for(init_iterator first=list.begin(),last=list.end(); + first!=last;++first){ + hint=super::make_iterator(insert_(*first,hint.get_node()).first); + ++hint; + } + } + BOOST_CATCH(...){ + clear_(); + BOOST_RETHROW; + } + BOOST_CATCH_END + } +#endif + + multi_index_container( + const multi_index_container& x): + bfm_allocator( + node_alloc_traits::select_on_container_copy_construction( + x.bfm_allocator::member)), + bfm_header(), + super(x), + node_count(0) + { + copy_construct_from(x); + } + + multi_index_container(BOOST_RV_REF(multi_index_container) x): + bfm_allocator(boost::move(x.bfm_allocator::member)), + bfm_header(), + super(x,detail::do_not_copy_elements_tag()), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x); + swap_elements_(x); + } + + multi_index_container( + const multi_index_container& x, + const allocator_type& al): + bfm_allocator(al), + bfm_header(), + super(x), + node_count(0) + { + copy_construct_from(x); + } + + multi_index_container( + BOOST_RV_REF(multi_index_container) x,const allocator_type& al): + bfm_allocator(al), + bfm_header(), + super(x,detail::do_not_copy_elements_tag()), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x); + + if(al==x.get_allocator()){ + swap_elements_(x); + } + else{ + multi_index_container y(x,al,detail::unequal_alloc_move_ctor_tag()); + swap_elements_(y); + } + } + + ~multi_index_container() + { + delete_all_nodes_(); + } + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + /* As per http://www.boost.org/doc/html/move/emulation_limitations.html + * #move.emulation_limitations.assignment_operator + */ + + multi_index_container& operator=( + const multi_index_container& x) + { + multi_index_container y( + x, + node_alloc_traits::propagate_on_container_copy_assignment::value? + x.get_allocator():this->get_allocator()); + swap_(y,boost::true_type() /* swap_allocators */); + return *this; + } +#endif + + multi_index_container& operator=( + BOOST_COPY_ASSIGN_REF(multi_index_container) x) + { + multi_index_container y( + x, + node_alloc_traits::propagate_on_container_copy_assignment::value? + x.get_allocator():this->get_allocator()); + swap_(y,boost::true_type() /* swap_allocators */); + return *this; + } + + multi_index_container& operator=( + BOOST_RV_REF(multi_index_container) x) + { +#include + + BOOST_MULTI_INDEX_IF_CONSTEXPR( + node_alloc_traits::propagate_on_container_move_assignment::value){ + swap_(x,boost::true_type() /* swap_allocators */); + } + else if(this->get_allocator()==x.get_allocator()){ + swap_(x,boost::false_type() /* swap_allocators */); + } + else{ + multi_index_container y(boost::move(x),this->get_allocator()); + swap_(y,boost::false_type() /* swap_allocators */); + } + return *this; + +#include + } + +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + multi_index_container& operator=( + std::initializer_list list) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + typedef const Value* init_iterator; + + multi_index_container x(*this,detail::do_not_copy_elements_tag()); + iterator hint=x.end(); + for(init_iterator first=list.begin(),last=list.end(); + first!=last;++first){ + hint=x.make_iterator(x.insert_(*first,hint.get_node()).first); + ++hint; + } + x.swap_elements_(*this); + return*this; + } +#endif + + allocator_type get_allocator()const BOOST_NOEXCEPT + { + return allocator_type(bfm_allocator::member); + } + + /* retrieval of indices by number */ + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) + template + struct nth_index + { + BOOST_STATIC_ASSERT(N>=0&&N::type::value); + typedef typename mpl::at_c::type type; + }; + + template + typename nth_index::type& get()BOOST_NOEXCEPT + { + BOOST_STATIC_ASSERT(N>=0&&N::type::value); + return *this; + } + + template + const typename nth_index::type& get()const BOOST_NOEXCEPT + { + BOOST_STATIC_ASSERT(N>=0&&N::type::value); + return *this; + } +#endif + + /* retrieval of indices by tag */ + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) + template + struct index + { + typedef typename mpl::find_if< + index_type_list, + detail::has_tag + >::type iter; + + BOOST_STATIC_CONSTANT( + bool,index_found=!(is_same::type >::value)); + BOOST_STATIC_ASSERT(index_found); + + typedef typename mpl::deref::type type; + }; + + template + typename index::type& get()BOOST_NOEXCEPT + { + return *this; + } + + template + const typename index::type& get()const BOOST_NOEXCEPT + { + return *this; + } +#endif + + /* projection of iterators by number */ + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) + template + struct nth_index_iterator + { + typedef typename nth_index::type::iterator type; + }; + + template + struct nth_index_const_iterator + { + typedef typename nth_index::type::const_iterator type; + }; + + template + typename nth_index_iterator::type project(IteratorType it) + { + typedef typename nth_index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ + BOOST_STATIC_ASSERT( + (mpl::contains::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,*this); + return index_type::make_iterator( + static_cast(it.get_node())); + } + + template + typename nth_index_const_iterator::type project(IteratorType it)const + { + typedef typename nth_index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ + BOOST_STATIC_ASSERT(( + mpl::contains::value|| + mpl::contains::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,*this); + return index_type::make_iterator( + static_cast(it.get_node())); + } +#endif + + /* projection of iterators by tag */ + +#if !defined(BOOST_NO_MEMBER_TEMPLATES) + template + struct index_iterator + { + typedef typename index::type::iterator type; + }; + + template + struct index_const_iterator + { + typedef typename index::type::const_iterator type; + }; + + template + typename index_iterator::type project(IteratorType it) + { + typedef typename index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ + BOOST_STATIC_ASSERT( + (mpl::contains::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,*this); + return index_type::make_iterator( + static_cast(it.get_node())); + } + + template + typename index_const_iterator::type project(IteratorType it)const + { + typedef typename index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* fails in Sun C++ 5.7 */ + BOOST_STATIC_ASSERT(( + mpl::contains::value|| + mpl::contains::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,*this); + return index_type::make_iterator( + static_cast(it.get_node())); + } +#endif + +BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS: + typedef typename super::final_node_handle_type final_node_handle_type; + typedef typename super::copy_map_type copy_map_type; + + multi_index_container( + multi_index_container& x, + const allocator_type& al, + detail::unequal_alloc_move_ctor_tag): + bfm_allocator(al), + bfm_header(), + super(x), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT_OF(x); + BOOST_TRY{ + copy_map_type map(bfm_allocator::member,x.size(),x.header(),header()); + for(const_iterator it=x.begin(),it_end=x.end();it!=it_end;++it){ + map.move_clone(it.get_node()); + } + super::copy_(x,map); + map.release(); + node_count=x.size(); + x.clear(); + } + BOOST_CATCH(...){ + x.clear(); + BOOST_RETHROW; + } + BOOST_CATCH_END + + /* Not until this point are the indices required to be consistent, + * hence the position of the invariant checker. + */ + + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } + +#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) + multi_index_container( + const multi_index_container& x, + detail::do_not_copy_elements_tag): + bfm_allocator(x.bfm_allocator::member), + bfm_header(), + super(x,detail::do_not_copy_elements_tag()), + node_count(0) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } +#endif + + void copy_construct_from( + const multi_index_container& x) + { + copy_map_type map(bfm_allocator::member,x.size(),x.header(),header()); + for(const_iterator it=x.begin(),it_end=x.end();it!=it_end;++it){ + map.copy_clone(it.get_node()); + } + super::copy_(x,map); + map.release(); + node_count=x.size(); + + /* Not until this point are the indices required to be consistent, + * hence the position of the invariant checker. + */ + + BOOST_MULTI_INDEX_CHECK_INVARIANT; + } + + final_node_type* header()const + { + return &*bfm_header::member; + } + + final_node_type* allocate_node() + { + return &*node_alloc_traits::allocate(bfm_allocator::member,1); + } + + void deallocate_node(final_node_type* x) + { + node_alloc_traits::deallocate( + bfm_allocator::member,static_cast(x),1); + } + + void construct_value(final_node_type* x,const Value& v) + { + node_alloc_traits::construct( + bfm_allocator::member,boost::addressof(x->value()),v); + } + + void construct_value(final_node_type* x,BOOST_RV_REF(Value) v) + { + node_alloc_traits::construct( + bfm_allocator::member,boost::addressof(x->value()),boost::move(v)); + } + + BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG( + void,construct_value,vartempl_construct_value_impl,final_node_type*,x) + + void destroy_value(final_node_type* x) + { + node_alloc_traits::destroy( + bfm_allocator::member,boost::addressof(x->value())); + } + + bool empty_()const + { + return node_count==0; + } + + size_type size_()const + { + return node_count; + } + + size_type max_size_()const + { + return static_cast(-1); + } + + template + std::pair insert_(const Value& v,Variant variant) + { + final_node_type* x=0; + final_node_type* res=super::insert_(v,x,variant); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + return std::pair(res,false); + } + } + + std::pair insert_(const Value& v) + { + return insert_(v,detail::lvalue_tag()); + } + + std::pair insert_rv_(const Value& v) + { + return insert_(v,detail::rvalue_tag()); + } + + template + std::pair insert_ref_(T& t) + { + final_node_type* x=allocate_node(); + BOOST_TRY{ + construct_value(x,t); + BOOST_TRY{ + final_node_type* res=super::insert_( + x->value(),x,detail::emplaced_tag()); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + delete_node_(x); + return std::pair(res,false); + } + } + BOOST_CATCH(...){ + destroy_value(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + BOOST_CATCH(...){ + deallocate_node(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + std::pair insert_ref_(const value_type& x) + { + return insert_(x); + } + + std::pair insert_ref_(value_type& x) + { + return insert_(x); + } + + std::pair insert_nh_(final_node_handle_type& nh) + { + if(!nh)return std::pair(header(),false); + else{ + final_node_type* x=nh.node; + final_node_type* res=super::insert_( + x->value(),x,detail::emplaced_tag()); + if(res==x){ + nh.release_node(); + ++node_count; + return std::pair(res,true); + } + else return std::pair(res,false); + } + } + + template + std::pair transfer_(Index& x,final_node_type* n) + { + final_node_type* res=super::insert_(n->value(),n,&super::final(x)); + if(res==n){ + ++node_count; + return std::pair(res,true); + } + else{ + return std::pair(res,false); + } + } + + template + std::pair emplace_( + BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK) + { + final_node_type* x=allocate_node(); + BOOST_TRY{ + construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK); + BOOST_TRY{ + final_node_type* res=super::insert_( + x->value(),x,detail::emplaced_tag()); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + delete_node_(x); + return std::pair(res,false); + } + } + BOOST_CATCH(...){ + destroy_value(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + BOOST_CATCH(...){ + deallocate_node(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + template + std::pair insert_( + const Value& v,final_node_type* position,Variant variant) + { + final_node_type* x=0; + final_node_type* res=super::insert_(v,position,x,variant); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + return std::pair(res,false); + } + } + + std::pair insert_( + const Value& v,final_node_type* position) + { + return insert_(v,position,detail::lvalue_tag()); + } + + std::pair insert_rv_( + const Value& v,final_node_type* position) + { + return insert_(v,position,detail::rvalue_tag()); + } + + template + std::pair insert_ref_( + T& t,final_node_type* position) + { + final_node_type* x=allocate_node(); + BOOST_TRY{ + construct_value(x,t); + BOOST_TRY{ + final_node_type* res=super::insert_( + x->value(),position,x,detail::emplaced_tag()); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + delete_node_(x); + return std::pair(res,false); + } + } + BOOST_CATCH(...){ + destroy_value(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + BOOST_CATCH(...){ + deallocate_node(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + std::pair insert_ref_( + const value_type& x,final_node_type* position) + { + return insert_(x,position); + } + + std::pair insert_ref_( + value_type& x,final_node_type* position) + { + return insert_(x,position); + } + + std::pair insert_nh_( + final_node_handle_type& nh,final_node_type* position) + { + if(!nh)return std::pair(header(),false); + else{ + final_node_type* x=nh.node; + final_node_type* res=super::insert_( + x->value(),position,x,detail::emplaced_tag()); + if(res==x){ + nh.release_node(); + ++node_count; + return std::pair(res,true); + } + else return std::pair(res,false); + } + } + + template + std::pair emplace_hint_( + final_node_type* position, + BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK) + { + final_node_type* x=allocate_node(); + BOOST_TRY{ + construct_value(x,BOOST_MULTI_INDEX_FORWARD_PARAM_PACK); + BOOST_TRY{ + final_node_type* res=super::insert_( + x->value(),position,x,detail::emplaced_tag()); + if(res==x){ + ++node_count; + return std::pair(res,true); + } + else{ + delete_node_(x); + return std::pair(res,false); + } + } + BOOST_CATCH(...){ + destroy_value(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + BOOST_CATCH(...){ + deallocate_node(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + final_node_handle_type extract_(final_node_type* x) + { + --node_count; + super::extract_(x,detail::invalidate_iterators()); + return final_node_handle_type(x,get_allocator()); + } + + template + void extract_for_transfer_(final_node_type* x,Dst dst) + { + --node_count; + super::extract_(x,dst); + } + + void erase_(final_node_type* x) + { + --node_count; + super::extract_(x,detail::invalidate_iterators()); + delete_node_(x); + } + + void delete_node_(final_node_type* x) + { + destroy_value(x); + deallocate_node(x); + } + + void delete_all_nodes_() + { + super::delete_all_nodes_(); + } + + void clear_() + { + delete_all_nodes_(); + super::clear_(); + node_count=0; + } + + template + void transfer_range_( + Index& x, + BOOST_DEDUCED_TYPENAME Index::iterator first, + BOOST_DEDUCED_TYPENAME Index::iterator last) + { + while(first!=last){ + transfer_(x,static_cast((first++).get_node())); + } + } + + void swap_(multi_index_container& x) + { + swap_( + x, + boost::integral_constant< + bool,node_alloc_traits::propagate_on_container_swap::value>()); + } + + void swap_( + multi_index_container& x, + boost::true_type swap_allocators) + { + detail::adl_swap(bfm_allocator::member,x.bfm_allocator::member); + std::swap(bfm_header::member,x.bfm_header::member); + super::swap_(x,swap_allocators); + std::swap(node_count,x.node_count); + } + + void swap_( + multi_index_container& x, + boost::false_type swap_allocators) + { + std::swap(bfm_header::member,x.bfm_header::member); + super::swap_(x,swap_allocators); + std::swap(node_count,x.node_count); + } + + void swap_elements_( + multi_index_container& x) + { + std::swap(bfm_header::member,x.bfm_header::member); + super::swap_elements_(x); + std::swap(node_count,x.node_count); + } + + bool replace_(const Value& k,final_node_type* x) + { + return super::replace_(k,x,detail::lvalue_tag()); + } + + bool replace_rv_(const Value& k,final_node_type* x) + { + return super::replace_(k,x,detail::rvalue_tag()); + } + + template + bool modify_(Modifier& mod,final_node_type* x) + { + BOOST_TRY{ + mod(const_cast(x->value())); + } + BOOST_CATCH(...){ + this->erase_(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + + BOOST_TRY{ + if(!super::modify_(x)){ + delete_node_(x); + --node_count; + return false; + } + else return true; + } + BOOST_CATCH(...){ + delete_node_(x); + --node_count; + BOOST_RETHROW; + } + BOOST_CATCH_END + } + + template + bool modify_(Modifier& mod,Rollback& back_,final_node_type* x) + { + BOOST_TRY{ + mod(const_cast(x->value())); + } + BOOST_CATCH(...){ + this->erase_(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + + bool b; + BOOST_TRY{ + b=super::modify_rollback_(x); + } + BOOST_CATCH(...){ + BOOST_TRY{ + back_(const_cast(x->value())); + if(!super::check_rollback_(x))this->erase_(x); + BOOST_RETHROW; + } + BOOST_CATCH(...){ + this->erase_(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + BOOST_CATCH_END + + BOOST_TRY{ + if(!b){ + back_(const_cast(x->value())); + if(!super::check_rollback_(x))this->erase_(x); + return false; + } + else return true; + } + BOOST_CATCH(...){ + this->erase_(x); + BOOST_RETHROW; + } + BOOST_CATCH_END + } + +#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) + /* serialization */ + + friend class boost::serialization::access; + + BOOST_SERIALIZATION_SPLIT_MEMBER() + + typedef typename super::index_saver_type index_saver_type; + typedef typename super::index_loader_type index_loader_type; + + template + void save(Archive& ar,const unsigned int version)const + { + const serialization::collection_size_type s(size_()); + const detail::serialization_version value_version; + ar< + void load(Archive& ar,const unsigned int version) + { + BOOST_MULTI_INDEX_CHECK_INVARIANT; + + clear_(); + serialization::collection_size_type s; + detail::serialization_version value_version; + if(version<1){ + std::size_t sz; + ar>>serialization::make_nvp("count",sz); + s=static_cast(sz); + } + else{ + ar>>serialization::make_nvp("count",s); + } + if(version<2){ + value_version=0; + } + else{ + ar>>serialization::make_nvp("value_version",value_version); + } + + index_loader_type lm(bfm_allocator::member,s); + + for(std::size_t n=0;n value("item",ar,value_version); + std::pair p=insert_rv_( + value.get(),super::end().get_node()); + if(!p.second)throw_exception( + archive::archive_exception( + archive::archive_exception::other_exception)); + ar.reset_object_address( + boost::addressof(p.first->value()),boost::addressof(value.get())); + lm.add(p.first,ar,version); + } + lm.add_track(header(),ar,version); + + super::load_(ar,version,lm); + } +#endif + +#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING) + /* invariant stuff */ + + bool invariant_()const + { + return super::invariant_(); + } + + void check_invariant_()const + { + BOOST_MULTI_INDEX_INVARIANT_ASSERT(invariant_()); + } +#endif + +private: + template + void vartempl_construct_value_impl( + final_node_type* x,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK) + { + node_alloc_traits::construct( + bfm_allocator::member,boost::addressof(x->value()), + BOOST_MULTI_INDEX_FORWARD_PARAM_PACK); + } + + size_type node_count; + +#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\ + BOOST_WORKAROUND(__MWERKS__,<=0x3003) +#pragma parse_mfunc_templ reset +#endif +}; + +#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500)) +#pragma warning(pop) /* C4522 */ +#endif + +/* retrieval of indices by number */ + +template +struct nth_index +{ + BOOST_STATIC_CONSTANT( + int, + M=mpl::size::type::value); + BOOST_STATIC_ASSERT(N>=0&&N::type type; +}; + +template +typename nth_index< + multi_index_container,N>::type& +get( + multi_index_container& m)BOOST_NOEXCEPT +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename nth_index< + multi_index_container< + Value,IndexSpecifierList,Allocator>, + N + >::type index_type; + + BOOST_STATIC_ASSERT(N>=0&& + N< + mpl::size< + BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list + >::type::value); + + return detail::converter::index(m); +} + +template +const typename nth_index< + multi_index_container,N>::type& +get( + const multi_index_container& m +)BOOST_NOEXCEPT +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename nth_index< + multi_index_container< + Value,IndexSpecifierList,Allocator>, + N + >::type index_type; + + BOOST_STATIC_ASSERT(N>=0&& + N< + mpl::size< + BOOST_DEDUCED_TYPENAME multi_index_type::index_type_list + >::type::value); + + return detail::converter::index(m); +} + +/* retrieval of indices by tag */ + +template +struct index +{ + typedef typename MultiIndexContainer::index_type_list index_type_list; + + typedef typename mpl::find_if< + index_type_list, + detail::has_tag + >::type iter; + + BOOST_STATIC_CONSTANT( + bool,index_found=!(is_same::type >::value)); + BOOST_STATIC_ASSERT(index_found); + + typedef typename mpl::deref::type type; +}; + +template< + typename Tag,typename Value,typename IndexSpecifierList,typename Allocator +> +typename ::boost::multi_index::index< + multi_index_container,Tag>::type& +get( + multi_index_container& m)BOOST_NOEXCEPT +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename ::boost::multi_index::index< + multi_index_container< + Value,IndexSpecifierList,Allocator>, + Tag + >::type index_type; + + return detail::converter::index(m); +} + +template< + typename Tag,typename Value,typename IndexSpecifierList,typename Allocator +> +const typename ::boost::multi_index::index< + multi_index_container,Tag>::type& +get( + const multi_index_container& m +)BOOST_NOEXCEPT +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename ::boost::multi_index::index< + multi_index_container< + Value,IndexSpecifierList,Allocator>, + Tag + >::type index_type; + + return detail::converter::index(m); +} + +/* projection of iterators by number */ + +template +struct nth_index_iterator +{ + typedef typename nth_index::type::iterator type; +}; + +template +struct nth_index_const_iterator +{ + typedef typename nth_index::type::const_iterator type; +}; + +template< + int N,typename IteratorType, + typename Value,typename IndexSpecifierList,typename Allocator> +typename nth_index_iterator< + multi_index_container,N>::type +project( + multi_index_container& m, + IteratorType it) +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename nth_index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */ + BOOST_STATIC_ASSERT(( + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list, + IteratorType>::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,m); + return detail::converter::iterator( + m,static_cast(it.get_node())); +} + +template< + int N,typename IteratorType, + typename Value,typename IndexSpecifierList,typename Allocator> +typename nth_index_const_iterator< + multi_index_container,N>::type +project( + const multi_index_container& m, + IteratorType it) +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename nth_index::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */ + BOOST_STATIC_ASSERT(( + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list, + IteratorType>::value|| + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list, + IteratorType>::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,m); + return detail::converter::const_iterator( + m,static_cast(it.get_node())); +} + +/* projection of iterators by tag */ + +template +struct index_iterator +{ + typedef typename ::boost::multi_index::index< + MultiIndexContainer,Tag>::type::iterator type; +}; + +template +struct index_const_iterator +{ + typedef typename ::boost::multi_index::index< + MultiIndexContainer,Tag>::type::const_iterator type; +}; + +template< + typename Tag,typename IteratorType, + typename Value,typename IndexSpecifierList,typename Allocator> +typename index_iterator< + multi_index_container,Tag>::type +project( + multi_index_container& m, + IteratorType it) +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename ::boost::multi_index::index< + multi_index_type,Tag>::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */ + BOOST_STATIC_ASSERT(( + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list, + IteratorType>::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,m); + return detail::converter::iterator( + m,static_cast(it.get_node())); +} + +template< + typename Tag,typename IteratorType, + typename Value,typename IndexSpecifierList,typename Allocator> +typename index_const_iterator< + multi_index_container,Tag>::type +project( + const multi_index_container& m, + IteratorType it) +{ + typedef multi_index_container< + Value,IndexSpecifierList,Allocator> multi_index_type; + typedef typename ::boost::multi_index::index< + multi_index_type,Tag>::type index_type; + +#if !defined(__SUNPRO_CC)||!(__SUNPRO_CC<0x580) /* Sun C++ 5.7 fails */ + BOOST_STATIC_ASSERT(( + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::iterator_type_list, + IteratorType>::value|| + mpl::contains< + BOOST_DEDUCED_TYPENAME multi_index_type::const_iterator_type_list, + IteratorType>::value)); +#endif + + BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(it); + BOOST_MULTI_INDEX_CHECK_BELONGS_IN_SOME_INDEX(it,m); + return detail::converter::const_iterator( + m,static_cast(it.get_node())); +} + +/* Comparison. Simple forward to first index. */ + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator==( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)==get<0>(y); +} + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator<( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)(y); +} + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator!=( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)!=get<0>(y); +} + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator>( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)>get<0>(y); +} + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator>=( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)>=get<0>(y); +} + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator<=( + const multi_index_container& x, + const multi_index_container& y) +{ + return get<0>(x)<=get<0>(y); +} + +/* specialized algorithms */ + +template +void swap( + multi_index_container& x, + multi_index_container& y) +{ + x.swap(y); +} + +} /* namespace multi_index */ + +#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION) +/* class version = 1 : we now serialize the size through + * boost::serialization::collection_size_type. + * class version = 2 : proper use of {save|load}_construct_data. + */ + +namespace serialization { +template +struct version< + boost::multi_index_container +> +{ + BOOST_STATIC_CONSTANT(int,value=2); +}; +} /* namespace serialization */ +#endif + +/* Associated global functions are promoted to namespace boost, except + * comparison operators and swap, which are meant to be Koenig looked-up. + */ + +using multi_index::get; +using multi_index::project; + +} /* namespace boost */ + +#undef BOOST_MULTI_INDEX_CHECK_INVARIANT +#undef BOOST_MULTI_INDEX_CHECK_INVARIANT_OF + +#endif diff --git a/Slang/boost/multi_index_container_fwd.hpp b/Slang/boost/multi_index_container_fwd.hpp new file mode 100644 index 0000000..b35acad --- /dev/null +++ b/Slang/boost/multi_index_container_fwd.hpp @@ -0,0 +1,121 @@ +/* Copyright 2003-2013 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/multi_index for library home page. + */ + +#ifndef BOOST_MULTI_INDEX_FWD_HPP +#define BOOST_MULTI_INDEX_FWD_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include /* keep it first to prevent nasty warns in MSVC */ +#include +#include +#include +#include + +namespace boost{ + +namespace multi_index{ + +/* Default value for IndexSpecifierList specifies a container + * equivalent to std::set. + */ + +template< + typename Value, + typename IndexSpecifierList=indexed_by > >, + typename Allocator=std::allocator > +class multi_index_container; + +template +struct nth_index; + +template +struct index; + +template +struct nth_index_iterator; + +template +struct nth_index_const_iterator; + +template +struct index_iterator; + +template +struct index_const_iterator; + +/* get and project functions not fwd declared due to problems + * with dependent typenames + */ + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator==( + const multi_index_container& x, + const multi_index_container& y); + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator<( + const multi_index_container& x, + const multi_index_container& y); + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator!=( + const multi_index_container& x, + const multi_index_container& y); + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator>( + const multi_index_container& x, + const multi_index_container& y); + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator>=( + const multi_index_container& x, + const multi_index_container& y); + +template< + typename Value1,typename IndexSpecifierList1,typename Allocator1, + typename Value2,typename IndexSpecifierList2,typename Allocator2 +> +bool operator<=( + const multi_index_container& x, + const multi_index_container& y); + +template +void swap( + multi_index_container& x, + multi_index_container& y); + +} /* namespace multi_index */ + +/* multi_index_container, being the main type of this library, is promoted to + * namespace boost. + */ + +using multi_index::multi_index_container; + +} /* namespace boost */ + +#endif diff --git a/Slang/boost/next_prior.hpp b/Slang/boost/next_prior.hpp new file mode 100644 index 0000000..5de705f --- /dev/null +++ b/Slang/boost/next_prior.hpp @@ -0,0 +1,195 @@ +// Boost next_prior.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. +// Copyright (c) Andrey Semashev 2017 +// +// Distributed under the 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/utility for documentation. + +// Revision History +// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) + +#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_NEXT_PRIOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +// Helper functions for classes like bidirectional iterators not supporting +// operator+ and operator- +// +// Usage: +// const std::list::iterator p = get_some_iterator(); +// const std::list::iterator prev = boost::prior(p); +// const std::list::iterator next = boost::next(prev, 2); + +// Contributed by Dave Abrahams + +namespace next_prior_detail { + +// The trait attempts to detect if the T type is an iterator. Class-type iterators are assumed +// to have the nested type iterator_category. Strictly speaking, this is not required to be the +// case (e.g. a user can specialize iterator_traits for T without defining T::iterator_category). +// Still, this is a good heuristic in practice, and we can't do anything better anyway. +// Since C++17 we can test for iterator_traits::iterator_category presence instead as it is +// required to be only present for iterators. +template< typename T, typename Void = void > +struct is_iterator_class +{ + static BOOST_CONSTEXPR_OR_CONST bool value = false; +}; + +template< typename T > +struct is_iterator_class< + T, + typename enable_if_has_type< +#if !defined(BOOST_NO_CXX17_ITERATOR_TRAITS) + typename std::iterator_traits< T >::iterator_category +#else + typename T::iterator_category +#endif + >::type +> +{ + static BOOST_CONSTEXPR_OR_CONST bool value = true; +}; + +template< typename T > +struct is_iterator : + public is_iterator_class< T > +{ +}; + +template< typename T > +struct is_iterator< T* > +{ + static BOOST_CONSTEXPR_OR_CONST bool value = true; +}; + + +template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value > +struct next_plus_impl; + +template< typename T, typename Distance > +struct next_plus_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x + n; + } +}; + +template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value > +struct next_plus_assign_impl : + public next_plus_impl< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct next_plus_assign_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + x += n; + return x; + } +}; + +template< typename T, typename Distance, bool IsIterator = is_iterator< T >::value > +struct next_advance_impl : + public next_plus_assign_impl< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct next_advance_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + boost::iterators::advance(x, n); + return x; + } +}; + + +template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value > +struct prior_minus_impl; + +template< typename T, typename Distance > +struct prior_minus_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x - n; + } +}; + +template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value > +struct prior_minus_assign_impl : + public prior_minus_impl< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_minus_assign_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + x -= n; + return x; + } +}; + +template< typename T, typename Distance, bool IsIterator = is_iterator< T >::value > +struct prior_advance_impl : + public prior_minus_assign_impl< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_advance_impl< T, Distance, true > +{ + static T call(T x, Distance n) + { + // Avoid negating n to sidestep possible integer overflow + boost::iterators::reverse_iterator< T > rx(x); + boost::iterators::advance(rx, n); + return rx.base(); + } +}; + +} // namespace next_prior_detail + +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + return next_prior_detail::next_advance_impl< T, Distance >::call(x, n); +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + return next_prior_detail::prior_advance_impl< T, Distance >::call(x, n); +} + +} // namespace boost + +#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED diff --git a/Slang/boost/non_type.hpp b/Slang/boost/non_type.hpp new file mode 100644 index 0000000..896aed4 --- /dev/null +++ b/Slang/boost/non_type.hpp @@ -0,0 +1,27 @@ +// ------------------------------------- +// +// (C) Copyright Gennaro Prota 2003. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ------------------------------------------------------ + +#ifndef BOOST_NON_TYPE_HPP_GP_20030417 +#define BOOST_NON_TYPE_HPP_GP_20030417 + + +namespace boost { + + // Just a simple "envelope" for non-type template parameters. Useful + // to work around some MSVC deficiencies. + + template + struct non_type { }; + + +} + + +#endif // include guard diff --git a/Slang/boost/noncopyable.hpp b/Slang/boost/noncopyable.hpp new file mode 100644 index 0000000..e998ee8 --- /dev/null +++ b/Slang/boost/noncopyable.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_NONCOPYABLE_HPP +#define BOOST_NONCOPYABLE_HPP + +// The header file at this path is deprecated; +// use boost/core/noncopyable.hpp instead. + +#include + +#endif diff --git a/Slang/boost/nondet_random.hpp b/Slang/boost/nondet_random.hpp new file mode 100644 index 0000000..1ec2e44 --- /dev/null +++ b/Slang/boost/nondet_random.hpp @@ -0,0 +1,22 @@ +/* boost nondet_random.hpp header file + * + * Copyright Jens Maurer 2000 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * $Id$ + * + * Revision history + * 2000-02-18 Portability fixes (thanks to Beman Dawes) + */ + +// See http://www.boost.org/libs/random for documentation. + + +#ifndef BOOST_NONDET_RANDOM_HPP +#define BOOST_NONDET_RANDOM_HPP + +#include + +#endif /* BOOST_NONDET_RANDOM_HPP */ diff --git a/Slang/boost/none.hpp b/Slang/boost/none.hpp new file mode 100644 index 0000000..5f927cc --- /dev/null +++ b/Slang/boost/none.hpp @@ -0,0 +1,59 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014, 2015 Andrzej Krzemienski. +// +// Distributed under the 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/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_NONE_17SEP2003_HPP +#define BOOST_NONE_17SEP2003_HPP + +#include "boost/config.hpp" +#include "boost/none_t.hpp" + +// NOTE: Borland users have to include this header outside any precompiled headers +// (bcc<=5.64 cannot include instance data in a precompiled header) +// -- * To be verified, now that there's no unnamed namespace + +namespace boost { + +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE + +BOOST_INLINE_VARIABLE none_t BOOST_CONSTEXPR_OR_CONST none = (static_cast(0)) ; + +#elif defined BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE + +namespace detail { namespace optional_detail { + + // the trick here is to make boost::none defined once as a global but in a header file + template + struct none_instance + { + static const T instance; + }; + + template + const T none_instance::instance = T(); // global, but because 'tis a template, no cpp file required + +} } // namespace detail::optional_detail + + +namespace { + // TU-local + const none_t& none = detail::optional_detail::none_instance::instance; +} + +#else + +BOOST_INLINE_VARIABLE BOOST_CONSTEXPR_OR_CONST none_t none ((none_t::init_tag())); + +#endif // older definitions + +} // namespace boost + +#endif // header guard diff --git a/Slang/boost/none_t.hpp b/Slang/boost/none_t.hpp new file mode 100644 index 0000000..6b3c833 --- /dev/null +++ b/Slang/boost/none_t.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014, 2015 Andrzej Krzemienski. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_NONE_T_17SEP2003_HPP +#define BOOST_NONE_T_17SEP2003_HPP + +#include + +namespace boost { + +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE + +namespace detail { struct none_helper{}; } +typedef int detail::none_helper::*none_t ; + +#elif defined BOOST_OPTIONAL_USE_SINGLETON_DEFINITION_OF_NONE + +class none_t {}; + +#else + +struct none_t +{ + struct init_tag{}; + explicit BOOST_CONSTEXPR none_t(init_tag){} // to disable default constructor +}; + +#endif // old implementation workarounds + +} // namespace boost + +#endif // header guard diff --git a/Slang/boost/operators.hpp b/Slang/boost/operators.hpp new file mode 100644 index 0000000..be56a2f --- /dev/null +++ b/Slang/boost/operators.hpp @@ -0,0 +1,920 @@ +// Boost operators.hpp header file ----------------------------------------// + +// (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. +// (C) Copyright Daniel Frey 2002-2017. +// Distributed under the 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/utility/operators.htm for documentation. + +// Revision History +// 23 Nov 17 Protect dereferenceable<> from overloaded operator&. +// 15 Oct 17 Adapted to C++17, replace std::iterator<> with manual +// implementation. +// 22 Feb 16 Added ADL protection, preserve old work-arounds in +// operators_v1.hpp and clean up this file. (Daniel Frey) +// 16 Dec 10 Limit warning suppression for 4284 to older versions of VC++ +// (Matthew Bradbury, fixes #4432) +// 07 Aug 08 Added "euclidean" spelling. (Daniel Frey) +// 03 Apr 08 Make sure "convertible to bool" is sufficient +// for T::operator<, etc. (Daniel Frey) +// 24 May 07 Changed empty_base to depend on T, see +// http://svn.boost.org/trac/boost/ticket/979 +// 21 Oct 02 Modified implementation of operators to allow compilers with a +// correct named return value optimization (NRVO) to produce optimal +// code. (Daniel Frey) +// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) +// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) +// 27 Aug 01 'left' form for non commutative operators added; +// additional classes for groups of related operators added; +// workaround for empty base class optimization +// bug of GCC 3.0 (Helmut Zeisel) +// 25 Jun 01 output_iterator_helper changes: removed default template +// parameters, added support for self-proxying, additional +// documentation and tests (Aleksey Gurtovoy) +// 29 May 01 Added operator classes for << and >>. Added input and output +// iterator helper classes. Added classes to connect equality and +// relational operators. Added classes for groups of related +// operators. Reimplemented example operator and iterator helper +// classes in terms of the new groups. (Daryle Walker, with help +// from Alexy Gurtovoy) +// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly +// supplied arguments from actually being used (Dave Abrahams) +// 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and +// refactoring of compiler workarounds, additional documentation +// (Alexy Gurtovoy and Mark Rodgers with some help and prompting from +// Dave Abrahams) +// 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and +// Jeremy Siek (Dave Abrahams) +// 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 +// (Mark Rodgers) +// 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) +// 10 Jun 00 Support for the base class chaining technique was added +// (Aleksey Gurtovoy). See documentation and the comments below +// for the details. +// 12 Dec 99 Initial version with iterator operators (Jeremy Siek) +// 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary +// specializations of dividable, subtractable, modable (Ed Brey) +// 17 Nov 99 Add comments (Beman Dawes) +// Remove unnecessary specialization of operators<> (Ed Brey) +// 15 Nov 99 Fix less_than_comparable second operand type for first two +// operators.(Beman Dawes) +// 12 Nov 99 Add operators templates (Ed Brey) +// 11 Nov 99 Add single template parameter version for compilers without +// partial specialization (Beman Dawes) +// 10 Nov 99 Initial version + +// 10 Jun 00: +// An additional optional template parameter was added to most of +// operator templates to support the base class chaining technique (see +// documentation for the details). Unfortunately, a straightforward +// implementation of this change would have broken compatibility with the +// previous version of the library by making it impossible to use the same +// template name (e.g. 'addable') for both the 1- and 2-argument versions of +// an operator template. This implementation solves the backward-compatibility +// issue at the cost of some simplicity. +// +// One of the complications is an existence of special auxiliary class template +// 'is_chained_base<>' (see 'operators_detail' namespace below), which is used +// to determine whether its template parameter is a library's operator template +// or not. You have to specialize 'is_chained_base<>' for each new +// operator template you add to the library. +// +// However, most of the non-trivial implementation details are hidden behind +// several local macros defined below, and as soon as you understand them, +// you understand the whole library implementation. + +#ifndef BOOST_OPERATORS_HPP +#define BOOST_OPERATORS_HPP + +// If old work-arounds are needed, refer to the preserved version without +// ADL protection. +#if defined(BOOST_NO_OPERATORS_IN_NAMESPACE) || defined(BOOST_USE_OPERATORS_V1) +#include "operators_v1.hpp" +#else + +#include +#include + +#include +#include +#include + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1234 +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1600) +# pragma warning( disable : 4284 ) // complaint about return type of +#endif // operator-> not begin a UDT + +// Define BOOST_OPERATORS_CONSTEXPR to be like BOOST_CONSTEXPR but empty under MSVC < v19.22 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1922) +#define BOOST_OPERATORS_CONSTEXPR +#elif defined __sun +#define BOOST_OPERATORS_CONSTEXPR +#else +#define BOOST_OPERATORS_CONSTEXPR BOOST_CONSTEXPR +#endif + +// In this section we supply the xxxx1 and xxxx2 forms of the operator +// templates, which are explicitly targeted at the 1-type-argument and +// 2-type-argument operator forms, respectively. + +namespace boost +{ +namespace operators_impl +{ +namespace operators_detail +{ + +template class empty_base {}; + +} // namespace operators_detail + +// Basic operator classes (contributed by Dave Abrahams) ------------------// + +// Note that friend functions defined in a class are implicitly inline. +// See the C++ std, 11.4 [class.friend] paragraph 5 + +template > +struct less_than_comparable2 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>(const U& x, const T& y) { return y < x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<(const U& x, const T& y) { return y > x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; + +template > +struct less_than_comparable1 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator>(const T& x, const T& y) { return y < x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; + +template > +struct equality_comparable2 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator==(const U& y, const T& x) { return x == y; } + friend BOOST_OPERATORS_CONSTEXPR bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; + +template > +struct equality_comparable1 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; + +// A macro which produces "name_2left" from "name". +#define BOOST_OPERATOR2_LEFT(name) name##2##_##left + +// NRVO-friendly implementation (contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// This is the optimal implementation for ISO/ANSI C++, +// but it requires the compiler to implement the NRVO. +// If the compiler has no NRVO, this is the best symmetric +// implementation available. + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// For compilers without NRVO the following code is optimal, but not +// symmetric! Note that the implementation of +// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide +// optimization opportunities to the compiler :) + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ + friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { return T( lhs ) OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) + +#undef BOOST_BINARY_OPERATOR_COMMUTATIVE +#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE +#undef BOOST_OPERATOR2_LEFT + +// incrementable and decrementable contributed by Jeremy Siek + +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T incrementable_type; +}; + +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T decrementable_type; +}; + +// Iterator operator classes (contributed by Jeremy Siek) ------------------// + +template > +struct dereferenceable : B +{ + P operator->() const + { + return ::boost::addressof(*static_cast(*this)); + } +}; + +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; + +// More operator classes (contributed by Daryle Walker) --------------------// +// (NRVO-friendly implementation contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR( left_shiftable, << ) +BOOST_BINARY_OPERATOR( right_shiftable, >> ) + +#undef BOOST_BINARY_OPERATOR + +template > +struct equivalent2 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; + +template > +struct equivalent1 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; + +template > +struct partially_ordered2 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>(const U& x, const T& y) + { return y < x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<(const U& x, const T& y) + { return y > x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; + +template > +struct partially_ordered1 : B +{ + friend BOOST_OPERATORS_CONSTEXPR bool operator>(const T& x, const T& y) + { return y < x; } + friend BOOST_OPERATORS_CONSTEXPR bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend BOOST_OPERATORS_CONSTEXPR bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; + +// Combined operator classes (contributed by Daryle Walker) ----------------// + +template > +struct totally_ordered2 + : less_than_comparable2 > {}; + +template > +struct totally_ordered1 + : less_than_comparable1 > {}; + +template > +struct additive2 + : addable2 > {}; + +template > +struct additive1 + : addable1 > {}; + +template > +struct multiplicative2 + : multipliable2 > {}; + +template > +struct multiplicative1 + : multipliable1 > {}; + +template > +struct integer_multiplicative2 + : multiplicative2 > {}; + +template > +struct integer_multiplicative1 + : multiplicative1 > {}; + +template > +struct arithmetic2 + : additive2 > {}; + +template > +struct arithmetic1 + : additive1 > {}; + +template > +struct integer_arithmetic2 + : additive2 > {}; + +template > +struct integer_arithmetic1 + : additive1 > {}; + +template > +struct bitwise2 + : xorable2 > > {}; + +template > +struct bitwise1 + : xorable1 > > {}; + +template > +struct unit_steppable + : incrementable > {}; + +template > +struct shiftable2 + : left_shiftable2 > {}; + +template > +struct shiftable1 + : left_shiftable1 > {}; + +template > +struct ring_operators2 + : additive2 > > {}; + +template > +struct ring_operators1 + : additive1 > {}; + +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template > +struct field_operators2 + : ring_operators2 > > {}; + +template > +struct field_operators1 + : ring_operators1 > {}; + +template > +struct ordered_field_operators2 + : field_operators2 > {}; + +template > +struct ordered_field_operators1 + : field_operators1 > {}; + +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; + +template > +struct input_iteratable + : equality_comparable1 > > {}; + +template > +struct output_iteratable + : incrementable {}; + +template > +struct forward_iteratable + : input_iteratable {}; + +template > +struct bidirectional_iteratable + : forward_iteratable > {}; + +// To avoid repeated derivation from equality_comparable, +// which is an indirect base class of bidirectional_iterable, +// random_access_iteratable must not be derived from totally_ordered1 +// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + + +// +// Here's where we put it all together, defining the xxxx forms of the templates. +// We also define specializations of is_chained_base<> for +// the xxxx, xxxx1, and xxxx2 templates. +// + +namespace operators_detail +{ + +// A type parameter is used instead of a plain bool because Borland's compiler +// didn't cope well with the more obvious non-type template parameter. +struct true_t {}; +struct false_t {}; + +} // namespace operators_detail + +// is_chained_base<> - a traits class used to distinguish whether an operator +// template argument is being used for base class chaining, or is specifying a +// 2nd argument type. + +// Unspecialized version assumes that most types are not being used for base +// class chaining. We specialize for the operator templates defined in this +// library. +template struct is_chained_base { + typedef operators_detail::false_t value; +}; + +// Provide a specialization of 'is_chained_base<>' +// for a 4-type-argument operator template. +# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ + template \ + struct is_chained_base< template_name4 > { \ + typedef operators_detail::true_t value; \ + }; + +// Provide a specialization of 'is_chained_base<>' +// for a 3-type-argument operator template. +# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ + template \ + struct is_chained_base< template_name3 > { \ + typedef operators_detail::true_t value; \ + }; + +// Provide a specialization of 'is_chained_base<>' +// for a 2-type-argument operator template. +# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ + template \ + struct is_chained_base< template_name2 > { \ + typedef operators_detail::true_t value; \ + }; + +// Provide a specialization of 'is_chained_base<>' +// for a 1-type-argument operator template. +# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ + template \ + struct is_chained_base< template_name1 > { \ + typedef operators_detail::true_t value; \ + }; + +// BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it +// can be used for specifying both 1-argument and 2-argument forms. Requires the +// existence of two previously defined class templates named '1' +// and '2' which must implement the corresponding 1- and 2- +// argument forms. +// +// The template type parameter O == is_chained_base::value is used to +// distinguish whether the 2nd argument to is being used for +// base class chaining from another boost operator template or is describing a +// 2nd operand type. O == true_t only when U is actually an another operator +// template from the library. Partial specialization is used to select an +// implementation in terms of either '1' or '2'. +// + +# define BOOST_OPERATOR_TEMPLATE(template_name) \ +template \ + ,class O = typename is_chained_base::value \ + > \ +struct template_name; \ + \ +template \ +struct template_name \ + : template_name##2 {}; \ + \ +template \ +struct template_name, operators_detail::true_t> \ + : template_name##1 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct is_chained_base< template_name > { \ + typedef operators_detail::true_t value; \ +}; \ + \ +BOOST_OPERATOR_TEMPLATE2(template_name##2) \ +BOOST_OPERATOR_TEMPLATE1(template_name##1) + +BOOST_OPERATOR_TEMPLATE(less_than_comparable) +BOOST_OPERATOR_TEMPLATE(equality_comparable) +BOOST_OPERATOR_TEMPLATE(multipliable) +BOOST_OPERATOR_TEMPLATE(addable) +BOOST_OPERATOR_TEMPLATE(subtractable) +BOOST_OPERATOR_TEMPLATE2(subtractable2_left) +BOOST_OPERATOR_TEMPLATE(dividable) +BOOST_OPERATOR_TEMPLATE2(dividable2_left) +BOOST_OPERATOR_TEMPLATE(modable) +BOOST_OPERATOR_TEMPLATE2(modable2_left) +BOOST_OPERATOR_TEMPLATE(xorable) +BOOST_OPERATOR_TEMPLATE(andable) +BOOST_OPERATOR_TEMPLATE(orable) + +BOOST_OPERATOR_TEMPLATE1(incrementable) +BOOST_OPERATOR_TEMPLATE1(decrementable) + +BOOST_OPERATOR_TEMPLATE2(dereferenceable) +BOOST_OPERATOR_TEMPLATE3(indexable) + +BOOST_OPERATOR_TEMPLATE(left_shiftable) +BOOST_OPERATOR_TEMPLATE(right_shiftable) +BOOST_OPERATOR_TEMPLATE(equivalent) +BOOST_OPERATOR_TEMPLATE(partially_ordered) + +BOOST_OPERATOR_TEMPLATE(totally_ordered) +BOOST_OPERATOR_TEMPLATE(additive) +BOOST_OPERATOR_TEMPLATE(multiplicative) +BOOST_OPERATOR_TEMPLATE(integer_multiplicative) +BOOST_OPERATOR_TEMPLATE(arithmetic) +BOOST_OPERATOR_TEMPLATE(integer_arithmetic) +BOOST_OPERATOR_TEMPLATE(bitwise) +BOOST_OPERATOR_TEMPLATE1(unit_steppable) +BOOST_OPERATOR_TEMPLATE(shiftable) +BOOST_OPERATOR_TEMPLATE(ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) +BOOST_OPERATOR_TEMPLATE(field_operators) +BOOST_OPERATOR_TEMPLATE(ordered_field_operators) +BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE2(input_iteratable) +BOOST_OPERATOR_TEMPLATE1(output_iteratable) +BOOST_OPERATOR_TEMPLATE2(forward_iteratable) +BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) +BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) + +#undef BOOST_OPERATOR_TEMPLATE +#undef BOOST_OPERATOR_TEMPLATE4 +#undef BOOST_OPERATOR_TEMPLATE3 +#undef BOOST_OPERATOR_TEMPLATE2 +#undef BOOST_OPERATOR_TEMPLATE1 + +template +struct operators2 + : totally_ordered2 > > {}; + +template +struct operators : operators2 {}; + +template struct operators + : totally_ordered > > > {}; + +// Iterator helper classes (contributed by Jeremy Siek) -------------------// +// (Input and output iterator helpers contributed by Daryle Walker) -------// +// (Changed to use combined operator classes by Daryle Walker) ------------// +// (Adapted to C++17 by Daniel Frey) --------------------------------------// +template +struct iterator_helper +{ + typedef Category iterator_category; + typedef T value_type; + typedef Distance difference_type; + typedef Pointer pointer; + typedef Reference reference; +}; + +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; // random_access_iterator_helper + +} // namespace operators_impl +using namespace operators_impl; + +} // namespace boost + +#if defined(__sgi) && !defined(__GNUC__) +#pragma reset woff 1234 +#endif + +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE +#endif // BOOST_OPERATORS_HPP diff --git a/Slang/boost/operators_v1.hpp b/Slang/boost/operators_v1.hpp new file mode 100644 index 0000000..e1c53e8 --- /dev/null +++ b/Slang/boost/operators_v1.hpp @@ -0,0 +1,951 @@ +// Boost operators.hpp header file ----------------------------------------// + +// (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. +// Distributed under the 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/utility/operators.htm for documentation. + +// Revision History +// 22 Feb 16 Preserve old work-arounds. (Daniel Frey) +// 16 Dec 10 Limit warning suppression for 4284 to older versions of VC++ +// (Matthew Bradbury, fixes #4432) +// 07 Aug 08 Added "euclidean" spelling. (Daniel Frey) +// 03 Apr 08 Make sure "convertible to bool" is sufficient +// for T::operator<, etc. (Daniel Frey) +// 24 May 07 Changed empty_base to depend on T, see +// http://svn.boost.org/trac/boost/ticket/979 +// 21 Oct 02 Modified implementation of operators to allow compilers with a +// correct named return value optimization (NRVO) to produce optimal +// code. (Daniel Frey) +// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) +// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) +// 27 Aug 01 'left' form for non commutative operators added; +// additional classes for groups of related operators added; +// workaround for empty base class optimization +// bug of GCC 3.0 (Helmut Zeisel) +// 25 Jun 01 output_iterator_helper changes: removed default template +// parameters, added support for self-proxying, additional +// documentation and tests (Aleksey Gurtovoy) +// 29 May 01 Added operator classes for << and >>. Added input and output +// iterator helper classes. Added classes to connect equality and +// relational operators. Added classes for groups of related +// operators. Reimplemented example operator and iterator helper +// classes in terms of the new groups. (Daryle Walker, with help +// from Alexy Gurtovoy) +// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly +// supplied arguments from actually being used (Dave Abrahams) +// 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and +// refactoring of compiler workarounds, additional documentation +// (Alexy Gurtovoy and Mark Rodgers with some help and prompting from +// Dave Abrahams) +// 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and +// Jeremy Siek (Dave Abrahams) +// 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 +// (Mark Rodgers) +// 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) +// 10 Jun 00 Support for the base class chaining technique was added +// (Aleksey Gurtovoy). See documentation and the comments below +// for the details. +// 12 Dec 99 Initial version with iterator operators (Jeremy Siek) +// 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary +// specializations of dividable, subtractable, modable (Ed Brey) +// 17 Nov 99 Add comments (Beman Dawes) +// Remove unnecessary specialization of operators<> (Ed Brey) +// 15 Nov 99 Fix less_than_comparable second operand type for first two +// operators.(Beman Dawes) +// 12 Nov 99 Add operators templates (Ed Brey) +// 11 Nov 99 Add single template parameter version for compilers without +// partial specialization (Beman Dawes) +// 10 Nov 99 Initial version + +// 10 Jun 00: +// An additional optional template parameter was added to most of +// operator templates to support the base class chaining technique (see +// documentation for the details). Unfortunately, a straightforward +// implementation of this change would have broken compatibility with the +// previous version of the library by making it impossible to use the same +// template name (e.g. 'addable') for both the 1- and 2-argument versions of +// an operator template. This implementation solves the backward-compatibility +// issue at the cost of some simplicity. +// +// One of the complications is an existence of special auxiliary class template +// 'is_chained_base<>' (see 'detail' namespace below), which is used +// to determine whether its template parameter is a library's operator template +// or not. You have to specialize 'is_chained_base<>' for each new +// operator template you add to the library. +// +// However, most of the non-trivial implementation details are hidden behind +// several local macros defined below, and as soon as you understand them, +// you understand the whole library implementation. + +#ifndef BOOST_OPERATORS_V1_HPP +#define BOOST_OPERATORS_V1_HPP + +#include +#include + +#include +#include + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1234 +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1600) +# pragma warning( disable : 4284 ) // complaint about return type of +#endif // operator-> not begin a UDT + +namespace boost { +namespace detail { + +template class empty_base {}; + +} // namespace detail +} // namespace boost + +// In this section we supply the xxxx1 and xxxx2 forms of the operator +// templates, which are explicitly targeted at the 1-type-argument and +// 2-type-argument operator forms, respectively. Some compilers get confused +// when inline friend functions are overloaded in namespaces other than the +// global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of +// these templates must go in the global namespace. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +namespace boost +{ +#endif + +// Basic operator classes (contributed by Dave Abrahams) ------------------// + +// Note that friend functions defined in a class are implicitly inline. +// See the C++ std, 11.4 [class.friend] paragraph 5 + +template > +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; + +template > +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; + +template > +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; + +template > +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; + +// A macro which produces "name_2left" from "name". +#define BOOST_OPERATOR2_LEFT(name) name##2##_##left + +// NRVO-friendly implementation (contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// This is the optimal implementation for ISO/ANSI C++, +// but it requires the compiler to implement the NRVO. +// If the compiler has no NRVO, this is the best symmetric +// implementation available. + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// For compilers without NRVO the following code is optimal, but not +// symmetric! Note that the implementation of +// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide +// optimization opportunities to the compiler :) + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ + friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { return T( lhs ) OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) + +#undef BOOST_BINARY_OPERATOR_COMMUTATIVE +#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE +#undef BOOST_OPERATOR2_LEFT + +// incrementable and decrementable contributed by Jeremy Siek + +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T incrementable_type; +}; + +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T decrementable_type; +}; + +// Iterator operator classes (contributed by Jeremy Siek) ------------------// + +template > +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; + +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; + +// More operator classes (contributed by Daryle Walker) --------------------// +// (NRVO-friendly implementation contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template > \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template > \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR( left_shiftable, << ) +BOOST_BINARY_OPERATOR( right_shiftable, >> ) + +#undef BOOST_BINARY_OPERATOR + +template > +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; + +template > +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; + +template > +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; + +template > +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; + +// Combined operator classes (contributed by Daryle Walker) ----------------// + +template > +struct totally_ordered2 + : less_than_comparable2 > {}; + +template > +struct totally_ordered1 + : less_than_comparable1 > {}; + +template > +struct additive2 + : addable2 > {}; + +template > +struct additive1 + : addable1 > {}; + +template > +struct multiplicative2 + : multipliable2 > {}; + +template > +struct multiplicative1 + : multipliable1 > {}; + +template > +struct integer_multiplicative2 + : multiplicative2 > {}; + +template > +struct integer_multiplicative1 + : multiplicative1 > {}; + +template > +struct arithmetic2 + : additive2 > {}; + +template > +struct arithmetic1 + : additive1 > {}; + +template > +struct integer_arithmetic2 + : additive2 > {}; + +template > +struct integer_arithmetic1 + : additive1 > {}; + +template > +struct bitwise2 + : xorable2 > > {}; + +template > +struct bitwise1 + : xorable1 > > {}; + +template > +struct unit_steppable + : incrementable > {}; + +template > +struct shiftable2 + : left_shiftable2 > {}; + +template > +struct shiftable1 + : left_shiftable1 > {}; + +template > +struct ring_operators2 + : additive2 > > {}; + +template > +struct ring_operators1 + : additive1 > {}; + +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template > +struct field_operators2 + : ring_operators2 > > {}; + +template > +struct field_operators1 + : ring_operators1 > {}; + +template > +struct ordered_field_operators2 + : field_operators2 > {}; + +template > +struct ordered_field_operators1 + : field_operators1 > {}; + +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; + +template > +struct input_iteratable + : equality_comparable1 > > {}; + +template > +struct output_iteratable + : incrementable {}; + +template > +struct forward_iteratable + : input_iteratable {}; + +template > +struct bidirectional_iteratable + : forward_iteratable > {}; + +// To avoid repeated derivation from equality_comparable, +// which is an indirect base class of bidirectional_iterable, +// random_access_iteratable must not be derived from totally_ordered1 +// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +} // namespace boost +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + + +// BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 - +// +// When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an +// operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used +// for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for +// two-argument forms. Note that these macros expect to be invoked from within +// boost. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE + + // The template is already in boost so we have nothing to do. +# define BOOST_IMPORT_TEMPLATE4(template_name) +# define BOOST_IMPORT_TEMPLATE3(template_name) +# define BOOST_IMPORT_TEMPLATE2(template_name) +# define BOOST_IMPORT_TEMPLATE1(template_name) + +#else // BOOST_NO_OPERATORS_IN_NAMESPACE + +# ifndef BOOST_NO_USING_TEMPLATE + + // Bring the names in with a using-declaration + // to avoid stressing the compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name; + +# else + + // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration + // from working, we are forced to use inheritance for that compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE3(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE2(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE1(template_name) \ + template > \ + struct template_name : ::template_name {}; + +# endif // BOOST_NO_USING_TEMPLATE + +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + +// +// Here's where we put it all together, defining the xxxx forms of the templates +// in namespace boost. We also define specializations of is_chained_base<> for +// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as +// necessary. +// + +// is_chained_base<> - a traits class used to distinguish whether an operator +// template argument is being used for base class chaining, or is specifying a +// 2nd argument type. + +namespace boost { +// A type parameter is used instead of a plain bool because Borland's compiler +// didn't cope well with the more obvious non-type template parameter. +namespace detail { + struct true_t {}; + struct false_t {}; +} // namespace detail + +// Unspecialized version assumes that most types are not being used for base +// class chaining. We specialize for the operator templates defined in this +// library. +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; + +} // namespace boost + +// Import a 4-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ + BOOST_IMPORT_TEMPLATE4(template_name4) \ + template \ + struct is_chained_base< ::boost::template_name4 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 3-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ + BOOST_IMPORT_TEMPLATE3(template_name3) \ + template \ + struct is_chained_base< ::boost::template_name3 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 2-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ + BOOST_IMPORT_TEMPLATE2(template_name2) \ + template \ + struct is_chained_base< ::boost::template_name2 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 1-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ + BOOST_IMPORT_TEMPLATE1(template_name1) \ + template \ + struct is_chained_base< ::boost::template_name1 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it +// can be used for specifying both 1-argument and 2-argument forms. Requires the +// existence of two previously defined class templates named '1' +// and '2' which must implement the corresponding 1- and 2- +// argument forms. +// +// The template type parameter O == is_chained_base::value is used to +// distinguish whether the 2nd argument to is being used for +// base class chaining from another boost operator template or is describing a +// 2nd operand type. O == true_t only when U is actually an another operator +// template from the library. Partial specialization is used to select an +// implementation in terms of either '1' or '2'. +// + +# define BOOST_OPERATOR_TEMPLATE(template_name) \ +template \ + ,class O = typename is_chained_base::value \ + > \ +struct template_name : template_name##2 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct is_chained_base< ::boost::template_name > { \ + typedef ::boost::detail::true_t value; \ +}; \ + \ +BOOST_OPERATOR_TEMPLATE2(template_name##2) \ +BOOST_OPERATOR_TEMPLATE1(template_name##1) + + + +namespace boost { + +BOOST_OPERATOR_TEMPLATE(less_than_comparable) +BOOST_OPERATOR_TEMPLATE(equality_comparable) +BOOST_OPERATOR_TEMPLATE(multipliable) +BOOST_OPERATOR_TEMPLATE(addable) +BOOST_OPERATOR_TEMPLATE(subtractable) +BOOST_OPERATOR_TEMPLATE2(subtractable2_left) +BOOST_OPERATOR_TEMPLATE(dividable) +BOOST_OPERATOR_TEMPLATE2(dividable2_left) +BOOST_OPERATOR_TEMPLATE(modable) +BOOST_OPERATOR_TEMPLATE2(modable2_left) +BOOST_OPERATOR_TEMPLATE(xorable) +BOOST_OPERATOR_TEMPLATE(andable) +BOOST_OPERATOR_TEMPLATE(orable) + +BOOST_OPERATOR_TEMPLATE1(incrementable) +BOOST_OPERATOR_TEMPLATE1(decrementable) + +BOOST_OPERATOR_TEMPLATE2(dereferenceable) +BOOST_OPERATOR_TEMPLATE3(indexable) + +BOOST_OPERATOR_TEMPLATE(left_shiftable) +BOOST_OPERATOR_TEMPLATE(right_shiftable) +BOOST_OPERATOR_TEMPLATE(equivalent) +BOOST_OPERATOR_TEMPLATE(partially_ordered) + +BOOST_OPERATOR_TEMPLATE(totally_ordered) +BOOST_OPERATOR_TEMPLATE(additive) +BOOST_OPERATOR_TEMPLATE(multiplicative) +BOOST_OPERATOR_TEMPLATE(integer_multiplicative) +BOOST_OPERATOR_TEMPLATE(arithmetic) +BOOST_OPERATOR_TEMPLATE(integer_arithmetic) +BOOST_OPERATOR_TEMPLATE(bitwise) +BOOST_OPERATOR_TEMPLATE1(unit_steppable) +BOOST_OPERATOR_TEMPLATE(shiftable) +BOOST_OPERATOR_TEMPLATE(ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) +BOOST_OPERATOR_TEMPLATE(field_operators) +BOOST_OPERATOR_TEMPLATE(ordered_field_operators) +BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidean_ring_operators) +BOOST_OPERATOR_TEMPLATE2(input_iteratable) +BOOST_OPERATOR_TEMPLATE1(output_iteratable) +BOOST_OPERATOR_TEMPLATE2(forward_iteratable) +BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) +BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) + +#undef BOOST_OPERATOR_TEMPLATE +#undef BOOST_OPERATOR_TEMPLATE4 +#undef BOOST_OPERATOR_TEMPLATE3 +#undef BOOST_OPERATOR_TEMPLATE2 +#undef BOOST_OPERATOR_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE2 +#undef BOOST_IMPORT_TEMPLATE3 +#undef BOOST_IMPORT_TEMPLATE4 + +// The following 'operators' classes can only be used portably if the derived class +// declares ALL of the required member operators. +template +struct operators2 + : totally_ordered2 > > {}; + +template +struct operators : operators2 {}; + +template struct operators + : totally_ordered > > > {}; + +// Iterator helper classes (contributed by Jeremy Siek) -------------------// +// (Input and output iterator helpers contributed by Daryle Walker) -------// +// (Changed to use combined operator classes by Daryle Walker) ------------// +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; // random_access_iterator_helper + +} // namespace boost + +#if defined(__sgi) && !defined(__GNUC__) +#pragma reset woff 1234 +#endif + +#endif // BOOST_OPERATORS_V1_HPP diff --git a/Slang/boost/optional.hpp b/Slang/boost/optional.hpp new file mode 100644 index 0000000..40cf12e --- /dev/null +++ b/Slang/boost/optional.hpp @@ -0,0 +1,18 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_OPTIONAL_FLC_19NOV2002_HPP +#define BOOST_OPTIONAL_FLC_19NOV2002_HPP + +#include "boost/optional/optional.hpp" + +#endif + diff --git a/Slang/boost/outcome.hpp b/Slang/boost/outcome.hpp new file mode 100644 index 0000000..d2ecbbb --- /dev/null +++ b/Slang/boost/outcome.hpp @@ -0,0 +1,33 @@ +/* Include the default amount of outcome +(C) 2018-2021 Niall Douglas (4 commits) +File Created: Mar 2018 + + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +*/ + +#include "outcome/coroutine_support.hpp" +#include "outcome/iostream_support.hpp" +#include "outcome/try.hpp" diff --git a/Slang/boost/parameter.hpp b/Slang/boost/parameter.hpp new file mode 100644 index 0000000..b6e666c --- /dev/null +++ b/Slang/boost/parameter.hpp @@ -0,0 +1,30 @@ +// Copyright David Abrahams, Daniel Wallin 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/parameter for documentation. + +#ifndef BOOST_PARAMETER_050401_HPP +#define BOOST_PARAMETER_050401_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // include guard + diff --git a/Slang/boost/pfr.hpp b/Slang/boost/pfr.hpp new file mode 100644 index 0000000..3eaf421 --- /dev/null +++ b/Slang/boost/pfr.hpp @@ -0,0 +1,21 @@ +// Copyright (c) 2016-2021 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) + +#ifndef BOOST_PFR_HPP +#define BOOST_PFR_HPP + +/// \file boost/pfr.hpp +/// Includes all the Boost.PFR headers + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_PFR_HPP diff --git a/Slang/boost/phoenix.hpp b/Slang/boost/phoenix.hpp new file mode 100644 index 0000000..189460d --- /dev/null +++ b/Slang/boost/phoenix.hpp @@ -0,0 +1,13 @@ +/*============================================================================== + Copyright (c) 2005-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) +==============================================================================*/ + +#ifndef BOOST_PHOENIX_HPP + +#include + +#endif diff --git a/Slang/boost/pointee.hpp b/Slang/boost/pointee.hpp new file mode 100644 index 0000000..69efa94 --- /dev/null +++ b/Slang/boost/pointee.hpp @@ -0,0 +1,76 @@ +#ifndef POINTEE_DWA200415_HPP +# define POINTEE_DWA200415_HPP + +// +// Copyright David Abrahams 2004. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// typename pointee

::type provides the pointee type of P. +// +// For example, it is T for T* and X for shared_ptr. +// +// http://www.boost.org/libs/iterator/doc/pointee.html +// + +# include +# include +# include +# include +# include +# include + +#include + +namespace boost { + +namespace detail +{ + template + struct smart_ptr_pointee + { + typedef typename P::element_type type; + }; + + template + struct iterator_pointee + { + typedef typename std::iterator_traits::value_type value_type; + + struct impl + { + template + static char test(T const&); + + static char (& test(value_type&) )[2]; + + static Iterator& x; + }; + + BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1); + + typedef typename mpl::if_c< +# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551)) + ::boost::detail::iterator_pointee::is_constant +# else + is_constant +# endif + , typename add_const::type + , value_type + >::type type; + }; +} + +template +struct pointee + : mpl::eval_if< + detail::is_incrementable

+ , detail::iterator_pointee

+ , detail::smart_ptr_pointee

+ > +{ +}; + +} // namespace boost + +#endif // POINTEE_DWA200415_HPP diff --git a/Slang/boost/pointer_cast.hpp b/Slang/boost/pointer_cast.hpp new file mode 100644 index 0000000..d47327b --- /dev/null +++ b/Slang/boost/pointer_cast.hpp @@ -0,0 +1,122 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2005. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_POINTER_CAST_HPP +#define BOOST_POINTER_CAST_HPP + +#include +#include + +namespace boost { + +//static_pointer_cast overload for raw pointers +template +inline T* static_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT +{ + return static_cast(ptr); +} + +//dynamic_pointer_cast overload for raw pointers +template +inline T* dynamic_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT +{ + return dynamic_cast(ptr); +} + +//const_pointer_cast overload for raw pointers +template +inline T* const_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT +{ + return const_cast(ptr); +} + +//reinterpret_pointer_cast overload for raw pointers +template +inline T* reinterpret_pointer_cast(U *ptr) BOOST_SP_NOEXCEPT +{ + return reinterpret_cast(ptr); +} + +} // namespace boost + +#if !defined( BOOST_NO_CXX11_SMART_PTR ) + +#include +#include +#include + +namespace boost { + +//static_pointer_cast overload for std::shared_ptr +using std::static_pointer_cast; + +//dynamic_pointer_cast overload for std::shared_ptr +using std::dynamic_pointer_cast; + +//const_pointer_cast overload for std::shared_ptr +using std::const_pointer_cast; + +//reinterpret_pointer_cast overload for std::shared_ptr +template std::shared_ptr reinterpret_pointer_cast(const std::shared_ptr & r ) BOOST_SP_NOEXCEPT +{ + (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename std::shared_ptr::element_type E; + + E * p = reinterpret_cast< E* >( r.get() ); + return std::shared_ptr( r, p ); +} + +//static_pointer_cast overload for std::unique_ptr +template std::unique_ptr static_pointer_cast( std::unique_ptr && r ) BOOST_SP_NOEXCEPT +{ + (void) static_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename std::unique_ptr::element_type E; + + return std::unique_ptr( static_cast( r.release() ) ); +} + +//dynamic_pointer_cast overload for std::unique_ptr +template std::unique_ptr dynamic_pointer_cast( std::unique_ptr && r ) BOOST_SP_NOEXCEPT +{ + (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); + + BOOST_STATIC_ASSERT_MSG( boost::has_virtual_destructor::value, "The target of dynamic_pointer_cast must have a virtual destructor." ); + + T * p = dynamic_cast( r.get() ); + if( p ) r.release(); + return std::unique_ptr( p ); +} + +//const_pointer_cast overload for std::unique_ptr +template std::unique_ptr const_pointer_cast( std::unique_ptr && r ) BOOST_SP_NOEXCEPT +{ + (void) const_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename std::unique_ptr::element_type E; + + return std::unique_ptr( const_cast( r.release() ) ); +} + +//reinterpret_pointer_cast overload for std::unique_ptr +template std::unique_ptr reinterpret_pointer_cast( std::unique_ptr && r ) BOOST_SP_NOEXCEPT +{ + (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); + + typedef typename std::unique_ptr::element_type E; + + return std::unique_ptr( reinterpret_cast( r.release() ) ); +} + +} // namespace boost + +#endif // #if !defined( BOOST_NO_CXX11_SMART_PTR ) + +#endif //BOOST_POINTER_CAST_HPP diff --git a/Slang/boost/pointer_to_other.hpp b/Slang/boost/pointer_to_other.hpp new file mode 100644 index 0000000..d7d455d --- /dev/null +++ b/Slang/boost/pointer_to_other.hpp @@ -0,0 +1,55 @@ +#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED +#define BOOST_POINTER_TO_OTHER_HPP_INCLUDED + +// +// pointer_to_other.hpp +// +// (C) Copyright Ion Gaztanaga 2005. +// Copyright (c) 2005 Peter Dimov. +// +// Distributed under the 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/smart_ptr/ for documentation. +// + +namespace boost +{ + +// Defines the same pointer type (raw or smart) to another pointee type + +template +struct pointer_to_other; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template +struct pointer_to_other< T*, U > +{ + typedef U* type; +}; + +} // namespace boost + +#endif // #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED diff --git a/Slang/boost/polymorphic_cast.hpp b/Slang/boost/polymorphic_cast.hpp new file mode 100644 index 0000000..3592506 --- /dev/null +++ b/Slang/boost/polymorphic_cast.hpp @@ -0,0 +1,126 @@ +// boost polymorphic_cast.hpp header file ----------------------------------------------// + +// (C) Copyright Kevlin Henney and Dave Abrahams 1999. +// (C) Copyright Boris Rasin 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/conversion for Documentation. + +// Revision History +// 10 Nov 14 polymorphic_pointer_downcast moved to a separate header, +// minor improvements to stisfy latest Boost coding style +// 08 Nov 14 Add polymorphic_pointer_downcast (Boris Rasin) +// 09 Jun 14 "cast.hpp" was renamed to "polymorphic_cast.hpp" and +// inclusion of numeric_cast was removed (Antony Polukhin) +// 23 Jun 05 numeric_cast removed and redirected to the new verion (Fernando Cacciola) +// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included +// instead (the workaround did not +// actually compile when BOOST_NO_LIMITS was defined in +// any case, so we loose nothing). (John Maddock) +// 21 Jan 01 Undid a bug I introduced yesterday. numeric_cast<> never +// worked with stock GCC; trying to get it to do that broke +// vc-stlport. +// 20 Jan 01 Moved BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS to config.hpp. +// Removed unused BOOST_EXPLICIT_TARGET macro. Moved +// boost::detail::type to boost/type.hpp. Made it compile with +// stock gcc again (Dave Abrahams) +// 29 Nov 00 Remove nested namespace cast, cleanup spacing before Formal +// Review (Beman Dawes) +// 19 Oct 00 Fix numeric_cast for floating-point types (Dave Abrahams) +// 15 Jul 00 Suppress numeric_cast warnings for GCC, Borland and MSVC +// (Dave Abrahams) +// 30 Jun 00 More MSVC6 wordarounds. See comments below. (Dave Abrahams) +// 28 Jun 00 Removed implicit_cast<>. See comment below. (Beman Dawes) +// 27 Jun 00 More MSVC6 workarounds +// 15 Jun 00 Add workarounds for MSVC6 +// 2 Feb 00 Remove bad_numeric_cast ";" syntax error (Doncho Angelov) +// 26 Jan 00 Add missing throw() to bad_numeric_cast::what(0 (Adam Levar) +// 29 Dec 99 Change using declarations so usages in other namespaces work +// correctly (Dave Abrahams) +// 23 Sep 99 Change polymorphic_downcast assert to also detect M.I. errors +// as suggested Darin Adler and improved by Valentin Bonnard. +// 2 Sep 99 Remove controversial asserts, simplify, rename. +// 30 Aug 99 Move to cast.hpp, replace value_cast with numeric_cast, +// place in nested namespace. +// 3 Aug 99 Initial version + +#ifndef BOOST_POLYMORPHIC_CAST_HPP +#define BOOST_POLYMORPHIC_CAST_HPP + +# include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +# include +# include +# include +# include +# include +# include + +# include + +namespace boost +{ +// See the documentation for descriptions of how to choose between +// static_cast<>, dynamic_cast<>, polymorphic_cast<> and polymorphic_downcast<> + +// polymorphic_cast --------------------------------------------------------// + + // Runtime checked polymorphic downcasts and crosscasts. + // Suggested in The C++ Programming Language, 3rd Ed, Bjarne Stroustrup, + // section 15.8 exercise 1, page 425. + + template + inline Target polymorphic_cast(Source* x) + { + Target tmp = dynamic_cast(x); + if ( tmp == 0 ) boost::throw_exception( std::bad_cast() ); + return tmp; + } + +// polymorphic_downcast ----------------------------------------------------// + + // BOOST_ASSERT() checked raw pointer polymorphic downcast. Crosscasts prohibited. + + // WARNING: Because this cast uses BOOST_ASSERT(), it violates + // the One Definition Rule if used in multiple translation units + // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER + // NDEBUG are defined inconsistently. + + // Contributed by Dave Abrahams + + template + inline Target polymorphic_downcast(Source* x) + { + BOOST_ASSERT( dynamic_cast(x) == x ); // detect logic error + return static_cast(x); + } + + // BOOST_ASSERT() checked reference polymorphic downcast. Crosscasts prohibited. + + // WARNING: Because this cast uses BOOST_ASSERT(), it violates + // the One Definition Rule if used in multiple translation units + // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER + // NDEBUG are defined inconsistently. + + // Contributed by Julien Delacroix + + template + inline typename boost::enable_if_c< + boost::is_reference::value, Target + >::type polymorphic_downcast(Source& x) + { + typedef typename boost::remove_reference::type* target_pointer_type; + return *boost::polymorphic_downcast( + boost::addressof(x) + ); + } + +} // namespace boost + +#endif // BOOST_POLYMORPHIC_CAST_HPP diff --git a/Slang/boost/polymorphic_pointer_cast.hpp b/Slang/boost/polymorphic_pointer_cast.hpp new file mode 100644 index 0000000..393edf9 --- /dev/null +++ b/Slang/boost/polymorphic_pointer_cast.hpp @@ -0,0 +1,78 @@ +// boost polymorphic_pointer_cast.hpp header file ----------------------------------------------// +// (C) Copyright Boris Rasin and Antony Polukhin 2014-2021. +// Distributed under the 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/conversion for Documentation. + +#ifndef BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP +#define BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP + +# include +# include +# include +# include +# include +# ifdef BOOST_NO_CXX11_DECLTYPE +# include +# endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost +{ +// See the documentation for descriptions of how to choose between +// static_pointer_cast<>, dynamic_pointer_cast<>, polymorphic_pointer_cast<> and polymorphic_pointer_downcast<> + +// polymorphic_pointer_downcast --------------------------------------------// + + // BOOST_ASSERT() checked polymorphic downcast. Crosscasts prohibited. + // Supports any type with static_pointer_cast/dynamic_pointer_cast functions: + // built-in pointers, std::shared_ptr, boost::shared_ptr, boost::intrusive_ptr, etc. + + // WARNING: Because this cast uses BOOST_ASSERT(), it violates + // the One Definition Rule if used in multiple translation units + // where BOOST_DISABLE_ASSERTS, BOOST_ENABLE_ASSERT_HANDLER + // NDEBUG are defined inconsistently. + + // Contributed by Boris Rasin + + namespace detail + { + template + struct dynamic_pointer_cast_result + { +#ifdef BOOST_NO_CXX11_DECLTYPE + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, dynamic_pointer_cast(boost::declval())) + typedef typename nested::type type; +#else + typedef decltype(dynamic_pointer_cast(boost::declval())) type; +#endif + }; + } + + template + inline typename detail::dynamic_pointer_cast_result::type + polymorphic_pointer_downcast (const Source& x) + { + BOOST_ASSERT(dynamic_pointer_cast (x) == x); + return static_pointer_cast (x); + } + + template + inline typename detail::dynamic_pointer_cast_result::type + polymorphic_pointer_cast (const Source& x) + { + typename detail::dynamic_pointer_cast_result::type tmp + = dynamic_pointer_cast (x); + if ( !tmp ) boost::throw_exception( std::bad_cast() ); + + return tmp; + } + +} // namespace boost + +#endif // BOOST_CONVERSION_POLYMORPHIC_POINTER_CAST_HPP diff --git a/Slang/boost/predef.h b/Slang/boost/predef.h new file mode 100644 index 0000000..4965337 --- /dev/null +++ b/Slang/boost/predef.h @@ -0,0 +1,24 @@ +/* +Copyright Rene Rivera 2008-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) +*/ + +#if !defined(BOOST_PREDEF_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) +#ifndef BOOST_PREDEF_H +#define BOOST_PREDEF_H +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif diff --git a/Slang/boost/preprocessor.hpp b/Slang/boost/preprocessor.hpp new file mode 100644 index 0000000..b5c928e --- /dev/null +++ b/Slang/boost/preprocessor.hpp @@ -0,0 +1,19 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org/libs/preprocessor for documentation. */ +# +# ifndef BOOST_PREPROCESSOR_HPP +# define BOOST_PREPROCESSOR_HPP +# +# include +# +# endif diff --git a/Slang/boost/process.hpp b/Slang/boost/process.hpp new file mode 100644 index 0000000..1bf5951 --- /dev/null +++ b/Slang/boost/process.hpp @@ -0,0 +1,42 @@ +// Copyright (c) 2006, 2007 Julio M. Merino Vidal +// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling +// Copyright (c) 2009 Boris Schaeling +// Copyright (c) 2010 Felipe Tanus, Boris Schaeling +// Copyright (c) 2011 Jeff Flinn, Boris Schaeling +// Copyright (c) 2012 Boris Schaeling +// Copyright (c) 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_PROCESS_HPP +#define BOOST_PROCESS_HPP + +/** + * \file boost/process.hpp + * + * Convenience header which includes all public and platform-independent + * boost.process header files. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/program_options.hpp b/Slang/boost/program_options.hpp new file mode 100644 index 0000000..dc35011 --- /dev/null +++ b/Slang/boost/program_options.hpp @@ -0,0 +1,25 @@ +// Copyright Vladimir Prus 2002. +// Distributed under the 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 www.boost.org/libs/program_options for documentation. + +#ifndef PROGRAM_OPTIONS_VP_2003_05_19 +#define PROGRAM_OPTIONS_VP_2003_05_19 + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/progress.hpp b/Slang/boost/progress.hpp new file mode 100644 index 0000000..be6ec6a --- /dev/null +++ b/Slang/boost/progress.hpp @@ -0,0 +1,145 @@ +// boost progress.hpp header file ------------------------------------------// + +// Copyright Beman Dawes 1994-99. Distributed under the 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/timer for documentation. + +// Revision History +// 1 Dec 01 Add leading progress display strings (suggested by Toon Knapen) +// 20 May 01 Introduce several static_casts<> to eliminate warning messages +// (Fixed by Beman, reported by Herve Bronnimann) +// 12 Jan 01 Change to inline implementation to allow use without library +// builds. See docs for more rationale. (Beman Dawes) +// 22 Jul 99 Name changed to .hpp +// 16 Jul 99 Second beta +// 6 Jul 99 Initial boost version + +#ifndef BOOST_PROGRESS_HPP +#define BOOST_PROGRESS_HPP + +#include +BOOST_HEADER_DEPRECATED( "the facilities in or " ) + +#include +#include +#include // for uintmax_t +#include // for ostream, cout, etc +#include // for string + +namespace boost { + +// progress_timer ----------------------------------------------------------// + +// A progress_timer behaves like a timer except that the destructor displays +// an elapsed time message at an appropriate place in an appropriate form. + +class progress_timer : public timer, private noncopyable +{ + + public: + explicit progress_timer( std::ostream & os = std::cout ) + // os is hint; implementation may ignore, particularly in embedded systems + : timer(), noncopyable(), m_os(os) {} + ~progress_timer() + { + // A) Throwing an exception from a destructor is a Bad Thing. + // B) The progress_timer destructor does output which may throw. + // C) A progress_timer is usually not critical to the application. + // Therefore, wrap the I/O in a try block, catch and ignore all exceptions. + try + { + // use istream instead of ios_base to workaround GNU problem (Greg Chicares) + std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed, + std::istream::floatfield ); + std::streamsize old_prec = m_os.precision( 2 ); + m_os << elapsed() << " s\n" // "s" is System International d'Unites std + << std::endl; + m_os.flags( old_flags ); + m_os.precision( old_prec ); + } + + catch (...) {} // eat any exceptions + } // ~progress_timer + + private: + std::ostream & m_os; +}; + + +// progress_display --------------------------------------------------------// + +// progress_display displays an appropriate indication of +// progress at an appropriate place in an appropriate form. + +// NOTE: (Jan 12, 2001) Tried to change unsigned long to boost::uintmax_t, but +// found some compilers couldn't handle the required conversion to double. +// Reverted to unsigned long until the compilers catch up. + +class progress_display : private noncopyable +{ + public: + explicit progress_display( unsigned long expected_count_, + std::ostream & os = std::cout, + const std::string & s1 = "\n", //leading strings + const std::string & s2 = "", + const std::string & s3 = "" ) + // os is hint; implementation may ignore, particularly in embedded systems + : noncopyable(), m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); } + + void restart( unsigned long expected_count_ ) + // Effects: display appropriate scale + // Postconditions: count()==0, expected_count()==expected_count_ + { + _count = _next_tic_count = _tic = 0; + _expected_count = expected_count_; + + m_os << m_s1 << "0% 10 20 30 40 50 60 70 80 90 100%\n" + << m_s2 << "|----|----|----|----|----|----|----|----|----|----|" + << std::endl // endl implies flush, which ensures display + << m_s3; + if ( !_expected_count ) _expected_count = 1; // prevent divide by zero + } // restart + + unsigned long operator+=( unsigned long increment ) + // Effects: Display appropriate progress tic if needed. + // Postconditions: count()== original count() + increment + // Returns: count(). + { + if ( (_count += increment) >= _next_tic_count ) { display_tic(); } + return _count; + } + + unsigned long operator++() { return operator+=( 1 ); } + unsigned long count() const { return _count; } + unsigned long expected_count() const { return _expected_count; } + + private: + std::ostream & m_os; // may not be present in all imps + const std::string m_s1; // string is more general, safer than + const std::string m_s2; // const char *, and efficiency or size are + const std::string m_s3; // not issues + + unsigned long _count, _expected_count, _next_tic_count; + unsigned int _tic; + void display_tic() + { + // use of floating point ensures that both large and small counts + // work correctly. static_cast<>() is also used several places + // to suppress spurious compiler warnings. + unsigned int tics_needed = static_cast((static_cast(_count) + / static_cast(_expected_count)) * 50.0); + do { m_os << '*' << std::flush; } while ( ++_tic < tics_needed ); + _next_tic_count = + static_cast((_tic/50.0) * static_cast(_expected_count)); + if ( _count == _expected_count ) { + if ( _tic < 51 ) m_os << '*'; + m_os << std::endl; + } + } // display_tic +}; + +} // namespace boost + +#endif // BOOST_PROGRESS_HPP diff --git a/Slang/boost/python.hpp b/Slang/boost/python.hpp new file mode 100644 index 0000000..e484034 --- /dev/null +++ b/Slang/boost/python.hpp @@ -0,0 +1,75 @@ +// Copyright David Abrahams 2002. +// Distributed under the 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/python for documentation. + +#ifndef PYTHON_DWA2002810_HPP +# define PYTHON_DWA2002810_HPP + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +#endif // PYTHON_DWA2002810_HPP diff --git a/Slang/boost/qvm.hpp b/Slang/boost/qvm.hpp new file mode 100644 index 0000000..257823a --- /dev/null +++ b/Slang/boost/qvm.hpp @@ -0,0 +1,11 @@ +#ifndef BOOST_QVM_HPP_INCLUDED +#define BOOST_QVM_HPP_INCLUDED + +/// Copyright (c) 2008-2021 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 + +#endif diff --git a/Slang/boost/qvm_lite.hpp b/Slang/boost/qvm_lite.hpp new file mode 100644 index 0000000..8e2feec --- /dev/null +++ b/Slang/boost/qvm_lite.hpp @@ -0,0 +1,11 @@ +#ifndef BOOST_QVM_LITE_HPP_INCLUDED +#define BOOST_QVM_LITE_HPP_INCLUDED + +/// Copyright (c) 2008-2021 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 + +#endif diff --git a/Slang/boost/random.hpp b/Slang/boost/random.hpp new file mode 100644 index 0000000..d85f763 --- /dev/null +++ b/Slang/boost/random.hpp @@ -0,0 +1,92 @@ +/* boost random.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Distributed under the 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/random for documentation. + * + * $Id$ + * + * Revision history + * 2000-02-18 portability fixes (thanks to Beman Dawes) + * 2000-02-21 shuffle_output, inversive_congruential_schrage, + * generator_iterator, uniform_smallint + * 2000-02-23 generic modulus arithmetic helper, removed *_schrage classes, + * implemented Streamable and EqualityComparable concepts for + * generators, added Bernoulli distribution and Box-Muller + * transform + * 2000-03-01 cauchy, lognormal, triangle distributions; fixed + * uniform_smallint; renamed gaussian to normal distribution + * 2000-03-05 implemented iterator syntax for distribution functions + * 2000-04-21 removed some optimizations for better BCC/MSVC compatibility + * 2000-05-10 adapted to BCC and MSVC + * 2000-06-13 incorporated review results + * 2000-07-06 moved basic templates from namespace detail to random + * 2000-09-23 warning removals and int64 fixes (Ed Brey) + * 2000-09-24 added lagged_fibonacci generator (Matthias Troyer) + * 2001-02-18 moved to individual header files + */ + +#ifndef BOOST_RANDOM_HPP +#define BOOST_RANDOM_HPP + +// generators +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// misc +#include +#include +#include +#include + +// distributions +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif // BOOST_RANDOM_HPP diff --git a/Slang/boost/range.hpp b/Slang/boost/range.hpp new file mode 100644 index 0000000..179ae22 --- /dev/null +++ b/Slang/boost/range.hpp @@ -0,0 +1,23 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_HPP_27_07_04 +#define BOOST_RANGE_HPP_27_07_04 + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/ratio.hpp b/Slang/boost/ratio.hpp new file mode 100644 index 0000000..096fe62 --- /dev/null +++ b/Slang/boost/ratio.hpp @@ -0,0 +1,14 @@ +// ratio.hpp ---------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_RATIO_HPP +#define BOOST_RATIO_HPP + +#include + +#endif // BOOST_RATIO_HPP diff --git a/Slang/boost/rational.hpp b/Slang/boost/rational.hpp new file mode 100644 index 0000000..4b66aae --- /dev/null +++ b/Slang/boost/rational.hpp @@ -0,0 +1,1046 @@ +// Boost rational.hpp header file ------------------------------------------// + +// (C) Copyright Paul Moore 1999. 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/libs/rational for documentation. + +// Credits: +// Thanks to the boost mailing list in general for useful comments. +// Particular contributions included: +// Andrew D Jewell, for reminding me to take care to avoid overflow +// Ed Brey, for many comments, including picking up on some dreadful typos +// Stephen Silver contributed the test suite and comments on user-defined +// IntType +// Nickolay Mladenov, for the implementation of operator+= + +// Revision History +// 12 Nov 20 Fix operators to work with C++20 rules (Glen Joseph Fernandes) +// 02 Sep 13 Remove unneeded forward declarations; tweak private helper +// function (Daryle Walker) +// 30 Aug 13 Improve exception safety of "assign"; start modernizing I/O code +// (Daryle Walker) +// 27 Aug 13 Add cross-version constructor template, plus some private helper +// functions; add constructor to exception class to take custom +// messages (Daryle Walker) +// 25 Aug 13 Add constexpr qualification wherever possible (Daryle Walker) +// 05 May 12 Reduced use of implicit gcd (Mario Lang) +// 05 Nov 06 Change rational_cast to not depend on division between different +// types (Daryle Walker) +// 04 Nov 06 Off-load GCD and LCM to Boost.Integer; add some invariant checks; +// add std::numeric_limits<> requirement to help GCD (Daryle Walker) +// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity +// divisions; the rational-value version now uses continued fraction +// expansion to avoid overflows, for bug #798357 (Daryle Walker) +// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz) +// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config +// (Joaquín M López Muñoz) +// 27 Dec 05 Add Boolean conversion operator (Daryle Walker) +// 28 Sep 02 Use _left versions of operators from operators.hpp +// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel) +// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams) +// 05 Feb 01 Update operator>> to tighten up input syntax +// 05 Feb 01 Final tidy up of gcd code prior to the new release +// 27 Jan 01 Recode abs() without relying on abs(IntType) +// 21 Jan 01 Include Nickolay Mladenov's operator+= algorithm, +// tidy up a number of areas, use newer features of operators.hpp +// (reduces space overhead to zero), add operator!, +// introduce explicit mixed-mode arithmetic operations +// 12 Jan 01 Include fixes to handle a user-defined IntType better +// 19 Nov 00 Throw on divide by zero in operator /= (John (EBo) David) +// 23 Jun 00 Incorporate changes from Mark Rodgers for Borland C++ +// 22 Jun 00 Change _MSC_VER to BOOST_MSVC so other compilers are not +// affected (Beman Dawes) +// 6 Mar 00 Fix operator-= normalization, #include (Jens Maurer) +// 14 Dec 99 Modifications based on comments from the boost list +// 09 Dec 99 Initial Version (Paul Moore) + +#ifndef BOOST_RATIONAL_HPP +#define BOOST_RATIONAL_HPP + +#include // for BOOST_NO_STDC_NAMESPACE, BOOST_MSVC, etc +#ifndef BOOST_NO_IOSTREAM +#include // for std::setw +#include // for std::noskipws, streamsize +#include // for std::istream +#include // for std::ostream +#include // for std::ostringstream +#endif +#include // for NULL +#include // for std::domain_error +#include // for std::string implicit constructor +#include // for std::abs +#include // for boost::call_traits +#include // for BOOST_WORKAROUND +#include // for BOOST_ASSERT +#include // for boost::integer::gcd, lcm +#include // for std::numeric_limits +#include // for BOOST_STATIC_ASSERT +#include +#include +#include +#include +#include +#include + +// Control whether depreciated GCD and LCM functions are included (default: yes) +#ifndef BOOST_CONTROL_RATIONAL_HAS_GCD +#define BOOST_CONTROL_RATIONAL_HAS_GCD 1 +#endif + +namespace boost { + +#if BOOST_CONTROL_RATIONAL_HAS_GCD +template +IntType gcd(IntType n, IntType m) +{ + // Defer to the version in Boost.Integer + return integer::gcd( n, m ); +} + +template +IntType lcm(IntType n, IntType m) +{ + // Defer to the version in Boost.Integer + return integer::lcm( n, m ); +} +#endif // BOOST_CONTROL_RATIONAL_HAS_GCD + +namespace rational_detail{ + + template + struct is_compatible_integer; + + template + struct is_compatible_integer::value>::type> + { + BOOST_STATIC_CONSTANT(bool, value = ((std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::numeric_limits::radix == std::numeric_limits::radix) + && ((std::numeric_limits::is_signed == false) || (std::numeric_limits::is_signed == true)) + && is_convertible::value) + || is_same::value) + || (is_class::value && is_class::value && is_convertible::value)); + }; + + template + struct is_compatible_integer::value>::type> + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_backward_compatible_integer; + + template + struct is_backward_compatible_integer::value>::type> + { + BOOST_STATIC_CONSTANT(bool, value = (std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && !is_compatible_integer::value + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value)); + }; + + template + struct is_backward_compatible_integer::value>::type> + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +} + +class bad_rational : public std::domain_error +{ +public: + explicit bad_rational() : std::domain_error("bad rational: zero denominator") {} + explicit bad_rational( char const *what ) : std::domain_error( what ) {} +}; + +template +class rational +{ + // Class-wide pre-conditions + BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized ); + + // Helper types + typedef typename boost::call_traits::param_type param_type; + + struct helper { IntType parts[2]; }; + typedef IntType (helper::* bool_type)[2]; + +public: + // Component type + typedef IntType int_type; + + BOOST_CONSTEXPR + rational() : num(0), den(1) {} + + template //, typename enable_if_c::value>::type> + BOOST_CONSTEXPR rational(const T& n, typename enable_if_c< + rational_detail::is_compatible_integer::value + >::type const* = 0) : num(n), den(1) {} + + template + BOOST_CXX14_CONSTEXPR rational(const T& n, const U& d, typename enable_if_c< + rational_detail::is_compatible_integer::value && rational_detail::is_compatible_integer::value + >::type const* = 0) : num(n), den(d) { + normalize(); + } + + template < typename NewType > + BOOST_CONSTEXPR explicit + rational(rational const &r, typename enable_if_c::value>::type const* = 0) + : num(r.numerator()), den(is_normalized(int_type(r.numerator()), + int_type(r.denominator())) ? r.denominator() : + (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){} + + template < typename NewType > + BOOST_CONSTEXPR explicit + rational(rational const &r, typename disable_if_c::value>::type const* = 0) + : num(r.numerator()), den(is_normalized(int_type(r.numerator()), + int_type(r.denominator())) && is_safe_narrowing_conversion(r.denominator()) && is_safe_narrowing_conversion(r.numerator()) ? r.denominator() : + (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){} + // Default copy constructor and assignment are fine + + // Add assignment from IntType + template + BOOST_CXX14_CONSTEXPR typename enable_if_c< + rational_detail::is_compatible_integer::value, rational & + >::type operator=(const T& n) { return assign(static_cast(n), static_cast(1)); } + + // Assign in place + template + BOOST_CXX14_CONSTEXPR typename enable_if_c< + rational_detail::is_compatible_integer::value && rational_detail::is_compatible_integer::value, rational & + >::type assign(const T& n, const U& d) + { + return *this = rational(static_cast(n), static_cast(d)); + } + // + // The following overloads should probably *not* be provided - + // but are provided for backwards compatibity reasons only. + // These allow for construction/assignment from types that + // are wider than IntType only if there is an implicit + // conversion from T to IntType, they will throw a bad_rational + // if the conversion results in loss of precision or undefined behaviour. + // + template //, typename enable_if_c::value>::type> + BOOST_CXX14_CONSTEXPR rational(const T& n, typename enable_if_c< + rational_detail::is_backward_compatible_integer::value + >::type const* = 0) + { + assign(n, static_cast(1)); + } + template + BOOST_CXX14_CONSTEXPR rational(const T& n, const U& d, typename enable_if_c< + (!rational_detail::is_compatible_integer::value + || !rational_detail::is_compatible_integer::value) + && std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value && + std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value + >::type const* = 0) + { + assign(n, d); + } + template + BOOST_CXX14_CONSTEXPR typename enable_if_c< + std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && !rational_detail::is_compatible_integer::value + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value, + rational & + >::type operator=(const T& n) { return assign(n, static_cast(1)); } + + template + BOOST_CXX14_CONSTEXPR typename enable_if_c< + (!rational_detail::is_compatible_integer::value + || !rational_detail::is_compatible_integer::value) + && std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value && + std::numeric_limits::is_specialized && std::numeric_limits::is_integer + && (std::numeric_limits::radix == std::numeric_limits::radix) + && is_convertible::value, + rational & + >::type assign(const T& n, const U& d) + { + if(!is_safe_narrowing_conversion(n) || !is_safe_narrowing_conversion(d)) + BOOST_THROW_EXCEPTION(bad_rational()); + return *this = rational(static_cast(n), static_cast(d)); + } + + // Access to representation + BOOST_CONSTEXPR + const IntType& numerator() const { return num; } + BOOST_CONSTEXPR + const IntType& denominator() const { return den; } + + // Arithmetic assignment operators + BOOST_CXX14_CONSTEXPR rational& operator+= (const rational& r); + BOOST_CXX14_CONSTEXPR rational& operator-= (const rational& r); + BOOST_CXX14_CONSTEXPR rational& operator*= (const rational& r); + BOOST_CXX14_CONSTEXPR rational& operator/= (const rational& r); + + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, rational&>::type operator+= (const T& i) + { + num += i * den; + return *this; + } + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, rational&>::type operator-= (const T& i) + { + num -= i * den; + return *this; + } + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, rational&>::type operator*= (const T& i) + { + // Avoid overflow and preserve normalization + IntType gcd = integer::gcd(static_cast(i), den); + num *= i / gcd; + den /= gcd; + return *this; + } + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, rational&>::type operator/= (const T& i) + { + // Avoid repeated construction + IntType const zero(0); + + if(i == zero) BOOST_THROW_EXCEPTION(bad_rational()); + if(num == zero) return *this; + + // Avoid overflow and preserve normalization + IntType const gcd = integer::gcd(num, static_cast(i)); + num /= gcd; + den *= i / gcd; + + if(den < zero) { + num = -num; + den = -den; + } + + return *this; + } + + // Increment and decrement + BOOST_CXX14_CONSTEXPR const rational& operator++() { num += den; return *this; } + BOOST_CXX14_CONSTEXPR const rational& operator--() { num -= den; return *this; } + + BOOST_CXX14_CONSTEXPR rational operator++(int) + { + rational t(*this); + ++(*this); + return t; + } + BOOST_CXX14_CONSTEXPR rational operator--(int) + { + rational t(*this); + --(*this); + return t; + } + + // Operator not + BOOST_CONSTEXPR + bool operator!() const { return !num; } + + // Boolean conversion + +#if BOOST_WORKAROUND(__MWERKS__,<=0x3003) + // The "ISO C++ Template Parser" option in CW 8.3 chokes on the + // following, hence we selectively disable that option for the + // offending memfun. +#pragma parse_mfunc_templ off +#endif + + BOOST_CONSTEXPR + operator bool_type() const { return operator !() ? 0 : &helper::parts; } + +#if BOOST_WORKAROUND(__MWERKS__,<=0x3003) +#pragma parse_mfunc_templ reset +#endif + + // Comparison operators + BOOST_CXX14_CONSTEXPR bool operator< (const rational& r) const; + BOOST_CXX14_CONSTEXPR bool operator> (const rational& r) const { return r < *this; } + BOOST_CONSTEXPR + bool operator== (const rational& r) const; + + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, bool>::type operator< (const T& i) const + { + // Avoid repeated construction + int_type const zero(0); + + // Break value into mixed-fraction form, w/ always-nonnegative remainder + BOOST_ASSERT(this->den > zero); + int_type q = this->num / this->den, r = this->num % this->den; + while(r < zero) { r += this->den; --q; } + + // Compare with just the quotient, since the remainder always bumps the + // value up. [Since q = floor(n/d), and if n/d < i then q < i, if n/d == i + // then q == i, if n/d == i + r/d then q == i, and if n/d >= i + 1 then + // q >= i + 1 > i; therefore n/d < i iff q < i.] + return q < i; + } + template + BOOST_CXX14_CONSTEXPR typename boost::enable_if_c::value, bool>::type operator>(const T& i) const + { + return operator==(i) ? false : !operator<(i); + } + template + BOOST_CONSTEXPR typename boost::enable_if_c::value, bool>::type operator== (const T& i) const + { + return ((den == IntType(1)) && (num == i)); + } + +private: + // Implementation - numerator and denominator (normalized). + // Other possibilities - separate whole-part, or sign, fields? + IntType num; + IntType den; + + // Helper functions + static BOOST_CONSTEXPR + int_type inner_gcd( param_type a, param_type b, int_type const &zero = + int_type(0) ) + { return b == zero ? a : inner_gcd(b, a % b, zero); } + + static BOOST_CONSTEXPR + int_type inner_abs( param_type x, int_type const &zero = int_type(0) ) + { return x < zero ? -x : +x; } + + // Representation note: Fractions are kept in normalized form at all + // times. normalized form is defined as gcd(num,den) == 1 and den > 0. + // In particular, note that the implementation of abs() below relies + // on den always being positive. + BOOST_CXX14_CONSTEXPR bool test_invariant() const; + BOOST_CXX14_CONSTEXPR void normalize(); + + static BOOST_CONSTEXPR + bool is_normalized( param_type n, param_type d, int_type const &zero = + int_type(0), int_type const &one = int_type(1) ) + { + return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n, + d, zero), zero ) == one; + } + // + // Conversion checks: + // + // (1) From an unsigned type with more digits than IntType: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits > std::numeric_limits::digits) && (std::numeric_limits::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) + { + return val < (T(1) << std::numeric_limits::digits); + } + // + // (2) From a signed type with more digits than IntType, and IntType also signed: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits > std::numeric_limits::digits) && (std::numeric_limits::is_signed == true) && (std::numeric_limits::is_signed == true), bool>::type is_safe_narrowing_conversion(const T& val) + { + // Note that this check assumes IntType has a 2's complement representation, + // we don't want to try to convert a std::numeric_limits::min() to + // a T because that conversion may not be allowed (this happens when IntType + // is from Boost.Multiprecision). + return (val < (T(1) << std::numeric_limits::digits)) && (val >= -(T(1) << std::numeric_limits::digits)); + } + // + // (3) From a signed type with more digits than IntType, and IntType unsigned: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits > std::numeric_limits::digits) && (std::numeric_limits::is_signed == true) && (std::numeric_limits::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) + { + return (val < (T(1) << std::numeric_limits::digits)) && (val >= 0); + } + // + // (4) From a signed type with fewer digits than IntType, and IntType unsigned: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits <= std::numeric_limits::digits) && (std::numeric_limits::is_signed == true) && (std::numeric_limits::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val) + { + return val >= 0; + } + // + // (5) From an unsigned type with fewer digits than IntType, and IntType signed: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits <= std::numeric_limits::digits) && (std::numeric_limits::is_signed == false) && (std::numeric_limits::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&) + { + return true; + } + // + // (6) From an unsigned type with fewer digits than IntType, and IntType unsigned: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits <= std::numeric_limits::digits) && (std::numeric_limits::is_signed == false) && (std::numeric_limits::is_signed == false), bool>::type is_safe_narrowing_conversion(const T&) + { + return true; + } + // + // (7) From an signed type with fewer digits than IntType, and IntType signed: + // + template + BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits::digits <= std::numeric_limits::digits) && (std::numeric_limits::is_signed == true) && (std::numeric_limits::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&) + { + return true; + } +}; + +// Unary plus and minus +template +BOOST_CONSTEXPR +inline rational operator+ (const rational& r) +{ + return r; +} + +template +BOOST_CXX14_CONSTEXPR +inline rational operator- (const rational& r) +{ + return rational(static_cast(-r.numerator()), r.denominator()); +} + +// Arithmetic assignment operators +template +BOOST_CXX14_CONSTEXPR rational& rational::operator+= (const rational& r) +{ + // This calculation avoids overflow, and minimises the number of expensive + // calculations. Thanks to Nickolay Mladenov for this algorithm. + // + // Proof: + // We have to compute a/b + c/d, where gcd(a,b)=1 and gcd(b,c)=1. + // Let g = gcd(b,d), and b = b1*g, d=d1*g. Then gcd(b1,d1)=1 + // + // The result is (a*d1 + c*b1) / (b1*d1*g). + // Now we have to normalize this ratio. + // Let's assume h | gcd((a*d1 + c*b1), (b1*d1*g)), and h > 1 + // If h | b1 then gcd(h,d1)=1 and hence h|(a*d1+c*b1) => h|a. + // But since gcd(a,b1)=1 we have h=1. + // Similarly h|d1 leads to h=1. + // So we have that h | gcd((a*d1 + c*b1) , (b1*d1*g)) => h|g + // Finally we have gcd((a*d1 + c*b1), (b1*d1*g)) = gcd((a*d1 + c*b1), g) + // Which proves that instead of normalizing the result, it is better to + // divide num and den by gcd((a*d1 + c*b1), g) + + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + IntType g = integer::gcd(den, r_den); + den /= g; // = b1 from the calculations above + num = num * (r_den / g) + r_num * den; + g = integer::gcd(num, g); + num /= g; + den *= r_den/g; + + return *this; +} + +template +BOOST_CXX14_CONSTEXPR rational& rational::operator-= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // This calculation avoids overflow, and minimises the number of expensive + // calculations. It corresponds exactly to the += case above + IntType g = integer::gcd(den, r_den); + den /= g; + num = num * (r_den / g) - r_num * den; + g = integer::gcd(num, g); + num /= g; + den *= r_den/g; + + return *this; +} + +template +BOOST_CXX14_CONSTEXPR rational& rational::operator*= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // Avoid overflow and preserve normalization + IntType gcd1 = integer::gcd(num, r_den); + IntType gcd2 = integer::gcd(r_num, den); + num = (num/gcd1) * (r_num/gcd2); + den = (den/gcd2) * (r_den/gcd1); + return *this; +} + +template +BOOST_CXX14_CONSTEXPR rational& rational::operator/= (const rational& r) +{ + // Protect against self-modification + IntType r_num = r.num; + IntType r_den = r.den; + + // Avoid repeated construction + IntType zero(0); + + // Trap division by zero + if (r_num == zero) + BOOST_THROW_EXCEPTION(bad_rational()); + if (num == zero) + return *this; + + // Avoid overflow and preserve normalization + IntType gcd1 = integer::gcd(num, r_num); + IntType gcd2 = integer::gcd(r_den, den); + num = (num/gcd1) * (r_den/gcd2); + den = (den/gcd2) * (r_num/gcd1); + + if (den < zero) { + num = -num; + den = -den; + } + return *this; +} + + +// +// Non-member operators: previously these were provided by Boost.Operator, but these had a number of +// drawbacks, most notably, that in order to allow inter-operability with IntType code such as this: +// +// rational r(3); +// assert(r == 3.5); // compiles and passes!! +// +// Happens to be allowed as well :-( +// +// There are three possible cases for each operator: +// 1) rational op rational. +// 2) rational op integer +// 3) integer op rational +// Cases (1) and (2) are folded into the one function. +// +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, rational >::type + operator + (const rational& a, const Arg& b) +{ + rational t(a); + return t += b; +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, rational >::type + operator + (const Arg& b, const rational& a) +{ + rational t(a); + return t += b; +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, rational >::type + operator - (const rational& a, const Arg& b) +{ + rational t(a); + return t -= b; +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, rational >::type + operator - (const Arg& b, const rational& a) +{ + rational t(a); + return -(t -= b); +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, rational >::type + operator * (const rational& a, const Arg& b) +{ + rational t(a); + return t *= b; +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, rational >::type + operator * (const Arg& b, const rational& a) +{ + rational t(a); + return t *= b; +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, rational >::type + operator / (const rational& a, const Arg& b) +{ + rational t(a); + return t /= b; +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, rational >::type + operator / (const Arg& b, const rational& a) +{ + rational t(b); + return t /= a; +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, bool>::type + operator <= (const rational& a, const Arg& b) +{ + return !a.operator>(b); +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator <= (const Arg& b, const rational& a) +{ + return a >= b; +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, bool>::type + operator >= (const rational& a, const Arg& b) +{ + return !a.operator<(b); +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator >= (const Arg& b, const rational& a) +{ + return a <= b; +} + +template +BOOST_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value || is_same, Arg>::value, bool>::type + operator != (const rational& a, const Arg& b) +{ + return !a.operator==(b); +} +template +BOOST_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator != (const Arg& b, const rational& a) +{ + return !(b == a); +} + +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator < (const Arg& b, const rational& a) +{ + return a.operator>(b); +} +template +BOOST_CXX14_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator > (const Arg& b, const rational& a) +{ + return a.operator<(b); +} +template +BOOST_CONSTEXPR +inline typename boost::enable_if_c < + rational_detail::is_compatible_integer::value, bool>::type + operator == (const Arg& b, const rational& a) +{ + return a.operator==(b); +} + +// Comparison operators +template +BOOST_CXX14_CONSTEXPR +bool rational::operator< (const rational& r) const +{ + // Avoid repeated construction + int_type const zero( 0 ); + + // This should really be a class-wide invariant. The reason for these + // checks is that for 2's complement systems, INT_MIN has no corresponding + // positive, so negating it during normalization keeps it INT_MIN, which + // is bad for later calculations that assume a positive denominator. + BOOST_ASSERT( this->den > zero ); + BOOST_ASSERT( r.den > zero ); + + // Determine relative order by expanding each value to its simple continued + // fraction representation using the Euclidian GCD algorithm. + struct { int_type n, d, q, r; } + ts = { this->num, this->den, static_cast(this->num / this->den), + static_cast(this->num % this->den) }, + rs = { r.num, r.den, static_cast(r.num / r.den), + static_cast(r.num % r.den) }; + unsigned reverse = 0u; + + // Normalize negative moduli by repeatedly adding the (positive) denominator + // and decrementing the quotient. Later cycles should have all positive + // values, so this only has to be done for the first cycle. (The rules of + // C++ require a nonnegative quotient & remainder for a nonnegative dividend + // & positive divisor.) + while ( ts.r < zero ) { ts.r += ts.d; --ts.q; } + while ( rs.r < zero ) { rs.r += rs.d; --rs.q; } + + // Loop through and compare each variable's continued-fraction components + for ( ;; ) + { + // The quotients of the current cycle are the continued-fraction + // components. Comparing two c.f. is comparing their sequences, + // stopping at the first difference. + if ( ts.q != rs.q ) + { + // Since reciprocation changes the relative order of two variables, + // and c.f. use reciprocals, the less/greater-than test reverses + // after each index. (Start w/ non-reversed @ whole-number place.) + return reverse ? ts.q > rs.q : ts.q < rs.q; + } + + // Prepare the next cycle + reverse ^= 1u; + + if ( (ts.r == zero) || (rs.r == zero) ) + { + // At least one variable's c.f. expansion has ended + break; + } + + ts.n = ts.d; ts.d = ts.r; + ts.q = ts.n / ts.d; ts.r = ts.n % ts.d; + rs.n = rs.d; rs.d = rs.r; + rs.q = rs.n / rs.d; rs.r = rs.n % rs.d; + } + + // Compare infinity-valued components for otherwise equal sequences + if ( ts.r == rs.r ) + { + // Both remainders are zero, so the next (and subsequent) c.f. + // components for both sequences are infinity. Therefore, the sequences + // and their corresponding values are equal. + return false; + } + else + { +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4800) +#endif + // Exactly one of the remainders is zero, so all following c.f. + // components of that variable are infinity, while the other variable + // has a finite next c.f. component. So that other variable has the + // lesser value (modulo the reversal flag!). + return ( ts.r != zero ) != static_cast( reverse ); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + } +} + +template +BOOST_CONSTEXPR +inline bool rational::operator== (const rational& r) const +{ + return ((num == r.num) && (den == r.den)); +} + +// Invariant check +template +BOOST_CXX14_CONSTEXPR +inline bool rational::test_invariant() const +{ + return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) == + int_type(1) ); +} + +// Normalisation +template +BOOST_CXX14_CONSTEXPR void rational::normalize() +{ + // Avoid repeated construction + IntType zero(0); + + if (den == zero) + BOOST_THROW_EXCEPTION(bad_rational()); + + // Handle the case of zero separately, to avoid division by zero + if (num == zero) { + den = IntType(1); + return; + } + + IntType g = integer::gcd(num, den); + + num /= g; + den /= g; + + if (den < -(std::numeric_limits::max)()) { + BOOST_THROW_EXCEPTION(bad_rational("bad rational: non-zero singular denominator")); + } + + // Ensure that the denominator is positive + if (den < zero) { + num = -num; + den = -den; + } + + BOOST_ASSERT( this->test_invariant() ); +} + +#ifndef BOOST_NO_IOSTREAM +namespace detail { + + // A utility class to reset the format flags for an istream at end + // of scope, even in case of exceptions + struct resetter { + resetter(std::istream& is) : is_(is), f_(is.flags()) {} + ~resetter() { is_.flags(f_); } + std::istream& is_; + std::istream::fmtflags f_; // old GNU c++ lib has no ios_base + }; + +} + +// Input and output +template +std::istream& operator>> (std::istream& is, rational& r) +{ + using std::ios; + + IntType n = IntType(0), d = IntType(1); + char c = 0; + detail::resetter sentry(is); + + if ( is >> n ) + { + if ( is.get(c) ) + { + if ( c == '/' ) + { + if ( is >> std::noskipws >> d ) + try { + r.assign( n, d ); + } catch ( bad_rational & ) { // normalization fail + try { is.setstate(ios::failbit); } + catch ( ... ) {} // don't throw ios_base::failure... + if ( is.exceptions() & ios::failbit ) + throw; // ...but the original exception instead + // ELSE: suppress the exception, use just error flags + } + } + else + is.setstate( ios::failbit ); + } + } + + return is; +} + +// Add manipulators for output format? +template +std::ostream& operator<< (std::ostream& os, const rational& r) +{ + // The slash directly precedes the denominator, which has no prefixes. + std::ostringstream ss; + + ss.copyfmt( os ); + ss.tie( NULL ); + ss.exceptions( std::ios::goodbit ); + ss.width( 0 ); + ss << std::noshowpos << std::noshowbase << '/' << r.denominator(); + + // The numerator holds the showpos, internal, and showbase flags. + std::string const tail = ss.str(); + std::streamsize const w = + os.width() - static_cast( tail.size() ); + + ss.clear(); + ss.str( "" ); + ss.flags( os.flags() ); + 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 + +// Type conversion +template +BOOST_CONSTEXPR +inline T rational_cast(const rational& src) +{ + return static_cast(src.numerator())/static_cast(src.denominator()); +} + +// Do not use any abs() defined on IntType - it isn't worth it, given the +// difficulties involved (Koenig lookup required, there may not *be* an abs() +// defined, etc etc). +template +BOOST_CXX14_CONSTEXPR +inline rational abs(const rational& r) +{ + return r.numerator() >= IntType(0)? r: -r; +} + +namespace integer { + +template +struct gcd_evaluator< rational > +{ + typedef rational result_type, + first_argument_type, second_argument_type; + result_type operator() ( first_argument_type const &a + , second_argument_type const &b + ) const + { + return result_type(integer::gcd(a.numerator(), b.numerator()), + integer::lcm(a.denominator(), b.denominator())); + } +}; + +template +struct lcm_evaluator< rational > +{ + typedef rational result_type, + first_argument_type, second_argument_type; + result_type operator() ( first_argument_type const &a + , second_argument_type const &b + ) const + { + return result_type(integer::lcm(a.numerator(), b.numerator()), + integer::gcd(a.denominator(), b.denominator())); + } +}; + +} // namespace integer + +} // namespace boost + +#endif // BOOST_RATIONAL_HPP diff --git a/Slang/boost/ref.hpp b/Slang/boost/ref.hpp new file mode 100644 index 0000000..17b56ec --- /dev/null +++ b/Slang/boost/ref.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_REF_HPP +#define BOOST_REF_HPP + +// The header file at this path is deprecated; +// use boost/core/ref.hpp instead. + +#include + +#endif diff --git a/Slang/boost/regex.h b/Slang/boost/regex.h new file mode 100644 index 0000000..52af275 --- /dev/null +++ b/Slang/boost/regex.h @@ -0,0 +1,100 @@ +/* + * + * Copyright (c) 1998-2000 + * Dr John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for documentation. + * FILE regex.h + * VERSION 3.12 + * DESCRIPTION: Declares POSIX API functions + */ + +#ifndef BOOST_RE_REGEX_H +#define BOOST_RE_REGEX_H + +#include + +/* +* add using declarations to bring POSIX API functions into +* global scope, only if this is C++ (and not C). +*/ +#ifdef __cplusplus + +using boost::regoff_t; +using boost::regex_tA; +using boost::regmatch_t; +using boost::REG_BASIC; +using boost::REG_EXTENDED; +using boost::REG_ICASE; +using boost::REG_NOSUB; +using boost::REG_NEWLINE; +using boost::REG_NOSPEC; +using boost::REG_PEND; +using boost::REG_DUMP; +using boost::REG_NOCOLLATE; +using boost::REG_ESCAPE_IN_LISTS; +using boost::REG_NEWLINE_ALT; +using boost::REG_PERL; +using boost::REG_AWK; +using boost::REG_GREP; +using boost::REG_EGREP; +using boost::REG_ASSERT; +using boost::REG_INVARG; +using boost::REG_ATOI; +using boost::REG_ITOA; + +using boost::REG_NOTBOL; +using boost::REG_NOTEOL; +using boost::REG_STARTEND; + +using boost::reg_comp_flags; +using boost::reg_exec_flags; +using boost::regcompA; +using boost::regerrorA; +using boost::regexecA; +using boost::regfreeA; + +#ifndef BOOST_NO_WREGEX +using boost::regcompW; +using boost::regerrorW; +using boost::regexecW; +using boost::regfreeW; +using boost::regex_tW; +#endif + +using boost::REG_NOERROR; +using boost::REG_NOMATCH; +using boost::REG_BADPAT; +using boost::REG_ECOLLATE; +using boost::REG_ECTYPE; +using boost::REG_EESCAPE; +using boost::REG_ESUBREG; +using boost::REG_EBRACK; +using boost::REG_EPAREN; +using boost::REG_EBRACE; +using boost::REG_BADBR; +using boost::REG_ERANGE; +using boost::REG_ESPACE; +using boost::REG_BADRPT; +using boost::REG_EEND; +using boost::REG_ESIZE; +using boost::REG_ERPAREN; +using boost::REG_EMPTY; +using boost::REG_E_MEMORY; +using boost::REG_E_UNKNOWN; +using boost::reg_errcode_t; + +#endif /* __cplusplus */ + +#endif /* BOOST_RE_REGEX_H */ + + + + diff --git a/Slang/boost/regex.hpp b/Slang/boost/regex.hpp new file mode 100644 index 0000000..b0c8bf1 --- /dev/null +++ b/Slang/boost/regex.hpp @@ -0,0 +1,41 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for documentation. + * FILE regex.cpp + * VERSION see + * DESCRIPTION: Declares boost::basic_regex<> and associated + * functions and classes. This header is the main + * entry point for the template regex code. + */ + + +/* start with C compatibility API */ + +#ifndef BOOST_RE_REGEX_HPP +#define BOOST_RE_REGEX_HPP + +#ifndef BOOST_REGEX_CONFIG_HPP +#include +#endif + +#ifdef BOOST_REGEX_CXX03 +#include +#else +#include +#endif + +#endif // include + + + + diff --git a/Slang/boost/regex_fwd.hpp b/Slang/boost/regex_fwd.hpp new file mode 100644 index 0000000..99371b8 --- /dev/null +++ b/Slang/boost/regex_fwd.hpp @@ -0,0 +1,37 @@ +/* + * + * Copyright (c) 1998-2002 + * John Maddock + * + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + + /* + * LOCATION: see http://www.boost.org/libs/regex for documentation. + * FILE regex_fwd.cpp + * VERSION see + * DESCRIPTION: Forward declares boost::basic_regex<> and + * associated typedefs. + */ + +#ifndef BOOST_REGEX_FWD_HPP +#define BOOST_REGEX_FWD_HPP + +#ifndef BOOST_REGEX_CONFIG_HPP +#include +#endif + +#ifdef BOOST_REGEX_CXX03 +#include +#else +#include +#endif + +#endif + + + + diff --git a/Slang/boost/scope_exit.hpp b/Slang/boost/scope_exit.hpp new file mode 100644 index 0000000..8658322 --- /dev/null +++ b/Slang/boost/scope_exit.hpp @@ -0,0 +1,1414 @@ + +// Copyright (C) 2006-2009, 2012 Alexander Nasonov +// Copyright (C) 2012 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 +// (see accompanying file LICENSE_1_0.txt or a copy at +// http://www.boost.org/LICENSE_1_0.txt) +// Home at http://www.boost.org/libs/scope_exit + +#ifndef BOOST_SCOPE_EXIT_HPP +#define BOOST_SCOPE_EXIT_HPP + +#ifndef DOXYGEN + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// PRIVATE/PROTECTED // + +// NOTE: AUX prefix and aux namespace mark "private" symbols that shall be used +// only within this library; DETAIL prefix and detail namespace mark "protected" +// symbols that can be used by other Boost libraries but not outside Boost. + +// WARNING: BOOST_SCOPE_EXIT_AUX_GCC also used by some regression test. +#if defined(__GNUC__) && !defined(BOOST_INTEL) +# define BOOST_SCOPE_EXIT_AUX_GCC (__GNUC__ * 100 + __GNUC_MINOR__) +#else +# define BOOST_SCOPE_EXIT_AUX_GCC 0 +#endif + +#if BOOST_WORKAROUND(BOOST_SCOPE_EXIT_AUX_GCC, BOOST_TESTED_AT(413)) +# define BOOST_SCOPE_EXIT_AUX_TPL_GCC_WORKAROUND_01 1 +#else +# define BOOST_SCOPE_EXIT_AUX_TPL_GCC_WORKAROUND_01 0 +#endif + +#if BOOST_MSVC && (BOOST_MSVC <= 1900) +# define BOOST_SCOPE_EXIT_AUX_TYPEOF_THIS_MSVC_WORKAROUND_01 1 +#else +# define BOOST_SCOPE_EXIT_AUX_TYPEOF_THIS_MSVC_WORKAROUND_01 0 +#endif + +// MSVC has problems expanding __LINE__ so use (the non standard) __COUNTER__. +#ifdef BOOST_MSVC +# define BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER __COUNTER__ +#else +# define BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER __LINE__ +#endif + +// Preprocessor "keyword" detection. + +// These are not a local macros, do not #undefine them (these are used by the +// ..._BACK macros below). +#define this_BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_THISUNDERSCORE_IS (1) /* unary */ +#define void_BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_VOID_IS (1) /* unary */ + +#define BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_BACK_(token, checking_postfix) \ + BOOST_PP_IS_UNARY(BOOST_PP_CAT(token, checking_postfix)) + +#define BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_THISUNDERSCORE_BACK(token) \ + BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_BACK_(token, \ + BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_THISUNDERSCORE_IS) + +#define BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_VOID_BACK(token) \ + BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_BACK_(token, \ + _BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_VOID_IS) + +// Preprocessor "void-list". + +// NOTE: Empty list must always be represented as void (which is also a way to +// specify no function parameter) and it can never be empty because (1) +// IS_EMPTY(&var) fails (because of the leading non alphanumeric symbol) and +// (2) some compilers (MSVC) fail to correctly pass empty macro parameters +// even if they support variadic macros. Therefore, always using void to +// represent is more portable. + +// Argument: (token1)... +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_FROM_SEQ_(unused, seq) \ + BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(seq), BOOST_PP_SEQ_TO_TUPLE(seq)) + +// Token: void | token1 +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_HANDLE_VOID_( \ + is_void_macro, token) \ + BOOST_PP_IIF(is_void_macro(token), \ + BOOST_PP_NIL \ + , \ + (token, BOOST_PP_NIL) \ + ) + +// Token: (a)(b)... | empty | void | token +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_HANDLE_SEQ_( \ + is_void_macro, token) \ + BOOST_PP_IIF(BOOST_PP_IS_UNARY(token), /* unary paren (a)... */ \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_FROM_SEQ_ \ + , \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_HANDLE_VOID_ \ + )(is_void_macro, token) + +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_NEVER_(tokens) \ + 0 /* void check always returns false */ + +#ifdef BOOST_NO_CXX11_VARIADIC_MACROS + +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_(is_void_macro, seq) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_HANDLE_SEQ_(is_void_macro, seq) + +// Expand `void | (a)(b)...` to pp-list `NIL | (a, (b, NIL))`. +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(sign) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_( \ + BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_VOID_BACK, sign) + +// Expand `(a)(b)...` to pp-list `(a, (b, NIL))`. +#define BOOST_SCOPE_EXIT_AUX_PP_NON_VOID_LIST(seq) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_NEVER_, seq) + +#else // VARIADICS + +// FUTURE: Replace this with BOOST_PP_VARIADIC_SIZE when and if +// BOOST_PP_VARIAIDCS detection will match !BOOST_NO_CXX11_VARIADIC_MACROS (for +// now Boost.Preprocessor and Boost.Config disagree on detecting compiler +// variadic support while this VARIADIC_SIZE works on compilers not detected by +// PP). +#if BOOST_MSVC +# define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_(...) \ + BOOST_PP_CAT(BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_I_(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) +#else // MSVC +# define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_(...) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_I_(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) +#endif // MSVC +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_I_(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size + +// Argument: token1, ... +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_FROM_VARIADIC_(unused, ...) \ + BOOST_PP_TUPLE_TO_LIST( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_( \ + __VA_ARGS__), (__VA_ARGS__)) + +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_(is_void_macro, ...) \ + BOOST_PP_IIF(BOOST_PP_EQUAL( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_VARIADIC_SIZE_( \ + __VA_ARGS__), 1), \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_HANDLE_SEQ_ \ + , \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_FROM_VARIADIC_ \ + )(is_void_macro, __VA_ARGS__) + +// Expand `void | (a)(b)... | a, b, ...` to pp-list `NIL | (a, (b, NIL))`. +#define BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(...) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_( \ + BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_VOID_BACK, __VA_ARGS__) + +// Expand `(a)(b)... | a, b, ...` to pp-list `(a, (b, NIL))`. +#define BOOST_SCOPE_EXIT_AUX_PP_NON_VOID_LIST(...) \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST_NEVER_, __VA_ARGS__) + +#endif // VARIADICS + +// Steven Watanabe's trick with a modification suggested by Kim Barrett +namespace boost { namespace scope_exit { namespace detail { + +// Type of a local BOOST_SCOPE_EXIT_AUX_ARGS variable. +// First use in a local scope will declare the BOOST_SCOPE_EXIT_AUX_ARGS +// variable, subsequent uses will be resolved as two comparisons +// (cmp1 with 0 and cmp2 with BOOST_SCOPE_EXIT_AUX_ARGS). +template +struct declared +{ + void* value; + static int const cmp2 = 0; + friend void operator>(int, declared const&) {} +}; + +struct undeclared { declared<> dummy[2]; }; + +template struct resolve; + +template<> +struct resolve)> +{ + static const int cmp1 = 0; +}; + +template<> +struct resolve +{ + template + struct cmp1 + { + static int const cmp2 = 0; + }; +}; + +typedef void (*ref_tag)(int&); +typedef void (*val_tag)(int ); + +template struct member; + +template +struct member +{ + T& value; +#if !BOOST_SCOPE_EXIT_AUX_TPL_GCC_WORKAROUND_01 + member(T& ref) : value(ref) {} +#endif +}; + +template +struct member +{ + T value; +#if !BOOST_SCOPE_EXIT_AUX_TPL_GCC_WORKAROUND_01 + member(T& val) : value(val) {} +#endif +}; + +template inline T& deref(T* p, ref_tag) { return *p; } +template inline T& deref(T& r, val_tag) { return r; } + +template +struct wrapper +{ + typedef T type; +}; + +template wrapper wrap(T&); + +} } } // namespace + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::scope_exit::detail::wrapper, 1) + +#define BOOST_SCOPE_EXIT_AUX_ARGS boost_scope_exit_aux_args +extern boost::scope_exit::detail::undeclared BOOST_SCOPE_EXIT_AUX_ARGS; + +#define BOOST_SCOPE_EXIT_AUX_GUARD(id) \ + BOOST_PP_CAT(boost_se_guard_, id) + +#define BOOST_SCOPE_EXIT_AUX_GUARD_T(id) \ + BOOST_PP_CAT(boost_se_guard_t_, id) + +#define BOOST_SCOPE_EXIT_AUX_PARAMS(id) \ + BOOST_PP_CAT(boost_se_params_, id) + +#define BOOST_SCOPE_EXIT_AUX_THIS_T(id) \ + BOOST_PP_CAT(boost_se_this_t_, id) + +#define BOOST_SCOPE_EXIT_AUX_THIS_CAPTURE_T(id) \ + BOOST_PP_CAT(boost_se_this_capture_t_, id) + +#define BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id) \ + BOOST_PP_CAT(boost_se_params_t_, id) + +#define BOOST_SCOPE_EXIT_DETAIL_TAG(id, i) \ + BOOST_PP_SEQ_CAT( (boost_se_tag_)(i)(_)(id) ) + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM_THIS(id) \ + BOOST_PP_SEQ_CAT( (boost_se_param_this_)(id) ) + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM(id, i, var) \ + BOOST_PP_SEQ_CAT( (boost_se_param_)(i)(_)(id) ) + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM_T(id, i, var) \ + BOOST_PP_SEQ_CAT( (boost_se_param_t_)(i)(_)(id) ) + +#define BOOST_SCOPE_EXIT_DETAIL_CAPTURE_T(id, i, var) \ + BOOST_PP_SEQ_CAT( (boost_se_capture_t_)(i)(_)(id) ) + +#define BOOST_SCOPE_EXIT_AUX_WRAPPED(id, i) \ + BOOST_PP_SEQ_CAT( (boost_se_wrapped_t_)(i)(_)(id) ) + +#define BOOST_SCOPE_EXIT_AUX_DEREF(id, i, var) \ + ::boost::scope_exit::detail::deref(var, \ + static_cast(0)) + +#define BOOST_SCOPE_EXIT_AUX_MEMBER(r, id, i, var) \ + ::boost::scope_exit::detail::member< \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_T(id, i, var), \ + BOOST_SCOPE_EXIT_DETAIL_TAG(id, i) \ + > BOOST_SCOPE_EXIT_DETAIL_PARAM(id, i, var); + +#define BOOST_SCOPE_EXIT_AUX_ARG_DECL(r, id_ty, i, var) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_PP_TUPLE_ELEM(2, 1, id_ty) \ + BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty)):: \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + var + +#define BOOST_SCOPE_EXIT_AUX_ARG(r, id, i, var) \ + BOOST_PP_COMMA_IF(i) \ + boost_se_params_->BOOST_SCOPE_EXIT_DETAIL_PARAM(id, i, var).value + +#define BOOST_SCOPE_EXIT_DETAIL_TAG_DECL(r, id, i, var) \ + typedef void (*BOOST_SCOPE_EXIT_DETAIL_TAG(id, i))(int var); + +// Adam Butcher's workaround to deduce `this` type on MSVC revision < 10. +// Boost.Typeof for VC71's typeid-based workaround does not work to determine +// `this` type due to error C2355 being incorrectly reported. The typical +// avoidance strategy implemented below is to make an indirect compile-time +// constant by assigning an enum and use that as type-index-- this only works +// with the sizeof() approach and not with the typeid() approach. Lorenzo +// Caminiti extended this approach to work in type-of emulation mode. This code +// is very similar (and somewhat of a duplication) of the code in +// boost/typeof/msvc/typeof_impl.hpp). However, this code cannot be integrated +// into Boost.Typeof because its final API has to be a `typedef ...` and it +// cannot be a `typeof(...)`. +#if BOOST_SCOPE_EXIT_AUX_TYPEOF_THIS_MSVC_WORKAROUND_01 + +#include +#include +#include +#include +#include + +#if defined(BOOST_MSVC) +# include +#endif + +namespace boost { namespace scope_exit { namespace aux { + namespace msvc_typeof_this { + +// compile-time constant code +#if defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS) + +template struct the_counter; + +template +struct encode_counter { + __if_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned, + count=(encode_counter::count)); + } + __if_not_exists(the_counter) { + __if_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned, + count=(encode_counter::count)); + } + __if_not_exists(the_counter) { + __if_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned, + count=(encode_counter::count)); + } + __if_not_exists(the_counter) { + __if_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned, + count=(encode_counter::count)); + } + __if_not_exists(the_counter) { + __if_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned, + count=(encode_counter::count)); + } + __if_not_exists(the_counter) { + BOOST_STATIC_CONSTANT(unsigned,count=N); + typedef the_counter type; + } + } + } + } + } +}; + +#else // compile-time constant code + +template struct encode_counter : encode_counter {}; + +template<> struct encode_counter<0> {}; + +#endif // compile-time constant code + +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) // type-of code + +struct msvc_extract_type_default_param {}; + +template +struct msvc_extract_type; + +template +struct msvc_extract_type { + template + struct id2type_impl; + + typedef id2type_impl id2type; +}; + +template +struct msvc_extract_type + : msvc_extract_type { + template<> + struct id2type_impl { // VC8.0 specific bug-feature. + typedef T type; + }; + + template + struct id2type_impl; + + typedef id2type_impl id2type; +}; + +template +struct msvc_register_type : msvc_extract_type {}; + +#else // type-of code + +template +struct msvc_extract_type { + struct id2type; +}; + +template +struct msvc_register_type : msvc_extract_type { + typedef msvc_extract_type base_type; + struct base_type::id2type { // This uses nice VC6.5 and VC7.1 bug-features. + typedef T type; + }; +}; + +#endif // typeof code + +template +struct msvc_typeid_wrapper { + typedef typename msvc_extract_type + >::id2type id2type; + typedef typename id2type::type type; +}; + +template<> +struct msvc_typeid_wrapper<4> { + typedef msvc_typeid_wrapper<4> type; +}; + +template +struct encode_type { + BOOST_STATIC_CONSTANT(unsigned, value = encode_counter::count); + typedef typename msvc_register_type >::id2type type; + BOOST_STATIC_CONSTANT(unsigned, next = value + 1); +}; + +template +struct sizer { + typedef char(*type)[encode_type::value]; +}; + +template +typename boost::enable_if_< + !boost::is_function::value + , typename sizer::type +>::type encode_start(T const&); + +template +typename boost::enable_if_< + boost::is_function::value + , typename sizer::type +>::type encode_start(T&); + +template +msvc_register_type typeof_register_type(const T&, + Organizer* = 0); + +} } } } // namespace + +#define BOOST_SCOPE_EXIT_AUX_TYPEDEF_TYPEOF_THIS_INDEX_(id) \ + BOOST_PP_CAT(boost_se_thistype_index_, id) + +#define BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, ty, new_type) \ + /* unfortunately, we need to go via this enum which causes this to be */ \ + /* a typedef construct and not a typeof (so this code cannot be */ \ + /* integrated into Boost.Typeof) */ \ + enum { \ + BOOST_SCOPE_EXIT_AUX_TYPEDEF_TYPEOF_THIS_INDEX_(id) = sizeof( \ + *::boost::scope_exit::aux::msvc_typeof_this::encode_start(this)) \ + }; \ + typedef \ + ty ::boost::scope_exit::aux::msvc_typeof_this::msvc_typeid_wrapper< \ + BOOST_SCOPE_EXIT_AUX_TYPEDEF_TYPEOF_THIS_INDEX_(id) \ + >::type \ + new_type \ + ; + +#else // TYPEOF_THIS_MSVC_WORKAROUND + +#define BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, ty, new_type) \ + typedef /* trailing `EMPTY()` handles empty `ty` */ \ + BOOST_PP_IIF(BOOST_PP_IS_EMPTY(ty BOOST_PP_EMPTY()), \ + BOOST_TYPEOF \ + , \ + BOOST_TYPEOF_TPL \ + )(this) \ + new_type \ + ; + +#endif // TYPEOF_THIS_MSVC_WORKAROUND + +#if BOOST_SCOPE_EXIT_AUX_TPL_GCC_WORKAROUND_01 + +#define BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, ty, captures, has_this) \ + /* expand to nothing */ + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM_INIT(r, id, i, var) \ + BOOST_PP_COMMA_IF(i) { BOOST_SCOPE_EXIT_AUX_DEREF(id, i, var) } + +#define BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id, captures, has_this) \ + BOOST_PP_EXPR_IIF(BOOST_PP_BITOR(has_this, \ + BOOST_PP_LIST_IS_CONS(captures)), \ + = { \ + ) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_PARAM_INIT, id, captures) \ + BOOST_PP_COMMA_IF(BOOST_PP_BITAND(BOOST_PP_LIST_IS_CONS(captures), \ + has_this)) \ + BOOST_PP_EXPR_IIF(has_this, this) /* no extra {...} needed here */ \ + BOOST_PP_EXPR_IIF(BOOST_PP_BITOR(has_this, \ + BOOST_PP_LIST_IS_CONS(captures)), \ + } /* trailing `;` will be added by the caller */ \ + ) + +#else // TPL_GCC_WORKAROUND + +#define BOOST_SCOPE_EXIT_AUX_CTOR_ARG(r, id, i, var) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_T(id, i, var) & BOOST_PP_CAT(a, i) + +#define BOOST_SCOPE_EXIT_AUX_MEMBER_INIT(r, id, i, var) \ + BOOST_PP_COMMA_IF(i) \ + BOOST_SCOPE_EXIT_DETAIL_PARAM(id, i, var) ( BOOST_PP_CAT(a, i) ) + +#define BOOST_SCOPE_EXIT_AUX_CTOR_ARG_THIS_NAME(id) \ + BOOST_PP_CAT(boost_se_this_arg_, id) + +#define BOOST_SCOPE_EXIT_AUX_CTOR_ARG_THIS(id, ty, comma01) \ + BOOST_PP_COMMA_IF(comma01) \ + ty BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id)::BOOST_SCOPE_EXIT_AUX_THIS_T(id) \ + BOOST_SCOPE_EXIT_AUX_CTOR_ARG_THIS_NAME(id) /* ptr so no & */ + +#define BOOST_SCOPE_EXIT_AUX_MEMBER_THIS_INIT(id, comma01) \ + BOOST_PP_COMMA_IF(comma01) \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_THIS(id)( \ + BOOST_SCOPE_EXIT_AUX_CTOR_ARG_THIS_NAME(id)) + +#define BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, ty, captures, has_this) \ + BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id)( \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_CTOR_ARG, id, captures) \ + BOOST_PP_IIF(has_this, \ + BOOST_SCOPE_EXIT_AUX_CTOR_ARG_THIS \ + , \ + BOOST_PP_TUPLE_EAT(3) \ + )(id, ty, BOOST_PP_LIST_IS_CONS(captures)) \ + ) \ + BOOST_PP_EXPR_IIF(BOOST_PP_BITOR(BOOST_PP_LIST_IS_CONS(captures), \ + has_this), \ + : \ + ) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_MEMBER_INIT, id, \ + captures) \ + BOOST_PP_IIF(has_this, \ + BOOST_SCOPE_EXIT_AUX_MEMBER_THIS_INIT \ + , \ + BOOST_PP_TUPLE_EAT(2) \ + )(id, BOOST_PP_LIST_IS_CONS(captures)) \ + {} + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM_INIT(r, id, i, var) \ + BOOST_PP_COMMA_IF(i) BOOST_SCOPE_EXIT_AUX_DEREF(id,i,var) + +#define BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id, captures, has_this) \ + BOOST_PP_LPAREN_IF(BOOST_PP_BITOR(has_this, \ + BOOST_PP_LIST_IS_CONS(captures))) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_PARAM_INIT, id, captures) \ + BOOST_PP_COMMA_IF(BOOST_PP_BITAND(BOOST_PP_LIST_IS_CONS(captures), \ + has_this)) \ + BOOST_PP_EXPR_IIF(has_this, this) \ + BOOST_PP_RPAREN_IF(BOOST_PP_BITOR(has_this, \ + BOOST_PP_LIST_IS_CONS(captures))) + +#endif // TPL_GCC_WORKAROUND + +#if defined(BOOST_TYPEOF_EMULATION) + +#define BOOST_SCOPE_EXIT_DETAIL_CAPTURE_DECL(r, id_ty, i, var) \ + struct BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), i) \ + /* no need to use TYPEOF_TPL here because it's within inheritance */ \ + : BOOST_TYPEOF(::boost::scope_exit::detail::wrap( \ + BOOST_SCOPE_EXIT_AUX_DEREF(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var))) \ + {}; \ + typedef BOOST_PP_TUPLE_ELEM(2, 1, id_ty) \ + BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), i)::type\ + BOOST_SCOPE_EXIT_DETAIL_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + ; + +#elif defined(BOOST_INTEL) + +#define BOOST_SCOPE_EXIT_DETAIL_CAPTURE_DECL(r, id_ty, i, var) \ + typedef \ + /* no TYPEOF_TPL here because uses TYPEOF_KEYWORD directly */ \ + BOOST_TYPEOF_KEYWORD(BOOST_SCOPE_EXIT_AUX_DEREF( \ + BOOST_PP_TUPLE_ELEM(2, 0, id_ty), i, var)) \ + BOOST_SCOPE_EXIT_DETAIL_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + ; + +#else + +#define BOOST_SCOPE_EXIT_DETAIL_CAPTURE_DECL(r, id_ty, i, var) \ + typedef \ + /* no need to use TYPEOF_TPL here because it's a typedef */ \ + BOOST_TYPEOF(::boost::scope_exit::detail::wrap( \ + BOOST_SCOPE_EXIT_AUX_DEREF(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var))) \ + BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), i) \ + ; \ + typedef BOOST_PP_TUPLE_ELEM(2, 1, id_ty) \ + BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), i)::type\ + BOOST_SCOPE_EXIT_DETAIL_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + ; + +#endif + +#define BOOST_SCOPE_EXIT_DETAIL_PARAM_DECL(r, id_ty, i, var) \ + typedef \ + BOOST_SCOPE_EXIT_DETAIL_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_T(BOOST_PP_TUPLE_ELEM(2, 0, id_ty), \ + i, var) \ + ; + +// Traits. + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_OP_CAPTURE(d, captures, this01, capture) \ + (BOOST_PP_LIST_APPEND(captures, (capture, BOOST_PP_NIL)), this01) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_OP_THIS(d, captures, this01, this_) \ + (captures, 1 /* has this (note, no error if multiple this_) */) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_OP(d, captures_this, capture) \ + BOOST_PP_IIF(BOOST_SCOPE_EXIT_AUX_PP_KEYWORD_IS_THISUNDERSCORE_BACK(\ + capture), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_OP_THIS \ + , \ + BOOST_SCOPE_EXIT_AUX_TRAITS_OP_CAPTURE \ + )(d, BOOST_PP_TUPLE_ELEM(2, 0, captures_this), \ + BOOST_PP_TUPLE_ELEM(2, 1, captures_this), capture) + +// ref_val: & | = +#define BOOST_SCOPE_EXIT_AUX_TRAITS_ALL_OP(ref_val, traits) \ + ( \ + BOOST_PP_LIST_APPEND((ref_val, BOOST_PP_NIL), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + , \ + BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits) \ + ) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS(captures) \ + BOOST_PP_LIST_FOLD_LEFT(BOOST_SCOPE_EXIT_AUX_TRAITS_OP, \ + (BOOST_PP_NIL, 0), captures) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_ALL(captures) \ + BOOST_SCOPE_EXIT_AUX_TRAITS_ALL_OP(BOOST_PP_LIST_FIRST(captures), \ + BOOST_SCOPE_EXIT_AUX_TRAITS(BOOST_PP_LIST_REST(captures))) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits) \ + BOOST_PP_TUPLE_ELEM(2, 0, traits) + +#define BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits) \ + BOOST_PP_TUPLE_ELEM(2, 1, traits) + +#ifndef BOOST_NO_CXX11_LAMBDAS + +namespace boost { namespace scope_exit { namespace aux { + +template +struct guard { // With object `this_` (for backward compatibility). + explicit guard(This _this) : this_(_this) {} + ~guard() { if(f_) f_(this_); } + template + void operator=(Lambda f) { f_ = f; } +private: + This this_; + boost::function f_; +}; + +template<> +struct guard { // Without object `this_` (could capture `this` directly). + ~guard() { if(f_) f_(); } + template + void operator=(Lambda f) { f_ = f; } +private: + boost::function f_; +}; + +} } } // namespace + +#define BOOST_SCOPE_EXIT_AUX_LAMBDA_PARAMS(id) \ + BOOST_PP_CAT(boost_se_lambda_params_, id) + +#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_CAPTURE_TYPE(id) \ + BOOST_PP_CAT(boost_se_lambda_this_t_, id) + +#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_PARAM_TYPE(id) \ + BOOST_PP_CAT(boost_se_lambda_this_capture_t_, id) + +#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPE(id, ty) \ + ty BOOST_SCOPE_EXIT_AUX_LAMBDA_PARAMS(id):: \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_PARAM_TYPE(id) + +// Precondition: HAS_THIS(traits). +#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPEDEFS(id, ty, traits) \ + BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, ty, \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_CAPTURE_TYPE(id)) \ + /* capture type for workaround GCC internal error (even on later C++11) */ \ + struct BOOST_SCOPE_EXIT_AUX_LAMBDA_PARAMS(id) { \ + typedef BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_CAPTURE_TYPE(id) \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_PARAM_TYPE(id); \ + }; + +#define BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, ty, traits) \ + BOOST_PP_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + /* no need for TYPEDEF THIS MSVC workaround on C++11 */ \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPEDEFS \ + , \ + BOOST_PP_TUPLE_EAT(3) \ + )(id, ty, traits) \ + ::boost::scope_exit::aux::guard< \ + BOOST_PP_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPE \ + , \ + BOOST_PP_TUPLE_EAT(2) \ + )(id, ty) \ + > BOOST_SCOPE_EXIT_AUX_GUARD(id) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + (this) \ + ) \ + ; \ + BOOST_SCOPE_EXIT_AUX_GUARD(id) = [ \ + BOOST_PP_LIST_ENUM(BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + ]( \ + BOOST_PP_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPE \ + , \ + BOOST_PP_TUPLE_EAT(2) \ + )(id, ty) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), this_) \ + ) mutable /* can change value captures (as with SCOPE_EXIT) */ -> void + +#endif // Lambdas. + +#if defined(BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS) && \ + !defined(BOOST_NO_CXX11_LAMBDAS) // Use lambda for SCOPE_EXIT (not just _ALL). + +#define BOOST_SCOPE_EXIT_AUX_IMPL(id, ty, traits) \ + BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, ty, traits) + +#else // Not using lambdas. + +// ty: EMPTY() | typename +#define BOOST_SCOPE_EXIT_AUX_IMPL(id, ty, traits) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_TAG_DECL, id, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_CAPTURE_DECL, (id, ty), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS \ + , \ + BOOST_PP_TUPLE_EAT(3) \ + )(id, ty, BOOST_SCOPE_EXIT_AUX_THIS_CAPTURE_T(id)) \ + struct BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id) { \ + /* interim capture types to workaround internal errors on old GCC */ \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_DETAIL_PARAM_DECL, (id, ty), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + typedef BOOST_SCOPE_EXIT_AUX_THIS_CAPTURE_T(id) \ + BOOST_SCOPE_EXIT_AUX_THIS_T(id) ; \ + ) \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_MEMBER, id, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + BOOST_SCOPE_EXIT_AUX_THIS_T(id) \ + BOOST_SCOPE_EXIT_DETAIL_PARAM_THIS(id) ; \ + ) \ + BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, ty, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits)) \ + } BOOST_SCOPE_EXIT_AUX_PARAMS(id) \ + BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits)) \ + ; \ + ::boost::scope_exit::detail::declared< \ + ::boost::scope_exit::detail::resolve< \ + sizeof(BOOST_SCOPE_EXIT_AUX_ARGS) \ + >::cmp1<0>::cmp2 \ + > BOOST_SCOPE_EXIT_AUX_ARGS; \ + BOOST_SCOPE_EXIT_AUX_ARGS.value = &BOOST_SCOPE_EXIT_AUX_PARAMS(id); \ + struct BOOST_SCOPE_EXIT_AUX_GUARD_T(id) { \ + BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id)* boost_se_params_; \ + BOOST_SCOPE_EXIT_AUX_GUARD_T(id) (void* boost_se_params) \ + : boost_se_params_( \ + (BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id)*)boost_se_params) \ + {} \ + ~BOOST_SCOPE_EXIT_AUX_GUARD_T(id)() { \ + boost_se_body( \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_ARG, id, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_COMMA_IF(BOOST_PP_BITAND(BOOST_PP_LIST_IS_CONS( \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits))) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS( \ + traits), \ + boost_se_params_->BOOST_SCOPE_EXIT_DETAIL_PARAM_THIS(id) \ + ) \ + ); \ + } \ + static void boost_se_body( \ + BOOST_PP_LIST_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_ARG_DECL, (id, ty), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)) \ + BOOST_PP_COMMA_IF(BOOST_PP_BITAND(BOOST_PP_LIST_IS_CONS( \ + BOOST_SCOPE_EXIT_AUX_TRAITS_CAPTURES(traits)), \ + BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits))) \ + BOOST_PP_EXPR_IIF(BOOST_SCOPE_EXIT_AUX_TRAITS_HAS_THIS(traits), \ + ty BOOST_SCOPE_EXIT_DETAIL_PARAMS_T(id):: \ + BOOST_SCOPE_EXIT_AUX_THIS_T(id) this_ \ + ) \ + ) + +#endif // Using lambdas. + +// PUBLIC // + +#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) // No variadic macros (sequences only). +# define BOOST_SCOPE_EXIT_ID(id, void_or_seq) \ + BOOST_SCOPE_EXIT_AUX_IMPL(id, BOOST_PP_EMPTY(), \ + BOOST_SCOPE_EXIT_AUX_TRAITS( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(void_or_seq))) +# define BOOST_SCOPE_EXIT_ID_TPL(id, void_or_seq) \ + BOOST_SCOPE_EXIT_AUX_IMPL(id, typename, \ + BOOST_SCOPE_EXIT_AUX_TRAITS( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(void_or_seq))) +# define BOOST_SCOPE_EXIT(void_or_seq) \ + BOOST_SCOPE_EXIT_ID(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, \ + void_or_seq) +# define BOOST_SCOPE_EXIT_TPL(void_or_seq) \ + BOOST_SCOPE_EXIT_ID_TPL(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, \ + void_or_seq) +# if !defined(BOOST_NO_CXX11_LAMBDAS) +# define BOOST_SCOPE_EXIT_ALL_ID(id, seq) \ + BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, \ + /* C++11 allows to use typename outside templates so */ \ + /* always typename here and no need for ..._ALL_TPL */ \ + /* (if a C++11 compiler does not implement this use of */ \ + /* typename, always use `this` instead of `this_`) */ \ + typename, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_ALL( \ + BOOST_SCOPE_EXIT_AUX_PP_NON_VOID_LIST(seq))) +# define BOOST_SCOPE_EXIT_ALL(seq) \ + BOOST_SCOPE_EXIT_ALL_ID( \ + BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, seq) +# endif +#else // Variadic macros (both sequences and variadic tuples). +# define BOOST_SCOPE_EXIT_ID(id, ...) \ + BOOST_SCOPE_EXIT_AUX_IMPL(id, BOOST_PP_EMPTY(), \ + BOOST_SCOPE_EXIT_AUX_TRAITS( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(__VA_ARGS__))) +# define BOOST_SCOPE_EXIT_ID_TPL(id, ...) \ + BOOST_SCOPE_EXIT_AUX_IMPL(id, typename, \ + BOOST_SCOPE_EXIT_AUX_TRAITS( \ + BOOST_SCOPE_EXIT_AUX_PP_VOID_LIST(__VA_ARGS__))) +# define BOOST_SCOPE_EXIT(...) \ + BOOST_SCOPE_EXIT_ID(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, \ + __VA_ARGS__) +# define BOOST_SCOPE_EXIT_TPL(...) \ + BOOST_SCOPE_EXIT_ID_TPL(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, \ + __VA_ARGS__) +# if !defined(BOOST_NO_CXX11_LAMBDAS) +# define BOOST_SCOPE_EXIT_ALL_ID(id, ...) \ + BOOST_SCOPE_EXIT_AUX_IMPL_LAMBDA(id, \ + /* C++11 allows to use typename outside templates so */ \ + /* always typename here and no need for ..._ALL_TPL */ \ + /* (if a C++11 compiler does not implement this use of */ \ + /* typename, always use `this` instead of `this_`) */ \ + typename, \ + BOOST_SCOPE_EXIT_AUX_TRAITS_ALL( \ + BOOST_SCOPE_EXIT_AUX_PP_NON_VOID_LIST( \ + __VA_ARGS__))) +# define BOOST_SCOPE_EXIT_ALL(...) \ + BOOST_SCOPE_EXIT_ALL_ID( \ + BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, __VA_ARGS__) +# endif +#endif // Variadics. + +#if defined(BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS) && \ + !defined(BOOST_NO_CXX11_LAMBDAS) // Use lambdas for SCOPE_EXIT (not just ALL). +# define BOOST_SCOPE_EXIT_END_ID(id) \ + ; /* lambdas ended with just `;` */ +#else // Not using lambdas. +# define BOOST_SCOPE_EXIT_END_ID(id) \ + } BOOST_SCOPE_EXIT_AUX_GUARD(id)(BOOST_SCOPE_EXIT_AUX_ARGS.value); +#endif // Using lambdas. +#define BOOST_SCOPE_EXIT_END \ + BOOST_SCOPE_EXIT_END_ID(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER) + +// DOCUMENTATION // + +#else // DOXYGEN + +/** @file +@brief Scope exits allow to execute arbitrary code when the enclosing scope +exits. +*/ + +/** +@brief This macro declares a scope exit. + +The scope exit declaration schedules the execution of the scope exit body at +the exit of the enclosing scope: + +@code + { // Some local scope. + ... + BOOST_SCOPE_EXIT(capture_list) { + ... // Body code. + } BOOST_SCOPE_EXIT_END + ... + } +@endcode + +The enclosing scope must be local. +If multiple scope exits are declared within the same enclosing scope, the scope +exit bodies are executed in the reversed order of their declarations. +Note how the end of the scope exit body must be marked by +@RefMacro{BOOST_SCOPE_EXIT_END}. + +@Params +@Param{capture_list, +On compilers that support variadic macros (see also Boost.Config +BOOST_NO_CXX11_VARIADIC_MACROS)\, the capture list syntax is defined by the +following grammar: +@code + capture_list: + void | capture_tuple | capture_sequence + capture_tuple: + capture\, capture\, ... + capture_sequence: + (capture) (capture) ... + capture: + [&]variable | this_ +@endcode +On compilers that do not support variadic macros\, capture_tuple cannot +be used: +@code + capture_list: + void | capture_sequence +@endcode +Furthermore\, if @RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS} is defined on +C++11 compilers that support lambda functions (i.e.\, Boost.Config's BOOST_NO_CXX11_LAMBDAS is not defined) then a semicolon ; can be used instead of +@RefMacro{BOOST_SCOPE_EXIT_END} and this can be used instead of +this_: +@code + capture: + [&]variable | this_ | this +@endcode + +(Lexical conventions: token1 | token2 means either token1 or +token2; [token] means either token or nothing; +{expression} means the tokens resulting from the expression.) +} +@EndParams + +Note that on compilers that support variadic macros (most of moder compliers +and all C++11 compilers), the capture list can be specified as a +comma-separated list of tokens (this is the preferred syntax). +However, on all compilers the same macro @RefMacro{BOOST_SCOPE_EXIT} also +allows to specify the capture list as a Boost.Preprocessor sequence of tokens +(for supporting compilers without variadic macros and for backward compatibility with older versions of this library). + +The name variable of each captured variable must be a valid name in the +enclosing scope and it must appear exactly once in the capture list. +If a capture starts with the ampersand sign &, the corresponding +variable will be available by reference within the scope exit body; otherwise, +a copy of the variable will be made at the point of the scope exit declaration +and that copy will be available inside the scope exit body (in this case, the +variable's type must be CopyConstructible). + +From within a member function, the object this can be captured using the +special name this_ in both the capture list and the scope exit body +(using this instead of this_ in the scope exit body leads to +undefined behaviour). + +It is possible to capture no variable by specifying the capture list as +void (regardless of variadic macro support). + +Only variables listed in the capture list, static variables, extern +variables, global variables, functions, and enumerations from the enclosing +scope can be used inside the scope exit body. + +On various GCC versions the special macro @RefMacro{BOOST_SCOPE_EXIT_TPL} must +be used instead of @RefMacro{BOOST_SCOPE_EXIT} within templates (to maximize +portability, it is recommended to always use @RefMacro{BOOST_SCOPE_EXIT_TPL} +within templates). + +On C++11, it is possible capture all variables in scope without listing their +names one-by-one using the macro @RefMacro{BOOST_SCOPE_EXIT_ALL}. + +In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_ID} must be used +instead of @RefMacro{BOOST_SCOPE_EXIT} when it is necessary to expand multiple +scope exit declarations on the same line. + +@Warning The implementation executes the scope exit body within a destructor +thus the scope exit body must never throw in order to comply with STL exception +safety requirements. + +@Note The implementation uses Boost.Typeof to automatically deduce the types of +the captured variables. +In order to compile code in type-of emulation mode, all types must be properly +registered with Boost.Typeof (see the +@RefSect{getting_started, Getting Started} section). + +@See @RefSect{tutorial, Tutorial} section, +@RefSect{getting_started, Getting Started} section, +@RefSect{no_variadic_macros, No Variadic Macros} section, +@RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_ALL}, +@RefMacro{BOOST_SCOPE_EXIT_END}, @RefMacro{BOOST_SCOPE_EXIT_ID}. +*/ +#define BOOST_SCOPE_EXIT(capture_list) + +/** +@brief This macro is a workaround for various versions of GCC to declare scope +exits within templates. + +Various versions of the GCC compiler do not compile @RefMacro{BOOST_SCOPE_EXIT} +inside function templates. +As a workaround, @RefMacro{BOOST_SCOPE_EXIT_TPL} should be used instead of +@RefMacro{BOOST_SCOPE_EXIT} in these cases: + +@code + { // Some local scope. + ... + BOOST_SCOPE_EXIT_TPL(capture_list) { + ... // Body code. + } BOOST_SCOPE_EXIT_END + ... + } +@endcode + +The syntax of @RefMacro{BOOST_SCOPE_EXIT_TPL} is the exact same as the one of +@RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more +information). + +On C++11 compilers, @RefMacro{BOOST_SCOPE_EXIT_TPL} is not needed because +@RefMacro{BOOST_SCOPE_EXIT} always compiles on GCC versions that support C++11. +However, @RefMacro{BOOST_SCOPE_EXIT_TPL} is still provided on C++11 so to write code that is portable between C++03 and C++11 compilers. +It is recommended to always use @RefMacro{BOOST_SCOPE_EXIT_TPL} within +templates so to maximize portability. + +In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_ID_TPL} must be used +instead of @RefMacro{BOOST_SCOPE_EXIT_TPL} when it is necessary to expand +multiple scope exit declarations on the same line within templates. + +@Note The issue in compiling scope exit declarations that some GCC versions +have is illustrated by the following code (see also +GCC bug 37920): +@code + template + void f(T const& x) { + int i = 0; + struct local { + typedef __typeof__(i) typeof_i; + typedef __typeof__(x) typeof_x; + }; + typedef local::typeof_i i_type; + typedef local::typeof_x x_type; + } + + int main(void) { f(0); } +@endcode +This can be fixed by adding typename in front of local::typeof_i +and local::typeof_x (which is the approach followed by the +implementation of the @RefMacro{BOOST_SCOPE_EXIT_TPL} macro). + +@Note Although @RefMacro{BOOST_SCOPE_EXIT_TPL} has the same suffix as +BOOST_TYPEOF_TPL, it does not follow the Boost.Typeof convention. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT}, +@RefMacro{BOOST_SCOPE_EXIT_END}, @RefMacro{BOOST_SCOPE_EXIT_ID_TPL}. +*/ +#define BOOST_SCOPE_EXIT_TPL(capture_list) + +/** +@brief This macro allows to expand multiple scope exit declarations on the same +line. + +This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT} but it can be expanded +multiple times on the same line if different identifiers id are provided +for each expansion (see @RefMacro{BOOST_SCOPE_EXIT} for more information). + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, scope_exit_number_1_on_line_123\, a combination of +alphanumeric tokens\, etc). +} +@Param{capture_list, +Same as the capture_list parameter of the @RefMacro{BOOST_SCOPE_EXIT} +macro. +} +@EndParams + +@Note This macro can be useful when the scope exit macros are expanded +within user-defined macros (because nested macros expand on the same line). +On some compilers (e.g., MSVC which supports the non standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro is always necessary to ensure portability when expanding +multiple scope exit declarations on the same line. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT}, +@RefMacro{BOOST_SCOPE_EXIT_END_ID}, @RefMacro{BOOST_SCOPE_EXIT_ALL_ID}, +@RefMacro{BOOST_SCOPE_EXIT_ID_TPL}. +*/ +#define BOOST_SCOPE_EXIT_ID(id, capture_list) + +/** +@brief This macro is required to expand multiple scope exit declarations on the +same line within templates on various versions of GCC. + +This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_TPL} but it can be +expanded multiple times on the same line if different identifiers id are +provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_TPL} for more +information). +As with @RefMacro{BOOST_SCOPE_EXIT_TPL}, it is recommended to always use this +macro when expanding scope exits multiple times on the same line within +templates. + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, scope_exit_number_1_on_line_123\, a combination of +alphanumeric tokens\, etc). +} +@Param{capture_list, +Same as the capture_list parameter of the +@RefMacro{BOOST_SCOPE_EXIT_TPL} macro. +} +@EndParams + +@Note This macro can be useful when the scope exit macros are expanded +within user-defined macros (because nested macros expand on the same line). +On some compilers (e.g., MSVC which supports the non standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro is always necessary to ensure portability when expanding +multiple scope exit declarations on the same line. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT_TPL}, +@RefMacro{BOOST_SCOPE_EXIT_END_ID}, @RefMacro{BOOST_SCOPE_EXIT_ID}, +@RefMacro{BOOST_SCOPE_EXIT_ALL_ID}. +*/ +#define BOOST_SCOPE_EXIT_ID_TPL(id, capture_list) + +/** +@brief This macro declares a scope exit that captures all variables in scope +(C++11 only). + +This macro accepts a capture list starting with either & or = to capture all variables in scope by reference or value respectively (following the same syntax of C++11 lambdas). +A part from that, this macro works like @RefMacro{BOOST_SCOPE_EXIT} (see @RefMacro{BOOST_SCOPE_EXIT} for more information): + +@code + { // Some local scope. + ... + BOOST_SCOPE_EXIT_ALL(capture_list) { // C++11 only. + ... // Body code. + }; // Use `;` instead of `BOOST_SCOPE_EXIT_END` (C++11 only). + ... + } +@endcode + +Note how the end of the scope exit body declared by this macro must be marked +by a semi-column ; (and not by @RefMacro{BOOST_SCOPE_EXIT_END}). + +@Warning This macro is only available on C++11 compilers (specifically, on +C++11 compilers that do not define the Boost.Config BOOST_NO_CXX11_LAMBDAS +macro). +It is not defined on non-C++11 compilers so its use on non-C++11 compilers will generate a compiler error. + +@Params +@Param{capture_list, +On compilers that support variadic macros (see also Boost.Config +BOOST_NO_CXX11_VARIADIC_MACROS)\, the capture list syntax is defined by the +following grammar: +@code +capture_list: + capture_tuple | capture_sequence +capture_tuple: + {& | =} [\, capture\, capture\, ...] +capture_sequence: + {(&) | (=)} [(capture) (capture) ...] +capture: + [&]variable | this_ +@endcode +On compilers that do not support variadic macros\, capture_tuple cannot +be used: +@code + capture_list: + void | capture_sequence +@endcode +Furthermore\, on C++11 compilers that support the use of typename +outside templates\, also this can be used to capture the object at member +function scope: +@code + capture: + [&]variable | this_ | this +@endcode + +(Lexical conventions: token1 | token2 means either token1 or +token2; [token] means either token or nothing; +{expression} means the token resulting from the expression.) +} +@EndParams + +Note that on compilers with variadic macro support (which should be all C++11 +compilers), the capture list can be specified as a comma-separated list. +On all compilers, the same macro @RefMacro{BOOST_SCOPE_EXIT_ALL} also allows to +specify the capture list as a Boost.Preprocessor sequence. + +The capture list must always contain at least the leading & or = +so it can never be void (BOOST_SCOPE_EXIT(void) should be used +to program scope exits with an empty capture list). + +In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_ALL_ID} must be used +instead of @RefMacro{BOOST_SCOPE_EXIT_ALL} when it is necessary to expand +multiple scope exit declarations on the same line. + +@Warning This macro capture list follows the exact same syntax of C++11 lambda +captures which is unfortunately different from the syntax of +@RefMacro{BOOST_SCOPE_EXIT} captures (unless programmers define the +@RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS} macro). +For example, like C++11 lambda functions, @RefMacro{BOOST_SCOPE_EXIT_ALL} +requires to capture data members by capturing the object this while +@RefMacro{BOOST_SCOPE_EXIT} allows to capture data members directly and without +capturing the object. + +@Warning The implementation executes the scope exit body within a destructor +thus the scope exit body must never throw in order to comply with STL exception +safety requirements. + +@Note This macro can always be used also within templates (so there is no need +for a BOOST_SCOPE_EXIT_ALL_TPL macro). + +@See @RefSect{tutorial, Tutorial} section, +@RefSect{no_variadic_macros, No Variadic Macros} section, +@RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_ALL_ID}. +*/ +#define BOOST_SCOPE_EXIT_ALL(capture_list) + +/** +@brief This macro allows to expand on the same line multiple scope exits that +capture all variables in scope (C++11 only). + +This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_ALL} but it can be +expanded multiple times on the same line if different identifiers id are +provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_ALL} for more +information). +As with @RefMacro{BOOST_SCOPE_EXIT_ALL}, this macro is only available on C++11 +compilers (specifically, on C++11 compilers that do not define the +Boost.Config BOOST_NO_CXX11_LAMBDAS macro). + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, scope_exit_number_1_on_line_123\, a combination of +alphanumeric tokens\, etc). +} +@Param{capture_list, +Same as the capture_list parameter of the +@RefMacro{BOOST_SCOPE_EXIT_ALL} macro. +} +@EndParams + +@Note This macro can be useful when the scope exit macros are expanded +within user-defined macros (because nested macros expand on the same line). +On some compilers (e.g., MSVC which supports the non standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro is always necessary to ensure portability when expanding +multiple scope exit declarations on the same line. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT_ALL}, +@RefMacro{BOOST_SCOPE_EXIT_ID}. +*/ +#define BOOST_SCOPE_EXIT_ALL_ID(id, capture_list) + +/** +@brief This macro marks the end of a scope exit body. + +This macro must follow the closing curly bracket } that ends the body of +either @RefMacro{BOOST_SCOPE_EXIT} or @RefMacro{BOOST_SCOPE_EXIT_TPL}: + +@code + { // Some local scope. + ... + BOOST_SCOPE_EXIT(capture_list) { + ... // Body code. + } BOOST_SCOPE_EXIT_END + ... + } +@endcode + +In general, the special macro @RefMacro{BOOST_SCOPE_EXIT_END_ID} must be used +instead of @RefMacro{BOOST_SCOPE_EXIT_END} when it is necessary to expand +multiple scope exit bodies on the same line. + +@Note If programmers define the @RefMacro{BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS} +macro on C++11 compilers, a semicolon ; can be used instead of this +macro. +However, to maximize portability, it is recommended to always use +@RefMacro{BOOST_SCOPE_EXIT_END}. + +@See @RefSect{tutorial, Tutorial} section, @RefMacro{BOOST_SCOPE_EXIT}, +@RefMacro{BOOST_SCOPE_EXIT_TPL}, @RefMacro{BOOST_SCOPE_EXIT_END_ID}. +*/ +#define BOOST_SCOPE_EXIT_END + +/** +@brief This macro allows to terminate multiple scope exit bodies on the same +line. + +This macro is equivalent to @RefMacro{BOOST_SCOPE_EXIT_END} but it can be +expanded multiple times on the same line if different identifiers id are +provided for each expansion (see @RefMacro{BOOST_SCOPE_EXIT_END} for more +information). + +@Params +@Param{id, +A unique identifier token which can be concatenated by the preprocessor +(__LINE__\, scope_exit_number_1_on_line_123\, a combination of +alphanumeric tokens\, etc). +} +@EndParams + +@Note This macro can be useful when the scope exit macros are expanded +within user-defined macros (because macros all expand on the same line). +On some compilers (e.g., MSVC which supports the non standard +__COUNTER__ macro) it might not be necessary to use this macro but +the use of this macro is always necessary to ensure portability when expanding +multiple scope exit macros on the same line (because this library can only +portably use __LINE__ to internally generate unique identifiers). + +@See @RefMacro{BOOST_SCOPE_EXIT_ID}, @RefMacro{BOOST_SCOPE_EXIT_ID_TPL}, +@RefMacro{BOOST_SCOPE_EXIT_END}. +*/ +#define BOOST_SCOPE_EXIT_END_ID(id) + +/** +@brief Force to use C++11 lambda functions to implement scope exits. + +If programmers define this configuration macro on a C++11 compiler for which +the Boost.Config macro BOOST_NO_CXX11_LAMBDAS is not defined, the +@RefMacro{BOOST_SCOPE_EXIT} and @RefMacro{BOOST_SCOPE_EXIT_TPL} macros will use +C++11 lambda functions to declare scope exits. +By default this macro is not defined. + +@Warning When scope exits are implemented using lambda functions, the syntax of +the capture list follows the exact same syntax of C++11 lambda captures +which is in general different from the legacy capture syntax of this library. +For example, C++11 lambdas require to capture data members by capturing the +object this while this library always allowed to capture data members +directly. +Therefore, when this configuration macro is defined, +@RefMacro{BOOST_SCOPE_EXIT} and @RefMacro{BOOST_SCOPE_EXIT_TPL} are no longer +backward compatible (and this is why this macro is not defined by default). + +A semicolon ; can be used instead of @RefMacro{BOOST_SCOPE_EXIT_END} +when this configuration macro is defined (but it is recommended to always use +@RefMacro{BOOST_SCOPE_EXIT_END} so to maximize portability). + +@Note This configuration macro does not control the definition of +@RefMacro{BOOST_SCOPE_EXIT_ALL} which is always and automatically defined on +compilers that support C++11 lambda functions. + +@See @RefMacro{BOOST_SCOPE_EXIT}, @RefMacro{BOOST_SCOPE_EXIT_TPL}, +@RefMacro{BOOST_SCOPE_EXIT_END}. +*/ +#define BOOST_SCOPE_EXIT_CONFIG_USE_LAMBDAS + +#endif // DOXYGEN + +#endif // BOOST_SCOPE_EXIT_HPP + diff --git a/Slang/boost/scoped_array.hpp b/Slang/boost/scoped_array.hpp new file mode 100644 index 0000000..d91889b --- /dev/null +++ b/Slang/boost/scoped_array.hpp @@ -0,0 +1,15 @@ +#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED +#define BOOST_SCOPED_ARRAY_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. + +#include + +#endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED diff --git a/Slang/boost/scoped_ptr.hpp b/Slang/boost/scoped_ptr.hpp new file mode 100644 index 0000000..334a22e --- /dev/null +++ b/Slang/boost/scoped_ptr.hpp @@ -0,0 +1,15 @@ +#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED +#define BOOST_SCOPED_PTR_HPP_INCLUDED + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. + +#include + +#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED diff --git a/Slang/boost/shared_array.hpp b/Slang/boost/shared_array.hpp new file mode 100644 index 0000000..6804224 --- /dev/null +++ b/Slang/boost/shared_array.hpp @@ -0,0 +1,19 @@ +#ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED +#define BOOST_SHARED_ARRAY_HPP_INCLUDED + +// +// shared_array.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. +// + +#include + +#endif // #ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED diff --git a/Slang/boost/shared_container_iterator.hpp b/Slang/boost/shared_container_iterator.hpp new file mode 100644 index 0000000..8adcaf7 --- /dev/null +++ b/Slang/boost/shared_container_iterator.hpp @@ -0,0 +1,69 @@ +// (C) Copyright Ronald Garcia 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. + +// See http://www.boost.org/libs/utility/shared_container_iterator.html for documentation. + +#ifndef BOOST_SHARED_CONTAINER_ITERATOR_HPP +#define BOOST_SHARED_CONTAINER_ITERATOR_HPP + +#include "boost/iterator_adaptors.hpp" +#include "boost/shared_ptr.hpp" +#include + +namespace boost { +namespace iterators { + +template +class shared_container_iterator : public iterator_adaptor< + shared_container_iterator, + typename Container::iterator> { + + typedef iterator_adaptor< + shared_container_iterator, + typename Container::iterator> super_t; + + typedef typename Container::iterator iterator_t; + typedef boost::shared_ptr container_ref_t; + + container_ref_t container_ref; +public: + shared_container_iterator() { } + + shared_container_iterator(iterator_t const& x,container_ref_t const& c) : + super_t(x), container_ref(c) { } + + +}; + +template +inline shared_container_iterator +make_shared_container_iterator(typename Container::iterator iter, + boost::shared_ptr const& container) { + typedef shared_container_iterator iterator; + return iterator(iter,container); +} + + + +template +inline std::pair< + shared_container_iterator, + shared_container_iterator > +make_shared_container_range(boost::shared_ptr const& container) { + return + std::make_pair( + make_shared_container_iterator(container->begin(),container), + make_shared_container_iterator(container->end(),container)); +} + +} // namespace iterators + +using iterators::shared_container_iterator; +using iterators::make_shared_container_iterator; +using iterators::make_shared_container_range; + +} // namespace boost + +#endif diff --git a/Slang/boost/shared_ptr.hpp b/Slang/boost/shared_ptr.hpp new file mode 100644 index 0000000..cb01b26 --- /dev/null +++ b/Slang/boost/shared_ptr.hpp @@ -0,0 +1,19 @@ +#ifndef BOOST_SHARED_PTR_HPP_INCLUDED +#define BOOST_SHARED_PTR_HPP_INCLUDED + +// +// shared_ptr.hpp +// +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001-2008 Peter Dimov +// +// Distributed under the 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/smart_ptr/ for documentation. +// + +#include + +#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED diff --git a/Slang/boost/signals2.hpp b/Slang/boost/signals2.hpp new file mode 100644 index 0000000..22b1119 --- /dev/null +++ b/Slang/boost/signals2.hpp @@ -0,0 +1,23 @@ +// A convenience header for Boost.Signals2, should pull in everying in the library. + +// Copyright (c) 2008-2009 Frank Mori Hess + +// Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_SIGNALS2_HPP +#define BOOST_SIGNALS2_HPP + +// For documentation, see http://www.boost.org/libs/signals2/ + +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/smart_ptr.hpp b/Slang/boost/smart_ptr.hpp new file mode 100644 index 0000000..6fabfc5 --- /dev/null +++ b/Slang/boost/smart_ptr.hpp @@ -0,0 +1,26 @@ +#ifndef BOOST_SMART_PTR_HPP_INCLUDED +#define BOOST_SMART_PTR_HPP_INCLUDED + +// +// smart_ptr.hpp +// +// For convenience, this header includes the rest of the smart +// pointer library headers. +// +// Copyright (c) 2003 Peter Dimov Distributed under the 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/smart_ptr/ for documentation. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef BOOST_SMART_PTR_HPP_INCLUDED diff --git a/Slang/boost/spirit.hpp b/Slang/boost/spirit.hpp new file mode 100644 index 0000000..bbf3849 --- /dev/null +++ b/Slang/boost/spirit.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2001-2008 Joel de Guzman + Copyright (c) 2001-2008 Hartmut Kaiser + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_DEPRECATED_INCLUDE_SPIRIT +#define BOOST_SPIRIT_DEPRECATED_INCLUDE_SPIRIT + +#include + +#if BOOST_VERSION >= 103800 +#if defined(_MSC_VER) || defined(__BORLANDC__) && !defined(__clang__) || defined(__DMC__) +# pragma message ("Warning: This header is deprecated. Please use: boost/spirit/include/classic.hpp") +#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) || defined(__BORLANDC__) +# warning "This header is deprecated. Please use: boost/spirit/include/classic.hpp" +#endif +#endif + +#if !defined(BOOST_SPIRIT_USE_OLD_NAMESPACE) +#define BOOST_SPIRIT_USE_OLD_NAMESPACE +#endif +#include + +#endif diff --git a/Slang/boost/stacktrace.hpp b/Slang/boost/stacktrace.hpp new file mode 100644 index 0000000..b458e3a --- /dev/null +++ b/Slang/boost/stacktrace.hpp @@ -0,0 +1,19 @@ +// Copyright Antony Polukhin, 2016-2021. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_STACKTRACE_HPP +#define BOOST_STACKTRACE_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include + +#endif // BOOST_STACKTRACE_HPP diff --git a/Slang/boost/static_assert.hpp b/Slang/boost/static_assert.hpp new file mode 100644 index 0000000..d94ca80 --- /dev/null +++ b/Slang/boost/static_assert.hpp @@ -0,0 +1,181 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/static_assert for documentation. + +/* + Revision history: + 02 August 2000 + Initial version. +*/ + +#ifndef BOOST_STATIC_ASSERT_HPP +#define BOOST_STATIC_ASSERT_HPP + +#include +#include +#include //for std::size_t + +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +// +// This is horrible, but it seems to be the only we can shut up the +// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" +// warning that get spewed out otherwise in non-C++11 mode. +// +#pragma GCC system_header +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg ) +# endif +#else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +#endif + +#ifdef BOOST_BORLANDC +// +// workaround for buggy integral-constant expression support: +#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS +#endif + +#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4)) +// gcc 3.3 and 3.4 don't produce good error messages with the default version: +# define BOOST_SA_GCC_WORKAROUND +#endif + +// +// If the compiler issues warnings about old C style casts, +// then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) != 0) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) != 0) +# endif +#else +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) +# endif +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) +# endif +#else + +namespace boost{ + +// HP aCC cannot deal with missing names for template value parameters +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + +// HP aCC cannot deal with missing names for template value parameters +template struct static_assert_test{}; + +} + +// +// Implicit instantiation requires that all member declarations be +// instantiated, but that the definitions are *not* instantiated. +// +// It's not particularly clear how this applies to enum's or typedefs; +// both are described as declarations [7.1.3] and [7.2] in the standard, +// however some compilers use "delayed evaluation" of one or more of +// these when implicitly instantiating templates. We use typedef declarations +// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum +// version gets better results from your compiler... +// +// Implementation: +// Both of these versions rely on sizeof(incomplete_type) generating an error +// message containing the name of the incomplete type. We use +// "STATIC_ASSERTION_FAILURE" as the type name here to generate +// an eye catching error message. The result of the sizeof expression is either +// used as an enum initialiser, or as a template argument depending which version +// is in use... +// Note that the argument to the assert is explicitly cast to bool using old- +// style casts: too many compilers currently have problems with static_cast +// when used inside integral constant expressions. +// +#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) + +#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +#define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif defined(BOOST_MSVC) +#define BOOST_STATIC_ASSERT(...) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT( B ) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT(...) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] +#elif defined(__sgi) +// special version for SGI MIPSpro compiler +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(bool, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) +#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003) +// special version for CodeWarrior <= 8.x +#define BOOST_STATIC_ASSERT( B ) \ + BOOST_STATIC_CONSTANT(int, \ + BOOST_JOIN(boost_static_assert_test_, __LINE__) = \ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) +#else +// generic version +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED +# else +# define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED +# endif +#endif + +#else +// alternative enum based implementation: +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } +# else +# define BOOST_STATIC_ASSERT(B) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } +# endif +#endif +#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) + +#endif // BOOST_STATIC_ASSERT_HPP + + diff --git a/Slang/boost/static_string.hpp b/Slang/boost/static_string.hpp new file mode 100644 index 0000000..b558e0e --- /dev/null +++ b/Slang/boost/static_string.hpp @@ -0,0 +1,13 @@ +// +// Copyright (c) 2020 Krystian Stasiowski (sdkrystian at gmail dot com) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Official repository: https://github.com/boostorg/static_string +// + +#ifndef BOOST_STATIC_STRING_HPP +#define BOOST_STATIC_STRING_HPP +#include +#endif \ No newline at end of file diff --git a/Slang/boost/swap.hpp b/Slang/boost/swap.hpp new file mode 100644 index 0000000..55cafa4 --- /dev/null +++ b/Slang/boost/swap.hpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_SWAP_HPP +#define BOOST_SWAP_HPP + +// The header file at this path is deprecated; +// use boost/core/swap.hpp instead. + +#include + +#endif diff --git a/Slang/boost/system.hpp b/Slang/boost/system.hpp new file mode 100644 index 0000000..5b70281 --- /dev/null +++ b/Slang/boost/system.hpp @@ -0,0 +1,17 @@ +#ifndef BOOST_SYSTEM_HPP_INCLUDED +#define BOOST_SYSTEM_HPP_INCLUDED + +// Copyright 2021 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt) +// +// See library home page at http://www.boost.org/libs/system + +#include +#include + +#if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1900) +# include +#endif + +#endif // #ifndef BOOST_SYSTEM_HPP_INCLUDED diff --git a/Slang/boost/thread.hpp b/Slang/boost/thread.hpp new file mode 100644 index 0000000..892bbb8 --- /dev/null +++ b/Slang/boost/thread.hpp @@ -0,0 +1,26 @@ +// Copyright (C) 2001-2003 +// William E. Kempf +// (C) Copyright 2008-9 Anthony Williams +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See www.boost.org/libs/thread for documentation. + +#if !defined(BOOST_THREAD_WEK01082003_HPP) +#define BOOST_THREAD_WEK01082003_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/throw_exception.hpp b/Slang/boost/throw_exception.hpp new file mode 100644 index 0000000..b8a2e49 --- /dev/null +++ b/Slang/boost/throw_exception.hpp @@ -0,0 +1,181 @@ +#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED +#define BOOST_THROW_EXCEPTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/throw_exception.hpp +// +// Copyright (c) 2002, 2018, 2019 Peter Dimov +// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/throw_exception +// + +#include +#include +#include +#include +#include +#include + +#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x593) ) +# define BOOST_EXCEPTION_DISABLE +#endif + +namespace boost +{ + +#if defined( BOOST_NO_EXCEPTIONS ) + +BOOST_NORETURN void throw_exception( std::exception const & e ); // user defined +BOOST_NORETURN void throw_exception( std::exception const & e, boost::source_location const & loc ); // user defined + +#endif + +// boost::wrapexcept + +namespace detail +{ + +typedef char (&wrapexcept_s1)[ 1 ]; +typedef char (&wrapexcept_s2)[ 2 ]; + +template wrapexcept_s1 wrapexcept_is_convertible( T* ); +template wrapexcept_s2 wrapexcept_is_convertible( void* ); + +template( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base; + +template struct wrapexcept_add_base +{ + struct type {}; +}; + +template struct wrapexcept_add_base +{ + typedef B type; +}; + +} // namespace detail + +template struct BOOST_SYMBOL_VISIBLE wrapexcept: + public detail::wrapexcept_add_base::type, + public E, + public detail::wrapexcept_add_base::type +{ +private: + + struct deleter + { + wrapexcept * p_; + ~deleter() { delete p_; } + }; + +private: + + void copy_from( void const* ) + { + } + + void copy_from( boost::exception const* p ) + { + static_cast( *this ) = *p; + } + +public: + + explicit wrapexcept( E const & e ): E( e ) + { + copy_from( &e ); + } + + explicit wrapexcept( E const & e, boost::source_location const & loc ): E( e ) + { + copy_from( &e ); + + set_info( *this, throw_file( loc.file_name() ) ); + set_info( *this, throw_line( loc.line() ) ); + set_info( *this, throw_function( loc.function_name() ) ); + } + + virtual boost::exception_detail::clone_base const * clone() const BOOST_OVERRIDE + { + wrapexcept * p = new wrapexcept( *this ); + deleter del = { p }; + + boost::exception_detail::copy_boost_exception( p, this ); + + del.p_ = 0; + return p; + } + + virtual void rethrow() const BOOST_OVERRIDE + { +#if defined( BOOST_NO_EXCEPTIONS ) + + boost::throw_exception( *this ); + +#else + + throw *this; + +#endif + } +}; + +// All boost exceptions are required to derive from std::exception, +// to ensure compatibility with BOOST_NO_EXCEPTIONS. + +inline void throw_exception_assert_compatibility( std::exception const & ) {} + +// boost::throw_exception + +#if !defined( BOOST_NO_EXCEPTIONS ) + +#if defined( BOOST_EXCEPTION_DISABLE ) + +template BOOST_NORETURN void throw_exception( E const & e ) +{ + throw_exception_assert_compatibility( e ); + throw e; +} + +template BOOST_NORETURN void throw_exception( E const & e, boost::source_location const & ) +{ + throw_exception_assert_compatibility( e ); + throw e; +} + +#else // defined( BOOST_EXCEPTION_DISABLE ) + +template BOOST_NORETURN void throw_exception( E const & e ) +{ + throw_exception_assert_compatibility( e ); + throw wrapexcept( e ); +} + +template BOOST_NORETURN void throw_exception( E const & e, boost::source_location const & loc ) +{ + throw_exception_assert_compatibility( e ); + throw wrapexcept( e, loc ); +} + +#endif // defined( BOOST_EXCEPTION_DISABLE ) + +#endif // !defined( BOOST_NO_EXCEPTIONS ) + +} // namespace boost + +// BOOST_THROW_EXCEPTION + +#define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x, BOOST_CURRENT_LOCATION) + +#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED diff --git a/Slang/boost/timer.hpp b/Slang/boost/timer.hpp new file mode 100644 index 0000000..f3ddb41 --- /dev/null +++ b/Slang/boost/timer.hpp @@ -0,0 +1,75 @@ +// boost timer.hpp header file ---------------------------------------------// + +// Copyright Beman Dawes 1994-99. Distributed under the 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/timer for documentation. + +// Revision History +// 01 Apr 01 Modified to use new header. (JMaddock) +// 12 Jan 01 Change to inline implementation to allow use without library +// builds. See docs for more rationale. (Beman Dawes) +// 25 Sep 99 elapsed_max() and elapsed_min() added (John Maddock) +// 16 Jul 99 Second beta +// 6 Jul 99 Initial boost version + +#ifndef BOOST_TIMER_HPP +#define BOOST_TIMER_HPP + +#include +BOOST_HEADER_DEPRECATED( "the facilities in " ) + +#include +#include +#include + +# ifdef BOOST_NO_STDC_NAMESPACE + namespace std { using ::clock_t; using ::clock; } +# endif + + +namespace boost { + +// timer -------------------------------------------------------------------// + +// A timer object measures elapsed time. + +// It is recommended that implementations measure wall clock rather than CPU +// time since the intended use is performance measurement on systems where +// total elapsed time is more important than just process or CPU time. + +// Warnings: The maximum measurable elapsed time may well be only 596.5+ hours +// due to implementation limitations. The accuracy of timings depends on the +// accuracy of timing information provided by the underlying platform, and +// this varies a great deal from platform to platform. + +class timer +{ + public: + timer() { _start_time = std::clock(); } // postcondition: elapsed()==0 +// timer( const timer& src ); // post: elapsed()==src.elapsed() +// ~timer(){} +// timer& operator=( const timer& src ); // post: elapsed()==src.elapsed() + void restart() { _start_time = std::clock(); } // post: elapsed()==0 + double elapsed() const // return elapsed time in seconds + { return double(std::clock() - _start_time) / CLOCKS_PER_SEC; } + + double elapsed_max() const // return estimated maximum value for elapsed() + // Portability warning: elapsed_max() may return too high a value on systems + // where std::clock_t overflows or resets at surprising values. + { + return (double((std::numeric_limits::max)()) + - double(_start_time)) / double(CLOCKS_PER_SEC); + } + + double elapsed_min() const // return minimum value for elapsed() + { return double(1)/double(CLOCKS_PER_SEC); } + + private: + std::clock_t _start_time; +}; // timer + +} // namespace boost + +#endif // BOOST_TIMER_HPP diff --git a/Slang/boost/token_functions.hpp b/Slang/boost/token_functions.hpp new file mode 100644 index 0000000..e6b8bef --- /dev/null +++ b/Slang/boost/token_functions.hpp @@ -0,0 +1,653 @@ +// Boost token_functions.hpp ------------------------------------------------// + +// Copyright John R. Bandela 2001. + +// Distributed under the 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/tokenizer/ for documentation. + +// Revision History: +// 01 Oct 2004 Joaquin M Lopez Munoz +// Workaround for a problem with string::assign in msvc-stlport +// 06 Apr 2004 John Bandela +// Fixed a bug involving using char_delimiter with a true input iterator +// 28 Nov 2003 Robert Zeh and John Bandela +// Converted into "fast" functions that avoid using += when +// the supplied iterator isn't an input_iterator; based on +// some work done at Archelon and a version that was checked into +// the boost CVS for a short period of time. +// 20 Feb 2002 John Maddock +// Removed using namespace std declarations and added +// workaround for BOOST_NO_STDC_NAMESPACE (the library +// can be safely mixed with regex). +// 06 Feb 2002 Jeremy Siek +// Added char_separator. +// 02 Feb 2002 Jeremy Siek +// Removed tabs and a little cleanup. + + +#ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ +#define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ + +#include +#include +#include +#include +#include // for find_if +#include +#include +#include +#include +#include +#include +#if !defined(BOOST_NO_CWCTYPE) +#include +#endif + +// +// the following must not be macros if we are to prefix them +// with std:: (they shouldn't be macros anyway...) +// +#ifdef ispunct +# undef ispunct +#endif +#ifdef iswpunct +# undef iswpunct +#endif +#ifdef isspace +# undef isspace +#endif +#ifdef iswspace +# undef iswspace +#endif +// +// fix namespace problems: +// +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::ispunct; + using ::isspace; +#if !defined(BOOST_NO_CWCTYPE) + using ::iswpunct; + using ::iswspace; +#endif +} +#endif + +namespace boost{ + //=========================================================================== + // The escaped_list_separator class. Which is a model of TokenizerFunction + // An escaped list is a super-set of what is commonly known as a comma + // separated value (csv) list.It is separated into fields by a comma or + // other character. If the delimiting character is inside quotes, then it is + // counted as a regular character.To allow for embedded quotes in a field, + // there can be escape sequences using the \ much like C. + // The role of the comma, the quotation mark, and the escape + // character (backslash \), can be assigned to other characters. + + struct escaped_list_error : public std::runtime_error{ + escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { } + }; + + +// The out of the box GCC 2.95 on cygwin does not have a char_traits class. +// MSVC does not like the following typename + template ::traits_type > + class escaped_list_separator { + + private: + typedef std::basic_string string_type; + struct char_eq { + Char e_; + char_eq(Char e):e_(e) { } + bool operator()(Char c) { + return Traits::eq(e_,c); + } + }; + string_type escape_; + string_type c_; + string_type quote_; + bool last_; + + bool is_escape(Char e) { + char_eq f(e); + return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end(); + } + bool is_c(Char e) { + char_eq f(e); + return std::find_if(c_.begin(),c_.end(),f)!=c_.end(); + } + bool is_quote(Char e) { + char_eq f(e); + return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end(); + } + template + void do_escape(iterator& next,iterator end,Token& tok) { + if (++next == end) + BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape"))); + if (Traits::eq(*next,'n')) { + tok+='\n'; + return; + } + else if (is_quote(*next)) { + tok+=*next; + return; + } + else if (is_c(*next)) { + tok+=*next; + return; + } + else if (is_escape(*next)) { + tok+=*next; + return; + } + else + BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence"))); + } + + public: + + explicit escaped_list_separator(Char e = '\\', + Char c = ',',Char q = '\"') + : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { } + + escaped_list_separator(string_type e, string_type c, string_type q) + : escape_(e), c_(c), quote_(q), last_(false) { } + + void reset() {last_=false;} + + template + bool operator()(InputIterator& next,InputIterator end,Token& tok) { + bool bInQuote = false; + tok = Token(); + + if (next == end) { + if (last_) { + last_ = false; + return true; + } + else + return false; + } + last_ = false; + for (;next != end;++next) { + if (is_escape(*next)) { + do_escape(next,end,tok); + } + else if (is_c(*next)) { + if (!bInQuote) { + // If we are not in quote, then we are done + ++next; + // The last character was a c, that means there is + // 1 more blank field + last_ = true; + return true; + } + else tok+=*next; + } + else if (is_quote(*next)) { + bInQuote=!bInQuote; + } + else { + tok += *next; + } + } + return true; + } + }; + + //=========================================================================== + // The classes here are used by offset_separator and char_separator to implement + // faster assigning of tokens using assign instead of += + + namespace tokenizer_detail { + //=========================================================================== + // Tokenizer was broken for wide character separators, at least on Windows, since + // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts + // if higher values are passed in. The traits extension class should take care of this. + // Assuming that the conditional will always get optimized out in the function + // implementations, argument types are not a problem since both forms of character classifiers + // expect an int. + +#if !defined(BOOST_NO_CWCTYPE) + template + struct traits_extension_details : public traits { + typedef typename traits::char_type char_type; + static bool isspace(char_type c) + { + return std::iswspace(c) != 0; + } + static bool ispunct(char_type c) + { + return std::iswpunct(c) != 0; + } + }; + + template + struct traits_extension_details : public traits { + typedef typename traits::char_type char_type; + static bool isspace(char_type c) + { + return std::isspace(c) != 0; + } + static bool ispunct(char_type c) + { + return std::ispunct(c) != 0; + } + }; +#endif + + + // In case there is no cwctype header, we implement the checks manually. + // We make use of the fact that the tested categories should fit in ASCII. + template + struct traits_extension : public traits { + typedef typename traits::char_type char_type; + static bool isspace(char_type c) + { +#if !defined(BOOST_NO_CWCTYPE) + return traits_extension_details::isspace(c); +#else + return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0; +#endif + } + + static bool ispunct(char_type c) + { +#if !defined(BOOST_NO_CWCTYPE) + return traits_extension_details::ispunct(c); +#else + return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0; +#endif + } + }; + + // The assign_or_plus_equal struct contains functions that implement + // assign, +=, and clearing based on the iterator type. The + // generic case does nothing for plus_equal and clearing, while + // passing through the call for assign. + // + // When an input iterator is being used, the situation is reversed. + // The assign method does nothing, plus_equal invokes operator +=, + // and the clearing method sets the supplied token to the default + // token constructor's result. + // + + template + struct assign_or_plus_equal { + template + static void assign(Iterator b, Iterator e, Token &t) { + t.assign(b, e); + } + + template + static void plus_equal(Token &, const Value &) { } + + // If we are doing an assign, there is no need for the + // the clear. + // + template + static void clear(Token &) { } + }; + + template <> + struct assign_or_plus_equal { + template + static void assign(Iterator , Iterator , Token &) { } + template + static void plus_equal(Token &t, const Value &v) { + t += v; + } + template + static void clear(Token &t) { + t = Token(); + } + }; + + + template + struct pointer_iterator_category{ + typedef std::random_access_iterator_tag type; + }; + + + template + struct class_iterator_category{ + typedef typename Iterator::iterator_category type; + }; + + + + // This portably gets the iterator_tag without partial template specialization + template + struct get_iterator_category{ + typedef typename mpl::if_, + pointer_iterator_category, + class_iterator_category + >::type cat; + + typedef typename cat::type iterator_category; + }; + + + } // namespace tokenizer_detail + + + //=========================================================================== + // The offset_separator class, which is a model of TokenizerFunction. + // Offset breaks a string into tokens based on a range of offsets + + class offset_separator { + private: + + std::vector offsets_; + unsigned int current_offset_; + bool wrap_offsets_; + bool return_partial_last_; + + public: + template + offset_separator(Iter begin, Iter end, bool wrap_offsets = true, + bool return_partial_last = true) + : offsets_(begin,end), current_offset_(0), + wrap_offsets_(wrap_offsets), + return_partial_last_(return_partial_last) { } + + offset_separator() + : offsets_(1,1), current_offset_(), + wrap_offsets_(true), return_partial_last_(true) { } + + void reset() { + current_offset_ = 0; + } + + template + bool operator()(InputIterator& next, InputIterator end, Token& tok) + { + typedef tokenizer_detail::assign_or_plus_equal< + BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< + InputIterator + >::iterator_category + > assigner; + + BOOST_ASSERT(!offsets_.empty()); + + assigner::clear(tok); + InputIterator start(next); + + if (next == end) + return false; + + if (current_offset_ == offsets_.size()) + { + if (wrap_offsets_) + current_offset_=0; + else + return false; + } + + int c = offsets_[current_offset_]; + int i = 0; + for (; i < c; ++i) { + if (next == end)break; + assigner::plus_equal(tok,*next++); + } + assigner::assign(start,next,tok); + + if (!return_partial_last_) + if (i < (c-1) ) + return false; + + ++current_offset_; + return true; + } + }; + + + //=========================================================================== + // The char_separator class breaks a sequence of characters into + // tokens based on the character delimiters (very much like bad old + // strtok). A delimiter character can either be kept or dropped. A + // kept delimiter shows up as an output token, whereas a dropped + // delimiter does not. + + // This class replaces the char_delimiters_separator class. The + // constructor for the char_delimiters_separator class was too + // confusing and needed to be deprecated. However, because of the + // default arguments to the constructor, adding the new constructor + // would cause ambiguity, so instead I deprecated the whole class. + // The implementation of the class was also simplified considerably. + + enum empty_token_policy { drop_empty_tokens, keep_empty_tokens }; + + // The out of the box GCC 2.95 on cygwin does not have a char_traits class. + template ::traits_type > + class char_separator + { + typedef tokenizer_detail::traits_extension Traits; + typedef std::basic_string string_type; + public: + explicit + char_separator(const Char* dropped_delims, + const Char* kept_delims = 0, + empty_token_policy empty_tokens = drop_empty_tokens) + : m_dropped_delims(dropped_delims), + m_use_ispunct(false), + m_use_isspace(false), + m_empty_tokens(empty_tokens), + m_output_done(false) + { + // Borland workaround + if (kept_delims) + m_kept_delims = kept_delims; + } + + // use ispunct() for kept delimiters and isspace for dropped. + explicit + char_separator() + : m_use_ispunct(true), + m_use_isspace(true), + m_empty_tokens(drop_empty_tokens), + m_output_done(false) { } + + void reset() { } + + template + bool operator()(InputIterator& next, InputIterator end, Token& tok) + { + typedef tokenizer_detail::assign_or_plus_equal< + BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< + InputIterator + >::iterator_category + > assigner; + + assigner::clear(tok); + + // skip past all dropped_delims + if (m_empty_tokens == drop_empty_tokens) + for (; next != end && is_dropped(*next); ++next) + { } + + InputIterator start(next); + + if (m_empty_tokens == drop_empty_tokens) { + + if (next == end) + return false; + + + // if we are on a kept_delims move past it and stop + if (is_kept(*next)) { + assigner::plus_equal(tok,*next); + ++next; + } else + // append all the non delim characters + for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) + assigner::plus_equal(tok,*next); + } + else { // m_empty_tokens == keep_empty_tokens + + // Handle empty token at the end + if (next == end) + { + if (m_output_done == false) + { + m_output_done = true; + assigner::assign(start,next,tok); + return true; + } + else + return false; + } + + if (is_kept(*next)) { + if (m_output_done == false) + m_output_done = true; + else { + assigner::plus_equal(tok,*next); + ++next; + m_output_done = false; + } + } + else if (m_output_done == false && is_dropped(*next)) { + m_output_done = true; + } + else { + if (is_dropped(*next)) + start=++next; + for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) + assigner::plus_equal(tok,*next); + m_output_done = true; + } + } + assigner::assign(start,next,tok); + return true; + } + + private: + string_type m_kept_delims; + string_type m_dropped_delims; + bool m_use_ispunct; + bool m_use_isspace; + empty_token_policy m_empty_tokens; + bool m_output_done; + + bool is_kept(Char E) const + { + if (m_kept_delims.length()) + return m_kept_delims.find(E) != string_type::npos; + else if (m_use_ispunct) { + return Traits::ispunct(E) != 0; + } else + return false; + } + bool is_dropped(Char E) const + { + if (m_dropped_delims.length()) + return m_dropped_delims.find(E) != string_type::npos; + else if (m_use_isspace) { + return Traits::isspace(E) != 0; + } else + return false; + } + }; + + //=========================================================================== + // The following class is DEPRECATED, use class char_separators instead. + // + // The char_delimiters_separator class, which is a model of + // TokenizerFunction. char_delimiters_separator breaks a string + // into tokens based on character delimiters. There are 2 types of + // delimiters. returnable delimiters can be returned as + // tokens. These are often punctuation. nonreturnable delimiters + // cannot be returned as tokens. These are often whitespace + + // The out of the box GCC 2.95 on cygwin does not have a char_traits class. + template ::traits_type > + class char_delimiters_separator { + private: + + typedef tokenizer_detail::traits_extension Traits; + typedef std::basic_string string_type; + string_type returnable_; + string_type nonreturnable_; + bool return_delims_; + bool no_ispunct_; + bool no_isspace_; + + bool is_ret(Char E)const + { + if (returnable_.length()) + return returnable_.find(E) != string_type::npos; + else{ + if (no_ispunct_) {return false;} + else{ + int r = Traits::ispunct(E); + return r != 0; + } + } + } + bool is_nonret(Char E)const + { + if (nonreturnable_.length()) + return nonreturnable_.find(E) != string_type::npos; + else{ + if (no_isspace_) {return false;} + else{ + int r = Traits::isspace(E); + return r != 0; + } + } + } + + public: + explicit char_delimiters_separator(bool return_delims = false, + const Char* returnable = 0, + const Char* nonreturnable = 0) + : returnable_(returnable ? returnable : string_type().c_str()), + nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()), + return_delims_(return_delims), no_ispunct_(returnable!=0), + no_isspace_(nonreturnable!=0) { } + + void reset() { } + + public: + + template + bool operator()(InputIterator& next, InputIterator end,Token& tok) { + tok = Token(); + + // skip past all nonreturnable delims + // skip past the returnable only if we are not returning delims + for (;next!=end && ( is_nonret(*next) || (is_ret(*next) + && !return_delims_ ) );++next) { } + + if (next == end) { + return false; + } + + // if we are to return delims and we are one a returnable one + // move past it and stop + if (is_ret(*next) && return_delims_) { + tok+=*next; + ++next; + } + else + // append all the non delim characters + for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next) + tok+=*next; + + + return true; + } + }; + + +} //namespace boost + +#endif diff --git a/Slang/boost/token_iterator.hpp b/Slang/boost/token_iterator.hpp new file mode 100644 index 0000000..42945d7 --- /dev/null +++ b/Slang/boost/token_iterator.hpp @@ -0,0 +1,131 @@ +// Boost token_iterator.hpp -------------------------------------------------// + +// Copyright John R. Bandela 2001 +// Distributed under the 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/tokenizer for documentation. + +// Revision History: +// 16 Jul 2003 John Bandela +// Allowed conversions from convertible base iterators +// 03 Jul 2003 John Bandela +// Converted to new iterator adapter + + + +#ifndef BOOST_TOKENIZER_POLICY_JRB070303_HPP_ +#define BOOST_TOKENIZER_POLICY_JRB070303_HPP_ + +#include +#include +#include +#include +#include + +namespace boost +{ + template + class token_iterator + : public iterator_facade< + token_iterator + , Type + , typename iterators::minimum_category< + forward_traversal_tag + , typename iterator_traversal::type + >::type + , const Type& + > + { + +#ifdef __DCC__ + friend class boost::iterator_core_access; +#else + friend class iterator_core_access; +#endif + TokenizerFunc f_; + Iterator begin_; + Iterator end_; + bool valid_; + Type tok_; + + void increment(){ + BOOST_ASSERT(valid_); + valid_ = f_(begin_,end_,tok_); + } + + const Type& dereference() const { + BOOST_ASSERT(valid_); + return tok_; + } + template + bool equal(const Other& a) const{ + return (a.valid_ && valid_) + ?( (a.begin_==begin_) && (a.end_ == end_) ) + :(a.valid_==valid_); + + } + + void initialize(){ + if(valid_) return; + f_.reset(); + valid_ = (begin_ != end_)? + f_(begin_,end_,tok_):false; + } + public: + token_iterator():begin_(),end_(),valid_(false),tok_() { } + + token_iterator(TokenizerFunc f, Iterator begin, Iterator e = Iterator()) + : f_(f),begin_(begin),end_(e),valid_(false),tok_(){ initialize(); } + + token_iterator(Iterator begin, Iterator e = Iterator()) + : f_(),begin_(begin),end_(e),valid_(false),tok_() {initialize();} + + template + token_iterator( + token_iterator const& t + , typename enable_if_convertible::type* = 0) + : f_(t.tokenizer_function()),begin_(t.base()) + ,end_(t.end()),valid_(!t.at_end()),tok_(t.current_token()) {} + + Iterator base()const{return begin_;} + + Iterator end()const{return end_;} + + TokenizerFunc tokenizer_function()const{return f_;} + + Type current_token()const{return tok_;} + + bool at_end()const{return !valid_;} + + + + + }; + template < + class TokenizerFunc = char_delimiters_separator, + class Iterator = std::string::const_iterator, + class Type = std::string + > + class token_iterator_generator { + + private: + public: + typedef token_iterator type; + }; + + + // Type has to be first because it needs to be explicitly specified + // because there is no way the function can deduce it. + template + typename token_iterator_generator::type + make_token_iterator(Iterator begin, Iterator end,const TokenizerFunc& fun){ + typedef typename + token_iterator_generator::type ret_type; + return ret_type(fun,begin,end); + } + +} // namespace boost + +#endif diff --git a/Slang/boost/tokenizer.hpp b/Slang/boost/tokenizer.hpp new file mode 100644 index 0000000..081e5ba --- /dev/null +++ b/Slang/boost/tokenizer.hpp @@ -0,0 +1,98 @@ +// Boost tokenizer.hpp -----------------------------------------------------// + +// (c) Copyright Jeremy Siek and John R. Bandela 2001. + +// Distributed under the 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/tokenizer for documenation + +// Revision History: +// 03 Jul 2003 John Bandela +// Converted to new iterator adapter +// 02 Feb 2002 Jeremy Siek +// Removed tabs and a little cleanup. + +#ifndef BOOST_TOKENIZER_JRB070303_HPP_ +#define BOOST_TOKENIZER_JRB070303_HPP_ + +#include + +namespace boost { + + + //=========================================================================== + // A container-view of a tokenized "sequence" + template < + typename TokenizerFunc = char_delimiters_separator, + typename Iterator = std::string::const_iterator, + typename Type = std::string + > + class tokenizer { + private: + typedef token_iterator_generator TGen; + + // It seems that MSVC does not like the unqualified use of iterator, + // Thus we use iter internally when it is used unqualified and + // the users of this class will always qualify iterator. + typedef typename TGen::type iter; + + public: + + typedef iter iterator; + typedef iter const_iterator; + typedef Type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const pointer const_pointer; + typedef void size_type; + typedef void difference_type; + + tokenizer(Iterator first, Iterator last, + const TokenizerFunc& f = TokenizerFunc()) + : first_(first), last_(last), f_(f) { } + + template + tokenizer(const Container& c) + : first_(c.begin()), last_(c.end()), f_() { } + + template + tokenizer(const Container& c,const TokenizerFunc& f) + : first_(c.begin()), last_(c.end()), f_(f) { } + + void assign(Iterator first, Iterator last){ + first_ = first; + last_ = last; + } + + void assign(Iterator first, Iterator last, const TokenizerFunc& f){ + assign(first,last); + f_ = f; + } + + template + void assign(const Container& c){ + assign(c.begin(),c.end()); + } + + + template + void assign(const Container& c, const TokenizerFunc& f){ + assign(c.begin(),c.end(),f); + } + + iter begin() const { return iter(f_,first_,last_); } + iter end() const { return iter(f_,last_,last_); } + + private: + Iterator first_; + Iterator last_; + TokenizerFunc f_; + }; + + +} // namespace boost + +#endif diff --git a/Slang/boost/type.hpp b/Slang/boost/type.hpp new file mode 100644 index 0000000..ab81c91 --- /dev/null +++ b/Slang/boost/type.hpp @@ -0,0 +1,18 @@ +// (C) Copyright David Abrahams 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPE_DWA20010120_HPP +# define BOOST_TYPE_DWA20010120_HPP + +namespace boost { + + // Just a simple "type envelope". Useful in various contexts, mostly to work + // around some MSVC deficiencies. + template + struct type {}; + +} + +#endif // BOOST_TYPE_DWA20010120_HPP diff --git a/Slang/boost/type_index.hpp b/Slang/boost/type_index.hpp new file mode 100644 index 0000000..d795a52 --- /dev/null +++ b/Slang/boost/type_index.hpp @@ -0,0 +1,265 @@ +// +// Copyright 2012-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_HPP + +/// \file boost/type_index.hpp +/// \brief Includes minimal set of headers required to use the Boost.TypeIndex library. +/// +/// By inclusion of this file most optimal type index classes will be included and used +/// as a boost::typeindex::type_index and boost::typeindex::type_info. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX) +# include BOOST_TYPE_INDEX_USER_TYPEINDEX +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX)) +# endif +#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC) +# include +# if defined(BOOST_NO_RTTI) || defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY) +# include +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates") +# endif +# else +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is used") +# endif +# endif +#else +# include +# include +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI") +# endif +#endif + +#ifndef BOOST_TYPE_INDEX_REGISTER_CLASS +#define BOOST_TYPE_INDEX_REGISTER_CLASS +#endif + +namespace boost { namespace typeindex { + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE +/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::typeindex::ctti_type_index class to +/// deduce the name of a type. If your compiler is not recognized +/// by the TypeIndex library and you wish to work with boost::typeindex::ctti_type_index, you may +/// define this macro by yourself. +/// +/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro +/// that outputs the \b whole function signature \b including \b template \b parameters. +/// +/// If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined, +/// then a compile-time error will arise at any attempt to use boost::typeindex::ctti_type_index classes. +/// +/// See BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS and BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING +/// for an information of how to tune the implementation to make a nice pretty_name() output. +#define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION + +/// \def BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING +/// This is a helper macro for making correct pretty_names() with RTTI off. +/// +/// BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro may be defined to +/// '(begin_skip, end_skip, runtime_skip, runtime_skip_until)' with parameters for adding a +/// support for compilers, that by default are not recognized by TypeIndex library. +/// +/// \b Example: +/// +/// Imagine the situation when +/// \code boost::typeindex::ctti_type_index::type_id().pretty_name() \endcode +/// returns the following string: +/// \code "static const char *boost::detail::ctti::n() [T = int]" \endcode +/// and \code boost::typeindex::ctti_type_index::type_id().pretty_name() \endcode returns the following: +/// \code "static const char *boost::detail::ctti::n() [T = short]" \endcode +/// +/// As we may see first 39 characters are "static const char *boost::detail::ctti<" and they do not depend on +/// the type T. After first 39 characters we have a human readable type name which is duplicated at the end +/// of a string. String always ends on ']', which consumes 1 character. +/// +/// Now if we define `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` to +/// `(39, 1, false, "")` we'll be getting \code "int>::n() [T = int" \endcode +/// for `boost::typeindex::ctti_type_index::type_id().pretty_name()` and \code "short>::n() [T = short" \endcode +/// for `boost::typeindex::ctti_type_index::type_id().pretty_name()`. +/// +/// Now we need to take additional care of the characters that go before the last mention of our type. We'll +/// do that by telling the macro that we need to cut off everything that goes before the "T = " including the "T = " +/// itself: +/// +/// \code (39, 1, true, "T = ") \endcode +/// +/// In case of GCC or Clang command line we need to add the following line while compiling all the sources: +/// +/// \code +/// -DBOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, "T = ")' +/// \endcode +/// \param begin_skip How many characters must be skipped at the beginning of the type holding string. +/// Must be a compile time constant. +/// \param end_skip How many characters must be skipped at the end of the type holding string. +/// Must be a compile time constant. +/// \param runtime_skip Do we need additional checks at runtime to cut off the more characters. +/// Must be `true` or `false`. +/// \param runtime_skip_until Skip all the characters before the following string (including the string itself). +/// Must be a compile time array of characters. +/// +/// See [RTTI emulation limitations](boost_typeindex/rtti_emulation_limitations.html) for more info. +#define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "") + + + /// Depending on a compiler flags, optimal implementation of type_index will be used + /// as a default boost::typeindex::type_index. + /// + /// Could be a boost::typeindex::stl_type_index, boost::typeindex::ctti_type_index or + /// user defined type_index class. + /// + /// \b See boost::typeindex::type_index_facade for a full description of type_index functions. + typedef platform_specific type_index; +#elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX) + // Nothing to do +#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC) + typedef boost::typeindex::stl_type_index type_index; +#else + typedef boost::typeindex::ctti_type_index type_index; +#endif + +/// Depending on a compiler flags, optimal implementation of type_info will be used +/// as a default boost::typeindex::type_info. +/// +/// Could be a std::type_info, boost::typeindex::detail::ctti_data or +/// some user defined class. +/// +/// type_info \b is \b not copyable or default constructible. It is \b not assignable too! +typedef type_index::type_info_t type_info; + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// \def BOOST_TYPE_INDEX_USER_TYPEINDEX +/// BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file +/// with user provided implementation of type_index. +/// +/// See [Making a custom type_index](boost_typeindex/making_a_custom_type_index.html) section +/// of documentation for usage example. +#define BOOST_TYPE_INDEX_USER_TYPEINDEX + + +/// \def BOOST_TYPE_INDEX_REGISTER_CLASS +/// BOOST_TYPE_INDEX_REGISTER_CLASS is used to help to emulate RTTI. +/// Put this macro into the public section of polymorphic class to allow runtime type detection. +/// +/// Depending on the typeid() availability this macro will expand to nothing or to virtual helper function +/// `virtual const type_info& boost_type_info_type_id_runtime_() const noexcept`. +/// +/// \b Example: +/// \code +/// class A { +/// public: +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// virtual ~A(){} +/// }; +/// +/// struct B: public A { +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// }; +/// +/// struct C: public B { +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// }; +/// +/// ... +/// +/// C c1; +/// A* pc1 = &c1; +/// assert(boost::typeindex::type_id() == boost::typeindex::type_id_runtime(*pc1)); +/// \endcode +#define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions + +/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY +/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY is a helper macro that must be defined if mixing +/// RTTI on/off modules. See +/// [Mixing sources with RTTI on and RTTI off](boost_typeindex/mixing_sources_with_rtti_on_and_.html) +/// section of documentation for more info. +#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY + +#endif // defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + + +/// Function to get boost::typeindex::type_index for a type T. +/// Removes const, volatile && and & modifiers from T. +/// +/// \b Example: +/// \code +/// type_index ti = type_id(); +/// std::cout << ti.pretty_name(); // Outputs 'int' +/// \endcode +/// +/// \tparam T Type for which type_index must be created. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified type T. +template +inline type_index type_id() BOOST_NOEXCEPT { + return type_index::type_id(); +} + +/// Function for constructing boost::typeindex::type_index instance for type T. +/// Does not remove const, volatile, & and && modifiers from T. +/// +/// If T has no const, volatile, & and && modifiers, then returns exactly +/// the same result as in case of calling `type_id()`. +/// +/// \b Example: +/// \code +/// type_index ti = type_id_with_cvr(); +/// std::cout << ti.pretty_name(); // Outputs 'int&' +/// \endcode +/// +/// \tparam T Type for which type_index must be created. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified type T. +template +inline type_index type_id_with_cvr() BOOST_NOEXCEPT { + return type_index::type_id_with_cvr(); +} + +/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. +/// +/// Returns runtime information about specified type. +/// +/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS. +/// +/// \b Example: +/// \code +/// struct Base { virtual ~Base(){} }; +/// struct Derived: public Base {}; +/// ... +/// Derived d; +/// Base& b = d; +/// type_index ti = type_id_runtime(b); +/// std::cout << ti.pretty_name(); // Outputs 'Derived' +/// \endcode +/// +/// \param runtime_val Variable which runtime type must be returned. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified variable. +template +inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT { + return type_index::type_id_runtime(runtime_val); +} + +}} // namespace boost::typeindex + + + +#endif // BOOST_TYPE_INDEX_HPP + diff --git a/Slang/boost/type_index/ctti_type_index.hpp b/Slang/boost/type_index/ctti_type_index.hpp new file mode 100644 index 0000000..bb44b66 --- /dev/null +++ b/Slang/boost/type_index/ctti_type_index.hpp @@ -0,0 +1,213 @@ +// +// Copyright 2013-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP + +/// \file ctti_type_index.hpp +/// \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 +/// for std::type_index. +/// +/// It is used in situations when typeid() method is not available or +/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined. + +#include +#include + +#include +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +namespace detail { + +// That's the most trickiest part of the TypeIndex library: +// 1) we do not want to give user ability to manually construct and compare `struct-that-represents-type` +// 2) we need to distinguish between `struct-that-represents-type` and `const char*` +// 3) we need a thread-safe way to have references to instances `struct-that-represents-type` +// 4) we need a compile-time control to make sure that user does not copy or +// default construct `struct-that-represents-type` +// +// Solution would be the following: + +/// \class ctti_data +/// Standard-layout class with private constructors and assignment operators. +/// +/// You can not work with this class directly. The purpose of this class is to hold type info +/// \b when \b RTTI \b is \b off and allow ctti_type_index construction from itself. +/// +/// \b Example: +/// \code +/// const detail::ctti_data& foo(); +/// ... +/// type_index ti = type_index(foo()); +/// std::cout << ti.pretty_name(); +/// \endcode +class ctti_data { +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +public: + ctti_data() = delete; + ctti_data(const ctti_data&) = delete; + ctti_data& operator=(const ctti_data&) = delete; +#else +private: + ctti_data(); + ctti_data(const ctti_data&); + ctti_data& operator=(const ctti_data&); +#endif +}; + +} // namespace detail + +/// Helper method for getting detail::ctti_data of a template parameter T. +template +inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT { + // Standard C++11, 5.2.10 Reinterpret cast: + // An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue + // v of type "pointer to T1" is converted to the type "pointer to cv T2", the result is static_cast(static_cast(v)) if both T1 and T2 are standard-layout types (3.9) and the alignment + // requirements of T2 are no stricter than those of T1, or if either type is void. Converting a prvalue of type + // "pointer to T1" to the type "pointer to T2" (where T1 and T2 are object types and where the alignment + // requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer + // value. + // + // Alignments are checked in `type_index_test_ctti_alignment.cpp` test. + return *reinterpret_cast(boost::detail::ctti::n()); +} + +/// \class ctti_type_index +/// 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 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(), type_id_with_cvr() +/// * 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 { + 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; + + BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT + : data_(boost::detail::ctti::n()) + {} + + inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT + : data_(reinterpret_cast(&data)) + {} + + 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 + BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT; + + template + BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT; + + template + inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT; +}; + + +inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT { + return *reinterpret_cast(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 +BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type no_ref_t; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cvr_t; + return ctti_type_index(boost::detail::ctti::n()); +} + + + +template +BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT { + return ctti_type_index(boost::detail::ctti::n()); +} + + +template +inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT { + return variable.boost_type_index_type_id_runtime_(); +} + + +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 { + return std::strlen(raw_name() + detail::ctti_skip_size_at_end); +} + + +inline std::string ctti_type_index::pretty_name() const { + std::size_t len = get_raw_name_length(); + while (raw_name()[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces + return std::string(raw_name(), len); +} + + +inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT { + return boost::hash_range(raw_name(), raw_name() + get_raw_name_length()); +} + + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP + diff --git a/Slang/boost/type_index/detail/compile_time_type_info.hpp b/Slang/boost/type_index/detail/compile_time_type_info.hpp new file mode 100644 index 0000000..07d7667 --- /dev/null +++ b/Slang/boost/type_index/detail/compile_time_type_info.hpp @@ -0,0 +1,339 @@ +// +// Copyright 2012-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP +#define BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP + +/// \file compile_time_type_info.hpp +/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index. +/// Not intended for inclusion from user's code. + +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +/// @cond +#if defined(__has_builtin) +#if __has_builtin(__builtin_constant_p) +#define BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(x) __builtin_constant_p(x) +#endif +#if __has_builtin(__builtin_strcmp) +#define BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(str1, str2) __builtin_strcmp(str1, str2) +#endif +#elif defined(__GNUC__) +#define BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(x) __builtin_constant_p(x) +#define BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(str1, str2) __builtin_strcmp(str1, str2) +#endif + +#define BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(begin_skip, end_skip, runtime_skip, runtime_skip_until) \ + namespace boost { namespace typeindex { namespace detail { \ + BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_begin = begin_skip; \ + BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_end = end_skip; \ + 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 */ +#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING) +# include + BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING ) +#elif defined(_MSC_VER) && !defined(__clang__) && 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(__clang__) && !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. + // + // Using less efficient solution because there is no good way to detect real version of Clang. + // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "???????????>::n() [T = int" + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ") +#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0)) + // 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__ >= 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(__EDG__) && !defined(BOOST_NO_CXX14_CONSTEXPR) + // sizeof("static cha boost::detail::ctti::s() [with I = 40U, T = ") - 1, sizeof("]") - 1 + // note: checked on 4.14 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(58, 1, false, "") +#elif defined(__EDG__) && defined(BOOST_NO_CXX14_CONSTEXPR) + // sizeof("static const char *boost::detail::ctti::n() [with T = ") - 1, sizeof("]") - 1 + // note: checked on 4.14 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "") +#elif defined(__GNUC__) && (__GNUC__ < 7) && !defined(BOOST_NO_CXX14_CONSTEXPR) + // sizeof("static constexpr char boost::detail::ctti::s() [with unsigned int I = 0u; T = ") - 1, sizeof("]") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(81, 1, false, "") +#elif defined(__GNUC__) && (__GNUC__ >= 7) && !defined(BOOST_NO_CXX14_CONSTEXPR) + // sizeof("static constexpr char boost::detail::ctti::s() [with unsigned int I = 0; T = ") - 1, sizeof("]") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(80, 1, false, "") +#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR) + // sizeof("static const char* boost::detail::ctti::n() [with T = ") - 1, sizeof("]") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "") +#elif defined(__ghs__) + // sizeof("static const char *boost::detail::ctti::n() [with T = ") - 1, sizeof("]") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "") +#else + // Deafult code for other platforms... Just skip nothing! + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(0, 0, false, "") +#endif + +#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS + +namespace boost { namespace typeindex { namespace detail { + template + BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + Condition, + "TypeIndex library is misconfigured for your compiler. " + "Please define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct values. See section " + "'RTTI emulation limitations' of the documentation for more information." + ); + } + + template + 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." + ); + } + +#if defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT) + BOOST_CXX14_CONSTEXPR BOOST_FORCEINLINE bool is_constant_string(const char* str) BOOST_NOEXCEPT { + while (BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT(*str)) { + if (*str == '\0') + return true; + ++str; + } + return false; + } +#endif // defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT) + + template + BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::false_type) BOOST_NOEXCEPT { + return begin; + } + + template + 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_loop(const char *v1, const char *v2) BOOST_NOEXCEPT { + while (*v1 != '\0' && *v1 == *v2) { + ++v1; + ++v2; + } + + return static_cast(*v1) - *v2; + } + + BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT { +#if !defined(BOOST_NO_CXX14_CONSTEXPR) && defined(BOOST_TYPE_INDEX_DETAIL_IS_CONSTANT) && defined(BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP) + if (boost::typeindex::detail::is_constant_string(v1) && boost::typeindex::detail::is_constant_string(v2)) + return boost::typeindex::detail::constexpr_strcmp_loop(v1, v2); + return BOOST_TYPE_INDEX_DETAIL_BUILTIN_STRCMP(v1, v2); +#elif !defined(BOOST_NO_CXX14_CONSTEXPR) + return boost::typeindex::detail::constexpr_strcmp_loop(v1, v2); +#else + return std::strcmp(v1, v2); +#endif + } + + template + BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::true_type) 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 + ); + return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1); + } + + template + 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( + begin + ctti_skip_size_at_begin, + boost::integral_constant() + ); + } + +#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR) + template + struct index_seq {}; + + template + struct make_index_sequence_join; + + template + struct make_index_sequence_join, index_seq > { + typedef index_seq type; + }; + + template + struct make_index_seq_impl { + typedef typename make_index_sequence_join< + typename make_index_seq_impl::type, + typename make_index_seq_impl::type + >::type type; + }; + + template + struct make_index_seq_impl { + typedef index_seq<> type; + }; + + template + struct make_index_seq_impl { + typedef index_seq type; + }; + + template + struct cstring { + static constexpr unsigned int size_ = sizeof...(C); + static constexpr char data_[size_] = { C... }; + }; + + template + constexpr char cstring::data_[]; +#endif + +}}} // namespace boost::typeindex::detail + +namespace boost { namespace detail { + +/// Noncopyable type_info that does not require RTTI. +/// CTTI == Compile Time Type Info. +/// This name must be as short as possible, to avoid code bloat +template +struct ctti { + +#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR) + //helper functions + template + constexpr static char s() BOOST_NOEXCEPT { // step + constexpr unsigned int 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 + constexpr static const char* impl(::boost::typeindex::detail::index_seq ) BOOST_NOEXCEPT { + return ::boost::typeindex::detail::cstring()...>::data_; + } + + template // `D` means `Dummy` + constexpr static const char* n() BOOST_NOEXCEPT { + #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) + constexpr unsigned int size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE); + #elif defined(__FUNCSIG__) + constexpr unsigned int 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 unsigned int 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 + 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); + #elif defined(__FUNCSIG__) + return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__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__) \ + || defined(__clang__) + return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__); + #else + boost::typeindex::detail::failed_to_get_function_name(); + return ""; + #endif + } +#endif +}; + +}} // namespace boost::detail + +#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP diff --git a/Slang/boost/type_index/detail/ctti_register_class.hpp b/Slang/boost/type_index/detail/ctti_register_class.hpp new file mode 100644 index 0000000..a51eb50 --- /dev/null +++ b/Slang/boost/type_index/detail/ctti_register_class.hpp @@ -0,0 +1,40 @@ +// +// Copyright 2013-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP +#define BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP + +/// \file ctti_register_class.hpp +/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::ctti_type_index. +/// Not intended for inclusion from user's code. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { namespace detail { + +template +inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT { + return ctti_construct(); +} + +}}} // namespace boost::typeindex::detail + +/// @cond +#define BOOST_TYPE_INDEX_REGISTER_CLASS \ + virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \ + return boost::typeindex::detail::ctti_construct_typeid_ref(this); \ + } \ +/**/ +/// @endcond + +#endif // BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP + diff --git a/Slang/boost/type_index/detail/stl_register_class.hpp b/Slang/boost/type_index/detail/stl_register_class.hpp new file mode 100644 index 0000000..51ccb25 --- /dev/null +++ b/Slang/boost/type_index/detail/stl_register_class.hpp @@ -0,0 +1,40 @@ +// +// Copyright 2013-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP +#define BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP + +/// \file stl_register_class.hpp +/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::stl_type_index. +/// Not intended for inclusion from user's code. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { namespace detail { + +template +inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT { + return typeid(T); +} + +}}} // namespace boost::typeindex::detail + +/// @cond +#define BOOST_TYPE_INDEX_REGISTER_CLASS \ + virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \ + return boost::typeindex::detail::stl_construct_typeid_ref(this); \ + } \ +/**/ +/// @endcond + +#endif // BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP + diff --git a/Slang/boost/type_index/runtime_cast.hpp b/Slang/boost/type_index/runtime_cast.hpp new file mode 100644 index 0000000..c72b119 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast.hpp @@ -0,0 +1,28 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_HPP + +/// \file runtime_cast.hpp +/// \brief Contains the basic utilities necessary to fully emulate +/// dynamic_cast for language level constructs (raw pointers and references). +/// +/// boost::typeindex::runtime_cast is a drop in replacement for dynamic_cast +/// that can be used in situations where traditional rtti is either unavailable +/// or undesirable. + +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_HPP diff --git a/Slang/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp b/Slang/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp new file mode 100644 index 0000000..aaf7122 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/boost_shared_ptr_cast.hpp @@ -0,0 +1,49 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_BOOST_SHARED_PTR_CAST_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_BOOST_SHARED_PTR_CAST_HPP + +/// \file boost_shared_ptr_cast.hpp +/// \brief Contains the overload of boost::typeindex::runtime_pointer_cast for +/// boost::shared_ptr types. + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { + template class shared_ptr; +} + +namespace boost { namespace typeindex { + +/// \brief Creates a new instance of std::shared_ptr whose stored pointer is obtained from u's +/// stored pointer using a runtime_cast. +/// +/// The new shared_ptr will share ownership with u, except that it is empty if the runtime_cast +/// performed by runtime_pointer_cast returns a null pointer. +/// \tparam T The desired target type to return a pointer of. +/// \tparam U A complete class type of the source instance pointed to from u. +/// \return If there exists a valid conversion from U* to T*, returns a boost::shared_ptr +/// that points to an address suitably offset from u. +/// If no such conversion exists, returns boost::shared_ptr(); +template +boost::shared_ptr runtime_pointer_cast(boost::shared_ptr const& u) { + T* value = detail::runtime_cast_impl(u.get(), boost::is_base_and_derived()); + if(value) + return boost::shared_ptr(u, value); + return boost::shared_ptr(); +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_BOOST_SHARED_PTR_CAST_HPP diff --git a/Slang/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp b/Slang/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp new file mode 100644 index 0000000..6181df6 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp @@ -0,0 +1,57 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_DETAIL_RUNTIME_CAST_IMPL_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_DETAIL_RUNTIME_CAST_IMPL_HPP + +/// \file runtime_cast_impl.hpp +/// \brief Contains the overload of boost::typeindex::runtime_cast for +/// pointer types. +/// +/// boost::typeindex::runtime_cast can be used to emulate dynamic_cast +/// functionality on platorms that don't provide it or should the user +/// desire opt in functionality instead of enabling it system wide. + +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +namespace detail { + +template +T* runtime_cast_impl(U* u, boost::true_type) BOOST_NOEXCEPT { + return u; +} + +template +T const* runtime_cast_impl(U const* u, boost::true_type) BOOST_NOEXCEPT { + return u; +} + +template +T* runtime_cast_impl(U* u, boost::false_type) BOOST_NOEXCEPT { + return const_cast(static_cast( + u->boost_type_index_find_instance_(boost::typeindex::type_id()) + )); +} + +template +T const* runtime_cast_impl(U const* u, boost::false_type) BOOST_NOEXCEPT { + return static_cast(u->boost_type_index_find_instance_(boost::typeindex::type_id())); +} + +} // namespace detail + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_DETAIL_RUNTIME_CAST_IMPL_HPP diff --git a/Slang/boost/type_index/runtime_cast/pointer_cast.hpp b/Slang/boost/type_index/runtime_cast/pointer_cast.hpp new file mode 100644 index 0000000..49a7613 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/pointer_cast.hpp @@ -0,0 +1,74 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_POINTER_CAST_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_POINTER_CAST_HPP + +/// \file pointer_class.hpp +/// \brief Contains the function overloads of boost::typeindex::runtime_cast for +/// pointer types. +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \brief Safely converts pointers to classes up, down, and sideways along the inheritance hierarchy. +/// \tparam T The desired target type. Like dynamic_cast, must be a pointer to complete class type. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U* to T, returns a T that points to +/// an address suitably offset from u. If no such conversion exists, returns NULL. +template +T runtime_cast(U* u) BOOST_NOEXCEPT { + typedef typename boost::remove_pointer::type impl_type; + return detail::runtime_cast_impl(u, boost::is_base_and_derived()); +} + +/// \brief Safely converts pointers to classes up, down, and sideways along the inheritance hierarchy. +/// \tparam T The desired target type. Like dynamic_cast, must be a pointer to complete class type. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U* to T, returns a T that points to +/// an address suitably offset from u. If no such conversion exists, returns NULL. +template +T runtime_cast(U const* u) BOOST_NOEXCEPT { + typedef typename boost::remove_pointer::type impl_type; + return detail::runtime_cast_impl(u, boost::is_base_and_derived()); +} + +/// \brief Safely converts pointers to classes up, down, and sideways along the inheritance +/// hierarchy. +/// \tparam T The desired target type to return a pointer to. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U const* to T*, returns a T* +/// that points to an address suitably offset from u. +/// If no such conversion exists, returns NULL. +template +T* runtime_pointer_cast(U* u) BOOST_NOEXCEPT { + return detail::runtime_cast_impl(u, boost::is_base_and_derived()); +} + +/// \brief Safely converts pointers to classes up, down, and sideways along the inheritance +/// hierarchy. +/// \tparam T The desired target type to return a pointer to. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U const* to T const*, returns a T const* +/// that points to an address suitably offset from u. +/// If no such conversion exists, returns NULL. +template +T const* runtime_pointer_cast(U const* u) BOOST_NOEXCEPT { + return detail::runtime_cast_impl(u, boost::is_base_and_derived()); +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_POINTER_CAST_HPP diff --git a/Slang/boost/type_index/runtime_cast/reference_cast.hpp b/Slang/boost/type_index/runtime_cast/reference_cast.hpp new file mode 100644 index 0000000..1511f7d --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/reference_cast.hpp @@ -0,0 +1,66 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_REFERENCE_CAST_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_REFERENCE_CAST_HPP + +/// \file reference_cast.hpp +/// \brief Contains the overload of boost::typeindex::runtime_cast for +/// reference types. + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \brief Indicates that runtime_cast was unable to perform the desired cast operation +/// because the source instance was not also an instance of the target type. +struct bad_runtime_cast : std::exception +{}; + +/// \brief Safely converts references to classes up, down, and sideways along the inheritance hierarchy. +/// \tparam T The desired target type. Like dynamic_cast, must be a pointer to complete class type. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U& to T, returns a T that references an address +/// suitably offset from u. If no such conversion exists, throws boost::typeindex::bad_runtime_cast. +template +typename boost::add_reference::type runtime_cast(U& u) { + typedef typename boost::remove_reference::type impl_type; + impl_type* value = detail::runtime_cast_impl( + boost::addressof(u), boost::is_base_and_derived()); + if(!value) + BOOST_THROW_EXCEPTION(bad_runtime_cast()); + return *value; +} + +/// \brief Safely converts references to classes up, down, and sideways along the inheritance hierarchy. +/// \tparam T The desired target type. Like dynamic_cast, must be a pointer to complete class type. +/// \tparam U A complete class type of the source instance, u. +/// \return If there exists a valid conversion from U const& to T const, returns a T const that references an address +/// suitably offset from u. If no such conversion exists, throws boost::typeindex::bad_runtime_cast. +template +typename boost::add_reference::type runtime_cast(U const& u) { + typedef typename boost::remove_reference::type impl_type; + impl_type* value = detail::runtime_cast_impl( + boost::addressof(u), boost::is_base_and_derived()); + if(!value) + BOOST_THROW_EXCEPTION(bad_runtime_cast()); + return *value; +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_REFERENCE_CAST_HPP diff --git a/Slang/boost/type_index/runtime_cast/register_runtime_class.hpp b/Slang/boost/type_index/runtime_cast/register_runtime_class.hpp new file mode 100644 index 0000000..ab758a5 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/register_runtime_class.hpp @@ -0,0 +1,138 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_REGISTER_RUNTIME_CLASS_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_REGISTER_RUNTIME_CLASS_HPP + +/// \file register_runtime_class.hpp +/// \brief Contains the macros BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST and +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +namespace detail { + +template +inline type_index runtime_class_construct_type_id(T const*) { + return type_id(); +} + +} // namespace detail + +}} // namespace boost::typeindex + +/// @cond + +#define BOOST_TYPE_INDEX_CHECK_BASE_(r, data, Base) \ + if(void const* ret_val = this->Base::boost_type_index_find_instance_(idx)) return ret_val; + +/// @endcond + +/// \def BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS +/// \brief Macro used to make a class compatible with boost::typeindex::runtime_cast +/// +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS generates a virtual function +/// in the current class that, when combined with the supplied base class information, allows +/// boost::typeindex::runtime_cast to accurately convert between dynamic types of instances of +/// the current class. +/// +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS also adds support for boost::typeindex::type_id_runtime +/// by including BOOST_TYPE_INDEX_REGISTER_CLASS. It is typical that these features are used together, +/// but in the event that BOOST_TYPE_INDEX_REGISTER_CLASS is undesirable in the current class, +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST is provided. +/// +/// \b Example: +/// \code +/// struct base1 { +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS(BOOST_TYPE_INDEX_NO_BASE_CLASS) +/// virtual ~base1(); +/// }; +/// +/// struct base2 { +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS(BOOST_TYPE_INDEX_NO_BASE_CLASS) +/// virtual ~base2(); +/// }; +/// +/// struct derived1 : base1 { +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS((base1)) +/// }; +/// +/// struct derived2 : base1, base2 { +/// BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS((base1)(base2)) +/// }; +/// +/// ... +/// +/// base1* pb1 = get_object(); +/// if(derived2* pb2 = boost::typeindex::runtime_cast(pb1)) { +/// assert(boost::typeindex::type_id_runtime(*pb1)) == boost::typeindex::type_id()); +/// } +/// \endcode +/// +/// \param base_class_seq A Boost.Preprocessor sequence of the current class' direct bases, or +/// BOOST_TYPE_INDEX_NO_BASE_CLASS if this class has no direct base classes. +#define BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS(base_class_seq) \ + BOOST_TYPE_INDEX_REGISTER_CLASS \ + BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST(base_class_seq) + +/// \def BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST +/// \brief Macro used to make a class compatible with boost::typeindex::runtime_cast without including +/// support for boost::typeindex::type_id_runtime. +/// +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST is provided as an alternative to BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS +/// in the event that support for boost::typeindex::type_id_runtime is undesirable. +/// +/// \b Example: +/// \code +/// struct base1 { +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST(BOOST_TYPE_INDEX_NO_BASE_CLASS) +/// virtual ~base1(); +/// }; +/// +/// struct base2 { +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST(BOOST_TYPE_INDEX_NO_BASE_CLASS) +/// virtual ~base2(); +/// }; +/// +/// struct derived1 : base1 { +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST((base1)) +/// }; +/// +/// struct derived2 : base1, base2 { +/// BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST((base1)(base2)) +/// }; +/// +/// ... +/// +/// base1* pb1 = get_object(); +/// if(derived2* pb2 = boost::typeindex::runtime_cast(pb1)) +/// { /* can't call boost::typeindex::type_id_runtime(*pb1) here */ } +/// \endcode +/// +/// \param base_class_seq A Boost.Preprocessor sequence of the current class' direct bases, or +/// BOOST_TYPE_INDEX_NO_BASE_CLASS if this class has no direct base classes. +#define BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST(base_class_seq) \ + virtual void const* boost_type_index_find_instance_(boost::typeindex::type_index const& idx) const BOOST_NOEXCEPT { \ + if(idx == boost::typeindex::detail::runtime_class_construct_type_id(this)) \ + return this; \ + BOOST_PP_SEQ_FOR_EACH(BOOST_TYPE_INDEX_CHECK_BASE_, _, base_class_seq) \ + return NULL; \ + } + +/// \def BOOST_TYPE_INDEX_NO_BASE_CLASS +/// \brief Instructs BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS and BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST +/// that this class has no base classes. +#define BOOST_TYPE_INDEX_NO_BASE_CLASS BOOST_PP_SEQ_NIL + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_REGISTER_RUNTIME_CLASS_HPP diff --git a/Slang/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp b/Slang/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp new file mode 100644 index 0000000..277a524 --- /dev/null +++ b/Slang/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp @@ -0,0 +1,46 @@ +// +// Copyright (c) Chris Glover, 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) +// + +#ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP +#define BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP + +/// \file std_shared_ptr_cast.hpp +/// \brief Contains the overload of boost::typeindex::runtime_pointer_cast for +/// std::shared_ptr types. + +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \brief Creates a new instance of std::shared_ptr whose stored pointer is obtained from u's +/// stored pointer using a runtime_cast. +/// +/// The new shared_ptr will share ownership with u, except that it is empty if the runtime_cast +/// performed by runtime_pointer_cast returns a null pointer. +/// \tparam T The desired target type to return a pointer of. +/// \tparam U A complete class type of the source instance pointed to from u. +/// \return If there exists a valid conversion from U* to T*, returns a std::shared_ptr +/// that points to an address suitably offset from u. +/// If no such conversion exists, returns std::shared_ptr(); +template +std::shared_ptr runtime_pointer_cast(std::shared_ptr const& u) { + T* value = detail::runtime_cast_impl(u.get(), boost::is_base_and_derived()); + if(value) + return std::shared_ptr(u, value); + return std::shared_ptr(); +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP diff --git a/Slang/boost/type_index/stl_type_index.hpp b/Slang/boost/type_index/stl_type_index.hpp new file mode 100644 index 0000000..26b93da --- /dev/null +++ b/Slang/boost/type_index/stl_type_index.hpp @@ -0,0 +1,278 @@ +// +// Copyright 2013-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP + +/// \file stl_type_index.hpp +/// \brief Contains boost::typeindex::stl_type_index class. +/// +/// boost::typeindex::stl_type_index class can be used as a drop-in replacement +/// for std::type_index. +/// +/// It is used in situations when RTTI is enabled or typeid() method is available. +/// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro +/// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index. + +#include + +// MSVC is capable of calling typeid(T) even when RTTI is off +#if defined(BOOST_NO_RTTI) && !defined(BOOST_MSVC) +#error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available." +#endif + +#include +#include // std::strcmp, std::strlen, std::strstr +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if (defined(_MSC_VER) && _MSC_VER > 1600) \ + || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \ + || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103) +# define BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE +#else +# include +#endif + +#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \ + || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) +# include +# include +# include +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \class stl_type_index +/// This class is a wrapper around std::type_info, that workarounds issues and provides +/// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade. +/// +/// This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index. +class stl_type_index + : public type_index_facade< + stl_type_index, + #ifdef BOOST_NO_STD_TYPEINFO + type_info + #else + std::type_info + #endif + > +{ +public: +#ifdef BOOST_NO_STD_TYPEINFO + typedef type_info type_info_t; +#else + typedef std::type_info type_info_t; +#endif + +private: + const type_info_t* data_; + +public: + inline stl_type_index() BOOST_NOEXCEPT + : data_(&typeid(void)) + {} + + inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT + : data_(&data) + {} + + inline const type_info_t& type_info() const BOOST_NOEXCEPT; + + inline const char* raw_name() const BOOST_NOEXCEPT; + inline const char* name() const BOOST_NOEXCEPT; + inline std::string pretty_name() const; + + inline std::size_t hash_code() const BOOST_NOEXCEPT; + inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT; + inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id() BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT; +}; + +inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT { + return *data_; +} + + +inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT { +#ifdef _MSC_VER + return data_->raw_name(); +#else + return data_->name(); +#endif +} + +inline const char* stl_type_index::name() const BOOST_NOEXCEPT { + return data_->name(); +} + +inline std::string stl_type_index::pretty_name() const { + static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<"; + static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1; + + // In case of MSVC demangle() is a no-op, and name() already returns demangled name. + // In case of GCC and Clang (on non-Windows systems) name() returns mangled name and demangle() undecorates it. + const boost::core::scoped_demangled_name demangled_name(data_->name()); + + const char* begin = demangled_name.get(); + if (!begin) { + boost::throw_exception(std::runtime_error("Type name demangling failed")); + } + + const std::string::size_type len = std::strlen(begin); + const char* end = begin + len; + + if (len > cvr_saver_name_len) { + const char* b = std::strstr(begin, cvr_saver_name); + if (b) { + b += cvr_saver_name_len; + + // Trim leading spaces + while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size + ++ b; + } + + // Skip the closing angle bracket + const char* e = end - 1; + while (e > b && *e != '>') { + -- e; + } + + // Trim trailing spaces + while (e > b && *(e - 1) == ' ') { + -- e; + } + + if (b < e) { + // Parsing seems to have succeeded, the type name is not empty + begin = b; + end = e; + } + } + } + + return std::string(begin, end); +} + + +inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT { +#ifdef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE + return data_->hash_code(); +#else + return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name())); +#endif +} + + +/// @cond + +// for this compiler at least, cross-shared-library type_info +// comparisons don't work, so we are using typeid(x).name() instead. +# if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))) \ + || defined(_AIX) \ + || (defined(__sgi) && defined(__host_mips)) \ + || (defined(__hpux) && defined(__HP_aCC)) \ + || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) +# define BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES +# endif + +/// @endcond + +inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT { +#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES + return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name()); +#else + return !!(*data_ == *rhs.data_); +#endif +} + +inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT { +#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES + return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0; +#else + return !!data_->before(*rhs.data_); +#endif +} + +#undef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES + + +template +inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type no_ref_t; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cvr_prefinal_t; + + # if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \ + || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) + + // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral' + // in typeid() expressions. Full template specialization for 'integral' fixes that issue: + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_signed::value, + boost::make_signed, + boost::type_identity + >::type no_cvr_prefinal_lazy_t; + + typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t; + #else + typedef no_cvr_prefinal_t no_cvr_t; + #endif + + return typeid(no_cvr_t); +} + +namespace detail { + template class cvr_saver{}; +} + +template +inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::conditional< + boost::is_reference::value || boost::is_const::value || boost::is_volatile::value, + detail::cvr_saver, + T + >::type type; + + return typeid(type); +} + + +template +inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT { +#ifdef BOOST_NO_RTTI + return value.boost_type_index_type_id_runtime_(); +#else + return typeid(value); +#endif +} + +}} // namespace boost::typeindex + +#undef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE + +#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP diff --git a/Slang/boost/type_index/type_index_facade.hpp b/Slang/boost/type_index/type_index_facade.hpp new file mode 100644 index 0000000..d004c5f --- /dev/null +++ b/Slang/boost/type_index/type_index_facade.hpp @@ -0,0 +1,297 @@ +// +// Copyright 2013-2021 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) +// + +#ifndef BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP +#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP + +#include +#include +#include +#include + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) +#include // for std::basic_ostream +#else +#include +#endif +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \class type_index_facade +/// +/// This class takes care about the comparison operators, hash functions and +/// ostream operators. Use this class as a public base class for defining new +/// type_info-conforming classes. +/// +/// \b Example: +/// \code +/// class stl_type_index: public type_index_facade +/// { +/// public: +/// typedef std::type_info type_info_t; +/// private: +/// const type_info_t* data_; +/// +/// public: +/// stl_type_index(const type_info_t& data) noexcept +/// : data_(&data) +/// {} +/// // ... +/// }; +/// \endcode +/// +/// \tparam Derived Class derived from type_index_facade. +/// \tparam TypeInfo Class that will be used as a base type_info class. +/// \note Take a look at the protected methods. They are \b not \b defined in type_index_facade. +/// Protected member functions raw_name() \b must be defined in Derived class. All the other +/// methods are mandatory. +/// \see 'Making a custom type_index' section for more information about +/// creating your own type_index using type_index_facade. +template +class type_index_facade { +private: + /// @cond + BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT { + return *static_cast(this); + } + /// @endcond +public: + typedef TypeInfo type_info_t; + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Name of a type. By default returns Derived::raw_name(). + inline const char* name() const BOOST_NOEXCEPT { + return derived().raw_name(); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides may throw. + /// \return Human readable type name. By default returns Derived::name(). + inline std::string pretty_name() const { + return derived().name(); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return True if two types are equal. By default compares types by raw_name(). + inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT { + const char* const left = derived().raw_name(); + const char* const right = rhs.raw_name(); + return left == right || !std::strcmp(left, right); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return True if rhs is greater than this. By default compares types by raw_name(). + inline bool before(const Derived& rhs) const BOOST_NOEXCEPT { + const char* const left = derived().raw_name(); + const char* const right = rhs.raw_name(); + return left != right && std::strcmp(left, right) < 0; + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Hash code of a type. By default hashes types by raw_name(). + /// \note Derived class header \b must include , \b unless this function is redefined in + /// Derived class to not use boost::hash_range(). + inline std::size_t hash_code() const BOOST_NOEXCEPT { + const char* const name_raw = derived().raw_name(); + return boost::hash_range(name_raw, name_raw + std::strlen(name_raw)); + } + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) +protected: + /// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw. + /// \return Pointer to unredable/raw type name. + inline const char* raw_name() const BOOST_NOEXCEPT; + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Const reference to underlying low level type_info_t. + inline const type_info_t& type_info() const BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw. + /// Overrides \b must remove const, volatile && and & modifiers from T. + /// \tparam T Type for which type_index must be created. + /// \return type_index for type T. + template + static Derived type_id() BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw. + /// Overrides \b must \b not remove const, volatile && and & modifiers from T. + /// \tparam T Type for which type_index must be created. + /// \return type_index for type T. + template + static Derived type_id_with_cvr() BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. + /// \param variable Variable which runtime type will be stored in type_index. + /// \return type_index with runtime type of variable. + template + static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT; + +#endif + +}; + +/// @cond +template +BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return static_cast(lhs).equal(static_cast(rhs)); +} + +template +BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return static_cast(lhs).before(static_cast(rhs)); +} + + + +template +BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return rhs < lhs; +} + +template +BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs > rhs); +} + +template +BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs < rhs); +} + +template +BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs == rhs); +} + +// ######################### COMPARISONS with Derived ############################ // +template +inline bool operator == (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return Derived(lhs) == rhs; +} + +template +inline bool operator < (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return Derived(lhs) < rhs; +} + +template +inline bool operator > (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return rhs < Derived(lhs); +} + +template +inline bool operator <= (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) > rhs); +} + +template +inline bool operator >= (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) < rhs); +} + +template +inline bool operator != (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) == rhs); +} + + +template +inline bool operator == (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return lhs == Derived(rhs); +} + +template +inline bool operator < (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return lhs < Derived(rhs); +} + +template +inline bool operator > (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return Derived(rhs) < lhs; +} + +template +inline bool operator <= (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs > Derived(rhs)); +} + +template +inline bool operator >= (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs < Derived(rhs)); +} + +template +inline bool operator != (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs == Derived(rhs)); +} + +// ######################### COMPARISONS with Derived END ############################ // + +/// @endcond + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// noexcept comparison operators for type_index_facade classes. +bool operator ==, !=, <, ... (const type_index_facade& lhs, const type_index_facade& rhs) noexcept; + +/// noexcept comparison operators for type_index_facade and it's TypeInfo classes. +bool operator ==, !=, <, ... (const type_index_facade& lhs, const TypeInfo& rhs) noexcept; + +/// noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes. +bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs) noexcept; + +#endif + +#ifndef BOOST_NO_IOSTREAM +#ifdef BOOST_NO_TEMPLATED_IOSTREAMS +/// @cond +/// Ostream operator that will output demangled name +template +inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade& ind) { + ostr << static_cast(ind).pretty_name(); + return ostr; +} +/// @endcond +#else +/// Ostream operator that will output demangled name. +template +inline std::basic_ostream& operator<<( + std::basic_ostream& ostr, + const type_index_facade& ind) +{ + ostr << static_cast(ind).pretty_name(); + return ostr; +} +#endif // BOOST_NO_TEMPLATED_IOSTREAMS +#endif // BOOST_NO_IOSTREAM + +/// This free function is used by Boost's unordered containers. +/// \note has to be included if this function is used. +template +inline std::size_t hash_value(const type_index_facade& lhs) BOOST_NOEXCEPT { + return static_cast(lhs).hash_code(); +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP + diff --git a/Slang/boost/type_traits.hpp b/Slang/boost/type_traits.hpp new file mode 100644 index 0000000..406fd02 --- /dev/null +++ b/Slang/boost/type_traits.hpp @@ -0,0 +1,163 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// See boost/type_traits/*.hpp for full copyright notices. + +#ifndef BOOST_TYPE_TRAITS_HPP +#define BOOST_TYPE_TRAITS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if !defined(BOOST_BORLANDC) && !defined(__CUDACC__) +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) +#include +#include +#endif + +#endif // BOOST_TYPE_TRAITS_HPP diff --git a/Slang/boost/type_traits/add_const.hpp b/Slang/boost/type_traits/add_const.hpp new file mode 100644 index 0000000..2d60118 --- /dev/null +++ b/Slang/boost/type_traits/add_const.hpp @@ -0,0 +1,52 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED +#define BOOST_TT_ADD_CONST_HPP_INCLUDED + +#include + +namespace boost { + +// * convert a type T to const type - add_const +// this is not required since the result is always +// the same as "T const", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_const is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + + template struct add_const + { + typedef T const type; + }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + template struct add_const + { + typedef T& type; + }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_const_t = typename add_const::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED diff --git a/Slang/boost/type_traits/add_cv.hpp b/Slang/boost/type_traits/add_cv.hpp new file mode 100644 index 0000000..425d019 --- /dev/null +++ b/Slang/boost/type_traits/add_cv.hpp @@ -0,0 +1,47 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_ADD_CV_HPP_INCLUDED +#define BOOST_TT_ADD_CV_HPP_INCLUDED + +#include + +namespace boost { + +// * convert a type T to a const volatile type - add_cv +// this is not required since the result is always +// the same as "T const volatile", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_volatile is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +template struct add_cv{ typedef T const volatile type; }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +template struct add_cv{ typedef T& type; }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_cv_t = typename add_cv::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_CV_HPP_INCLUDED diff --git a/Slang/boost/type_traits/add_lvalue_reference.hpp b/Slang/boost/type_traits/add_lvalue_reference.hpp new file mode 100644 index 0000000..26b74e6 --- /dev/null +++ b/Slang/boost/type_traits/add_lvalue_reference.hpp @@ -0,0 +1,33 @@ +// Copyright 2010 John Maddock + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP + +#include + +namespace boost{ + +template struct add_lvalue_reference +{ + typedef typename boost::add_reference::type type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct add_lvalue_reference +{ + typedef T& type; +}; +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_lvalue_reference_t = typename add_lvalue_reference::type; + +#endif + +} + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP diff --git a/Slang/boost/type_traits/add_pointer.hpp b/Slang/boost/type_traits/add_pointer.hpp new file mode 100644 index 0000000..80b0703 --- /dev/null +++ b/Slang/boost/type_traits/add_pointer.hpp @@ -0,0 +1,67 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED +#define BOOST_TT_ADD_POINTER_HPP_INCLUDED + +#include + +namespace boost { + +#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x5A0) +// +// For some reason this implementation stops Borlands compiler +// from dropping cv-qualifiers, it still fails with references +// to arrays for some reason though (shrug...) (JM 20021104) +// +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; +template +struct add_pointer +{ + typedef T* type; +}; + +#else + +template +struct add_pointer +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; + +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_pointer_t = typename add_pointer::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/add_reference.hpp b/Slang/boost/type_traits/add_reference.hpp new file mode 100644 index 0000000..33e9bc7 --- /dev/null +++ b/Slang/boost/type_traits/add_reference.hpp @@ -0,0 +1,66 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED +#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +namespace detail { + +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// + +template +struct add_reference_impl +{ + typedef T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct add_reference_impl +{ + typedef T&& type; +}; +#endif + +} // namespace detail + +template struct add_reference +{ + typedef typename boost::detail::add_reference_impl::type type; +}; +template struct add_reference +{ + typedef T& type; +}; + +// these full specialisations are always required: +template <> struct add_reference { typedef void type; }; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct add_reference { typedef const void type; }; +template <> struct add_reference { typedef const volatile void type; }; +template <> struct add_reference { typedef volatile void type; }; +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + +template using add_reference_t = typename add_reference::type; + +#endif + + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/add_rvalue_reference.hpp b/Slang/boost/type_traits/add_rvalue_reference.hpp new file mode 100644 index 0000000..ad64894 --- /dev/null +++ b/Slang/boost/type_traits/add_rvalue_reference.hpp @@ -0,0 +1,70 @@ +// add_rvalue_reference.hpp ---------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + +#include + +//----------------------------------------------------------------------------// + +#include +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.9.7.2 Reference modifications [meta.trans.ref] // +// Written by Vicente J. Botet Escriba // +// // +// If T names an object or function type then the member typedef type +// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects +// the semantics of reference collapsing. For example, when a type T names +// a type T1&, the type add_rvalue_reference::type is not an rvalue +// reference. -end note ] +//----------------------------------------------------------------------------// + +namespace boost { + +namespace type_traits_detail { + + template + struct add_rvalue_reference_helper + { typedef T type; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + struct add_rvalue_reference_helper + { + typedef T&& type; + }; +#endif + + template + struct add_rvalue_reference_imp + { + typedef typename boost::type_traits_detail::add_rvalue_reference_helper + ::value == false && is_reference::value == false) >::type type; + }; + +} + +template struct add_rvalue_reference +{ + typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_rvalue_reference_t = typename add_rvalue_reference::type; + +#endif + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + diff --git a/Slang/boost/type_traits/add_volatile.hpp b/Slang/boost/type_traits/add_volatile.hpp new file mode 100644 index 0000000..253751a --- /dev/null +++ b/Slang/boost/type_traits/add_volatile.hpp @@ -0,0 +1,46 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED +#define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED + +#include + +namespace boost { + +// * convert a type T to volatile type - add_volatile +// this is not required since the result is always +// the same as "T volatile", but it does suppress warnings +// from some compilers: + +#if defined(BOOST_MSVC) +// This bogus warning will appear when add_volatile is applied to a +// const volatile reference because we can't detect const volatile +// references with MSVC6. +# pragma warning(push) +# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored +#endif + +template struct add_volatile{ typedef T volatile type; }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +template struct add_volatile{ typedef T& type; }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using add_volatile_t = typename add_volatile::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/aligned_storage.hpp b/Slang/boost/type_traits/aligned_storage.hpp new file mode 100644 index 0000000..8ad00a2 --- /dev/null +++ b/Slang/boost/type_traits/aligned_storage.hpp @@ -0,0 +1,138 @@ +//----------------------------------------------------------------------------- +// boost aligned_storage.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 +// Eric Friedman, Itay Maman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TT_ALIGNED_STORAGE_HPP +#define BOOST_TT_ALIGNED_STORAGE_HPP + +#include // for std::size_t + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace detail { namespace aligned_storage { + +BOOST_STATIC_CONSTANT( + std::size_t + , alignment_of_max_align = ::boost::alignment_of::value + ); + +// +// To be TR1 conforming this must be a POD type: +// +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + + typename ::boost::type_with_alignment::type align_; + } data_; + void* address() const { return const_cast(this); } +}; +template +struct aligned_storage_imp +{ + union data_t + { + char buf[size]; + ::boost::detail::max_align align_; + } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + /* intentionally empty */ + void* address() const { return 0; } +}; + +}} // namespace detail::aligned_storage + +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : +#ifndef BOOST_BORLANDC + private +#else + public +#endif + ::boost::detail::aligned_storage::aligned_storage_imp +{ + +public: // constants + + typedef ::boost::detail::aligned_storage::aligned_storage_imp type; + + BOOST_STATIC_CONSTANT( + std::size_t + , size = size_ + ); + BOOST_STATIC_CONSTANT( + std::size_t + , alignment = ( + alignment_ == std::size_t(-1) + ? ::boost::detail::aligned_storage::alignment_of_max_align + : alignment_ + ) + ); + +private: // noncopyable + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); + +public: // structors + + aligned_storage() + { + } + + ~aligned_storage() + { + } + +public: // accessors + + void* address() + { + return static_cast(this)->address(); + } + + const void* address() const + { + return static_cast(this)->address(); + } +}; + +// +// Make sure that is_pod recognises aligned_storage<>::type +// as a POD (Note that aligned_storage<> itself is not a POD): +// +template +struct is_pod< ::boost::detail::aligned_storage::aligned_storage_imp > : public true_type{}; + +} // namespace boost + +#endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/Slang/boost/type_traits/alignment_of.hpp b/Slang/boost/type_traits/alignment_of.hpp new file mode 100644 index 0000000..baa3f4d --- /dev/null +++ b/Slang/boost/type_traits/alignment_of.hpp @@ -0,0 +1,119 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED +#define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + +#include +#include + +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121 4512) // alignment is sensitive to packing +#endif +#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x600) +#pragma option push -Vx- -Ve- +#endif + +namespace boost { + +template struct alignment_of; + +// get the alignment of some arbitrary type: +namespace detail { + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4324) // structure was padded due to __declspec(align()) +#endif +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +struct alignment_logic +{ + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); +}; + + +template< typename T > +struct alignment_of_impl +{ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + // + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + __alignof(T) + >::value)); +#elif !defined(BOOST_ALIGNMENT_OF) + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + sizeof(T) + >::value)); +#else + // + // We put this here, rather than in the definition of + // alignment_of below, because MSVC's __alignof doesn't + // always work in that context for some unexplained reason. + // (See type_with_alignment tests for test cases). + // + BOOST_STATIC_CONSTANT(std::size_t, value = BOOST_ALIGNMENT_OF(T)); +#endif +}; + +} // namespace detail + +template struct alignment_of : public integral_constant::value>{}; + +// references have to be treated specially, assume +// that a reference is just a special pointer: +template struct alignment_of : public alignment_of{}; + +#ifdef BOOST_BORLANDC +// long double gives an incorrect value of 10 (!) +// unless we do this... +struct long_double_wrapper{ long double ld; }; +template<> struct alignment_of : public alignment_of{}; +#endif + +// void has to be treated specially: +template<> struct alignment_of : integral_constant{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct alignment_of : integral_constant{}; +template<> struct alignment_of : integral_constant{}; +template<> struct alignment_of : integral_constant{}; +#endif + +} // namespace boost + +#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x600) +#pragma option pop +#endif +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/alignment_traits.hpp b/Slang/boost/type_traits/alignment_traits.hpp new file mode 100644 index 0000000..2ed6934 --- /dev/null +++ b/Slang/boost/type_traits/alignment_traits.hpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED +#define BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED + +#include +#include + +#endif // BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/arithmetic_traits.hpp b/Slang/boost/type_traits/arithmetic_traits.hpp new file mode 100644 index 0000000..e4670e6 --- /dev/null +++ b/Slang/boost/type_traits/arithmetic_traits.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for arithmetic types: +// is_void, is_integral, is_float, is_arithmetic, is_fundamental. + +#ifndef BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED +#define BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#endif // BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/array_traits.hpp b/Slang/boost/type_traits/array_traits.hpp new file mode 100644 index 0000000..a68ae73 --- /dev/null +++ b/Slang/boost/type_traits/array_traits.hpp @@ -0,0 +1,15 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED +#define BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/broken_compiler_spec.hpp b/Slang/boost/type_traits/broken_compiler_spec.hpp new file mode 100644 index 0000000..030840f --- /dev/null +++ b/Slang/boost/type_traits/broken_compiler_spec.hpp @@ -0,0 +1,21 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_BROKEN_SPEC_HPP_INCLUDED +#define BOOST_TT_BROKEN_SPEC_HPP_INCLUDED + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (boost/type_traits/broken_compiler_spec.hpp) is deprecated") +#endif + +#endif // BOOST_TT_CONFIG_HPP_INCLUDED + + diff --git a/Slang/boost/type_traits/common_type.hpp b/Slang/boost/type_traits/common_type.hpp new file mode 100644 index 0000000..7136d3e --- /dev/null +++ b/Slang/boost/type_traits/common_type.hpp @@ -0,0 +1,152 @@ +#ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_COMMON_TYPE_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_DECLTYPE) +#include +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#include +#endif + +namespace boost +{ + +// variadic common_type + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +template struct common_type +{ +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + +template using common_type_t = typename common_type::type; + +namespace type_traits_detail +{ + +template using common_type_fold = common_type_t, T...>; + +} // namespace type_traits_detail + +template +struct common_type: type_traits_detail::mp_defer +{ +}; + +#else + +template +struct common_type: common_type::type, T...> +{ +}; + +#endif // !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + +#else + +template< + class T1 = void, class T2 = void, class T3 = void, + class T4 = void, class T5 = void, class T6 = void, + class T7 = void, class T8 = void, class T9 = void +> +struct common_type: common_type::type, T3, T4, T5, T6, T7, T8, T9> +{ +}; + +#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +// one argument + +template struct common_type: boost::decay +{ + BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value || ::boost::is_void::value || ::boost::is_array::value, "Arguments to common_type must both be complete types"); +}; + +// two arguments + +namespace type_traits_detail +{ + +// binary common_type + +#if !defined(BOOST_NO_CXX11_DECLTYPE) + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +#if !defined(BOOST_MSVC) || BOOST_MSVC > 1800 + +// internal compiler error on msvc-12.0 + +template using builtin_common_type = typename boost::decay()? boost::declval(): boost::declval() )>::type; + +template struct common_type_impl: mp_defer +{ +}; + +#else + +template using builtin_common_type = decltype( boost::declval()? boost::declval(): boost::declval() ); + +template struct common_type_impl_2: mp_defer +{ +}; + +template using decay_common_type = typename boost::decay::type>::type; + +template struct common_type_impl: mp_defer +{ +}; + +#endif // !defined(BOOST_MSVC) || BOOST_MSVC > 1800 + +#else + +template struct common_type_impl: boost::decay()? boost::declval(): boost::declval() )> +{ +}; + +#endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +#endif // #if !defined(BOOST_NO_CXX11_DECLTYPE) + +// decay helper + +template::type, class T2d = typename boost::decay::type> struct common_type_decay_helper: boost::common_type +{ +}; + +template struct common_type_decay_helper: common_type_impl +{ +}; + +} // type_traits_detail + +template struct common_type: type_traits_detail::common_type_decay_helper +{ + BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value || ::boost::is_void::value || ::boost::is_array::value, "Arguments to common_type must both be complete types"); + BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value || ::boost::is_void::value || ::boost::is_array::value, "Arguments to common_type must both be complete types"); +}; + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/composite_traits.hpp b/Slang/boost/type_traits/composite_traits.hpp new file mode 100644 index 0000000..985a4c5 --- /dev/null +++ b/Slang/boost/type_traits/composite_traits.hpp @@ -0,0 +1,29 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for composite types: +// is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union. +// + +#ifndef BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED +#define BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED + + + + + diff --git a/Slang/boost/type_traits/conditional.hpp b/Slang/boost/type_traits/conditional.hpp new file mode 100644 index 0000000..ec31d8b --- /dev/null +++ b/Slang/boost/type_traits/conditional.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED +#define BOOST_TT_CONDITIONAL_HPP_INCLUDED + +#include + +namespace boost { + +template struct conditional { typedef T type; }; +template struct conditional { typedef U type; }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using conditional_t = typename conditional::type; + +#endif + +} // namespace boost + + +#endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/config.hpp b/Slang/boost/type_traits/config.hpp new file mode 100644 index 0000000..47a0648 --- /dev/null +++ b/Slang/boost/type_traits/config.hpp @@ -0,0 +1,21 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_OLD_CONFIG_HPP_INCLUDED +#define BOOST_TT_OLD_CONFIG_HPP_INCLUDED + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (boost/type_traits/config.hpp) is deprecated") +#endif + +#endif // BOOST_TT_CONFIG_HPP_INCLUDED + + diff --git a/Slang/boost/type_traits/conjunction.hpp b/Slang/boost/type_traits/conjunction.hpp new file mode 100644 index 0000000..aa5440b --- /dev/null +++ b/Slang/boost/type_traits/conjunction.hpp @@ -0,0 +1,40 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_CONJUNCTION_HPP_INCLUDED +#define BOOST_TT_CONJUNCTION_HPP_INCLUDED + +#include +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#include +#endif + +namespace boost { + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +struct conjunction + : true_type { }; + +template +struct conjunction + : T { }; + +template +struct conjunction + : conditional, T>::type { }; +#else +template +struct conjunction + : conditional::type { }; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/conversion_traits.hpp b/Slang/boost/type_traits/conversion_traits.hpp new file mode 100644 index 0000000..c8e5139 --- /dev/null +++ b/Slang/boost/type_traits/conversion_traits.hpp @@ -0,0 +1,17 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED +#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/copy_cv.hpp b/Slang/boost/type_traits/copy_cv.hpp new file mode 100644 index 0000000..2f3dc37 --- /dev/null +++ b/Slang/boost/type_traits/copy_cv.hpp @@ -0,0 +1,40 @@ +#ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include + +namespace boost +{ + +template struct copy_cv +{ +private: + + typedef typename boost::conditional::value, typename boost::add_const::type, T>::type CT; + +public: + + typedef typename boost::conditional::value, typename boost::add_volatile::type, CT>::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using copy_cv_t = typename copy_cv::type; + +#endif + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_COPY_CV_HPP_INCLUDED diff --git a/Slang/boost/type_traits/copy_cv_ref.hpp b/Slang/boost/type_traits/copy_cv_ref.hpp new file mode 100644 index 0000000..59cbc66 --- /dev/null +++ b/Slang/boost/type_traits/copy_cv_ref.hpp @@ -0,0 +1,31 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@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) +*/ +#ifndef BOOST_TT_COPY_CV_REF_HPP_INCLUDED +#define BOOST_TT_COPY_CV_REF_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + +template +struct copy_cv_ref { + typedef typename copy_reference::type >::type, U>::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using copy_cv_ref_t = typename copy_cv_ref::type; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/copy_reference.hpp b/Slang/boost/type_traits/copy_reference.hpp new file mode 100644 index 0000000..0056681 --- /dev/null +++ b/Slang/boost/type_traits/copy_reference.hpp @@ -0,0 +1,35 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@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) +*/ +#ifndef BOOST_TT_COPY_REFERENCE_HPP_INCLUDED +#define BOOST_TT_COPY_REFERENCE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { + +template +struct copy_reference { + typedef typename conditional::value, + typename add_rvalue_reference::type, + typename conditional::value, + typename add_lvalue_reference::type, T>::type>::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using copy_reference_t = typename copy_reference::type; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/cv_traits.hpp b/Slang/boost/type_traits/cv_traits.hpp new file mode 100644 index 0000000..5bd6c4f --- /dev/null +++ b/Slang/boost/type_traits/cv_traits.hpp @@ -0,0 +1,24 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for cv-qualified types: +// is_const, is_volatile, remove_const, remove_volatile, remove_cv. + +#ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED +#define BOOST_TT_CV_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/decay.hpp b/Slang/boost/type_traits/decay.hpp new file mode 100644 index 0000000..5b28d05 --- /dev/null +++ b/Slang/boost/type_traits/decay.hpp @@ -0,0 +1,49 @@ +// (C) Copyright John Maddock & Thorsten Ottosen 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_DECAY_HPP_INCLUDED +#define BOOST_TT_DECAY_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace detail + { + + template struct decay_imp { typedef typename remove_cv::type type; }; + template struct decay_imp { typedef typename remove_bounds::type* type; }; + template struct decay_imp { typedef T* type; }; + + } + + template< class T > + struct decay + { + private: + typedef typename remove_reference::type Ty; + public: + typedef typename boost::detail::decay_imp::value, boost::is_function::value>::type type; + }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using decay_t = typename decay::type; + +#endif + +} // namespace boost + + +#endif // BOOST_TT_DECAY_HPP_INCLUDED diff --git a/Slang/boost/type_traits/declval.hpp b/Slang/boost/type_traits/declval.hpp new file mode 100644 index 0000000..a050012 --- /dev/null +++ b/Slang/boost/type_traits/declval.hpp @@ -0,0 +1,44 @@ +// declval.hpp -------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED + +#include + +//----------------------------------------------------------------------------// + +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.2.4 Function template declval [declval] // +// Written by Vicente J. Botet Escriba // +// // +// 1 The library provides the function template declval to simplify the +// definition of expressions which occur as unevaluated operands. +// 2 Remarks: If this function is used, the program is ill-formed. +// 3 Remarks: The template parameter T of declval may be an incomplete type. +// [ Example: +// +// template +// decltype(static_cast(declval())) convert(From&&); +// +// declares a function template convert which only participates in overloading +// if the type From can be explicitly converted to type To. For another example +// see class template common_type (20.9.7.6). -end example ] +//----------------------------------------------------------------------------// + +namespace boost { + + template + typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/bool_trait_def.hpp b/Slang/boost/type_traits/detail/bool_trait_def.hpp new file mode 100644 index 0000000..b6b0677 --- /dev/null +++ b/Slang/boost/type_traits/detail/bool_trait_def.hpp @@ -0,0 +1,179 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (bool_trait_def.hpp) is deprecated") +#endif + +#include +#include +#include + +// +// Unfortunately some libraries have started using this header without +// cleaning up afterwards: so we'd better undef the macros just in case +// they've been defined already.... +// +#ifdef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_C_BASE +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 +#endif + +#ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/ +#endif + +#ifndef BOOST_TT_AUX_BOOL_C_BASE +# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant +#endif + + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \ +template< typename T > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ +/**/ + + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \ +template< typename T1, typename T2 > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \ +template< typename T1, typename T2, typename T3 > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +\ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \ +template<> struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \ +template<> struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \ +template<> struct trait##_impl< sp > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \ +template<> struct trait##_impl< sp1,sp2 > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \ +template< param > struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \ +template< param1, param2 > struct trait< sp > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ +template< param > struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \ +template< param1, param2 > struct trait< sp1,sp2 > \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ +public:\ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ +}; \ +/**/ + +#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ +template< param > struct trait##_impl< sp1,sp2 > \ +{ \ +public:\ + BOOST_STATIC_CONSTANT(bool, value = (C)); \ +}; \ +/**/ + +#ifndef BOOST_NO_CV_SPECIALIZATIONS +# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp volatile,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const volatile,value) \ + /**/ +#else +# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ + BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ + /**/ +#endif diff --git a/Slang/boost/type_traits/detail/bool_trait_undef.hpp b/Slang/boost/type_traits/detail/bool_trait_undef.hpp new file mode 100644 index 0000000..4ac61ef --- /dev/null +++ b/Slang/boost/type_traits/detail/bool_trait_undef.hpp @@ -0,0 +1,28 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Source$ +// $Date$ +// $Revision$ + +#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL +#undef BOOST_TT_AUX_BOOL_C_BASE +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 +#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 +#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 +#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 diff --git a/Slang/boost/type_traits/detail/common_arithmetic_type.hpp b/Slang/boost/type_traits/detail/common_arithmetic_type.hpp new file mode 100644 index 0000000..1a76e16 --- /dev/null +++ b/Slang/boost/type_traits/detail/common_arithmetic_type.hpp @@ -0,0 +1,220 @@ +#ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_ARITHMETIC_TYPE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DETAIL_COMMON_ARITHMETIC_TYPE_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 + +namespace boost +{ + +namespace type_traits_detail +{ + +template struct arithmetic_type; + +// Types bool, char, char16_t, char32_t, wchar_t, +// and the signed and unsigned integer types are +// collectively called integral types + +template<> struct arithmetic_type<1> +{ + typedef bool type; + typedef char (&result_type) [1]; +}; + +template<> struct arithmetic_type<2> +{ + typedef char type; + typedef char (&result_type) [2]; +}; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + +template<> struct arithmetic_type<3> +{ + typedef wchar_t type; + typedef char (&result_type) [3]; +}; + +#endif + +// There are five standard signed integer types: +// "signed char", "short int", "int", "long int", and "long long int". + +template<> struct arithmetic_type<4> +{ + typedef signed char type; + typedef char (&result_type) [4]; +}; + +template<> struct arithmetic_type<5> +{ + typedef short type; + typedef char (&result_type) [5]; +}; + +template<> struct arithmetic_type<6> +{ + typedef int type; + typedef char (&result_type) [6]; +}; + +template<> struct arithmetic_type<7> +{ + typedef long type; + typedef char (&result_type) [7]; +}; + +template<> struct arithmetic_type<8> +{ + typedef boost::long_long_type type; + typedef char (&result_type) [8]; +}; + +// For each of the standard signed integer types, there exists a corresponding +// (but different) standard unsigned integer type: "unsigned char", "unsigned short int", +// "unsigned int", "unsigned long int", and "unsigned long long int" + +template<> struct arithmetic_type<9> +{ + typedef unsigned char type; + typedef char (&result_type) [9]; +}; + +template<> struct arithmetic_type<10> +{ + typedef unsigned short type; + typedef char (&result_type) [10]; +}; + +template<> struct arithmetic_type<11> +{ + typedef unsigned int type; + typedef char (&result_type) [11]; +}; + +template<> struct arithmetic_type<12> +{ + typedef unsigned long type; + typedef char (&result_type) [12]; +}; + +template<> struct arithmetic_type<13> +{ + typedef boost::ulong_long_type type; + typedef char (&result_type) [13]; +}; + +// There are three floating point types: float, double, and long double. + +template<> struct arithmetic_type<14> +{ + typedef float type; + typedef char (&result_type) [14]; +}; + +template<> struct arithmetic_type<15> +{ + typedef double type; + typedef char (&result_type) [15]; +}; + +template<> struct arithmetic_type<16> +{ + typedef long double type; + typedef char (&result_type) [16]; +}; + +#if !defined( BOOST_NO_CXX11_CHAR16_T ) + +template<> struct arithmetic_type<17> +{ + typedef char16_t type; + typedef char (&result_type) [17]; +}; + +#endif + +#if !defined( BOOST_NO_CXX11_CHAR32_T ) + +template<> struct arithmetic_type<18> +{ + typedef char32_t type; + typedef char (&result_type) [18]; +}; + +#endif + +#if defined( BOOST_HAS_INT128 ) + +template<> struct arithmetic_type<19> +{ + typedef boost::int128_type type; + typedef char (&result_type) [19]; +}; + +template<> struct arithmetic_type<20> +{ + typedef boost::uint128_type type; + typedef char (&result_type) [20]; +}; + +#endif + +template class common_arithmetic_type +{ +private: + + static arithmetic_type<1>::result_type select( arithmetic_type<1>::type ); + static arithmetic_type<2>::result_type select( arithmetic_type<2>::type ); +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + static arithmetic_type<3>::result_type select( arithmetic_type<3>::type ); +#endif + static arithmetic_type<4>::result_type select( arithmetic_type<4>::type ); + static arithmetic_type<5>::result_type select( arithmetic_type<5>::type ); + static arithmetic_type<6>::result_type select( arithmetic_type<6>::type ); + static arithmetic_type<7>::result_type select( arithmetic_type<7>::type ); + static arithmetic_type<8>::result_type select( arithmetic_type<8>::type ); + static arithmetic_type<9>::result_type select( arithmetic_type<9>::type ); + static arithmetic_type<10>::result_type select( arithmetic_type<10>::type ); + static arithmetic_type<11>::result_type select( arithmetic_type<11>::type ); + static arithmetic_type<12>::result_type select( arithmetic_type<12>::type ); + static arithmetic_type<13>::result_type select( arithmetic_type<13>::type ); + static arithmetic_type<14>::result_type select( arithmetic_type<14>::type ); + static arithmetic_type<15>::result_type select( arithmetic_type<15>::type ); + static arithmetic_type<16>::result_type select( arithmetic_type<16>::type ); + +#if !defined( BOOST_NO_CXX11_CHAR16_T ) + static arithmetic_type<17>::result_type select( arithmetic_type<17>::type ); +#endif + +#if !defined( BOOST_NO_CXX11_CHAR32_T ) + static arithmetic_type<18>::result_type select( arithmetic_type<18>::type ); +#endif + +#if defined( BOOST_HAS_INT128 ) + static arithmetic_type<19>::result_type select( arithmetic_type<19>::type ); + static arithmetic_type<20>::result_type select( arithmetic_type<20>::type ); +#endif + + static bool cond(); + + BOOST_STATIC_CONSTANT(int, selector = sizeof(select(cond() ? T() : U()))); + +public: + + typedef typename arithmetic_type::type type; +}; + +} // namespace type_traits_detail + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_ARITHMETIC_TYPE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/common_type_impl.hpp b/Slang/boost/type_traits/detail/common_type_impl.hpp new file mode 100644 index 0000000..53a634d --- /dev/null +++ b/Slang/boost/type_traits/detail/common_type_impl.hpp @@ -0,0 +1,107 @@ +#ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMPL_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMPL_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +namespace type_traits_detail +{ + +// the arguments to common_type_impl have already been passed through decay<> + +template struct common_type_impl; + +// same type + +template struct common_type_impl +{ + typedef T type; +}; + +// one of the operands is a class type, try conversions in both directions + +template struct ct_class +{ + BOOST_STATIC_CONSTANT( bool, ct = boost::is_class::value || boost::is_union::value ); + BOOST_STATIC_CONSTANT( bool, cu = boost::is_class::value || boost::is_union::value ); + + BOOST_STATIC_CONSTANT( bool, value = ct || cu ); +}; + +template struct common_type_impl3; + +template struct common_type_class: public boost::conditional< + + boost::is_convertible::value && !boost::is_convertible::value, + boost::type_identity, + + typename boost::conditional< + + boost::is_convertible::value && !boost::is_convertible::value, + boost::type_identity, + + common_type_impl3 + >::type +>::type +{ +}; + +template struct common_type_impl: public boost::conditional< + ct_class::value, + common_type_class, + common_type_impl3 >::type +{ +}; + +// pointers + +template struct common_type_impl4; + +template struct common_type_impl3: public boost::conditional< + boost::is_pointer::value || boost::is_pointer::value, + composite_pointer_type, + common_type_impl4 >::type +{ +}; + +// pointers to members + +template struct common_type_impl5; + +template struct common_type_impl4: public boost::conditional< + boost::is_member_pointer::value || boost::is_member_pointer::value, + composite_member_pointer_type, + common_type_impl5 >::type +{ +}; + +// arithmetic types (including class types w/ conversions to arithmetic and enums) + +template struct common_type_impl5: public common_arithmetic_type +{ +}; + +} // namespace type_traits_detail + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMPL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/composite_member_pointer_type.hpp b/Slang/boost/type_traits/detail/composite_member_pointer_type.hpp new file mode 100644 index 0000000..a747ee4 --- /dev/null +++ b/Slang/boost/type_traits/detail/composite_member_pointer_type.hpp @@ -0,0 +1,113 @@ +#ifndef BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_MEMBER_POINTER_TYPE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_MEMBER_POINTER_TYPE_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include +#include + +namespace boost +{ + +namespace type_traits_detail +{ + +template struct composite_member_pointer_type; + +// nullptr_t + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + +template struct composite_member_pointer_type +{ + typedef T C::* type; +}; + +template struct composite_member_pointer_type +{ + typedef T C::* type; +}; + +template<> struct composite_member_pointer_type +{ + typedef decltype(nullptr) type; +}; + +#else + +template struct composite_member_pointer_type +{ + typedef T C::* type; +}; + +template struct composite_member_pointer_type +{ + typedef T C::* type; +}; + +template<> struct composite_member_pointer_type +{ + typedef std::nullptr_t type; +}; + +#endif + +#endif // !defined( BOOST_NO_CXX11_NULLPTR ) + +template struct common_member_class; + +template struct common_member_class +{ + typedef C type; +}; + +template struct common_member_class +{ + typedef typename boost::conditional< + + boost::is_base_of::value, + C2, + typename boost::conditional::value, C1, void>::type + + >::type type; +}; + +//This indirection avoids compilation errors on some older +//compilers like MSVC 7.1 +template +struct common_member_class_pointer_to_member +{ + typedef CT CB::* type; +}; + +template struct composite_member_pointer_type +{ +private: + + typedef typename composite_pointer_type::type CPT; + typedef typename boost::remove_pointer::type CT; + + typedef typename common_member_class::type CB; + +public: + + typedef typename common_member_class_pointer_to_member::type type; +}; + +} // namespace type_traits_detail + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_MEMBER_POINTER_TYPE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/composite_pointer_type.hpp b/Slang/boost/type_traits/detail/composite_pointer_type.hpp new file mode 100644 index 0000000..ae21e18 --- /dev/null +++ b/Slang/boost/type_traits/detail/composite_pointer_type.hpp @@ -0,0 +1,153 @@ +#ifndef BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_POINTER_TYPE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_POINTER_TYPE_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include +#include +#include + +namespace boost +{ + +namespace type_traits_detail +{ + +template struct composite_pointer_type; + +// same type + +template struct composite_pointer_type +{ + typedef T* type; +}; + +// nullptr_t + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + +template struct composite_pointer_type +{ + typedef T* type; +}; + +template struct composite_pointer_type +{ + typedef T* type; +}; + +template<> struct composite_pointer_type +{ + typedef decltype(nullptr) type; +}; + +#else + +template struct composite_pointer_type +{ + typedef T* type; +}; + +template struct composite_pointer_type +{ + typedef T* type; +}; + +template<> struct composite_pointer_type +{ + typedef std::nullptr_t type; +}; + +#endif + +#endif // !defined( BOOST_NO_CXX11_NULLPTR ) + +namespace detail +{ + +template struct has_common_pointee +{ +private: + + typedef typename boost::remove_cv::type T2; + typedef typename boost::remove_cv::type U2; + +public: + + BOOST_STATIC_CONSTANT( bool, value = + (boost::is_same::value) + || boost::is_void::value + || boost::is_void::value + || (boost::is_base_of::value) + || (boost::is_base_of::value) ); +}; + +template struct common_pointee +{ +private: + + typedef typename boost::remove_cv::type T2; + typedef typename boost::remove_cv::type U2; + +public: + + typedef typename boost::conditional< + + boost::is_same::value || boost::is_void::value || boost::is_base_of::value, + typename boost::copy_cv::type, + typename boost::copy_cv::type + + >::type type; +}; + +template struct composite_pointer_impl +{ +private: + + typedef typename boost::remove_cv::type T2; + typedef typename boost::remove_cv::type U2; + +public: + + typedef typename boost::copy_cv::type const, T>::type, U>::type type; +}; + +//Old compilers like MSVC-7.1 have problems using boost::conditional in +//composite_pointer_type. Partially specializing on has_common_pointee::value +//seems to make their life easier +template::value > +struct composite_pointer_type_dispatch + : common_pointee +{}; + +template +struct composite_pointer_type_dispatch + : composite_pointer_impl +{}; + + +} // detail + + +template struct composite_pointer_type +{ + typedef typename detail::composite_pointer_type_dispatch::type* type; +}; + +} // namespace type_traits_detail + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_COMPOSITE_POINTER_TYPE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/config.hpp b/Slang/boost/type_traits/detail/config.hpp new file mode 100644 index 0000000..8ac3b4a --- /dev/null +++ b/Slang/boost/type_traits/detail/config.hpp @@ -0,0 +1,113 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#define BOOST_TT_CONFIG_HPP_INCLUDED + +#ifndef BOOST_CONFIG_HPP +#include +#endif +#include +#include + +// +// whenever we have a conversion function with ellipses +// it needs to be declared __cdecl to suppress compiler +// warnings from MS and Borland compilers (this *must* +// appear before we include is_same.hpp below): +#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && !defined(BOOST_DISABLE_WIN32)) +# define BOOST_TT_DECL __cdecl +#else +# define BOOST_TT_DECL /**/ +#endif + +# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ + || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ + || BOOST_WORKAROUND(BOOST_BORLANDC, < 0x5A0) \ + || defined(__ghs) \ + || BOOST_WORKAROUND(__HP_aCC, < 60700) \ + || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ + && defined(BOOST_NO_IS_ABSTRACT) + +# define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 + +#endif + +#ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION +# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 +#endif + +// +// define BOOST_TT_TEST_MS_FUNC_SIGS +// when we want to test __stdcall etc function types with is_function etc +// (Note, does not work with Borland, even though it does support __stdcall etc): +// +#if defined(_MSC_EXTENSIONS) && !defined(BOOST_BORLANDC) +# define BOOST_TT_TEST_MS_FUNC_SIGS +#endif + +// +// define BOOST_TT_NO_CV_FUNC_TEST +// if tests for cv-qualified member functions don't +// work in is_member_function_pointer +// +#if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600) +# define BOOST_TT_NO_CV_FUNC_TEST +#endif + +// +// Macros that have been deprecated, defined here for backwards compatibility: +// +#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) +#define BOOST_TT_BROKEN_COMPILER_SPEC(x) + +// +// Can we implement "accurate" binary operator detection: +// +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900) +# define BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION +#endif + +#if defined(__clang__) && (__clang_major__ == 3) && (__clang_minor__ < 2) && defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) +#undef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION +#endif + +// +// Can we implement accurate is_function/is_member_function_pointer (post C++03)? +// +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40805)\ + && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4) +# define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION +#endif + +#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703) +# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM +#endif +#if defined(__APPLE_CC__) && defined(__clang_major__) && (__clang_major__ == 9) && (__clang_minor__ == 0) +# define BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif +// +// If we have the SD6 macros (check for C++11's __cpp_rvalue_references), and we don't have __cpp_noexcept_function_type +// set, then don't treat noexcept functions as seperate types. This is a fix for msvc with the /Zc:noexceptTypes- flag set. +// +#if defined(__cpp_rvalue_references) && !defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif +// +// Check MSVC specific macro on older msvc compilers that don't support the SD6 macros, we don't rely on this +// if the SD6 macros *are* available as it appears to be undocumented. +// +#if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED) +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif + +#endif // BOOST_TT_CONFIG_HPP_INCLUDED + + diff --git a/Slang/boost/type_traits/detail/detector.hpp b/Slang/boost/type_traits/detail/detector.hpp new file mode 100644 index 0000000..f13a1f9 --- /dev/null +++ b/Slang/boost/type_traits/detail/detector.hpp @@ -0,0 +1,37 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_DETAIL_DETECTOR_HPP_INCLUDED +#define BOOST_TT_DETAIL_DETECTOR_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace detail { + +template +using detector_t = typename boost::make_void::type; + +template class, class...> +struct detector { + using value_t = boost::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector >, Op, Args...> { + using value_t = boost::true_type; + using type = Op; +}; + +} /* detail */ +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/detail/has_binary_operator.hpp b/Slang/boost/type_traits/detail/has_binary_operator.hpp new file mode 100644 index 0000000..7e74705 --- /dev/null +++ b/Slang/boost/type_traits/detail/has_binary_operator.hpp @@ -0,0 +1,279 @@ +// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 4133) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)::type>() BOOST_TT_TRAIT_OP std::declval::type>())>::type> + : public boost::integral_constant::type>() BOOST_TT_TRAIT_OP std::declval::type>()), Ret>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)::type>() BOOST_TT_TRAIT_OP std::declval::type>())>::type> + : public boost::integral_constant::type>() BOOST_TT_TRAIT_OP std::declval::type>())>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)::type>() BOOST_TT_TRAIT_OP std::declval::type>())>::type> + : public boost::true_type {}; + + } + + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail:: BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) {}; + + +} + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace detail { + +// This namespace ensures that argument-dependent name lookup does not mess things up. +namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { + +// 1. a function to have an instance of type T without requiring T to be default +// constructible +template T &make(); + + +// 2. we provide our operator definition for types that do not have one already + +// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is +// found in the type's own namespace (our own operator is used) so that we have +// a means to know that our operator was used +struct no_operator { }; + +// this class allows implicit conversions and makes the following operator +// definition less-preferred than any other such operators that might be found +// via argument-dependent name lookup +struct any { template any(T const&); }; + +// when operator BOOST_TT_TRAIT_OP is not available, this one is used +no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&); + + +// 3. checks if the operator returns void or not +// conditions: Lhs!=void and Rhs!=void + +// we first redefine "operator," so that we have no compilation error if +// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of +// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if +// operator BOOST_TT_TRAIT_OP returns void or not: +// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t +// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int +struct returns_void_t { }; +template int operator,(const T&, returns_void_t); +template int operator,(const volatile T&, returns_void_t); + +// this intermediate trait has member value of type bool: +// - value==true -> operator BOOST_TT_TRAIT_OP returns void +// - value==false -> operator BOOST_TT_TRAIT_OP does not return void +template < typename Lhs, typename Rhs > +struct operator_returns_void { + // overloads of function returns_void make the difference + // yes_type and no_type have different size by construction + static ::boost::type_traits::yes_type returns_void(returns_void_t); + static ::boost::type_traits::no_type returns_void(int); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP make(),returns_void_t()))))); +}; + + +// 4. checks if the return type is Ret or Ret==dont_care +// conditions: Lhs!=void and Rhs!=void + +struct dont_care { }; + +template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > +struct operator_returns_Ret; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs, typename Rhs > +struct operator_returns_Ret < Lhs, Rhs, void, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// otherwise checks if it is convertible to Ret using the sizeof trick +// based on overload resolution +// condition: Ret!=void and Ret!=dont_care and the operator does not return void +template < typename Lhs, typename Rhs, typename Ret > +struct operator_returns_Ret < Lhs, Rhs, Ret, false > { + static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret + static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 5. checks for operator existence +// condition: Lhs!=void and Rhs!=void + +// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other +// existing one; +// this is done with redefinition of "operator," that returns no_operator or has_operator +struct has_operator { }; +no_operator operator,(no_operator, has_operator); + +template < typename Lhs, typename Rhs > +struct operator_exists { + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 6. main trait: to avoid any compilation error, this class behaves +// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the +// standard. +// Forbidden_if is a bool that is: +// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard +// (would yield compilation error if used) +// - false otherwise +template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > +struct trait_impl1; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl1 < Lhs, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, + value = (operator_exists < Lhs, Rhs >::value && operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value)); +}; + +// some specializations needs to be declared for the special void case +template < typename Rhs, typename Ret > +struct trait_impl1 < void, Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Ret > +struct trait_impl1 < Lhs, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Ret > +struct trait_impl1 < void, void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// defines some typedef for convenience +template < typename Lhs, typename Rhs, typename Ret > +struct trait_impl { + typedef typename ::boost::remove_reference::type Lhs_noref; + typedef typename ::boost::remove_reference::type Rhs_noref; + typedef typename ::boost::remove_cv::type Lhs_nocv; + typedef typename ::boost::remove_cv::type Rhs_nocv; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; + BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); +}; + +} // namespace impl +} // namespace detail + +// this is the accessible definition of the trait to end user +template +struct BOOST_TT_TRAIT_NAME : public integral_constant::value)>{}; + +} // namespace boost + +#endif + +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif + diff --git a/Slang/boost/type_traits/detail/has_postfix_operator.hpp b/Slang/boost/type_traits/detail/has_postfix_operator.hpp new file mode 100644 index 0000000..d900acd --- /dev/null +++ b/Slang/boost/type_traits/detail/has_postfix_operator.hpp @@ -0,0 +1,250 @@ +// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#include +#include + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)::type>() BOOST_TT_TRAIT_OP) >::type> + : public boost::integral_constant::type>() BOOST_TT_TRAIT_OP), Ret>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)::type>()BOOST_TT_TRAIT_OP)>::type> + : public boost::integral_constant::type>() BOOST_TT_TRAIT_OP)>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)::type>() BOOST_TT_TRAIT_OP)>::type> + : public boost::true_type {}; + + } + + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) {}; + + +} + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// avoid warnings +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4244 4913 4800) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +namespace boost { +namespace detail { + +// This namespace ensures that argument-dependent name lookup does not mess things up. +namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { + +// 1. a function to have an instance of type T without requiring T to be default +// constructible +template T &make(); + + +// 2. we provide our operator definition for types that do not have one already + +// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is +// found in the type's own namespace (our own operator is used) so that we have +// a means to know that our operator was used +struct no_operator { }; + +// this class allows implicit conversions and makes the following operator +// definition less-preferred than any other such operators that might be found +// via argument-dependent name lookup +struct any { template any(T const&); }; + +// when operator BOOST_TT_TRAIT_OP is not available, this one is used +no_operator operator BOOST_TT_TRAIT_OP (const any&, int); + + +// 3. checks if the operator returns void or not +// conditions: Lhs!=void + +// we first redefine "operator," so that we have no compilation error if +// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of +// (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if +// operator BOOST_TT_TRAIT_OP returns void or not: +// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t +// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int +struct returns_void_t { }; +template int operator,(const T&, returns_void_t); +template int operator,(const volatile T&, returns_void_t); + +// this intermediate trait has member value of type bool: +// - value==true -> operator BOOST_TT_TRAIT_OP returns void +// - value==false -> operator BOOST_TT_TRAIT_OP does not return void +template < typename Lhs > +struct operator_returns_void { + // overloads of function returns_void make the difference + // yes_type and no_type have different size by construction + static ::boost::type_traits::yes_type returns_void(returns_void_t); + static ::boost::type_traits::no_type returns_void(int); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP,returns_void_t()))))); +}; + + +// 4. checks if the return type is Ret or Ret==dont_care +// conditions: Lhs!=void + +struct dont_care { }; + +template < typename Lhs, typename Ret, bool Returns_void > +struct operator_returns_Ret; + +template < typename Lhs > +struct operator_returns_Ret < Lhs, dont_care, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs > +struct operator_returns_Ret < Lhs, dont_care, false > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs > +struct operator_returns_Ret < Lhs, void, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Lhs > +struct operator_returns_Ret < Lhs, void, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Ret > +struct operator_returns_Ret < Lhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// otherwise checks if it is convertible to Ret using the sizeof trick +// based on overload resolution +// condition: Ret!=void and Ret!=dont_care and the operator does not return void +template < typename Lhs, typename Ret > +struct operator_returns_Ret < Lhs, Ret, false > { + static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret + static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 5. checks for operator existence +// condition: Lhs!=void + +// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other +// existing one; +// this is done with redefinition of "operator," that returns no_operator or has_operator +struct has_operator { }; +no_operator operator,(no_operator, has_operator); + +template < typename Lhs > +struct operator_exists { + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 6. main trait: to avoid any compilation error, this class behaves +// differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the +// standard. +// Forbidden_if is a bool that is: +// - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard +// (would yield compilation error if used) +// - false otherwise +template < typename Lhs, typename Ret, bool Forbidden_if > +struct trait_impl1; + +template < typename Lhs, typename Ret > +struct trait_impl1 < Lhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Lhs, typename Ret > +struct trait_impl1 < Lhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, + value = (operator_exists < Lhs >::value && operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value)); +}; + +// specialization needs to be declared for the special void case +template < typename Ret > +struct trait_impl1 < void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// defines some typedef for convenience +template < typename Lhs, typename Ret > +struct trait_impl { + typedef typename ::boost::remove_reference::type Lhs_noref; + typedef typename ::boost::remove_cv::type Lhs_nocv; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; + BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); +}; + +} // namespace impl +} // namespace detail + +// this is the accessible definition of the trait to end user +template +struct BOOST_TT_TRAIT_NAME : public integral_constant::value)>{}; + +} // namespace boost + +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif + +#endif diff --git a/Slang/boost/type_traits/detail/has_prefix_operator.hpp b/Slang/boost/type_traits/detail/has_prefix_operator.hpp new file mode 100644 index 0000000..77818c2 --- /dev/null +++ b/Slang/boost/type_traits/detail/has_prefix_operator.hpp @@ -0,0 +1,280 @@ +// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#include +#include + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_GCC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif +#if defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4804) +#endif + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)::type>()) >::type> + : public boost::integral_constant::type>() ), Ret>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)::type>())>::type> + : public boost::integral_constant::type>())>::value> {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {}; + + template + struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)::type>() )>::type> + : public boost::true_type {}; + + } + + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) {}; + template + struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) {}; + + +} + +#ifdef BOOST_GCC +#pragma GCC diagnostic pop +#endif +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4146: unary minus operator applied to unsigned type, result still unsigned +// warning C4804: '-' : unsafe use of type 'bool' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4146 4804 4913 4244 4800) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +# if BOOST_WORKAROUND(_MSC_VER, >= 1913) +# pragma warning ( disable : 4834) +# endif +#endif + + + +namespace boost { +namespace detail { + +// This namespace ensures that argument-dependent name lookup does not mess things up. +namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { + +// 1. a function to have an instance of type T without requiring T to be default +// constructible +template T &make(); + + +// 2. we provide our operator definition for types that do not have one already + +// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is +// found in the type's own namespace (our own operator is used) so that we have +// a means to know that our operator was used +struct no_operator { }; + +// this class allows implicit conversions and makes the following operator +// definition less-preferred than any other such operators that might be found +// via argument-dependent name lookup +struct any { template any(T const&); }; + +// when operator BOOST_TT_TRAIT_OP is not available, this one is used +no_operator operator BOOST_TT_TRAIT_OP (const any&); + + +// 3. checks if the operator returns void or not +// conditions: Rhs!=void + +// we first redefine "operator," so that we have no compilation error if +// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of +// (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if +// operator BOOST_TT_TRAIT_OP returns void or not: +// - operator BOOST_TT_TRAIT_OP returns void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t +// - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int +struct returns_void_t { }; +template int operator,(const T&, returns_void_t); +template int operator,(const volatile T&, returns_void_t); + +// this intermediate trait has member value of type bool: +// - value==true -> operator BOOST_TT_TRAIT_OP returns void +// - value==false -> operator BOOST_TT_TRAIT_OP does not return void +template < typename Rhs > +struct operator_returns_void { + // overloads of function returns_void make the difference + // yes_type and no_type have different size by construction + static ::boost::type_traits::yes_type returns_void(returns_void_t); + static ::boost::type_traits::no_type returns_void(int); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make(),returns_void_t()))))); +}; + + +// 4. checks if the return type is Ret or Ret==dont_care +// conditions: Rhs!=void + +struct dont_care { }; + +template < typename Rhs, typename Ret, bool Returns_void > +struct operator_returns_Ret; + +template < typename Rhs > +struct operator_returns_Ret < Rhs, dont_care, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Rhs > +struct operator_returns_Ret < Rhs, dont_care, false > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Rhs > +struct operator_returns_Ret < Rhs, void, true > { + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template < typename Rhs > +struct operator_returns_Ret < Rhs, void, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Rhs, typename Ret > +struct operator_returns_Ret < Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// otherwise checks if it is convertible to Ret using the sizeof trick +// based on overload resolution +// condition: Ret!=void and Ret!=dont_care and the operator does not return void +template < typename Rhs, typename Ret > +struct operator_returns_Ret < Rhs, Ret, false > { + static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret + static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 5. checks for operator existence +// condition: Rhs!=void + +// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other +// existing one; +// this is done with redefinition of "operator," that returns no_operator or has_operator +struct has_operator { }; +no_operator operator,(no_operator, has_operator); + +template < typename Rhs > +struct operator_exists { + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise + + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); +}; + + +// 6. main trait: to avoid any compilation error, this class behaves +// differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the +// standard. +// Forbidden_if is a bool that is: +// - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard +// (would yield compilation error if used) +// - false otherwise +template < typename Rhs, typename Ret, bool Forbidden_if > +struct trait_impl1; + +template < typename Rhs, typename Ret > +struct trait_impl1 < Rhs, Ret, true > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template < typename Rhs, typename Ret > +struct trait_impl1 < Rhs, Ret, false > { + BOOST_STATIC_CONSTANT(bool, + value = (operator_exists < Rhs >::value && operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value)); +}; + +// specialization needs to be declared for the special void case +template < typename Ret > +struct trait_impl1 < void, Ret, false > { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +// defines some typedef for convenience +template < typename Rhs, typename Ret > +struct trait_impl { + typedef typename ::boost::remove_reference::type Rhs_noref; + typedef typename ::boost::remove_cv::type Rhs_nocv; + typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; + BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); +}; + +} // namespace impl +} // namespace detail + +// this is the accessible definition of the trait to end user +template +struct BOOST_TT_TRAIT_NAME : public integral_constant::value)>{}; + +} // namespace boost + +#if defined(BOOST_MSVC) +# pragma warning ( pop ) +#endif + +#endif + diff --git a/Slang/boost/type_traits/detail/ice_and.hpp b/Slang/boost/type_traits/detail/ice_and.hpp new file mode 100644 index 0000000..3ccb03e --- /dev/null +++ b/Slang/boost/type_traits/detail/ice_and.hpp @@ -0,0 +1,42 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED + +#include + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated") +#endif + +namespace boost { +namespace type_traits { + +template +struct ice_and; + +template +struct ice_and +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template <> +struct ice_and +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/ice_eq.hpp b/Slang/boost/type_traits/detail/ice_eq.hpp new file mode 100644 index 0000000..5908f81 --- /dev/null +++ b/Slang/boost/type_traits/detail/ice_eq.hpp @@ -0,0 +1,43 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED + +#include + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (ice_eq.hpp) is deprecated") +#endif + +namespace boost { +namespace type_traits { + +template +struct ice_eq +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 == b2)); +}; + +template +struct ice_ne +{ + BOOST_STATIC_CONSTANT(bool, value = (b1 != b2)); +}; + +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +template bool const ice_eq::value; +template bool const ice_ne::value; +#endif + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/ice_not.hpp b/Slang/boost/type_traits/detail/ice_not.hpp new file mode 100644 index 0000000..e095be9 --- /dev/null +++ b/Slang/boost/type_traits/detail/ice_not.hpp @@ -0,0 +1,38 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED + +#include + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (ice_not.hpp) is deprecated") +#endif + +namespace boost { +namespace type_traits { + +template +struct ice_not +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template <> +struct ice_not +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/ice_or.hpp b/Slang/boost/type_traits/detail/ice_or.hpp new file mode 100644 index 0000000..ea523c8 --- /dev/null +++ b/Slang/boost/type_traits/detail/ice_or.hpp @@ -0,0 +1,41 @@ +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED +#define BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED + +#include + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (ice_or.hpp) is deprecated") +#endif + +namespace boost { +namespace type_traits { + +template +struct ice_or; + +template +struct ice_or +{ + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template <> +struct ice_or +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/is_function_cxx_03.hpp b/Slang/boost/type_traits/detail/is_function_cxx_03.hpp new file mode 100644 index 0000000..1b6169a --- /dev/null +++ b/Slang/boost/type_traits/detail/is_function_cxx_03.hpp @@ -0,0 +1,108 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED + +#include + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +# include +#else +# include +# include +#endif + +// is a type a function? +// Please note that this implementation is unnecessarily complex: +// we could just use !is_convertible::value, +// except that some compilers erroneously allow conversions from +// function pointers to void*. + +namespace boost { + +#if !defined( BOOST_CODEGEARC ) + +namespace detail { + +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +template +struct is_function_chooser +{ + template< typename T > struct result_ + : public false_type {}; +}; + +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : public ::boost::type_traits::is_function_ptr_helper {}; +}; + +template +struct is_function_impl + : public is_function_chooser< ::boost::is_reference::value > + ::BOOST_NESTED_TEMPLATE result_ +{ +}; + +#else + +template +struct is_function_impl +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* t; + BOOST_STATIC_CONSTANT( + bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) + == sizeof(::boost::type_traits::yes_type) + ); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +template +struct is_function_impl : public false_type +{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_function_impl : public false_type +{}; +#endif + +#endif + +} // namespace detail + +#endif // !defined( BOOST_CODEGEARC ) + +#if defined( BOOST_CODEGEARC ) +template struct is_function : integral_constant {}; +#else +template struct is_function : integral_constant::value> {}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_function : public false_type {}; +#endif +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1600) +template struct is_function : public false_type {}; +#endif +#endif +} // namespace boost + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700) +#include +#endif + +#endif // BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/is_function_cxx_11.hpp b/Slang/boost/type_traits/detail/is_function_cxx_11.hpp new file mode 100644 index 0000000..2dbe1de --- /dev/null +++ b/Slang/boost/type_traits/detail/is_function_cxx_11.hpp @@ -0,0 +1,676 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED + +#include + +namespace boost { + + template + struct is_function : public false_type {}; + +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) +#define BOOST_TT_NOEXCEPT_PARAM , bool NE +#define BOOST_TT_NOEXCEPT_DECL noexcept(NE) +#else +#define BOOST_TT_NOEXCEPT_PARAM +#define BOOST_TT_NOEXCEPT_DECL +#endif + +#ifdef _MSC_VER +#define BOOST_TT_DEF_CALL __cdecl +#else +#define BOOST_TT_DEF_CALL +#endif + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + // Reference qualified: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + // rvalue reference qualified: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_X64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: + +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + + // reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + + // rvalue reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + +#endif // _MSC_VER + + // All over again for msvc with noexcept: + +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) + +#undef BOOST_TT_NOEXCEPT_DECL +#define BOOST_TT_NOEXCEPT_DECL noexcept + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + // Reference qualified: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + // rvalue reference qualified: + +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const qualified: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // volatile: +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + // const volatile +#if !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif + template + struct is_function : public true_type {}; + + +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + + // reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + + // rvalue reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_function : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_function : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_function : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_function : public true_type {}; +#endif +#endif + +#endif // defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + +#endif + +} + +#undef BOOST_TT_NOEXCEPT_DECL +#undef BOOST_TT_NOEXCEPT_PARAM +#undef BOOST_TT_DEF_CALL + +#endif // BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/detail/is_function_msvc10_fix.hpp b/Slang/boost/type_traits/detail/is_function_msvc10_fix.hpp new file mode 100644 index 0000000..ec8ba9a --- /dev/null +++ b/Slang/boost/type_traits/detail/is_function_msvc10_fix.hpp @@ -0,0 +1,30 @@ + +// (C) Copyright John Maddock 2018. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_MSVC10_FIX_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_MSVC10_FIX_HPP_INCLUDED + +namespace boost { + +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; +template struct is_function : public false_type {}; + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/detail/is_function_ptr_helper.hpp b/Slang/boost/type_traits/detail/is_function_ptr_helper.hpp new file mode 100644 index 0000000..73a705c --- /dev/null +++ b/Slang/boost/type_traits/detail/is_function_ptr_helper.hpp @@ -0,0 +1,444 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Hide these #include from dependency analysers as +// these are required in maintenance mode only: +// +#define PP1 +#include PP1 +#undef PP1 +#define PP1 +#include PP1 +#undef PP1 +#define PP1 +#include PP1 +#undef PP1 +#endif + +namespace boost { +namespace type_traits { + +template +struct is_function_ptr_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// preprocessor-generated part, don't edit by hand! + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#if __cpp_noexcept_function_type +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#endif +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/Slang/boost/type_traits/detail/is_function_ptr_tester.hpp b/Slang/boost/type_traits/detail/is_function_ptr_tester.hpp new file mode 100644 index 0000000..1c8683c --- /dev/null +++ b/Slang/boost/type_traits/detail/is_function_ptr_tester.hpp @@ -0,0 +1,609 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Hide include dependencies from analysers since they're +// only require in maintenance mode: +// +#define PP1 +#define PP2 +#define PP3 +#include PP1 +#include PP2 +#include PP3 +#undef PP1 +#undef PP2 +#undef PP3 +#endif + +namespace boost { +namespace type_traits { + +// Note it is acceptable to use ellipsis here, since the argument will +// always be a pointer type of some sort (JM 2005/06/04): +no_type BOOST_TT_DECL is_function_ptr_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_function_ptr_tester(R(*)()); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)()); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)()); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)()); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)()); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +#endif +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R(*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...)); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R(__stdcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +#endif +#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R(__fastcall*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +#endif +template +yes_type is_function_ptr_tester(R(__cdecl*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +#endif +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_function_ptr_tester(R(__vectorcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER, T))); +@#endif +@#ifndef _MANAGED +template +yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif +template +yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/Slang/boost/type_traits/detail/is_likely_lambda.hpp b/Slang/boost/type_traits/detail/is_likely_lambda.hpp new file mode 100644 index 0000000..893b4ba --- /dev/null +++ b/Slang/boost/type_traits/detail/is_likely_lambda.hpp @@ -0,0 +1,95 @@ +/* Copyright 2017 Joaquin M Lopez Munoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/poly_collection for library home page. + */ + +#ifndef BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP +#define BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) +// +// We don't need or use this, just define a dummy class: +// +namespace boost{ namespace type_traits_detail{ + +template +struct is_likely_stateless_lambda : public false_type {}; + +}} + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900)\ + && !(BOOST_WORKAROUND(BOOST_MSVC, == 1900) && defined(_MANAGED)) + +#include +#include + +namespace boost{ + +namespace type_traits_detail{ + +/* Stateless lambda expressions have one (and only one) call operator and are + * convertible to a function pointer with the same signature. Non-lambda types + * could satisfy this too, hence the "likely" qualifier. + */ + +template +struct has_one_operator_call_helper +{ + template static boost::true_type test(decltype(&Q::operator())*); + template static boost::false_type test(...); + + using type=decltype(test(nullptr)); +}; + +template +using has_one_operator_call=typename has_one_operator_call_helper::type; + +template +struct equivalent_function_pointer +{ + template + static auto helper(R (Q::*)(Args...)const)->R(*)(Args...); + template + static auto helper(R (Q::*)(Args...))->R(*)(Args...); + + using type=decltype(helper(&T::operator())); +}; + +template +struct is_likely_stateless_lambda : false_type{}; + +template +struct is_likely_stateless_lambda< + T, + typename boost::enable_if_::value>::type> : + boost::is_convertible::type +>{}; + +} /* namespace type_traits_detail */ + +} /* namespace boost */ + +#else + // + // Can't implement this: + // +namespace boost { + namespace type_traits_detail { + + template + struct is_likely_stateless_lambda : public boost::integral_constant {}; +}} + +#endif +#endif + diff --git a/Slang/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/Slang/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp new file mode 100644 index 0000000..dcc6e2a --- /dev/null +++ b/Slang/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp @@ -0,0 +1,1328 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Maintenance mode, hide include dependencies +// from trackers: +// +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#endif + +namespace boost { +namespace type_traits { + +template +struct is_mem_fun_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#if __cpp_noexcept_function_type +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +#endif +#endif +#endif + +#else + +#undef BOOST_STATIC_CONSTANT +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif + +@#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#endif + +@#if __cpp_noexcept_function_type + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif + +@#if !defined(BOOST_TT_NO_CV_FUNC_TEST) +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; + +template +struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; +@#endif +@#endif + +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING + diff --git a/Slang/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/Slang/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp new file mode 100644 index 0000000..083a10f --- /dev/null +++ b/Slang/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp @@ -0,0 +1,1603 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED +#define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_TT_PREPROCESSING_MODE) +// +// Maintentance mode, hide include dependencies +// from dependency trackers: +// +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#define PPI +#include PPI +#undef PPI +#endif + +namespace boost { +namespace type_traits { + +no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...); + +#if !defined(BOOST_TT_PREPROCESSING_MODE) +// pre-processed code, don't edit, try GNU cpp with +// cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename + +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)()); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)() const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)()); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)() const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)()); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)() const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)()); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)() const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)()); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)() const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile); +#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...)); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) const); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) volatile); +template +yes_type is_mem_fun_pointer_tester(R(T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 ...) const volatile); +#endif +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__stdcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile); +#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__vectorcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile); +#endif +#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__fastcall T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile); +#endif +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) volatile); +template +yes_type is_mem_fun_pointer_tester(R(__cdecl T::*const volatile*)(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24) const volatile); +#endif + +#else + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")) +#include BOOST_PP_ITERATE() + +#endif // BOOST_TT_PREPROCESSING_MODE + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED + +///// iteration + +#else +#define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) +#undef __stdcall +#undef __fastcall +#undef __cdecl + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); +@#endif +@#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers: +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); +@#if (_MSC_VER >= 1800) && !defined(_MANAGED) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +template +yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__vectorcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); +@#endif +@#ifndef _MANAGED +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); + +template +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); + +@#endif + +#undef BOOST_PP_COUNTER +#endif // BOOST_PP_IS_ITERATING diff --git a/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp b/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp new file mode 100644 index 0000000..7dbee1d --- /dev/null +++ b/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp @@ -0,0 +1,117 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED + +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + // + // Note: we use the "workaround" version for MSVC because it works for + // __stdcall etc function types, where as the partial specialisation + // version does not do so. + // +# include +# include +# include +#else +# include +# include +# include +# include +#endif + +namespace boost { + +#if defined( BOOST_CODEGEARC ) +template struct is_member_function_pointer : public integral_constant {}; +#elif !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) + +template struct is_member_function_pointer + : public ::boost::integral_constant::type>::value>{}; + +#else + +namespace detail { + +#ifndef BOOST_BORLANDC + +template +struct is_mem_fun_pointer_select +{ + template struct result_ : public false_type{}; +}; + +template <> +struct is_mem_fun_pointer_select +{ + template struct result_ + { +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + static T* make_t; + typedef result_ self_type; + + BOOST_STATIC_CONSTANT( + bool, value = ( + 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) + )); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif + }; +}; + +template +struct is_member_function_pointer_impl + : public is_mem_fun_pointer_select< + ::boost::is_reference::value || ::boost::is_array::value>::template result_{}; + +template +struct is_member_function_pointer_impl : public false_type{}; + +#else // Borland C++ + +template +struct is_member_function_pointer_impl +{ + static T* m_t; + BOOST_STATIC_CONSTANT( + bool, value = + (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); +}; + +template +struct is_member_function_pointer_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +#endif + +template<> struct is_member_function_pointer_impl : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct is_member_function_pointer_impl : public false_type{}; +template<> struct is_member_function_pointer_impl : public false_type{}; +template<> struct is_member_function_pointer_impl : public false_type{}; +#endif + +} // namespace detail + +template +struct is_member_function_pointer + : public integral_constant::value>{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp new file mode 100644 index 0000000..ac3477b --- /dev/null +++ b/Slang/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp @@ -0,0 +1,697 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED + +#include + +namespace boost { + +#ifdef _MSC_VER +#define BOOST_TT_DEF_CALL __thiscall +#else +#define BOOST_TT_DEF_CALL +#endif + + + template + struct is_member_function_pointer : public false_type {}; + template + struct is_member_function_pointer : public is_member_function_pointer {}; + template + struct is_member_function_pointer : public is_member_function_pointer {}; + template + struct is_member_function_pointer : public is_member_function_pointer {}; + +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) + // MSVC can't handle noexcept(b) as a deduced template parameter + // so we will have to write everything out :( +#define BOOST_TT_NOEXCEPT_PARAM +#define BOOST_TT_NOEXCEPT_DECL +#elif defined(__cpp_noexcept_function_type) +#define BOOST_TT_NOEXCEPT_PARAM , bool NE +#define BOOST_TT_NOEXCEPT_DECL noexcept(NE) +#else +#define BOOST_TT_NOEXCEPT_PARAM +#define BOOST_TT_NOEXCEPT_DECL +#endif + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + + // Reference qualified: + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + + // rvalue reference qualified: + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // rvalue reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + +#endif + + +#if defined(BOOST_TT_NO_DEDUCED_NOEXCEPT_PARAM) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) + +#undef BOOST_TT_NOEXCEPT_DECL +#define BOOST_TT_NOEXCEPT_DECL noexcept + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + + // Reference qualified: + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + + // rvalue reference qualified: + + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const qualified: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // volatile: + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + // const volatile + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; + +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // rvalue reference qualified: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + + // const volatile: +#if !defined(_M_X64) && !defined(_M_CEE_SAFE) && !defined(_M_CEE_PURE) + template + struct is_member_function_pointer : public true_type {}; + template + struct is_member_function_pointer : public true_type {}; +#endif +#ifdef _MANAGED + template + struct is_member_function_pointer : public true_type {}; +#else +#ifndef _M_AMD64 + template + struct is_member_function_pointer : public true_type {}; +#endif +#if defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64) + template + struct is_member_function_pointer : public true_type {}; +#endif +#endif + +#endif // defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + + +#endif + +#undef BOOST_TT_NOEXCEPT_DECL +#undef BOOST_TT_NOEXCEPT_PARAM +#undef BOOST_TT_DEF_CALL +} + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp b/Slang/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp new file mode 100644 index 0000000..d570735 --- /dev/null +++ b/Slang/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp @@ -0,0 +1,43 @@ + +// (C) Copyright John Maddock 2018. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_RVALUE_REFERENCE_MSVC10_FIX_HPP_INCLUDED +#define BOOST_TT_IS_RVALUE_REFERENCE_MSVC10_FIX_HPP_INCLUDED + +namespace boost { + +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; +template struct is_rvalue_reference : public true_type {}; + +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference : public false_type {}; + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/detail/mp_defer.hpp b/Slang/boost/type_traits/detail/mp_defer.hpp new file mode 100644 index 0000000..f3beeb2 --- /dev/null +++ b/Slang/boost/type_traits/detail/mp_defer.hpp @@ -0,0 +1,56 @@ +#ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 +#include + +namespace boost +{ + +namespace type_traits_detail +{ + +// mp_valid +// implementation by Bruno Dutra (by the name is_evaluable) + +template class F, class... T> +struct mp_valid_impl +{ + template class G, class = G> + static boost::true_type check_s(int); + + template class> + static boost::false_type check_s(...); + + using type = decltype(check_s(0)); +}; + +template class F, class... T> +using mp_valid = typename mp_valid_impl::type; + +// mp_defer + +struct mp_empty +{ +}; + +template class F, class... T> struct mp_defer_impl +{ + using type = F; +}; + +template class F, class... T> using mp_defer = typename boost::conditional::value, mp_defer_impl, mp_empty>::type; + +} // namespace type_traits_detail + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detail/template_arity_spec.hpp b/Slang/boost/type_traits/detail/template_arity_spec.hpp new file mode 100644 index 0000000..36ea96d --- /dev/null +++ b/Slang/boost/type_traits/detail/template_arity_spec.hpp @@ -0,0 +1,16 @@ +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// +// This header is deprecated and no longer used by type_traits: +// +#if defined(__GNUC__) || defined(_MSC_VER) +# pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated") +#endif + +# define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ diff --git a/Slang/boost/type_traits/detail/yes_no_type.hpp b/Slang/boost/type_traits/detail/yes_no_type.hpp new file mode 100644 index 0000000..f583730 --- /dev/null +++ b/Slang/boost/type_traits/detail/yes_no_type.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// macros and helpers for working with integral-constant-expressions. + +#ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED +#define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED + +namespace boost { +namespace type_traits { + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +} // namespace type_traits +} // namespace boost + +#endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/detected.hpp b/Slang/boost/type_traits/detected.hpp new file mode 100644 index 0000000..96a38a2 --- /dev/null +++ b/Slang/boost/type_traits/detected.hpp @@ -0,0 +1,24 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_DETECTED_HPP_INCLUDED +#define BOOST_TT_DETECTED_HPP_INCLUDED + +#include +#include + +namespace boost { + +template class Op, class... Args> +using detected_t = typename + detail::detector::type; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/detected_or.hpp b/Slang/boost/type_traits/detected_or.hpp new file mode 100644 index 0000000..e79e02a --- /dev/null +++ b/Slang/boost/type_traits/detected_or.hpp @@ -0,0 +1,25 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_DETECTED_OR_HPP_INCLUDED +#define BOOST_TT_DETECTED_OR_HPP_INCLUDED + +#include + +namespace boost { + +template class Op, class... Args> +using detected_or = detail::detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/disjunction.hpp b/Slang/boost/type_traits/disjunction.hpp new file mode 100644 index 0000000..dd06991 --- /dev/null +++ b/Slang/boost/type_traits/disjunction.hpp @@ -0,0 +1,40 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_DISJUNCTION_HPP_INCLUDED +#define BOOST_TT_DISJUNCTION_HPP_INCLUDED + +#include +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#include +#endif + +namespace boost { + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +struct disjunction + : false_type { }; + +template +struct disjunction + : T { }; + +template +struct disjunction + : conditional >::type { }; +#else +template +struct disjunction + : conditional::type { }; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/enable_if.hpp b/Slang/boost/type_traits/enable_if.hpp new file mode 100644 index 0000000..3cdc281 --- /dev/null +++ b/Slang/boost/type_traits/enable_if.hpp @@ -0,0 +1,37 @@ +/* +Copyright 2003 The Trustees of Indiana University + +Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) + Jeremiah Willcock (jewillco at osl.iu.edu) + Andrew Lumsdaine (lums at osl.iu.edu) + +Copyright 2018 Glen Joseph Fernandes +(glenjofe@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) +*/ +#ifndef BOOST_TT_ENABLE_IF_HPP_INCLUDED +#define BOOST_TT_ENABLE_IF_HPP_INCLUDED + +#include + +namespace boost { + +template +struct enable_if_ { + typedef T type; +}; + +template +struct enable_if_ { }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using enable_if_t = typename enable_if_::type; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/extent.hpp b/Slang/boost/type_traits/extent.hpp new file mode 100644 index 0000000..2bf517f --- /dev/null +++ b/Slang/boost/type_traits/extent.hpp @@ -0,0 +1,139 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_EXTENT_HPP_INCLUDED +#define BOOST_TT_EXTENT_HPP_INCLUDED + +#include // size_t +#include +#include + +namespace boost { + +namespace detail{ + +#if defined( BOOST_CODEGEARC ) + // wrap the impl as main trait provides additional MPL lambda support + template < typename T, std::size_t N > + struct extent_imp { + static const std::size_t value = __array_extent(T, N); + }; + +#else + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = 0); +}; +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = R); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = R); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = R); +}; + +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = R); +}; + +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) && !defined(__MWERKS__) +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::extent_imp::value)); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = 0); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = 0); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = 0); +}; +template +struct extent_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = 0); +}; +#endif +#endif + +#endif // non-CodeGear implementation +} // ::boost::detail + +template +struct extent + : public ::boost::integral_constant::value> +{ +}; + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/floating_point_promotion.hpp b/Slang/boost/type_traits/floating_point_promotion.hpp new file mode 100644 index 0000000..9110f24 --- /dev/null +++ b/Slang/boost/type_traits/floating_point_promotion.hpp @@ -0,0 +1,28 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED +#define FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED + +#include + +namespace boost { + + template struct floating_point_promotion { typedef T type; }; + template<> struct floating_point_promotion { typedef double type; }; + template<> struct floating_point_promotion { typedef double const type; }; + template<> struct floating_point_promotion{ typedef double volatile type; }; + template<> struct floating_point_promotion { typedef double const volatile type; }; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using floating_point_promotion_t = typename floating_point_promotion::type; + +#endif + +} + +#endif // #ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED + diff --git a/Slang/boost/type_traits/function_traits.hpp b/Slang/boost/type_traits/function_traits.hpp new file mode 100644 index 0000000..26d7e05 --- /dev/null +++ b/Slang/boost/type_traits/function_traits.hpp @@ -0,0 +1,174 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED +#define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + +namespace detail { + +template struct function_traits_helper; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 0); + typedef R result_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 1); + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 2); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 3); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 4); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 5); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 6); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 7); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 8); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 9); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; + +template +struct function_traits_helper +{ + BOOST_STATIC_CONSTANT(unsigned, arity = 10); + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; + +} // end namespace detail + +template +struct function_traits : + public boost::detail::function_traits_helper::type> +{ +}; + +} + +#endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_bit_and.hpp b/Slang/boost/type_traits/has_bit_and.hpp new file mode 100644 index 0000000..a16c71a --- /dev/null +++ b/Slang/boost/type_traits/has_bit_and.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_AND_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_AND_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_and +#define BOOST_TT_TRAIT_OP & +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_bit_and_assign.hpp b/Slang/boost/type_traits/has_bit_and_assign.hpp new file mode 100644 index 0000000..01e25e3 --- /dev/null +++ b/Slang/boost/type_traits/has_bit_and_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_and_assign +#define BOOST_TT_TRAIT_OP &= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (\ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_bit_or.hpp b/Slang/boost/type_traits/has_bit_or.hpp new file mode 100644 index 0000000..6e76929 --- /dev/null +++ b/Slang/boost/type_traits/has_bit_or.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_OR_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_OR_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_or +#define BOOST_TT_TRAIT_OP | +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_bit_or_assign.hpp b/Slang/boost/type_traits/has_bit_or_assign.hpp new file mode 100644 index 0000000..891c39c --- /dev/null +++ b/Slang/boost/type_traits/has_bit_or_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_or_assign +#define BOOST_TT_TRAIT_OP |= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_bit_xor.hpp b/Slang/boost/type_traits/has_bit_xor.hpp new file mode 100644 index 0000000..05173ac --- /dev/null +++ b/Slang/boost/type_traits/has_bit_xor.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_xor +#define BOOST_TT_TRAIT_OP ^ +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_bit_xor_assign.hpp b/Slang/boost/type_traits/has_bit_xor_assign.hpp new file mode 100644 index 0000000..3866b7a --- /dev/null +++ b/Slang/boost/type_traits/has_bit_xor_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_bit_xor_assign +#define BOOST_TT_TRAIT_OP ^= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_complement.hpp b/Slang/boost/type_traits/has_complement.hpp new file mode 100644 index 0000000..d323e12 --- /dev/null +++ b/Slang/boost/type_traits/has_complement.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED +#define BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_complement +#define BOOST_TT_TRAIT_OP ~ +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* pointer */\ + ::boost::is_pointer< Rhs_noref >::value || \ + /* fundamental non integral */\ + (\ + ::boost::is_fundamental< Rhs_noref >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_dereference.hpp b/Slang/boost/type_traits/has_dereference.hpp new file mode 100644 index 0000000..3275348 --- /dev/null +++ b/Slang/boost/type_traits/has_dereference.hpp @@ -0,0 +1,375 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED +#define BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_dereference +#define BOOST_TT_TRAIT_OP * +#define BOOST_TT_FORBIDDEN_IF\ + /* void* or fundamental */\ + (\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value\ + ) || \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +namespace boost { + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + // references: + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + // rvalue refs: + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + template + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + template <> + struct has_dereference : public false_type {}; + + +} +#endif +#endif diff --git a/Slang/boost/type_traits/has_divides.hpp b/Slang/boost/type_traits/has_divides.hpp new file mode 100644 index 0000000..869e907 --- /dev/null +++ b/Slang/boost/type_traits/has_divides.hpp @@ -0,0 +1,40 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_DIVIDES_HPP_INCLUDED +#define BOOST_TT_HAS_DIVIDES_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_divides +#define BOOST_TT_TRAIT_OP / +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer with pointer or fundamental */\ + (\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + )||\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_divides_assign.hpp b/Slang/boost/type_traits/has_divides_assign.hpp new file mode 100644 index 0000000..1a8e3c1 --- /dev/null +++ b/Slang/boost/type_traits/has_divides_assign.hpp @@ -0,0 +1,47 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_divides_assign +#define BOOST_TT_TRAIT_OP /= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Lhs==const and Rhs==fundamental */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + )||\ + /* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_equal_to.hpp b/Slang/boost/type_traits/has_equal_to.hpp new file mode 100644 index 0000000..3405d34 --- /dev/null +++ b/Slang/boost/type_traits/has_equal_to.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED +#define BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_equal_to +#define BOOST_TT_TRAIT_OP == +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + (\ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_greater.hpp b/Slang/boost/type_traits/has_greater.hpp new file mode 100644 index 0000000..1a9fda6 --- /dev/null +++ b/Slang/boost/type_traits/has_greater.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_GREATER_HPP_INCLUDED +#define BOOST_TT_HAS_GREATER_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_greater +#define BOOST_TT_TRAIT_OP > +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + ( \ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_greater_equal.hpp b/Slang/boost/type_traits/has_greater_equal.hpp new file mode 100644 index 0000000..c87f063 --- /dev/null +++ b/Slang/boost/type_traits/has_greater_equal.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED +#define BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_greater_equal +#define BOOST_TT_TRAIT_OP >= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + ( \ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_left_shift.hpp b/Slang/boost/type_traits/has_left_shift.hpp new file mode 100644 index 0000000..e95c12a --- /dev/null +++ b/Slang/boost/type_traits/has_left_shift.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED +#define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_left_shift +#define BOOST_TT_TRAIT_OP << +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_left_shift_assign.hpp b/Slang/boost/type_traits/has_left_shift_assign.hpp new file mode 100644 index 0000000..74e0df9 --- /dev/null +++ b/Slang/boost/type_traits/has_left_shift_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_left_shift_assign +#define BOOST_TT_TRAIT_OP <<= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_less.hpp b/Slang/boost/type_traits/has_less.hpp new file mode 100644 index 0000000..1326a18 --- /dev/null +++ b/Slang/boost/type_traits/has_less.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LESS_HPP_INCLUDED +#define BOOST_TT_HAS_LESS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_less +#define BOOST_TT_TRAIT_OP < +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + ( \ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_less_equal.hpp b/Slang/boost/type_traits/has_less_equal.hpp new file mode 100644 index 0000000..607b71c --- /dev/null +++ b/Slang/boost/type_traits/has_less_equal.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED +#define BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_less_equal +#define BOOST_TT_TRAIT_OP <= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + ( \ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_logical_and.hpp b/Slang/boost/type_traits/has_logical_and.hpp new file mode 100644 index 0000000..3bb1733 --- /dev/null +++ b/Slang/boost/type_traits/has_logical_and.hpp @@ -0,0 +1,40 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED +#define BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_logical_and +#define BOOST_TT_TRAIT_OP && +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer with fundamental non convertible to bool */\ + (\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_convertible< Rhs_nocv, bool >::value )\ + )\ + )||\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_convertible< Lhs_nocv, bool >::value )\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_logical_not.hpp b/Slang/boost/type_traits/has_logical_not.hpp new file mode 100644 index 0000000..d36858e --- /dev/null +++ b/Slang/boost/type_traits/has_logical_not.hpp @@ -0,0 +1,32 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED +#define BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-value" +#endif + +#define BOOST_TT_TRAIT_NAME has_logical_not +#define BOOST_TT_TRAIT_OP ! +#define BOOST_TT_FORBIDDEN_IF\ + false + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800) +#pragma GCC diagnostic pop +#endif + +#endif diff --git a/Slang/boost/type_traits/has_logical_or.hpp b/Slang/boost/type_traits/has_logical_or.hpp new file mode 100644 index 0000000..a188726 --- /dev/null +++ b/Slang/boost/type_traits/has_logical_or.hpp @@ -0,0 +1,40 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED +#define BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_logical_or +#define BOOST_TT_TRAIT_OP || +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer with fundamental non convertible to bool */\ + (\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_convertible< Rhs_nocv, bool >::value )\ + )\ + )||\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_convertible< Lhs_nocv, bool >::value )\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_minus.hpp b/Slang/boost/type_traits/has_minus.hpp new file mode 100644 index 0000000..fcd5d94 --- /dev/null +++ b/Slang/boost/type_traits/has_minus.hpp @@ -0,0 +1,158 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MINUS_HPP_INCLUDED +#define BOOST_TT_HAS_MINUS_HPP_INCLUDED + +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 4133) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct has_minus_ret_imp : public boost::false_type {}; + + template + struct has_minus_ret_imp::type>() - std::declval::type>())>::type> + : public boost::integral_constant::type>() - std::declval::type>()), Ret>::value> {}; + + template + struct has_minus_void_imp : public boost::false_type {}; + + template + struct has_minus_void_imp::type>() - std::declval::type>())>::type> + : public boost::integral_constant::type>() - std::declval::type>())>::value> {}; + + template + struct has_minus_dc_imp : public boost::false_type {}; + + template + struct has_minus_dc_imp::type>() - std::declval::type>())>::type> + : public boost::true_type {}; + + template + struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_ret_imp {}; + template + struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_void_imp {}; + template + struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_dc_imp {}; + + template + struct has_minus_void_ptr_filter : public boost::binary_op_detail::has_minus_ret_filter {}; + template + struct has_minus_void_ptr_filter : public boost::false_type {}; + + } + + template + struct has_minus : + public boost::binary_op_detail::has_minus_void_ptr_filter< + T, U, Ret, + boost::is_void::type>::type>::value + || boost::is_void::type>::type>::value> {}; + + +} + +#else + + +#define BOOST_TT_TRAIT_NAME has_minus +#define BOOST_TT_TRAIT_OP - +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) || \ + /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + ) ||\ + /* Lhs=fundamental and Rhs=pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) ||\ + /* two different pointers */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! ::boost::is_same< Lhs_nocv, Rhs_nocv >::value )\ + )\ + ) + +#define BOOST_TT_FORBIDDEN_IF_NEW (boost::is_void::type>::type>::value || boost::is_void::type>::type>::value) + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif + +#if defined(BOOST_MSVC) +# pragma warning (pop) +#endif + +#endif diff --git a/Slang/boost/type_traits/has_minus_assign.hpp b/Slang/boost/type_traits/has_minus_assign.hpp new file mode 100644 index 0000000..ea3169e --- /dev/null +++ b/Slang/boost/type_traits/has_minus_assign.hpp @@ -0,0 +1,163 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED +#define BOOST_TT_has_minus_assign_ASSIGN_HPP_INCLUDED + +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 4133) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct has_minus_assign_ret_imp : public boost::false_type {}; + + template + struct has_minus_assign_ret_imp::type>() -= std::declval::type>())>::type> + : public boost::integral_constant::type>() -= std::declval::type>()), Ret>::value> {}; + + template + struct has_minus_assign_void_imp : public boost::false_type {}; + + template + struct has_minus_assign_void_imp::type>() -= std::declval::type>())>::type> + : public boost::integral_constant::type>() -= std::declval::type>())>::value> {}; + + template + struct has_minus_assign_dc_imp : public boost::false_type {}; + + template + struct has_minus_assign_dc_imp::type>() -= std::declval::type>())>::type> + : public boost::true_type {}; + + template + struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_ret_imp {}; + template + struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_void_imp {}; + template + struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_dc_imp {}; + + template + struct has_minus_assign_void_ptr_filter : public boost::binary_op_detail::has_minus_assign_ret_filter {}; + template + struct has_minus_assign_void_ptr_filter : public boost::false_type {}; + + } + + template + struct has_minus_assign : + public boost::binary_op_detail::has_minus_assign_void_ptr_filter< + T, U, Ret, + boost::is_void::type>::type>::value + || boost::is_void::type>::type>::value + || (boost::is_pointer::type>::value && boost::is_pointer::type>::value)> {}; + + +} + +#else + +#define BOOST_TT_TRAIT_NAME has_minus_assign +#define BOOST_TT_TRAIT_OP -= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs=fundamental and Rhs=pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + (\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + (\ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif + +#if defined(BOOST_MSVC) +# pragma warning (pop) +#endif + +#endif diff --git a/Slang/boost/type_traits/has_modulus.hpp b/Slang/boost/type_traits/has_modulus.hpp new file mode 100644 index 0000000..24a815f --- /dev/null +++ b/Slang/boost/type_traits/has_modulus.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MODULUS_HPP_INCLUDED +#define BOOST_TT_HAS_MODULUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_modulus +#define BOOST_TT_TRAIT_OP % +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (\ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_modulus_assign.hpp b/Slang/boost/type_traits/has_modulus_assign.hpp new file mode 100644 index 0000000..5e3e83f --- /dev/null +++ b/Slang/boost/type_traits/has_modulus_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_modulus_assign +#define BOOST_TT_TRAIT_OP %= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_multiplies.hpp b/Slang/boost/type_traits/has_multiplies.hpp new file mode 100644 index 0000000..591a0ce --- /dev/null +++ b/Slang/boost/type_traits/has_multiplies.hpp @@ -0,0 +1,40 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED +#define BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_multiplies +#define BOOST_TT_TRAIT_OP * +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer with pointer or fundamental */\ + (\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + (\ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + )||\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_multiplies_assign.hpp b/Slang/boost/type_traits/has_multiplies_assign.hpp new file mode 100644 index 0000000..b24f879 --- /dev/null +++ b/Slang/boost/type_traits/has_multiplies_assign.hpp @@ -0,0 +1,47 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_multiplies_assign +#define BOOST_TT_TRAIT_OP *= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Lhs==const and Rhs==fundamental */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + )||\ + /* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_negate.hpp b/Slang/boost/type_traits/has_negate.hpp new file mode 100644 index 0000000..452e54a --- /dev/null +++ b/Slang/boost/type_traits/has_negate.hpp @@ -0,0 +1,25 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NEGATE_HPP_INCLUDED +#define BOOST_TT_HAS_NEGATE_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_negate +#define BOOST_TT_TRAIT_OP - +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer */\ + ::boost::is_pointer< Rhs_noref >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_new_operator.hpp b/Slang/boost/type_traits/has_new_operator.hpp new file mode 100644 index 0000000..4def872 --- /dev/null +++ b/Slang/boost/type_traits/has_new_operator.hpp @@ -0,0 +1,147 @@ + +// (C) Copyright Runar Undheim, Robert Ramey & John Maddock 2008. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED +#define BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED + +#include // std::nothrow_t +#include // std::size_t +#include +#include +#include + +#if defined(new) +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) +# define BOOST_TT_AUX_MACRO_NEW_DEFINED +# pragma push_macro("new") +# undef new +# else +# error "Sorry but you can't include this header if 'new' is defined as a macro." +# endif +#endif + +namespace boost { +namespace detail { + template + struct test; + + template + struct has_new_operator_impl { + template + static type_traits::yes_type check_sig1( + U*, + test< + void *(*)(std::size_t), + &U::operator new + >* = NULL + ); + template + static type_traits::no_type check_sig1(...); + + template + static type_traits::yes_type check_sig2( + U*, + test< + void *(*)(std::size_t, const std::nothrow_t&), + &U::operator new + >* = NULL + ); + template + static type_traits::no_type check_sig2(...); + + template + static type_traits::yes_type check_sig3( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new + >* = NULL + ); + template + static type_traits::no_type check_sig3(...); + + + template + static type_traits::yes_type check_sig4( + U*, + test< + void *(*)(std::size_t), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig4(...); + + template + static type_traits::yes_type check_sig5( + U*, + test< + void *(*)(std::size_t, const std::nothrow_t&), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig5(...); + + template + static type_traits::yes_type check_sig6( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig6(...); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. + #ifdef __GNUC__ + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl::template check_sig1(0))); + BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl::template check_sig2(0))); + BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(has_new_operator_impl::template check_sig3(0))); + BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(has_new_operator_impl::template check_sig4(0))); + BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(has_new_operator_impl::template check_sig5(0))); + BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(has_new_operator_impl::template check_sig6(0))); + #else + #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) + #pragma warning(push) + #pragma warning(disable:6334) + #endif + + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig1(0))); + BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2(0))); + BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(check_sig3(0))); + BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(check_sig4(0))); + BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(check_sig5(0))); + BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(check_sig6(0))); + + #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) + #pragma warning(pop) + #endif + #endif + BOOST_STATIC_CONSTANT(bool, value = + (s1 == sizeof(type_traits::yes_type)) || + (s2 == sizeof(type_traits::yes_type)) || + (s3 == sizeof(type_traits::yes_type)) || + (s4 == sizeof(type_traits::yes_type)) || + (s5 == sizeof(type_traits::yes_type)) || + (s6 == sizeof(type_traits::yes_type)) + ); + }; +} // namespace detail + +template struct has_new_operator : public integral_constant::value>{}; + +} // namespace boost + +#if defined(BOOST_TT_AUX_MACRO_NEW_DEFINED) +# pragma pop_macro("new") +#endif + +#endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_not_equal_to.hpp b/Slang/boost/type_traits/has_not_equal_to.hpp new file mode 100644 index 0000000..5f2c39a --- /dev/null +++ b/Slang/boost/type_traits/has_not_equal_to.hpp @@ -0,0 +1,52 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED +#define BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_not_equal_to +#define BOOST_TT_TRAIT_OP != +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==pointer and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value && \ + (! \ + (\ + ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value || \ + ::boost::is_same< Lhs_noptr, Rhs_noptr >::value || \ + ::boost::is_void< Lhs_noptr >::value || \ + ::boost::is_void< Rhs_noptr >::value\ + )\ + )\ + ) || \ + (\ + ::boost::type_traits_detail::is_likely_stateless_lambda::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_nothrow_assign.hpp b/Slang/boost/type_traits/has_nothrow_assign.hpp new file mode 100644 index 0000000..7517fa8 --- /dev/null +++ b/Slang/boost/type_traits/has_nothrow_assign.hpp @@ -0,0 +1,84 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED + +#include // size_t +#include +#include + +#if !defined(BOOST_HAS_NOTHROW_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#include +#include +#include +#include +#include +#include +#include +#endif +#endif +#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__) +#include +#include +#include +#include +#ifdef BOOST_INTEL +#include +#endif +#endif + +namespace boost { + +#if !defined(BOOST_HAS_NOTHROW_ASSIGN) && !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + + namespace detail + { + template struct has_nothrow_assign_imp{ static const bool value = false; }; + template struct has_nothrow_assign_imp{ static const bool value = noexcept(boost::declval::type>() = boost::declval::type>()); }; + template struct has_nothrow_assign_imp{ static const bool value = has_nothrow_assign_imp::value; }; + template struct has_nothrow_assign_imp{ static const bool value = has_nothrow_assign_imp::value; }; + } + +#endif + + template + struct has_nothrow_assign : public integral_constant < bool, +#ifndef BOOST_HAS_NOTHROW_ASSIGN +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // Portable C++11 version: + detail::has_nothrow_assign_imp::type>::value || is_volatile::type>::value || is_reference::value), + is_assignable::type, typename add_reference::type>::value + >::value +#else + ::boost::has_trivial_assign::value +#endif +#else + BOOST_HAS_NOTHROW_ASSIGN(T) +#endif + > {}; + +template struct has_nothrow_assign : public has_nothrow_assign {}; +template <> struct has_nothrow_assign : public false_type{}; +template struct has_nothrow_assign : public false_type{}; +template struct has_nothrow_assign : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_nothrow_assign : public false_type{}; +#endif +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_nothrow_assign : public false_type{}; +template <> struct has_nothrow_assign : public false_type{}; +template <> struct has_nothrow_assign : public false_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_nothrow_constructor.hpp b/Slang/boost/type_traits/has_nothrow_constructor.hpp new file mode 100644 index 0000000..fa47b1d --- /dev/null +++ b/Slang/boost/type_traits/has_nothrow_constructor.hpp @@ -0,0 +1,73 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED + +#include // size_t +#include +#include + +#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR + +#if defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#endif +#if defined(__GNUC__ ) || defined(__SUNPRO_CC) || defined(__clang__) +#include +#endif + +namespace boost { + +template struct has_nothrow_constructor : public integral_constant{}; + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) + +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4197) // top-level volatile in cast is ignored +#endif + +namespace boost { namespace detail{ + + template struct has_nothrow_constructor_imp : public boost::integral_constant{}; + template struct has_nothrow_constructor_imp : public boost::integral_constant{}; + template struct has_nothrow_constructor_imp : public has_nothrow_constructor_imp {}; +} + +template struct has_nothrow_constructor : public detail::has_nothrow_constructor_imp::value>{}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#else + +#include + +namespace boost { + +template struct has_nothrow_constructor : public ::boost::has_trivial_constructor {}; + +#endif + +template<> struct has_nothrow_constructor : public false_type {}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct has_nothrow_constructor : public false_type{}; +template<> struct has_nothrow_constructor : public false_type{}; +template<> struct has_nothrow_constructor : public false_type{}; +#endif + +template struct has_nothrow_default_constructor : public has_nothrow_constructor{}; + +} // namespace boost + +#endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_nothrow_copy.hpp b/Slang/boost/type_traits/has_nothrow_copy.hpp new file mode 100644 index 0000000..fd9db8d --- /dev/null +++ b/Slang/boost/type_traits/has_nothrow_copy.hpp @@ -0,0 +1,82 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED + +#include +#include + +#ifdef BOOST_HAS_NOTHROW_COPY + +#if defined(BOOST_CLANG) || defined(__GNUC__) || defined(__ghs__) || defined(BOOST_CODEGEARC) || defined(__SUNPRO_CC) +#include +#include +#include +#include +#ifdef BOOST_INTEL +#include +#endif +#elif defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#ifdef BOOST_INTEL +#include +#include +#endif +#endif + +namespace boost { + +template struct has_nothrow_copy_constructor : public integral_constant{}; + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) + +#include +#include + +namespace boost{ + +namespace detail{ + +template +struct has_nothrow_copy_constructor_imp : public boost::integral_constant{}; +template +struct has_nothrow_copy_constructor_imp : public boost::integral_constant()))>{}; + +} + +template struct has_nothrow_copy_constructor : public detail::has_nothrow_copy_constructor_imp::value>{}; + +#else + +#include + +namespace boost{ + +template struct has_nothrow_copy_constructor : public integral_constant::value>{}; + +#endif + +template <> struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +template struct has_nothrow_copy_constructor : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_nothrow_copy_constructor : public false_type{}; +#endif +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_nothrow_copy_constructor : public false_type{}; +template <> struct has_nothrow_copy_constructor : public false_type{}; +template <> struct has_nothrow_copy_constructor : public false_type{}; +#endif + +template struct has_nothrow_copy : public has_nothrow_copy_constructor{}; + +} // namespace boost + +#endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_nothrow_destructor.hpp b/Slang/boost/type_traits/has_nothrow_destructor.hpp new file mode 100644 index 0000000..74dd9e7 --- /dev/null +++ b/Slang/boost/type_traits/has_nothrow_destructor.hpp @@ -0,0 +1,56 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED + +#include + +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(__SUNPRO_CC) && !(defined(BOOST_MSVC) && (_MSC_FULL_VER < 190023506)) + +#include +#include +#include +#include + +namespace boost{ + + namespace detail{ + + template + struct has_nothrow_destructor_imp : public boost::integral_constant{}; + template + struct has_nothrow_destructor_imp : public boost::integral_constant()->~T())>{}; + + } + + template struct has_nothrow_destructor : public detail::has_nothrow_destructor_imp::value> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to has_nothrow_destructor must be complete types"); + }; + template struct has_nothrow_destructor : public has_nothrow_destructor + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to has_nothrow_destructor must be complete types"); + }; + template struct has_nothrow_destructor : public integral_constant{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template struct has_nothrow_destructor : public integral_constant{}; +#endif + template <> struct has_nothrow_destructor : public false_type {}; +} +#else + +namespace boost { + +template struct has_nothrow_destructor : public ::boost::has_trivial_destructor {}; + +} // namespace boost + +#endif + +#endif // BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_operator.hpp b/Slang/boost/type_traits/has_operator.hpp new file mode 100644 index 0000000..c97a90f --- /dev/null +++ b/Slang/boost/type_traits/has_operator.hpp @@ -0,0 +1,51 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_OPERATOR_HPP_INCLUDED +#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/type_traits/has_plus.hpp b/Slang/boost/type_traits/has_plus.hpp new file mode 100644 index 0000000..2d79328 --- /dev/null +++ b/Slang/boost/type_traits/has_plus.hpp @@ -0,0 +1,54 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_plus +#define BOOST_TT_TRAIT_OP + +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_integral< Lhs_noref >::value )\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_plus_assign.hpp b/Slang/boost/type_traits/has_plus_assign.hpp new file mode 100644 index 0000000..161ca15 --- /dev/null +++ b/Slang/boost/type_traits/has_plus_assign.hpp @@ -0,0 +1,161 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED + +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 4133) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template + struct has_plus_assign_ret_imp : public boost::false_type {}; + + template + struct has_plus_assign_ret_imp::type>() += std::declval::type>())>::type> + : public boost::integral_constant::type>() += std::declval::type>()), Ret>::value> {}; + + template + struct has_plus_assign_void_imp : public boost::false_type {}; + + template + struct has_plus_assign_void_imp::type>() += std::declval::type>())>::type> + : public boost::integral_constant::type>() += std::declval::type>())>::value> {}; + + template + struct has_plus_assign_dc_imp : public boost::false_type {}; + + template + struct has_plus_assign_dc_imp::type>() += std::declval::type>())>::type> + : public boost::true_type {}; + + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_ret_imp {}; + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_void_imp {}; + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_dc_imp {}; + + template + struct has_plus_assign_filter_impossible : public boost::binary_op_detail:: has_plus_assign_filter_ret {}; + template + struct has_plus_assign_filter_impossible : public boost::false_type {}; + + } + + template + struct has_plus_assign : public boost::binary_op_detail:: has_plus_assign_filter_impossible ::type>::value && boost::is_pointer::type>::value && !boost::is_same::type>::type>::value> {}; + +} + +#else + +#define BOOST_TT_TRAIT_NAME has_plus_assign +#define BOOST_TT_TRAIT_OP += +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + ) || \ + /* Lhs==void* and Rhs==fundamental */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value\ + ) || \ + /* Rhs==void* and Lhs==fundamental */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value\ + ) || \ + /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + (! ::boost::is_integral< Rhs_noref >::value )\ + ) || \ + /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_fundamental< Lhs_nocv >::value && \ + (! ::boost::is_same< Lhs_nocv, bool >::value )\ + ) || \ + /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\ + (\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif + +#if defined(BOOST_MSVC) +# pragma warning (pop) +#endif + +#endif diff --git a/Slang/boost/type_traits/has_post_decrement.hpp b/Slang/boost/type_traits/has_post_decrement.hpp new file mode 100644 index 0000000..fc1c430 --- /dev/null +++ b/Slang/boost/type_traits/has_post_decrement.hpp @@ -0,0 +1,65 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED +#define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED + +#include + +#define BOOST_TT_TRAIT_NAME has_post_decrement +#define BOOST_TT_TRAIT_OP -- +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* bool */\ + ::boost::is_same< bool, Lhs_nocv >::value || \ + /* void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value\ + ) || \ + /* (fundamental or pointer) and const */\ + (\ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )||\ + /* Arrays */ \ + ::boost::is_array::value\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +namespace boost { + + template + struct has_post_decrement : public false_type {}; + template <> + struct has_post_decrement : public false_type {}; + template <> + struct has_post_decrement : public false_type {}; + + template + struct has_post_decrement : public false_type {}; + template <> + struct has_post_decrement : public false_type {}; + template <> + struct has_post_decrement : public false_type {}; + +} + +#endif +#endif diff --git a/Slang/boost/type_traits/has_post_increment.hpp b/Slang/boost/type_traits/has_post_increment.hpp new file mode 100644 index 0000000..e83afd1 --- /dev/null +++ b/Slang/boost/type_traits/has_post_increment.hpp @@ -0,0 +1,65 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED +#define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED + +#include + +#define BOOST_TT_TRAIT_NAME has_post_increment +#define BOOST_TT_TRAIT_OP ++ +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* bool */\ + ::boost::is_same< bool, Lhs_nocv >::value || \ + /* void* */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_void< Lhs_noptr >::value\ + ) || \ + /* (fundamental or pointer) and const */\ + (\ + ( \ + ::boost::is_fundamental< Lhs_nocv >::value || \ + ::boost::is_pointer< Lhs_noref >::value\ + ) && \ + ::boost::is_const< Lhs_noref >::value\ + )||\ + /* Arrays */ \ + ::boost::is_array::value\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +namespace boost { + + template + struct has_post_increment : public false_type {}; + template <> + struct has_post_increment : public false_type {}; + template <> + struct has_post_increment : public false_type {}; + + template + struct has_post_increment : public false_type {}; + template <> + struct has_post_increment : public false_type {}; + template <> + struct has_post_increment : public false_type {}; + +} + +#endif +#endif diff --git a/Slang/boost/type_traits/has_pre_decrement.hpp b/Slang/boost/type_traits/has_pre_decrement.hpp new file mode 100644 index 0000000..5ce50e9 --- /dev/null +++ b/Slang/boost/type_traits/has_pre_decrement.hpp @@ -0,0 +1,65 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED +#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED + +#include + +#define BOOST_TT_TRAIT_NAME has_pre_decrement +#define BOOST_TT_TRAIT_OP -- +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* bool */\ + ::boost::is_same< bool, Rhs_nocv >::value || \ + /* void* */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value\ + ) || \ + /* (fundamental or pointer) and const */\ + (\ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Rhs_noref >::value\ + )||\ + /* Arrays */ \ + ::boost::is_array::value\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +namespace boost { + + template + struct has_pre_decrement : public false_type {}; + template <> + struct has_pre_decrement : public false_type {}; + template <> + struct has_pre_decrement : public false_type {}; + + template + struct has_pre_decrement : public false_type {}; + template <> + struct has_pre_decrement : public false_type {}; + template <> + struct has_pre_decrement : public false_type {}; + +} + +#endif +#endif diff --git a/Slang/boost/type_traits/has_pre_increment.hpp b/Slang/boost/type_traits/has_pre_increment.hpp new file mode 100644 index 0000000..9361cc8 --- /dev/null +++ b/Slang/boost/type_traits/has_pre_increment.hpp @@ -0,0 +1,66 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED +#define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED + +#include + +#define BOOST_TT_TRAIT_NAME has_pre_increment +#define BOOST_TT_TRAIT_OP ++ +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* bool */\ + ::boost::is_same< bool, Rhs_nocv >::value || \ + /* void* */\ + (\ + ::boost::is_pointer< Rhs_noref >::value && \ + ::boost::is_void< Rhs_noptr >::value\ + ) || \ + /* (fundamental or pointer) and const */\ + (\ + ( \ + ::boost::is_fundamental< Rhs_nocv >::value || \ + ::boost::is_pointer< Rhs_noref >::value\ + ) && \ + ::boost::is_const< Rhs_noref >::value\ + )||\ + /* Arrays */ \ + ::boost::is_array::value\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +namespace boost { + + template + struct has_pre_increment : public false_type {}; + template <> + struct has_pre_increment : public false_type {}; + template <> + struct has_pre_increment : public false_type {}; + + template + struct has_pre_increment : public false_type {}; + template <> + struct has_pre_increment : public false_type {}; + template <> + struct has_pre_increment : public false_type {}; + +} + +#endif + +#endif diff --git a/Slang/boost/type_traits/has_right_shift.hpp b/Slang/boost/type_traits/has_right_shift.hpp new file mode 100644 index 0000000..5562911 --- /dev/null +++ b/Slang/boost/type_traits/has_right_shift.hpp @@ -0,0 +1,49 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED +#define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_right_shift +#define BOOST_TT_TRAIT_OP >> +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_right_shift_assign.hpp b/Slang/boost/type_traits/has_right_shift_assign.hpp new file mode 100644 index 0000000..0e2c263 --- /dev/null +++ b/Slang/boost/type_traits/has_right_shift_assign.hpp @@ -0,0 +1,55 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_right_shift_assign +#define BOOST_TT_TRAIT_OP >>= +#define BOOST_TT_FORBIDDEN_IF\ + (\ + /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ( \ + (! ::boost::is_integral< Lhs_noref >::value ) || \ + (! ::boost::is_integral< Rhs_noref >::value )\ + )\ + )||\ + /* Lhs==fundamental and Rhs==pointer */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Rhs==fundamental and Lhs==pointer */\ + (\ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_pointer< Lhs_noref >::value\ + )||\ + /* Lhs==pointer and Rhs==pointer */\ + (\ + ::boost::is_pointer< Lhs_noref >::value && \ + ::boost::is_pointer< Rhs_noref >::value\ + )||\ + /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\ + (\ + ::boost::is_fundamental< Lhs_nocv >::value && \ + ::boost::is_fundamental< Rhs_nocv >::value && \ + ::boost::is_const< Lhs_noref >::value\ + )\ + ) + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_trivial_assign.hpp b/Slang/boost/type_traits/has_trivial_assign.hpp new file mode 100644 index 0000000..15b917e --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_assign.hpp @@ -0,0 +1,52 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED + +#include // size_t +#include +#include +#include + +#if !defined(BOOST_HAS_TRIVIAL_ASSIGN) || defined(BOOST_MSVC) || defined(__GNUC__) || defined(BOOST_INTEL) || defined(__SUNPRO_CC) || defined(__clang__) +#include +#include +#include +#include +#endif + +namespace boost { + + template + struct has_trivial_assign : public integral_constant < bool, +#ifdef BOOST_HAS_TRIVIAL_ASSIGN + BOOST_HAS_TRIVIAL_ASSIGN(T) +#else + ::boost::is_pod::value && !::boost::is_const::value && !::boost::is_volatile::value +#endif + > {}; + + template<> struct has_trivial_assign : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + template<> struct has_trivial_assign : public false_type{}; + template<> struct has_trivial_assign : public false_type{}; + template<> struct has_trivial_assign : public false_type{}; +#endif + template struct has_trivial_assign : public false_type{}; + template struct has_trivial_assign : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template struct has_trivial_assign : public false_type{}; +#endif + // Arrays are not explictly assignable: + template struct has_trivial_assign : public false_type{}; + template struct has_trivial_assign : public false_type{}; + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_trivial_constructor.hpp b/Slang/boost/type_traits/has_trivial_constructor.hpp new file mode 100644 index 0000000..06c137d --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_constructor.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED + +#include +#include +#include + +#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR +#ifdef BOOST_HAS_SGI_TYPE_TRAITS +#include +#elif defined(__GNUC__) || defined(__SUNPRO_CC) +#include +#ifdef BOOST_INTEL +#include +#endif +#endif +#endif + + +#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || defined(BOOST_CLANG) || (defined(__SUNPRO_CC) && defined(BOOST_HAS_TRIVIAL_CONSTRUCTOR)) +#include +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX && is_default_constructible::value +#else +// +// Mot all compilers, particularly older GCC versions can handle the fix above. +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX +#endif + +namespace boost { + +template struct has_trivial_constructor +#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR + : public integral_constant ::value || BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)) BOOST_TT_TRIVIAL_CONSTRUCT_FIX)>{}; +#else + : public integral_constant ::value>{}; +#endif + +template <> struct has_trivial_constructor : public boost::false_type{}; +template <> struct has_trivial_constructor : public boost::false_type{}; +template <> struct has_trivial_constructor : public boost::false_type{}; +template <> struct has_trivial_constructor : public boost::false_type{}; + +template struct has_trivial_default_constructor : public has_trivial_constructor {}; + +#undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_trivial_copy.hpp b/Slang/boost/type_traits/has_trivial_copy.hpp new file mode 100644 index 0000000..fd6ad2d --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_copy.hpp @@ -0,0 +1,63 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED + +#include // size_t +#include +#include +#include + +#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || defined(BOOST_CLANG) || (defined(__SUNPRO_CC) && defined(BOOST_HAS_TRIVIAL_COPY)) +#include +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX && is_copy_constructible::value +#else +#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX +#endif + +#ifdef BOOST_INTEL +#include +#include +#endif + +namespace boost { + +template struct has_trivial_copy +: public integral_constant::value +#endif +>{}; +// Arrays are not explicitly copyable: +template struct has_trivial_copy : public false_type{}; +template struct has_trivial_copy : public false_type{}; +// Are volatile types ever trivial? We don't really know, so assume not: +template struct has_trivial_copy : public false_type{}; + +template <> struct has_trivial_copy : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_copy : public false_type{}; +template <> struct has_trivial_copy : public false_type{}; +template <> struct has_trivial_copy : public false_type{}; +#endif + +template struct has_trivial_copy : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct has_trivial_copy : public false_type{}; +#endif + +template struct has_trivial_copy_constructor : public has_trivial_copy{}; + +#undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_trivial_destructor.hpp b/Slang/boost/type_traits/has_trivial_destructor.hpp new file mode 100644 index 0000000..9a3a61f --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_destructor.hpp @@ -0,0 +1,48 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED + +#include +#include + +#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR + +#if defined(BOOST_INTEL) || defined(BOOST_MSVC) +#include +#endif +#ifdef BOOST_HAS_SGI_TYPE_TRAITS +#include +#endif + +#if defined(__GNUC__) || defined(__clang__) || defined(__SUNPRO_CC) +#include +#endif + +namespace boost { + +template struct has_trivial_destructor : public integral_constant{}; +#else +#include + +namespace boost{ + +template struct has_trivial_destructor : public integral_constant::value>{}; +#endif + +template <> struct has_trivial_destructor : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_destructor : public false_type{}; +template <> struct has_trivial_destructor : public false_type{}; +template <> struct has_trivial_destructor : public false_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_trivial_move_assign.hpp b/Slang/boost/type_traits/has_trivial_move_assign.hpp new file mode 100644 index 0000000..7b39269 --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_move_assign.hpp @@ -0,0 +1,73 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED + +#include // size_t +#include +#include + +#if !defined(BOOST_HAS_TRIVIAL_MOVE_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#include +#ifdef BOOST_MSVC +#include +#endif +#endif + +#if defined(__GNUC__) || defined(__clang__) +#include +#include +#endif + +#ifdef __SUNPRO_CC +#include +#include +#if __cplusplus >= 201103 +#define SOLARIS_EXTRA_CHECK && is_assignable::type&, typename remove_const::type&&>::value +#endif +#endif + +#ifndef SOLARIS_EXTRA_CHECK +#define SOLARIS_EXTRA_CHECK +#endif + +namespace boost{ + +template +struct has_trivial_move_assign : public integral_constant::value && !::boost::is_const::value && !::boost::is_volatile::value SOLARIS_EXTRA_CHECK +#endif + > {}; + +template <> struct has_trivial_move_assign : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_move_assign : public false_type{}; +template <> struct has_trivial_move_assign : public false_type{}; +template <> struct has_trivial_move_assign : public false_type{}; +#endif +template struct has_trivial_move_assign : public false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct has_trivial_move_assign : public false_type{}; +#endif +// Array types are not assignable: +template struct has_trivial_move_assign : public false_type{}; +template struct has_trivial_move_assign : public false_type{}; + +} // namespace boost + +#undef SOLARIS_EXTRA_CHECK + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_trivial_move_constructor.hpp b/Slang/boost/type_traits/has_trivial_move_constructor.hpp new file mode 100644 index 0000000..ce85dc2 --- /dev/null +++ b/Slang/boost/type_traits/has_trivial_move_constructor.hpp @@ -0,0 +1,79 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED + +#include // size_t +#include +#include + +#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR + +#if defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#include +#endif + +#if defined(__GNUC__) || defined(__clang__) +#include +#include +#endif + + +namespace boost { + +template struct has_trivial_move_constructor : public integral_constant{}; + +#else + +#ifdef __SUNPRO_CC +#include +#include +#if __cplusplus >= 201103 +#define SOLARIS_EXTRA_CHECK && is_constructible::type, typename remove_const::type&&>::value +#endif +#endif + +#ifndef SOLARIS_EXTRA_CHECK +#define SOLARIS_EXTRA_CHECK +#endif + +#include +#include + +namespace boost { + +template struct has_trivial_move_constructor + : public integral_constant::value && !::boost::is_volatile::value SOLARIS_EXTRA_CHECK>{}; + +#undef SOLARIS_EXTRA_CHECK + +#endif + +template <> struct has_trivial_move_constructor : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct has_trivial_move_constructor : public false_type{}; +template <> struct has_trivial_move_constructor : public false_type{}; +template <> struct has_trivial_move_constructor : public false_type{}; +#endif +// What should we do with reference types??? The standard seems to suggest these are trivial, even if the thing they reference is not: +template struct has_trivial_move_constructor : public true_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct has_trivial_move_constructor : public true_type{}; +#endif +// Arrays can not be explicitly copied: +template struct has_trivial_move_constructor : public false_type{}; +template struct has_trivial_move_constructor : public false_type{}; + +} // namespace boost + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/has_unary_minus.hpp b/Slang/boost/type_traits/has_unary_minus.hpp new file mode 100644 index 0000000..6b3157f --- /dev/null +++ b/Slang/boost/type_traits/has_unary_minus.hpp @@ -0,0 +1,25 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED +#define BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_unary_minus +#define BOOST_TT_TRAIT_OP - +#define BOOST_TT_FORBIDDEN_IF\ + /* pointer */\ + ::boost::is_pointer< Rhs_noref >::value + + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_unary_plus.hpp b/Slang/boost/type_traits/has_unary_plus.hpp new file mode 100644 index 0000000..a61770f --- /dev/null +++ b/Slang/boost/type_traits/has_unary_plus.hpp @@ -0,0 +1,23 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED +#define BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED + +#define BOOST_TT_TRAIT_NAME has_unary_plus +#define BOOST_TT_TRAIT_OP + +#define BOOST_TT_FORBIDDEN_IF\ + false + +#include + +#undef BOOST_TT_TRAIT_NAME +#undef BOOST_TT_TRAIT_OP +#undef BOOST_TT_FORBIDDEN_IF + +#endif diff --git a/Slang/boost/type_traits/has_virtual_destructor.hpp b/Slang/boost/type_traits/has_virtual_destructor.hpp new file mode 100644 index 0000000..4b0f383 --- /dev/null +++ b/Slang/boost/type_traits/has_virtual_destructor.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_HAS_VIRTUAL_DESTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_VIRTUAL_DESTRUCTOR_HPP_INCLUDED + +#include +#include + +namespace boost { + +#ifdef BOOST_HAS_VIRTUAL_DESTRUCTOR + template struct has_virtual_destructor : public integral_constant{}; +#else + template struct has_virtual_destructor : public integral_constant{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/ice.hpp b/Slang/boost/type_traits/ice.hpp new file mode 100644 index 0000000..134bc4b --- /dev/null +++ b/Slang/boost/type_traits/ice.hpp @@ -0,0 +1,20 @@ + +// (C) Copyright John Maddock and Steve Cleary 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// macros and helpers for working with integral-constant-expressions. + +#ifndef BOOST_TT_ICE_HPP_INCLUDED +#define BOOST_TT_ICE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#endif // BOOST_TT_ICE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/integral_constant.hpp b/Slang/boost/type_traits/integral_constant.hpp new file mode 100644 index 0000000..2592bcb --- /dev/null +++ b/Slang/boost/type_traits/integral_constant.hpp @@ -0,0 +1,97 @@ +// (C) Copyright John Maddock 2015. +// 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_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP +#define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP + +#include +#include + +#if (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) )\ + || defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) + + +namespace boost{ + namespace mpl + { + template struct bool_; + template struct integral_c; + struct integral_c_tag; + } +} + +#else + +namespace mpl_{ + + template struct bool_; + template struct integral_c; + struct integral_c_tag; +} + +namespace boost +{ + namespace mpl + { + using ::mpl_::bool_; + using ::mpl_::integral_c; + using ::mpl_::integral_c_tag; + } +} + +#endif + +namespace boost{ + + template + struct integral_constant + { + typedef mpl::integral_c_tag tag; + typedef T value_type; + typedef integral_constant type; + static const T value = val; + + operator const mpl::integral_c& ()const + { + static const char data[sizeof(long)] = { 0 }; + static const void* pdata = data; + return *(reinterpret_cast*>(pdata)); + } + BOOST_CONSTEXPR operator T()const { return val; } + }; + + template + T const integral_constant::value; + + template + struct integral_constant + { + typedef mpl::integral_c_tag tag; + typedef bool value_type; + typedef integral_constant type; + static const bool value = val; + + operator const mpl::bool_& ()const + { + static const char data[sizeof(long)] = { 0 }; + static const void* pdata = data; + return *(reinterpret_cast*>(pdata)); + } + BOOST_CONSTEXPR operator bool()const { return val; } + }; + + template + bool const integral_constant::value; + + typedef integral_constant true_type; + typedef integral_constant false_type; + +} + +#endif diff --git a/Slang/boost/type_traits/integral_promotion.hpp b/Slang/boost/type_traits/integral_promotion.hpp new file mode 100644 index 0000000..cc6a41d --- /dev/null +++ b/Slang/boost/type_traits/integral_promotion.hpp @@ -0,0 +1,187 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED +#define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace type_traits { namespace detail { + +// 4.5/2 +template struct need_promotion : public boost::is_enum {}; + +// 4.5/1 +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; + + +// Specializations for non-standard types. +// Type is promoted if it's smaller then int. + +#define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \ + template<> struct need_promotion \ + : public integral_constant {}; + +// Same set of integral types as in boost/type_traits/is_integral.hpp. +// Please, keep in sync. +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x600) && (_MSC_VER < 1300)) +// TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int8 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int16 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int16) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int32 ) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int32) +#ifdef BOOST_BORLANDC +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif +#endif + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::ulong_long_type) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::long_long_type ) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) +BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE + + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// 4.5/2 +template<> struct need_promotion : public true_type {}; +#endif + +// 4.5/3 (integral bit-field) is not supported. + +// 4.5/4 +template<> struct need_promotion : public true_type {}; + + +// Get promoted type by index and cv qualifiers. + +template struct promote_from_index; + +#define BOOST_TT_AUX_PROMOTE_FROM_INDEX(N,T) \ + template<> struct promote_from_index { typedef T type; }; \ + template<> struct promote_from_index { typedef T volatile type; }; \ + template<> struct promote_from_index { typedef T const type; }; \ + template<> struct promote_from_index { typedef T const volatile type; }; + + +BOOST_TT_AUX_PROMOTE_FROM_INDEX(1, int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(2, unsigned int ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(3, long ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(4, unsigned long) + + +// WARNING: integral promotions to non-standard types +// long long and __int64 are not defined by the standard. +// Additional specialisations and overloads shouldn't +// introduce ambiguity, though. + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(7, __int64 ) +BOOST_TT_AUX_PROMOTE_FROM_INDEX(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTE_FROM_INDEX + + +// Define BOOST_TT_AUX_PROMOTED_INDEX_TESTER: +#if !defined(BOOST_MSVC) + +template +struct sized_type_for_promotion +{ + typedef char (&type)[N]; +}; + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + sized_type_for_promotion::type promoted_index_tester(T); + +#else + +#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ + char (&promoted_index_tester(T))[I]; + +#endif + +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(1, int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(2, unsigned int ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(3, long ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(4, unsigned long) + +#if defined(BOOST_HAS_LONG_LONG) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(5, boost::long_long_type ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(6, boost::ulong_long_type) +#elif defined(BOOST_HAS_MS_INT64) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(7, __int64 ) +BOOST_TT_AUX_PROMOTED_INDEX_TESTER(8, unsigned __int64) +#endif + +#undef BOOST_TT_AUX_PROMOTED_INDEX_TESTER + + +// Get an index of promoted type for type T. +// Precondition: need_promotion +template +struct promoted_index +{ + static T testee; // undefined + BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee)) ); + // Unary plus promotes testee LOOK HERE ---> ^ +}; + +template +struct integral_promotion_impl +{ + typedef BOOST_DEDUCED_TYPENAME promote_from_index< + (boost::type_traits::detail::promoted_index::value) + , (boost::is_const::value) + , (boost::is_volatile::value) + >::type type; +}; + +template struct integral_promotion { typedef T type; }; +template struct integral_promotion : public integral_promotion_impl{}; + +} } + +template struct integral_promotion +{ +private: + typedef boost::type_traits::detail::need_promotion::type> tag_type; +public: + typedef typename boost::type_traits::detail::integral_promotion::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using integral_promotion_t = typename integral_promotion::type; + +#endif + +} + +#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED + diff --git a/Slang/boost/type_traits/intrinsics.hpp b/Slang/boost/type_traits/intrinsics.hpp new file mode 100644 index 0000000..02f2a03 --- /dev/null +++ b/Slang/boost/type_traits/intrinsics.hpp @@ -0,0 +1,391 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED +#define BOOST_TT_INTRINSICS_HPP_INCLUDED + +#ifndef BOOST_TT_DISABLE_INTRINSICS + +#include + +#ifndef BOOST_TT_CONFIG_HPP_INCLUDED +#include +#endif + +// +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_IS_UNION(T) should evaluate to true if T is a union type +// BOOST_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) +// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor +// BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor. +// BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_IS_ABSTRACT(T) true if T is an abstract type +// BOOST_IS_BASE_OF(T,U) true if T is a base class of U +// BOOST_IS_CLASS(T) true if T is a class type (and not a union) +// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U +// BOOST_IS_ENUM(T) true is T is an enum +// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. +// +// define BOOST_TT_DISABLE_INTRINSICS to prevent any intrinsics being used (mostly used when testing) +// + +#ifdef BOOST_HAS_SGI_TYPE_TRAITS + // Hook into SGI's __type_traits class, this will pick up user supplied + // specializations as well as SGI - compiler supplied specializations. +# include +# ifdef __NetBSD__ + // There are two different versions of type_traits.h on NetBSD on Spark + // use an implicit include via algorithm instead, to make sure we get + // the same version as the std lib: +# include +# else +# include +# endif +# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits::is_POD_type, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_default_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_destructor, ::__true_type>::value + +# ifdef __sgi +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +# endif +#endif + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) +#if !defined(BOOST_INTEL) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) && !is_array::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) || ::boost::is_pod::value) +#elif (_MSC_VER >= 1900) +# define BOOST_HAS_NOTHROW_COPY(T) ((__is_nothrow_constructible(T, typename add_lvalue_reference::type>::type)) && !is_array::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_constructible(T, typename add_lvalue_reference::type>::type)) +#endif +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same::value && !is_function::value)) && !__is_abstract(U)) +# define BOOST_IS_ENUM(T) __is_enum(T) +// This one fails if the default alignment has been changed with /Zp: +// # define BOOST_ALIGNMENT_OF(T) __alignof(T) + +# if defined(_MSC_VER) && (_MSC_VER >= 1800) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__is_trivially_constructible(T, T&&) || boost::is_pod::value) && ! ::boost::is_volatile::value && ! ::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__is_trivially_assignable(T, T&&) || boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && ! ::boost::is_reference::value) +# elif defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || boost::is_pod::value) && ! ::boost::is_volatile::value && ! ::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && ! ::boost::is_reference::value) +# endif +#ifndef BOOST_NO_CXX11_FINAL +// This one doesn't quite always do the right thing on older VC++ versions +// we really need it when the final keyword is supported though: +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +#endif +#if _MSC_FULL_VER >= 180020827 +# define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&)) +# define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&)) +#endif +#if _MSC_VER >= 1800 +# define BOOST_IS_FINAL(T) __is_final(T) +#endif +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__DMC__) && (__DMC__ >= 0x848) +// For Digital Mars C++, www.digitalmars.com +# define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) +# define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) +# define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) +# define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) +# define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +// +// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears +// to not support them, even though the underlying clang compiler does so. +// This is a rubbish fix as it basically stops type traits from working correctly, +// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 +// +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// +# include + +# if __has_feature(is_union) +# define BOOST_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value && is_assignable::value) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible::value) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# endif +# if __has_feature(has_nothrow_assign) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value && is_assignable::value) +# endif +# if __has_feature(has_virtual_destructor) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) +# endif +# if __has_feature(is_abstract) +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# endif +# if __has_feature(is_base_of) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# endif +# if __has_feature(is_class) +# define BOOST_IS_CLASS(T) __is_class(T) +# endif +# if __has_feature(is_convertible_to) +# define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# endif +# if __has_feature(is_enum) +# define BOOST_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(is_polymorphic) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# endif +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +# if __has_extension(is_trivially_constructible) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible::value && !::boost::is_volatile::value) +# endif +# if __has_extension(is_trivially_assignable) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable::value && !::boost::is_volatile::value) +# endif +#endif +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) || !defined(__GNUC__) +// GCC sometimes lies about alignment requirements +// of type double on 32-bit unix platforms, use the +// old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof(T) +# endif +# if __has_feature(is_final) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) +// +// Note that even though these intrinsics rely on other type traits classes +// we do not #include those here as it produces cyclic dependencies and +// can cause the intrinsics to not even be used at all! +// + +#ifdef BOOST_INTEL +# define BOOST_INTEL_TT_OPTS || is_pod::value +#else +# define BOOST_INTEL_TT_OPTS +#endif + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value) +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS && is_destructible::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && is_assignable::value) +#else +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) +#if ((__GNUC__ * 100 + __GNUC_MINOR__) != 407) && ((__GNUC__ * 100 + __GNUC_MINOR__) != 408) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && !is_array::value) +#endif +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && !is_array::value) +#endif +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# if (!defined(unix) && !defined(__unix__) && \ + !(defined(__VXWORKS__) && defined(__i386__))) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# endif +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# if (__GNUC__ >= 5) && (__cplusplus >= 201103) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable::value && !::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible::value && !::boost::is_volatile::value) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) +# define BOOST_IS_UNION(T) __oracle_is_union(T) +# define BOOST_IS_POD(T) (__oracle_is_pod(T) && !is_function::value) +# define BOOST_IS_EMPTY(T) __oracle_is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__oracle_has_trivial_destructor(T) && is_destructible::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) ((__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) && is_default_constructible::value) +// __oracle_has_nothrow_copy appears to behave the same as __oracle_has_nothrow_assign, disabled for now: +//# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_const::value && is_assignable::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T) +//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __oracle_is_class(T) +# define BOOST_IS_ENUM(T) __oracle_is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_IS_FINAL(T) __oracle_is_final(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +# if defined(BOOST_CODEGEARC) +# include +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#endif // BOOST_TT_DISABLE_INTRINSICS + +#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_abstract.hpp b/Slang/boost/type_traits/is_abstract.hpp new file mode 100644 index 0000000..781d94a --- /dev/null +++ b/Slang/boost/type_traits/is_abstract.hpp @@ -0,0 +1,150 @@ +#ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP +#define BOOST_TT_IS_ABSTRACT_CLASS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// is_abstract_class.hpp: +// +// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. +// + +// Compile type discovery whether given type is abstract class or not. +// +// Requires DR 337 to be supported by compiler +// (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#337). +// +// +// Believed (Jan 2004) to work on: +// - GCC 3.4 +// - VC++ 7.1 +// - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) +// +// Doesn't work on: +// - VC++6, VC++7.0 and less +// - GCC 3.3.X and less +// - Borland C++ 6 and less +// +// +// History: +// - Originally written by Rani Sharoni, see +// http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com +// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. +// - Adapted and added into Boost.Serialization library by Robert Ramey +// (starting with submission #10). +// - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo). +// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). +// - Nov 2004: Christoph Ludwig found that the implementation did not work with +// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig +// and John Maddock. +// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template +// to degrade gracefully, rather than trash the compiler (John Maddock). +// + +#include // size_t +#include +#include +#ifndef BOOST_IS_ABSTRACT +#include +#include +#include +#ifdef BOOST_NO_IS_ABSTRACT +#include +#endif +#endif + +namespace boost { + +namespace detail{ + +#ifdef BOOST_IS_ABSTRACT +template +struct is_abstract_imp +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); +}; +#elif !defined(BOOST_NO_IS_ABSTRACT) +template +struct is_abstract_imp2 +{ + // Deduction fails if T is void, function type, + // reference type (14.8.2/2)or an abstract class type + // according to review status issue #337 + // + template + static type_traits::no_type check_sig(U (*)[1]); + template + static type_traits::yes_type check_sig(...); + // + // T must be a complete type, further if T is a template then + // it must be instantiated in order for us to get the right answer: + // + BOOST_STATIC_ASSERT(sizeof(T) != 0); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. +#ifdef __GNUC__ + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); +#else +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +#endif + + BOOST_STATIC_CONSTANT(bool, value = + (s1 == sizeof(type_traits::yes_type))); +}; + +template +struct is_abstract_select +{ + template + struct rebind + { + typedef is_abstract_imp2 type; + }; +}; +template <> +struct is_abstract_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_abstract_imp +{ + typedef is_abstract_select< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#endif +} + +#ifndef BOOST_NO_IS_ABSTRACT +template struct is_abstract : public integral_constant::value> {}; +#else +template struct is_abstract : public integral_constant::value> {}; +#endif + +} // namespace boost + +#endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP diff --git a/Slang/boost/type_traits/is_arithmetic.hpp b/Slang/boost/type_traits/is_arithmetic.hpp new file mode 100644 index 0000000..c23811e --- /dev/null +++ b/Slang/boost/type_traits/is_arithmetic.hpp @@ -0,0 +1,22 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED +#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED + +#include +#include + +namespace boost { + +template +struct is_arithmetic : public integral_constant::value || is_floating_point::value> {}; + +} // namespace boost + +#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_array.hpp b/Slang/boost/type_traits/is_array.hpp new file mode 100644 index 0000000..16f6a1b --- /dev/null +++ b/Slang/boost/type_traits/is_array.hpp @@ -0,0 +1,43 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +// Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. + + +#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED +#define BOOST_TT_IS_ARRAY_HPP_INCLUDED + +#include +#include // size_t + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + template struct is_array : public integral_constant {}; +#else + template struct is_array : public false_type {}; +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) + template struct is_array : public true_type {}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; + template struct is_array : public true_type{}; +#endif +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_assignable.hpp b/Slang/boost/type_traits/is_assignable.hpp new file mode 100644 index 0000000..6a9474b --- /dev/null +++ b/Slang/boost/type_traits/is_assignable.hpp @@ -0,0 +1,85 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED + +#include // size_t +#include +#include +#include +#include + +namespace boost{ + + template struct is_assignable; + +} + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) + +#include +#include + +namespace boost{ + + namespace detail{ + + struct is_assignable_imp + { + template() = boost::declval())> + static boost::type_traits::yes_type test(int); + + template + static boost::type_traits::no_type test(...); + }; + + } + + template struct is_assignable : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_assignable must be complete types"); + }; + template struct is_assignable : public is_assignable{}; + template struct is_assignable : public is_assignable{}; + template struct is_assignable : public is_assignable{}; + template struct is_assignable : public is_assignable{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + +#else + +#include +#include + +namespace boost{ + + // We don't know how to implement this: + template struct is_assignable : public integral_constant + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_assignable must be complete types"); + }; + template struct is_assignable : public integral_constant::value && is_pod::type>::value>{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + template struct is_assignable : public integral_constant{}; + /* + template <> struct is_assignable : public integral_constant{}; + template <> struct is_assignable : public integral_constant{}; + template <> struct is_assignable : public integral_constant{}; + template <> struct is_assignable : public integral_constant{}; + */ +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_base_and_derived.hpp b/Slang/boost/type_traits/is_base_and_derived.hpp new file mode 100644 index 0000000..7973e5a --- /dev/null +++ b/Slang/boost/type_traits/is_base_and_derived.hpp @@ -0,0 +1,244 @@ + +// (C) Copyright Rani Sharoni 2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED +#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_BASE_OF +#include +#include +#include +#include +#include +#endif +#include +#include + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_BASE_OF +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x581)) \ + && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ + && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ + && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + + // The EDG version number is a lower estimate. + // It is not currently known which EDG version + // exactly fixes the problem. + +/************************************************************************* + +This version detects ambiguous base classes and private base classes +correctly, and was devised by Rani Sharoni. + +Explanation by Terje Slettebo and Rani Sharoni. + +Let's take the multiple base class below as an example, and the following +will also show why there's not a problem with private or ambiguous base +class: + +struct B {}; +struct B1 : B {}; +struct B2 : B {}; +struct D : private B1, private B2 {}; + +is_base_and_derived::value; + +First, some terminology: + +SC - Standard conversion +UDC - User-defined conversion + +A user-defined conversion sequence consists of an SC, followed by an UDC, +followed by another SC. Either SC may be the identity conversion. + +When passing the default-constructed Host object to the overloaded check_sig() +functions (initialization 8.5/14/4/3), we have several viable implicit +conversion sequences: + +For "static no_type check_sig(B const volatile *, int)" we have the conversion +sequences: + +C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) + +For "static yes_type check_sig(D const volatile *, T)" we have the conversion +sequence: + +C -> D const volatile* (UDC) + +According to 13.3.3.1/4, in context of user-defined conversion only the +standard conversion sequence is considered when selecting the best viable +function, so it only considers up to the user-defined conversion. For the +first function this means choosing between C -> C const and C -> C, and it +chooses the latter, because it's a proper subset (13.3.3.2/3/2) of the +former. Therefore, we have: + +C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> + B const volatile* (SC - Conversion) +C -> D const volatile* (UDC) + +Here, the principle of the "shortest subsequence" applies again, and it +chooses C -> D const volatile*. This shows that it doesn't even need to +consider the multiple paths to B, or accessibility, as that possibility is +eliminated before it could possibly cause ambiguity or access violation. + +If D is not derived from B, it has to choose between C -> C const -> B const +volatile* for the first function, and C -> D const volatile* for the second +function, which are just as good (both requires a UDC, 13.3.3.2), had it not +been for the fact that "static no_type check_sig(B const volatile *, int)" is +not templated, which makes C -> C const -> B const volatile* the best choice +(13.3.3/1/4), resulting in "no". + +Also, if Host::operator B const volatile* hadn't been const, the two +conversion sequences for "static no_type check_sig(B const volatile *, int)", in +the case where D is derived from B, would have been ambiguous. + +See also +http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting. +google.com and links therein. + +*************************************************************************/ + +template +struct bd_helper +{ + // + // This VC7.1 specific workaround stops the compiler from generating + // an internal compiler error when compiling with /vmg (thanks to + // Aleksey Gurtovoy for figuring out the workaround). + // +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + template + static type_traits::yes_type check_sig(D const volatile *, T); + static type_traits::no_type check_sig(B const volatile *, int); +#else + static type_traits::yes_type check_sig(D const volatile *, long); + static type_traits::no_type check_sig(B const volatile * const&, int); +#endif +}; + +template +struct is_base_and_derived_impl2 +{ +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + // + // May silently do the wrong thing with incomplete types + // unless we trap them here: + // + BOOST_STATIC_ASSERT(sizeof(B) != 0); + BOOST_STATIC_ASSERT(sizeof(D) != 0); + + struct Host + { +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) + operator B const volatile *() const; +#else + operator B const volatile * const&() const; +#endif + operator D const volatile *(); + }; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(pop) +#endif +}; + +#else + +// +// broken version: +// +template +struct is_base_and_derived_impl2 +{ + BOOST_STATIC_CONSTANT(bool, value = + (::boost::is_convertible::value)); +}; + +#define BOOST_BROKEN_IS_BASE_AND_DERIVED + +#endif + +template +struct is_base_and_derived_impl3 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl3 type; + }; +}; + +template <> +struct is_base_and_derived_select +{ + template + struct rebind + { + typedef is_base_and_derived_impl2 type; + }; +}; + +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + typedef is_base_and_derived_select< + ::boost::is_class::value, + ::boost::is_class::value, + ::boost::is_same::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type bound_type; + + BOOST_STATIC_CONSTANT(bool, value = bound_type::value); +}; +#else +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); +}; +#endif +} // namespace detail + +template struct is_base_and_derived + : public integral_constant::value)> {}; + +template struct is_base_and_derived : public false_type{}; +template struct is_base_and_derived : public false_type{}; +template struct is_base_and_derived : public false_type{}; + +#if BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x610)) +template struct is_base_and_derived : public true_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_base_of.hpp b/Slang/boost/type_traits/is_base_of.hpp new file mode 100644 index 0000000..89f2f67 --- /dev/null +++ b/Slang/boost/type_traits/is_base_of.hpp @@ -0,0 +1,39 @@ + +// (C) Copyright Rani Sharoni 2003-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED +#define BOOST_TT_IS_BASE_OF_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = ( + (::boost::detail::is_base_and_derived_impl::value) || + (::boost::is_same::value && ::boost::is_class::value))); + }; + } + + template struct is_base_of + : public integral_constant::value)> {}; + + template struct is_base_of : false_type{}; + template struct is_base_of : false_type{}; + template struct is_base_of : false_type{}; + +} // namespace boost + +#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_base_of_tr1.hpp b/Slang/boost/type_traits/is_base_of_tr1.hpp new file mode 100644 index 0000000..210bf54 --- /dev/null +++ b/Slang/boost/type_traits/is_base_of_tr1.hpp @@ -0,0 +1,37 @@ + +// (C) Copyright Rani Sharoni 2003-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED +#define BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED + +#include +#include +#include + +namespace boost { namespace tr1{ + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = ((::boost::detail::is_base_and_derived_impl::value) || (::boost::is_same::value))); + }; + } + + template struct is_base_of + : public integral_constant::value)>{}; + + template struct is_base_of : public false_type{}; + template struct is_base_of : public false_type{}; + template struct is_base_of : public false_type{}; + +} } // namespace boost + +#endif // BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_bounded_array.hpp b/Slang/boost/type_traits/is_bounded_array.hpp new file mode 100644 index 0000000..5aeca6f --- /dev/null +++ b/Slang/boost/type_traits/is_bounded_array.hpp @@ -0,0 +1,42 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_BOUNDED_ARRAY_HPP_INCLUDED +#define BOOST_TT_IS_BOUNDED_ARRAY_HPP_INCLUDED + +#include +#include + +namespace boost { + +template +struct is_bounded_array + : false_type { }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct is_bounded_array + : true_type { }; + +template +struct is_bounded_array + : true_type { }; + +template +struct is_bounded_array + : true_type { }; + +template +struct is_bounded_array + : true_type { }; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_class.hpp b/Slang/boost/type_traits/is_class.hpp new file mode 100644 index 0000000..e3a22d2 --- /dev/null +++ b/Slang/boost/type_traits/is_class.hpp @@ -0,0 +1,114 @@ +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000-2003. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED +#define BOOST_TT_IS_CLASS_HPP_INCLUDED + +#include +#include +#include +#ifndef BOOST_IS_CLASS +# include + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# include +#else +# include +# include +# include +# include +# include +#endif + +#endif // BOOST_IS_CLASS + +namespace boost { + +namespace detail { + +#ifndef BOOST_IS_CLASS +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +// This is actually the conforming implementation which works with +// abstract classes. However, enough compilers have trouble with +// it that most will use the one in +// boost/type_traits/object_traits.hpp. This implementation +// actually works with VC7.0, but other interactions seem to fail +// when we use it. + +// is_class<> metafunction due to Paul Mensonides +// (leavings@attbi.com). For more details: +// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 +#if defined(__GNUC__) && !defined(__EDG_VERSION__) + +template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); +template ::boost::type_traits::no_type is_class_tester(...); + +template +struct is_class_impl +{ + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) + && ! ::boost::is_union::value + ); +}; + +#else + +template +struct is_class_impl +{ + template static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); + template static ::boost::type_traits::no_type is_class_tester(...); + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) + && ! ::boost::is_union::value + ); +}; + +#endif + +#else + +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = + ! ::boost::is_union::value >::value + && ! ::boost::is_scalar::value + && ! ::boost::is_array::value + && ! ::boost::is_reference::value + && ! ::boost::is_void::value + && ! ::boost::is_function::value + ); +}; + +# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# else // BOOST_IS_CLASS +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); +}; +# endif // BOOST_IS_CLASS + +} // namespace detail + +template struct is_class : public integral_constant::value> {}; +# ifdef __EDG_VERSION__ +template struct is_class : public is_class{}; +template struct is_class : public is_class{}; +template struct is_class : public is_class{}; +# endif + +} // namespace boost + +#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_complete.hpp b/Slang/boost/type_traits/is_complete.hpp new file mode 100644 index 0000000..07cb897 --- /dev/null +++ b/Slang/boost/type_traits/is_complete.hpp @@ -0,0 +1,92 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COMPLETE_HPP_INCLUDED +#define BOOST_TT_IS_COMPLETE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +/* + * CAUTION: + * ~~~~~~~~ + * + * THIS TRAIT EXISTS SOLELY TO GENERATE HARD ERRORS WHEN A ANOTHER TRAIT + * WHICH REQUIRES COMPLETE TYPES AS ARGUMENTS IS PASSED AN INCOMPLETE TYPE + * + * DO NOT MAKE GENERAL USE OF THIS TRAIT, AS THE COMPLETENESS OF A TYPE + * VARIES ACROSS TRANSLATION UNITS AS WELL AS WITHIN A SINGLE UNIT. + * +*/ + +namespace boost { + + +// +// We will undef this if the trait isn't fully functional: +// +#define BOOST_TT_HAS_WORKING_IS_COMPLETE + +#if !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1900) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40600) + + namespace detail{ + + template + struct ok_tag { double d; char c[N]; }; + + template + ok_tag check_is_complete(int); + template + char check_is_complete(...); + } + + template struct is_complete + : public integral_constant::type>::value || (sizeof(boost::detail::check_is_complete(0)) != sizeof(char))> {}; + +#elif !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + + namespace detail + { + + template + struct is_complete_imp + { + template ())) > + static type_traits::yes_type check(U*); + + template + static type_traits::no_type check(...); + + static const bool value = sizeof(check(0)) == sizeof(type_traits::yes_type); + }; + +} // namespace detail + + + template + struct is_complete : boost::integral_constant::type>::value || ::boost::detail::is_complete_imp::value> + {}; + template + struct is_complete : boost::is_complete {}; + +#else + + template struct is_complete + : public boost::integral_constant {}; + +#undef BOOST_TT_HAS_WORKING_IS_COMPLETE + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_COMPLETE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_complex.hpp b/Slang/boost/type_traits/is_complex.hpp new file mode 100644 index 0000000..c4554ce --- /dev/null +++ b/Slang/boost/type_traits/is_complex.hpp @@ -0,0 +1,25 @@ +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COMPLEX_HPP +#define BOOST_TT_IS_COMPLEX_HPP + +#include +#include +#include + +namespace boost { + + template struct is_complex : public false_type {}; + template struct is_complex : public is_complex{}; + template struct is_complex : public is_complex{}; + template struct is_complex : public is_complex{}; + template struct is_complex > : public true_type{}; + +} // namespace boost + +#endif //BOOST_TT_IS_COMPLEX_HPP diff --git a/Slang/boost/type_traits/is_compound.hpp b/Slang/boost/type_traits/is_compound.hpp new file mode 100644 index 0000000..08f6e11 --- /dev/null +++ b/Slang/boost/type_traits/is_compound.hpp @@ -0,0 +1,24 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED +#define BOOST_TT_IS_COMPOUND_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + template struct is_compound : public integral_constant {}; +#else + template struct is_compound : public integral_constant::value> {}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_const.hpp b/Slang/boost/type_traits/is_const.hpp new file mode 100644 index 0000000..256326f --- /dev/null +++ b/Slang/boost/type_traits/is_const.hpp @@ -0,0 +1,47 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED +#define BOOST_TT_IS_CONST_HPP_INCLUDED + +#include // size_t +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + + template + struct is_const : public integral_constant {}; + +#else + + template + struct is_const : public false_type {}; + template struct is_const : public true_type{}; + template struct is_const : public true_type{}; + template struct is_const : public true_type{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONST_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_constructible.hpp b/Slang/boost/type_traits/is_constructible.hpp new file mode 100644 index 0000000..6969cd6 --- /dev/null +++ b/Slang/boost/type_traits/is_constructible.hpp @@ -0,0 +1,90 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + +#include +#include +#include +#include +#include +#include + +#define BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING 1 + +namespace boost{ + + namespace detail{ + + struct is_constructible_imp + { + template()...))> + static boost::type_traits::yes_type test(int); + template + static boost::type_traits::no_type test(...); + + template()))> + static boost::type_traits::yes_type test1(int); + template + static boost::type_traits::no_type test1(...); + + template + static boost::type_traits::yes_type ref_test(T); + template + static boost::type_traits::no_type ref_test(...); + }; + + } + + template struct is_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + { + BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value, "The target type must be complete in order to test for constructibility"); + }; + template struct is_constructible : public integral_constant::value && sizeof(boost::detail::is_constructible_imp::test1(0)) == sizeof(boost::type_traits::yes_type)> + { + BOOST_STATIC_ASSERT_MSG(::boost::is_complete::value, "The target type must be complete in order to test for constructibility"); + }; + template struct is_constructible : public integral_constant(boost::declval())) == sizeof(boost::type_traits::yes_type)>{}; + template struct is_constructible : public integral_constant(boost::declval())) == sizeof(boost::type_traits::yes_type)>{}; + + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + + template struct is_constructible : public is_default_constructible{}; + +#else + +#include +#include + +namespace boost{ + + // We don't know how to implement this: + template struct is_constructible : public is_convertible{}; + template struct is_constructible : public is_default_constructible{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template <> struct is_constructible : public false_type{}; + template struct is_constructible : public false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template struct is_constructible : public false_type{}; +#endif +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_convertible.hpp b/Slang/boost/type_traits/is_convertible.hpp new file mode 100644 index 0000000..f873ef6 --- /dev/null +++ b/Slang/boost/type_traits/is_convertible.hpp @@ -0,0 +1,506 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#ifndef BOOST_IS_CONVERTIBLE +#include +#include +#include +#include +#include +#if !defined(BOOST_NO_IS_ABSTRACT) +#include +#endif +#include +#include +#include + +#if defined(__MWERKS__) +#include +#endif +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +# include +#endif +#elif defined(BOOST_MSVC) || defined(BOOST_INTEL) +#include +#include +#endif // BOOST_IS_CONVERTIBLE + +namespace boost { + +#ifndef BOOST_IS_CONVERTIBLE + +// is one type convertible to another? +// +// there are multiple versions of the is_convertible +// template, almost every compiler seems to require its +// own version. +// +// Thanks to Andrei Alexandrescu for the original version of the +// conversion detection technique! +// + +namespace detail { + +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(BOOST_GCC) && (BOOST_GCC < 40700)) + + // This is a C++11 conforming version, place this first and use it wherever possible: + +# define BOOST_TT_CXX11_IS_CONVERTIBLE + + template + struct or_helper + { + static const bool value = (A::value || B::value || C::value); + }; + + template, boost::is_function, boost::is_array >::value> + struct is_convertible_basic_impl + { + // Nothing converts to function or array, but void converts to void: + static const bool value = is_void::value; + }; + + template + class is_convertible_basic_impl + { + typedef char one; + typedef int two; + + template + static void test_aux(To1); + + template + static decltype(test_aux(boost::declval()), one()) test(int); + + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == 1; + }; + +#elif defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x560) +// +// special version for Borland compilers +// this version breaks when used for some +// UDT conversions: +// +template +struct is_convertible_impl +{ +#pragma option push -w-8074 + // This workaround for Borland breaks the EDG C++ frontend, + // so we only use it for Borland. + template struct checker + { + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); + }; + + static typename add_lvalue_reference::type _m_from; + static bool const value = sizeof( checker::_m_check(_m_from) ) + == sizeof(::boost::type_traits::yes_type); +#pragma option pop +}; + +#elif defined(__GNUC__) || defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x600) +// special version for gcc compiler + recent Borland versions +// note that this does not pass UDT's through (...) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) + static bool const value = + sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) + == sizeof(::boost::type_traits::yes_type); +#else + static bool const value = + sizeof( boost::detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +#endif +}; + +#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ + || defined(__IBMCPP__) || defined(__HP_aCC) +// +// This is *almost* an ideal world implementation as it doesn't rely +// on undefined behaviour by passing UDT's through (...). +// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) +// Enable this for your compiler if is_convertible_test.cpp will compile it... +// +// Note we do not enable this for VC7.1, because even though it passes all the +// type_traits tests it is known to cause problems when instantiation occurs +// deep within the instantiation tree :-( +// +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +#elif defined(__DMC__) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + // Using '...' doesn't always work on Digital Mars. This version seems to. + template + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + + // Static constants sometime cause the conversion of _m_from to To to be + // called. This doesn't happen with an enum. +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + enum { value = + sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#else + enum { value = + sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +#endif +}; + +#elif defined(__MWERKS__) +// +// CW works with the technique implemented above for EDG, except when From +// is a function type (or a reference to such a type), in which case +// any_conversion won't be accepted as a valid conversion. We detect this +// exceptional situation and channel it through an alternative algorithm. +// + +template +struct is_convertible_basic_impl_aux; + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(const T&); + template any_conversion(volatile T&); + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename add_lvalue_reference::type lvalue_type; + typedef typename add_rvalue_reference::type rvalue_type; + static lvalue_type _m_from; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +}; + +template +struct is_convertible_basic_impl: + is_convertible_basic_impl_aux< + From,To, + ::boost::is_function::type>::value + > +{}; + +#else +// +// This version seems to work pretty well for a wide spectrum of compilers, +// however it does rely on undefined behaviour by passing UDT's through (...). +// + +//Workaround for old compilers like MSVC 7.1 to avoid +//forming a reference to an array of unknown bound +template +struct is_convertible_basic_impl_add_lvalue_reference + : add_lvalue_reference +{}; + +template +struct is_convertible_basic_impl_add_lvalue_reference +{ + typedef From type []; +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + typedef typename is_convertible_basic_impl_add_lvalue_reference::type lvalue_type; + static lvalue_type _m_from; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +#pragma warning(disable:6334) +#endif +#endif +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + typedef typename add_rvalue_reference::type rvalue_type; + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) + ); +#else + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#endif +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +#endif // is_convertible_impl + +#if defined(__DMC__) +// As before, a static constant sometimes causes errors on Digital Mars. +template +struct is_convertible_impl +{ + enum { + value = ( ::boost::detail::is_convertible_basic_impl::value && ! ::boost::is_array::value && ! ::boost::is_function::value) + }; +}; +#elif !defined(BOOST_BORLANDC) || BOOST_BORLANDC > 0x551 +template +struct is_convertible_impl +{ + BOOST_STATIC_CONSTANT(bool, value = ( ::boost::detail::is_convertible_basic_impl::value && !::boost::is_array::value && !::boost::is_function::value)); +}; +#endif + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ +#if !BOOST_WORKAROUND(__HP_aCC, < 60700) + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, +#if !defined(BOOST_NO_IS_ABSTRACT) && !defined(BOOST_TT_CXX11_IS_CONVERTIBLE) + // We need to filter out abstract types, only if we don't have a strictly conforming C++11 version: + ::boost::is_abstract::value +#else + false +#endif + > selector; +#else + typedef is_convertible_impl_select selector; +#endif + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; + +// +// Now add the full and partial specialisations +// for void types, these are common to all the +// implementation above: +// +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; +template <> struct is_convertible_impl_dispatch : public true_type{}; + +#else +template <> struct is_convertible_impl_dispatch : public true_type{}; +#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS + +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +template struct is_convertible_impl_dispatch : public false_type{}; +#endif + +} // namespace detail + +template +struct is_convertible : public integral_constant::value> +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value || boost::is_void::value || boost::is_array::value, "Destination argument type to is_convertible must be a complete type"); + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value || boost::is_void::value || boost::is_array::value, "From argument type to is_convertible must be a complete type"); +}; + +#else + +template +struct is_convertible : public integral_constant +{ +#if defined(BOOST_MSVC) + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value || boost::is_void::value || boost::is_array::value || boost::is_reference::value, "From argument type to is_convertible must be a complete type"); +#endif +#if defined(__clang__) + // clang's intrinsic doesn't assert on incomplete types: + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value || boost::is_void::value || boost::is_array::value, "Destination argument type to is_convertible must be a complete type"); + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value || boost::is_void::value || boost::is_array::value, "From argument type to is_convertible must be a complete type"); +#endif +}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_copy_assignable.hpp b/Slang/boost/type_traits/is_copy_assignable.hpp new file mode 100644 index 0000000..ed04927 --- /dev/null +++ b/Slang/boost/type_traits/is_copy_assignable.hpp @@ -0,0 +1,140 @@ +// (C) Copyright Ion Gaztanaga 2014. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED + +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_TT_CXX11_IS_COPY_ASSIGNABLE +#include +#else + //For compilers without decltype + #include + #include + #include + #include +#endif + +namespace boost { + +namespace detail{ + +template +struct is_copy_assignable_impl2 { + +// Intel compiler has problems with SFINAE for copy constructors and deleted functions: +// +// error: function *function_name* cannot be referenced -- it is a deleted function +// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +// ^ +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) + typedef boost::type_traits::yes_type yes_type; + typedef boost::type_traits::no_type no_type; + + template + static decltype(::boost::declval() = ::boost::declval(), yes_type() ) test(int); + + template + static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); + +#else + static BOOST_DEDUCED_TYPENAME boost::add_reference::type produce(); + + template + static boost::type_traits::no_type test(T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0); + + static boost::type_traits::yes_type test(...); + // If you see errors like this: + // + // `'T::operator=(const T&)' is private` + // `boost/type_traits/is_copy_assignable.hpp:NN:M: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T & operator=(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T & operator=(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T& operator=(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test(produce())) == sizeof(boost::type_traits::yes_type) + )); + #endif +}; + +template +struct is_copy_assignable_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_copy_assignable_impl { + +#if !defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) + //For compilers without decltype, at least return false on const types, arrays + //types derived from boost::noncopyable and types defined as BOOST_MOVEABLE_BUT_NOT_COPYABLE + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type unreferenced_t; + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_assignable_impl2< + boost::is_noncopyable::value + || boost::is_const::value || boost::is_array::value + ,T + >::value + )); + #else + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_assignable_impl2< + boost::is_noncopyable::value,T + >::value + )); + #endif +}; + +} // namespace detail + +template struct is_copy_assignable : public integral_constant::value>{}; +template <> struct is_copy_assignable : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct is_copy_assignable : public false_type{}; +template <> struct is_copy_assignable : public false_type{}; +template <> struct is_copy_assignable : public false_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_copy_constructible.hpp b/Slang/boost/type_traits/is_copy_constructible.hpp new file mode 100644 index 0000000..ef97e18 --- /dev/null +++ b/Slang/boost/type_traits/is_copy_constructible.hpp @@ -0,0 +1,185 @@ +// (C) Copyright Antony Polukhin 2013. +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40900) + +#include + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1800) + +namespace boost { + +template struct is_copy_constructible : public boost::is_constructible{}; + +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; +template <> struct is_copy_constructible : public false_type{}; + +} // namespace boost + +#else +// +// Special version for VC12 which has a problem when a base class (such as non_copyable) has a deleted +// copy constructor. In this case the compiler thinks there really is a copy-constructor and tries to +// instantiate the deleted member. std::is_copy_constructible has the same issue (or at least returns +// an incorrect value, which just defers the issue into the users code) as well. We can at least fix +// boost::non_copyable as a base class as a special case: +// +#include + +namespace boost { + + namespace detail + { + + template struct is_copy_constructible_imp : public boost::is_constructible{}; + template struct is_copy_constructible_imp : public false_type{}; + + } + + template struct is_copy_constructible : public detail::is_copy_constructible_imp::value>{}; + + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + +} // namespace boost + +#endif + +#else + +#include +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4181) +#endif + +namespace boost { + + namespace detail{ + + template + struct is_copy_constructible_impl2 { + + // Intel compiler has problems with SFINAE for copy constructors and deleted functions: + // + // error: function *function_name* cannot be referenced -- it is a deleted function + // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); + // ^ + // + // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: + // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800) + +#ifdef BOOST_NO_CXX11_DECLTYPE + template + static boost::type_traits::yes_type test(const T1&, boost::mpl::int_()))>* = 0); +#else + template + static boost::type_traits::yes_type test(const T1&, decltype(T1(boost::declval()))* = 0); +#endif + + static boost::type_traits::no_type test(...); +#else + template + static boost::type_traits::no_type test(const T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0); + static boost::type_traits::yes_type test(...); +#endif + + // If you see errors like this: + // + // `'T::T(const T&)' is private` + // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test( + boost::declval::type>() + )) == sizeof(boost::type_traits::yes_type) + && + !boost::is_rvalue_reference::value + && !boost::is_array::value + )); + }; + + template + struct is_copy_constructible_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_copy_constructible_impl { + + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_constructible_impl2< + boost::is_noncopyable::value, + T + >::value + )); + }; + + } // namespace detail + + template struct is_copy_constructible : public integral_constant::value>{}; + template <> struct is_copy_constructible : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; + template <> struct is_copy_constructible : public false_type{}; +#endif + +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif + +#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_default_constructible.hpp b/Slang/boost/type_traits/is_default_constructible.hpp new file mode 100644 index 0000000..04c023f --- /dev/null +++ b/Slang/boost/type_traits/is_default_constructible.hpp @@ -0,0 +1,98 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED + +#include // size_t +#include +#include +#include +#include + +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) +#include +#endif +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5)) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1800)) +#include // std::pair +#endif + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + +#include + +namespace boost{ + + namespace detail{ + + struct is_default_constructible_imp + { + template + static boost::type_traits::yes_type test(int); + + template + static boost::type_traits::no_type test(...); + }; +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template + struct is_default_constructible_abstract_filter + { + static const bool value = sizeof(is_default_constructible_imp::test(0)) == sizeof(boost::type_traits::yes_type); + }; + template + struct is_default_constructible_abstract_filter + { + static const bool value = false; + }; +#endif + } + +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template struct is_default_constructible : public integral_constant::value>::value> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_default_constructible must be complete types"); + }; +#else + template struct is_default_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_default_constructible must be complete types"); + }; +#endif + template struct is_default_constructible : public is_default_constructible{}; + template struct is_default_constructible : public is_default_constructible{}; + template struct is_default_constructible : public integral_constant{}; +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ <= 5))|| (defined(BOOST_MSVC) && (BOOST_MSVC == 1800)) + template struct is_default_constructible > : public integral_constant::value && is_default_constructible::value>{}; +#endif +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template struct is_default_constructible : public integral_constant{}; +#endif + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + +#else + +#include + +namespace boost{ + + // We don't know how to implement this, note we can not use has_trivial_constructor here + // because the correct implementation of that trait requires this one: + template struct is_default_constructible : public is_pod{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + template <> struct is_default_constructible : public integral_constant{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_destructible.hpp b/Slang/boost/type_traits/is_destructible.hpp new file mode 100644 index 0000000..c32e758 --- /dev/null +++ b/Slang/boost/type_traits/is_destructible.hpp @@ -0,0 +1,69 @@ + +// (C) Copyright John Maddock 2015. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED + +#include // size_t +#include +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) + +#include +#include + +namespace boost{ + + namespace detail{ + + struct is_destructible_imp + { + template().~T())> + static boost::type_traits::yes_type test(int); + template + static boost::type_traits::no_type test(...); + }; + + } + + template struct is_destructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_destructible must be complete types"); + }; + +#else + +#include +#include + +namespace boost{ + + // We don't know how to implement this: + template struct is_destructible : public integral_constant::value || is_class::value> + { + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_destructible must be complete types"); + }; +#endif + + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template <> struct is_destructible : public false_type{}; + template struct is_destructible : public is_destructible{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template struct is_destructible : public is_destructible{}; +#endif + template struct is_destructible : public is_destructible{}; + template struct is_destructible : public is_destructible{}; + +} // namespace boost + +#endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_detected.hpp b/Slang/boost/type_traits/is_detected.hpp new file mode 100644 index 0000000..25dfa84 --- /dev/null +++ b/Slang/boost/type_traits/is_detected.hpp @@ -0,0 +1,29 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_DETECTED_HPP_INCLUDED +#define BOOST_TT_IS_DETECTED_HPP_INCLUDED + +#include +#include + +namespace boost { + +template class Op, class... Args> +using is_detected = typename + detail::detector::value_t; + +#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +template class Op, class... Args> +constexpr bool is_detected_v = is_detected::value; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_detected_convertible.hpp b/Slang/boost/type_traits/is_detected_convertible.hpp new file mode 100644 index 0000000..538ba25 --- /dev/null +++ b/Slang/boost/type_traits/is_detected_convertible.hpp @@ -0,0 +1,29 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_DETECTED_CONVERTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_DETECTED_CONVERTIBLE_HPP_INCLUDED + +#include +#include + +namespace boost { + +template class Op, class... Args> +using is_detected_convertible = is_convertible, To>; + +#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +template class Op, class... Args> +constexpr bool is_detected_convertible_v = is_detected_convertible::value; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_detected_exact.hpp b/Slang/boost/type_traits/is_detected_exact.hpp new file mode 100644 index 0000000..34f714c --- /dev/null +++ b/Slang/boost/type_traits/is_detected_exact.hpp @@ -0,0 +1,29 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_DETECTED_EXACT_HPP_INCLUDED +#define BOOST_TT_IS_DETECTED_EXACT_HPP_INCLUDED + +#include +#include + +namespace boost { + +template class Op, class... Args> +using is_detected_exact = is_same >; + +#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +template class Op, class... Args> +constexpr bool is_detected_exact_v = is_detected_exact::value; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_empty.hpp b/Slang/boost/type_traits/is_empty.hpp new file mode 100644 index 0000000..ce623e3 --- /dev/null +++ b/Slang/boost/type_traits/is_empty.hpp @@ -0,0 +1,120 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_EMPTY_HPP_INCLUDED +#define BOOST_TT_IS_EMPTY_HPP_INCLUDED + +#include +#include +#include + +#include +#include +#include + +#ifndef BOOST_INTERNAL_IS_EMPTY +#define BOOST_INTERNAL_IS_EMPTY(T) false +#else +#define BOOST_INTERNAL_IS_EMPTY(T) BOOST_IS_EMPTY(T) +#endif + +namespace boost { + +namespace detail { + + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4624) // destructor could not be generated +#endif + +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); // hh compiler bug workaround + int i[256]; +private: + // suppress compiler warnings: + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +struct empty_helper_t2 { int i[256]; }; + +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) + +template +struct empty_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct empty_helper +{ + BOOST_STATIC_CONSTANT( + bool, value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) + ); +}; + +template +struct is_empty_impl +{ + typedef typename remove_cv::type cvt; + BOOST_STATIC_CONSTANT( + bool, + value = ( ::boost::detail::empty_helper::value>::value || BOOST_INTERNAL_IS_EMPTY(cvt))); +}; + +#else // BOOST_BORLANDC + +template +struct empty_helper +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct empty_helper +{ + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(empty_helper_t1) == sizeof(empty_helper_t2) + )); +}; + +template +struct is_empty_impl +{ + typedef typename remove_cv::type cvt; + typedef typename add_reference::type r_type; + + BOOST_STATIC_CONSTANT( + bool, value = ( + ::boost::detail::empty_helper< + cvt + , ::boost::is_class::value + , ::boost::is_convertible< r_type,int>::value + >::value || BOOST_INTERNAL_IS_EMPTY(cvt))); +}; + +#endif // BOOST_BORLANDC + +} // namespace detail + +template struct is_empty : integral_constant::value> {}; + +} // namespace boost + +#undef BOOST_INTERNAL_IS_EMPTY + +#endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_enum.hpp b/Slang/boost/type_traits/is_enum.hpp new file mode 100644 index 0000000..d23baa1 --- /dev/null +++ b/Slang/boost/type_traits/is_enum.hpp @@ -0,0 +1,166 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED +#define BOOST_TT_IS_ENUM_HPP_INCLUDED + +#include +#include +#ifndef BOOST_IS_ENUM +#include +#include +#include +#include +#include +#ifdef __GNUC__ +#include +#endif +#include +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) +# include +# include +#endif +#endif + +namespace boost { + +#ifndef BOOST_IS_ENUM +#if !(defined(BOOST_BORLANDC) && (BOOST_BORLANDC <= 0x551)) + +namespace detail { + +#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) + +template +struct is_class_or_union +{ + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_class::value || ::boost::is_union::value); +}; + +#else + +template +struct is_class_or_union +{ +# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. + BOOST_STATIC_CONSTANT(bool, value = false); +# else + template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); + +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# else + template + static ::boost::type_traits::no_type is_class_or_union_tester(...); + BOOST_STATIC_CONSTANT( + bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); +# endif +# endif +}; +#endif + +struct int_convertible +{ + int_convertible(int); +}; + +// Don't evaluate convertibility to int_convertible unless the type +// is non-arithmetic. This suppresses warnings with GCC. +template +struct is_enum_helper +{ + template struct type + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template <> +struct is_enum_helper +{ + template struct type + { + static const bool value = ::boost::is_convertible::type, ::boost::detail::int_convertible>::value; + }; +}; + +template struct is_enum_impl +{ + //typedef ::boost::add_reference ar_t; + //typedef typename ar_t::type r_type; + +#if defined(__GNUC__) + +#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + + // We MUST check for is_class_or_union on conforming compilers in + // order to correctly deduce that noncopyable types are not enums + // (dwa 2002/04/15)... + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || ::boost::is_function::value + || is_class_or_union::value + || is_array::value); +#else + // ...however, not checking is_class_or_union on non-conforming + // compilers prevents a dependency recursion. + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || ::boost::is_function::value + || is_array::value); +#endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION + +#else // !defined(__GNUC__): + + BOOST_STATIC_CONSTANT(bool, selector = + ::boost::is_arithmetic::value + || ::boost::is_reference::value + || is_class_or_union::value + || is_array::value); + +#endif + +#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) + typedef ::boost::detail::is_enum_helper< + ::boost::detail::is_enum_impl::selector + > se_t; +#else + typedef ::boost::detail::is_enum_helper se_t; +#endif + + typedef typename se_t::template type helper; + BOOST_STATIC_CONSTANT(bool, value = helper::value); +}; + +} // namespace detail + +template struct is_enum : public integral_constant::value> {}; + +#else // BOOST_BORLANDC +// +// buggy is_convertible prevents working +// implementation of is_enum: +template struct is_enum : public integral_constant {}; + +#endif + +#else // BOOST_IS_ENUM + +template struct is_enum : public integral_constant {}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_ENUM_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_final.hpp b/Slang/boost/type_traits/is_final.hpp new file mode 100644 index 0000000..21ac93f --- /dev/null +++ b/Slang/boost/type_traits/is_final.hpp @@ -0,0 +1,30 @@ + +// Copyright (c) 2014 Agustin Berge +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_FINAL_HPP_INCLUDED +#define BOOST_TT_IS_FINAL_HPP_INCLUDED + +#include +#include +#ifdef BOOST_IS_FINAL +#include +#endif + +namespace boost { + +#ifdef BOOST_IS_FINAL +template struct is_final : public integral_constant {}; +#else +template struct is_final : public integral_constant {}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_FINAL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_float.hpp b/Slang/boost/type_traits/is_float.hpp new file mode 100644 index 0000000..7bf7d1f --- /dev/null +++ b/Slang/boost/type_traits/is_float.hpp @@ -0,0 +1,20 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED + +// should be the last #include +#include + +namespace boost { + +//* is a type T a floating-point type described in the standard (3.9.1p8) + template struct is_float : public is_floating_point {}; +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_floating_point.hpp b/Slang/boost/type_traits/is_floating_point.hpp new file mode 100644 index 0000000..196c900 --- /dev/null +++ b/Slang/boost/type_traits/is_floating_point.hpp @@ -0,0 +1,30 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED + +#include + +namespace boost { + +//* is a type T a floating-point type described in the standard (3.9.1p8) + template struct is_floating_point : public false_type{}; + template struct is_floating_point : public is_floating_point{}; + template struct is_floating_point : public is_floating_point{}; + template struct is_floating_point : public is_floating_point{}; + template<> struct is_floating_point : public true_type{}; + template<> struct is_floating_point : public true_type{}; + template<> struct is_floating_point : public true_type{}; + +#if defined(BOOST_HAS_FLOAT128) + template<> struct is_floating_point<__float128> : public true_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_function.hpp b/Slang/boost/type_traits/is_function.hpp new file mode 100644 index 0000000..8556235 --- /dev/null +++ b/Slang/boost/type_traits/is_function.hpp @@ -0,0 +1,27 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED +#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED + +#include +#include + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION + +#include + +#else + +#include + +#endif + +#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_fundamental.hpp b/Slang/boost/type_traits/is_fundamental.hpp new file mode 100644 index 0000000..5ce28d4 --- /dev/null +++ b/Slang/boost/type_traits/is_fundamental.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED +#define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED + +#include +#include + +namespace boost { + +//* is a type T a fundamental type described in the standard (3.9.1) +#if defined( BOOST_CODEGEARC ) +template struct is_fundamental : public integral_constant {}; +#else +template struct is_fundamental : public integral_constant::value || ::boost::is_void::value> {}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_integral.hpp b/Slang/boost/type_traits/is_integral.hpp new file mode 100644 index 0000000..6c6e239 --- /dev/null +++ b/Slang/boost/type_traits/is_integral.hpp @@ -0,0 +1,89 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED +#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED + +#include +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + template + struct is_integral : public integral_constant {}; +#else + +template struct is_integral : public false_type {}; +template struct is_integral : public is_integral {}; +template struct is_integral : public is_integral{}; +template struct is_integral : public is_integral{}; + +//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) +// as an extension we include long long, as this is likely to be added to the +// standard at a later date +template<> struct is_integral : public true_type {}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; + +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +// If the following line fails to compile and you're using the Intel +// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php, +// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line. +template<> struct is_integral : public true_type{}; +#endif + +// Same set of integral types as in boost/type_traits/integral_promotion.hpp. +// Please, keep in sync. -- Alexander Nasonov +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ + || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x600) && (_MSC_VER < 1300)) +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int8> : public true_type{}; +template<> struct is_integral<__int16> : public true_type{}; +template<> struct is_integral<__int32> : public true_type{}; +#ifdef BOOST_BORLANDC +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int64> : public true_type{}; +#endif +#endif + +# if defined(BOOST_HAS_LONG_LONG) +template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; +template<> struct is_integral< ::boost::long_long_type> : public true_type{}; +#elif defined(BOOST_HAS_MS_INT64) +template<> struct is_integral : public true_type{}; +template<> struct is_integral<__int64> : public true_type{}; +#endif + +#ifdef BOOST_HAS_INT128 +template<> struct is_integral : public true_type{}; +template<> struct is_integral : public true_type{}; +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T +template<> struct is_integral : public true_type{}; +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +template<> struct is_integral : public true_type{}; +#endif + +#endif // non-CodeGear implementation + +} // namespace boost + +#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_list_constructible.hpp b/Slang/boost/type_traits/is_list_constructible.hpp new file mode 100644 index 0000000..4a9f84a --- /dev/null +++ b/Slang/boost/type_traits/is_list_constructible.hpp @@ -0,0 +1,48 @@ +#ifndef BOOST_TYPE_TRAITS_IS_LIST_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_LIST_CONSTRUCTIBLE_HPP_INCLUDED + +// Copyright 2017 Peter Dimov +// +// Distributed under the 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 +#include +#include +#include +#include +#include + +namespace boost +{ + +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)\ + || BOOST_WORKAROUND(BOOST_GCC, < 40700) + +template struct is_list_constructible: false_type +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_list_constructible must be complete types"); +}; + +#else + +namespace type_traits_detail +{ + +template()...} )> true_type is_list_constructible_impl( int ); +template false_type is_list_constructible_impl( ... ); + +} // namespace type_traits_detail + +template struct is_list_constructible: decltype( type_traits_detail::is_list_constructible_impl(0) ) +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_list_constructible must be complete types"); +}; + +#endif + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_IS_LIST_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_lvalue_reference.hpp b/Slang/boost/type_traits/is_lvalue_reference.hpp new file mode 100644 index 0000000..553cb9f --- /dev/null +++ b/Slang/boost/type_traits/is_lvalue_reference.hpp @@ -0,0 +1,50 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + template struct is_lvalue_reference : public integral_constant{}; +#else + + template struct is_lvalue_reference : public false_type{}; + template struct is_lvalue_reference : public true_type{}; + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... + template struct is_lvalue_reference : public true_type{}; + template struct is_lvalue_reference : public true_type{}; + template struct is_lvalue_reference : public true_type{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_member_function_pointer.hpp b/Slang/boost/type_traits/is_member_function_pointer.hpp new file mode 100644 index 0000000..9b5dbbf --- /dev/null +++ b/Slang/boost/type_traits/is_member_function_pointer.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED + +#include + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION + +#include + +#else + +#include + +#endif + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_member_object_pointer.hpp b/Slang/boost/type_traits/is_member_object_pointer.hpp new file mode 100644 index 0000000..cb7cf14 --- /dev/null +++ b/Slang/boost/type_traits/is_member_object_pointer.hpp @@ -0,0 +1,24 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED + +#include +#include + +namespace boost { + +template struct is_member_object_pointer + : public integral_constant::value && !::boost::is_member_function_pointer::value>{}; + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_member_pointer.hpp b/Slang/boost/type_traits/is_member_pointer.hpp new file mode 100644 index 0000000..2078f15 --- /dev/null +++ b/Slang/boost/type_traits/is_member_pointer.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED + +#include +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) +template struct is_member_pointer : public integral_constant{}; +#else +template struct is_member_pointer : public integral_constant::value>{}; +template struct is_member_pointer : public true_type{}; + +#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) +template struct is_member_pointer : public true_type{}; +template struct is_member_pointer : public true_type{}; +template struct is_member_pointer : public true_type{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_noncopyable.hpp b/Slang/boost/type_traits/is_noncopyable.hpp new file mode 100644 index 0000000..787103e --- /dev/null +++ b/Slang/boost/type_traits/is_noncopyable.hpp @@ -0,0 +1,39 @@ +#ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED + +// +// Copyright 2018 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// is_noncopyable returns whether T is derived from boost::noncopyable +// + +#include + +namespace boost +{ + +#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED +#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED + +// boost::noncopyable derives from noncopyable_::base_token to enable us +// to recognize it. The definition is macro-guarded so that we can replicate +// it here without including boost/core/noncopyable.hpp, which is in Core. + +namespace noncopyable_ +{ + struct base_token {}; +} + +#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED + +template struct is_noncopyable: is_base_and_derived +{ +}; + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_nothrow_move_assignable.hpp b/Slang/boost/type_traits/is_nothrow_move_assignable.hpp new file mode 100644 index 0000000..c6194de --- /dev/null +++ b/Slang/boost/type_traits/is_nothrow_move_assignable.hpp @@ -0,0 +1,92 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN + +template +struct is_nothrow_move_assignable : public integral_constant +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_assignable must be complete types"); +}; +template struct is_nothrow_move_assignable : public false_type{}; +template struct is_nothrow_move_assignable : public false_type{}; +template struct is_nothrow_move_assignable : public false_type{}; +template struct is_nothrow_move_assignable : public false_type{}; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template struct is_nothrow_move_assignable : public false_type{}; +#endif + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + +namespace detail{ + +template +struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_assignable < + T, + typename ::boost::enable_if_() = ::boost::declval())>::type + > : public ::boost::integral_constant() = ::boost::declval())> +{}; + +} + +template +struct is_nothrow_move_assignable : public integral_constant::value> +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_assignable must be complete types"); +}; + +template struct is_nothrow_move_assignable : public ::boost::false_type {}; +template struct is_nothrow_move_assignable : public ::boost::false_type{}; +template struct is_nothrow_move_assignable : public ::boost::false_type{}; +template struct is_nothrow_move_assignable : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_nothrow_move_assignable : public ::boost::false_type{}; +#endif + +#else + +template +struct is_nothrow_move_assignable : public integral_constant::value || ::boost::has_nothrow_assign::value) && ! ::boost::is_array::value> +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_assignable must be complete types"); +}; + +#endif + + +template <> struct is_nothrow_move_assignable : public false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct is_nothrow_move_assignable : public false_type{}; +template <> struct is_nothrow_move_assignable : public false_type{}; +template <> struct is_nothrow_move_assignable : public false_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_nothrow_move_constructible.hpp b/Slang/boost/type_traits/is_nothrow_move_constructible.hpp new file mode 100644 index 0000000..60c2994 --- /dev/null +++ b/Slang/boost/type_traits/is_nothrow_move_constructible.hpp @@ -0,0 +1,97 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED + +#include // size_t +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT + +namespace boost { + +template +struct is_nothrow_move_constructible : public integral_constant +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_constructible must be complete types"); +}; + +template struct is_nothrow_move_constructible : public ::boost::false_type {}; +template struct is_nothrow_move_constructible : public ::boost::false_type{}; + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + +#include +#include + +namespace boost{ namespace detail{ + +template +struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_constructible < + T, + typename ::boost::enable_if_()))>::type + > : public ::boost::integral_constant()))> +{}; + +} + +template struct is_nothrow_move_constructible + : public integral_constant::value> +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_constructible must be complete types"); +}; + +template struct is_nothrow_move_constructible : public ::boost::false_type {}; +template struct is_nothrow_move_constructible : public ::boost::false_type{}; +template struct is_nothrow_move_constructible : public ::boost::false_type{}; +template struct is_nothrow_move_constructible : public ::boost::false_type{}; + +#else + +#include +#include +#include + +namespace boost{ + +template +struct is_nothrow_move_constructible + : public integral_constant::value || ::boost::has_nothrow_copy::value) && !::boost::is_array::value> +{ + BOOST_STATIC_ASSERT_MSG(boost::is_complete::value, "Arguments to is_nothrow_move_constructible must be complete types"); +}; + +#endif + +template <> struct is_nothrow_move_constructible : false_type{}; +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template <> struct is_nothrow_move_constructible : false_type{}; +template <> struct is_nothrow_move_constructible : false_type{}; +template <> struct is_nothrow_move_constructible : false_type{}; +#endif +// References are always trivially constructible, even if the thing they reference is not: +template struct is_nothrow_move_constructible : public ::boost::true_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_nothrow_move_constructible : public ::boost::true_type{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_nothrow_swappable.hpp b/Slang/boost/type_traits/is_nothrow_swappable.hpp new file mode 100644 index 0000000..10ad923 --- /dev/null +++ b/Slang/boost/type_traits/is_nothrow_swappable.hpp @@ -0,0 +1,67 @@ +#ifndef BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP_INCLUDED + +// Copyright 2017 Peter Dimov +// +// Distributed under the 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 +#include + +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) || BOOST_WORKAROUND(BOOST_GCC, < 40700) + +#include +#include +#include + +namespace boost +{ +template struct is_nothrow_swappable : boost::integral_constant::value && !boost::is_const::value> {}; + +template struct is_nothrow_swappable_with : false_type {}; +template struct is_nothrow_swappable_with : is_nothrow_swappable {}; +} + +#else + +#include +#include +#include + +namespace boost +{ + +namespace type_traits_swappable_detail +{ + +using std::swap; + +template(), declval()))> integral_constant is_nothrow_swappable_with_impl( int ); +template false_type is_nothrow_swappable_with_impl( ... ); +template +struct is_nothrow_swappable_with_helper { typedef decltype( type_traits_swappable_detail::is_nothrow_swappable_with_impl(0) ) type; }; + +template(), declval()))> integral_constant is_nothrow_swappable_impl( int ); +template false_type is_nothrow_swappable_impl( ... ); +template +struct is_nothrow_swappable_helper { typedef decltype( type_traits_swappable_detail::is_nothrow_swappable_impl(0) ) type; }; + +} // namespace type_traits_swappable_detail + +template struct is_nothrow_swappable_with: type_traits_swappable_detail::is_nothrow_swappable_with_helper::type +{ +}; + +template struct is_nothrow_swappable: type_traits_swappable_detail::is_nothrow_swappable_helper::type +{ +}; + +} // namespace boost + +#endif + +#endif // #ifndef BOOST_TYPE_TRAITS_IS_NOTHROW_SWAPPABLE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_object.hpp b/Slang/boost/type_traits/is_object.hpp new file mode 100644 index 0000000..fc9d2f2 --- /dev/null +++ b/Slang/boost/type_traits/is_object.hpp @@ -0,0 +1,28 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED +#define BOOST_TT_IS_OBJECT_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +template struct is_object + : public + integral_constant< + bool, + ! ::boost::is_reference::value && ! ::boost::is_void::value && ! ::boost::is_function::value > +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_pod.hpp b/Slang/boost/type_traits/is_pod.hpp new file mode 100644 index 0000000..9bd1962 --- /dev/null +++ b/Slang/boost/type_traits/is_pod.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POD_HPP_INCLUDED +#define BOOST_TT_IS_POD_HPP_INCLUDED + +#include // size_t +#include +#include +#include +#include + +#ifdef __SUNPRO_CC +#include +#endif + +#include + +#ifndef BOOST_IS_POD +#define BOOST_INTERNAL_IS_POD(T) false +#else +#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) +#endif + +namespace boost { + +// forward declaration, needed by 'is_pod_array_helper' template below +template< typename T > struct is_POD; + +template struct is_pod +: public integral_constant::value || ::boost::is_void::value || BOOST_INTERNAL_IS_POD(T)> +{}; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct is_pod : public is_pod{}; +#endif + + +// the following help compilers without partial specialization support: +template<> struct is_pod : public true_type{}; + +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +template<> struct is_pod : public true_type{}; +template<> struct is_pod : public true_type{}; +template<> struct is_pod : public true_type{}; +#endif + +template struct is_POD : public is_pod{}; + +} // namespace boost + +#undef BOOST_INTERNAL_IS_POD + +#endif // BOOST_TT_IS_POD_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_pointer.hpp b/Slang/boost/type_traits/is_pointer.hpp new file mode 100644 index 0000000..632c3c8 --- /dev/null +++ b/Slang/boost/type_traits/is_pointer.hpp @@ -0,0 +1,47 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED +#define BOOST_TT_IS_POINTER_HPP_INCLUDED + +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) +template struct is_pointer : public integral_constant{}; +#else +template struct is_pointer : public false_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; +template struct is_pointer : public true_type{}; + +#ifdef BOOST_MSVC +template struct is_pointer : public is_pointer{}; +template struct is_pointer : public is_pointer{}; +template struct is_pointer : public is_pointer{}; +#endif + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_polymorphic.hpp b/Slang/boost/type_traits/is_polymorphic.hpp new file mode 100644 index 0000000..722d8b4 --- /dev/null +++ b/Slang/boost/type_traits/is_polymorphic.hpp @@ -0,0 +1,122 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_POLYMORPHIC_HPP +#define BOOST_TT_IS_POLYMORPHIC_HPP + +#include +#include +#ifndef BOOST_IS_POLYMORPHIC +#include +#endif +#include + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(push) +#pragma warning(disable:4250) +#endif + +namespace boost{ + +#ifndef BOOST_IS_POLYMORPHIC + +namespace detail{ + +template +struct is_polymorphic_imp1 +{ +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always. + typedef char d1, (&d2)[2]; +# else + struct d1 : public T + { + d1(); +# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC + ~d1()throw(); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d1(const d1&); + d1& operator=(const d1&); + }; + struct d2 : public T + { + d2(); + virtual ~d2()throw(); +# if !defined(BOOST_MSVC) && !defined(__ICL) + // for some reason this messes up VC++ when T has virtual bases, + // probably likewise for compilers that use the same ABI: + struct unique{}; + virtual void unique_name_to_boost5487629(unique*); +# endif + char padding[256]; + private: + // keep some picky compilers happy: + d2(const d2&); + d2& operator=(const d2&); + }; +# endif + BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1))); +}; + +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; +template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; + +template +struct is_polymorphic_imp2 +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp2 type; + }; +}; + +template <> +struct is_polymorphic_selector +{ + template + struct rebind + { + typedef is_polymorphic_imp1 type; + }; +}; + +template +struct is_polymorphic_imp +{ + typedef is_polymorphic_selector< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type imp_type; + BOOST_STATIC_CONSTANT(bool, value = imp_type::value); +}; + +} // namespace detail + +template struct is_polymorphic : public integral_constant::value> {}; + +#else // BOOST_IS_POLYMORPHIC + +template struct is_polymorphic : public integral_constant {}; + +#endif + +} // namespace boost + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(pop) +#endif + +#endif diff --git a/Slang/boost/type_traits/is_reference.hpp b/Slang/boost/type_traits/is_reference.hpp new file mode 100644 index 0000000..85f0a63 --- /dev/null +++ b/Slang/boost/type_traits/is_reference.hpp @@ -0,0 +1,30 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000, 2010. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +template struct is_reference + : public + integral_constant< + bool, + ::boost::is_lvalue_reference::value || ::boost::is_rvalue_reference::value> +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_rvalue_reference.hpp b/Slang/boost/type_traits/is_rvalue_reference.hpp new file mode 100644 index 0000000..37d33c9 --- /dev/null +++ b/Slang/boost/type_traits/is_rvalue_reference.hpp @@ -0,0 +1,29 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + +template struct is_rvalue_reference : public false_type {}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template struct is_rvalue_reference : public true_type {}; +#endif + +} // namespace boost + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700) +#include +#endif + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_same.hpp b/Slang/boost/type_traits/is_same.hpp new file mode 100644 index 0000000..9a9ec7e --- /dev/null +++ b/Slang/boost/type_traits/is_same.hpp @@ -0,0 +1,41 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED +#define BOOST_TT_IS_SAME_HPP_INCLUDED + +#include + +namespace boost { + + + template struct is_same : public false_type {}; + template struct is_same : public true_type {}; +#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) +// without this, Borland's compiler gives the wrong answer for +// references to arrays: + template struct is_same : public true_type{}; +#endif + + +} // namespace boost + +#endif // BOOST_TT_IS_SAME_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/is_scalar.hpp b/Slang/boost/type_traits/is_scalar.hpp new file mode 100644 index 0000000..3031440 --- /dev/null +++ b/Slang/boost/type_traits/is_scalar.hpp @@ -0,0 +1,27 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED +#define BOOST_TT_IS_SCALAR_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { + +template +struct is_scalar + : public integral_constant::value || ::boost::is_enum::value || ::boost::is_pointer::value || ::boost::is_member_pointer::value> +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_scoped_enum.hpp b/Slang/boost/type_traits/is_scoped_enum.hpp new file mode 100644 index 0000000..7566859 --- /dev/null +++ b/Slang/boost/type_traits/is_scoped_enum.hpp @@ -0,0 +1,26 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_SCOPED_ENUM_HPP_INCLUDED +#define BOOST_TT_IS_SCOPED_ENUM_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +template +struct is_scoped_enum + : conjunction, negation > >::type { }; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_signed.hpp b/Slang/boost/type_traits/is_signed.hpp new file mode 100644 index 0000000..4d50bf8 --- /dev/null +++ b/Slang/boost/type_traits/is_signed.hpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED +#define BOOST_TT_IS_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +#if !defined( BOOST_CODEGEARC ) + +#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) && \ + !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ + !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +namespace detail{ + +template +struct is_signed_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); +}; + +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; + +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_signed_impl +{ + typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +} + +template struct is_signed : public integral_constant::value> {}; + +#else + +template struct is_signed : public false_type{}; + +#endif + +#else //defined( BOOST_CODEGEARC ) + template struct is_signed : public integral_constant{}; +#endif + +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; + +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_signed< ::boost::long_long_type> : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; + +template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#if defined(CHAR_MIN) +#if CHAR_MIN != 0 +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +#else +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#endif +#if defined(WCHAR_MIN) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) +#if WCHAR_MIN != 0 +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +template <> struct is_signed : public true_type{}; +#else +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +template <> struct is_signed : public false_type{}; +#endif +#endif +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_stateless.hpp b/Slang/boost/type_traits/is_stateless.hpp new file mode 100644 index 0000000..f9266da --- /dev/null +++ b/Slang/boost/type_traits/is_stateless.hpp @@ -0,0 +1,33 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED +#define BOOST_TT_IS_STATELESS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct is_stateless + : public integral_constant::value + && ::boost::has_trivial_copy::value + && ::boost::has_trivial_destructor::value + && ::boost::is_class::value + && ::boost::is_empty::value)> +{}; + +} // namespace boost + +#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_trivially_copyable.hpp b/Slang/boost/type_traits/is_trivially_copyable.hpp new file mode 100644 index 0000000..a62668a --- /dev/null +++ b/Slang/boost/type_traits/is_trivially_copyable.hpp @@ -0,0 +1,31 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED +#define BOOST_TT_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { + +template +struct is_trivially_copyable + : integral_constant::value && + has_trivial_assign::value && + has_trivial_move_constructor::value && + has_trivial_move_assign::value && + has_trivial_destructor::value> { }; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_unbounded_array.hpp b/Slang/boost/type_traits/is_unbounded_array.hpp new file mode 100644 index 0000000..1bacfdc --- /dev/null +++ b/Slang/boost/type_traits/is_unbounded_array.hpp @@ -0,0 +1,41 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_UNBOUNDED_ARRAY_HPP_INCLUDED +#define BOOST_TT_IS_UNBOUNDED_ARRAY_HPP_INCLUDED + +#include + +namespace boost { + +template +struct is_unbounded_array + : false_type { }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct is_unbounded_array + : true_type { }; + +template +struct is_unbounded_array + : true_type { }; + +template +struct is_unbounded_array + : true_type { }; + +template +struct is_unbounded_array + : true_type { }; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_union.hpp b/Slang/boost/type_traits/is_union.hpp new file mode 100644 index 0000000..c5e1a96 --- /dev/null +++ b/Slang/boost/type_traits/is_union.hpp @@ -0,0 +1,31 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNION_HPP_INCLUDED +#define BOOST_TT_IS_UNION_HPP_INCLUDED + +#include +#include + +namespace boost { + +#ifdef BOOST_IS_UNION +template struct is_union : public integral_constant {}; +#else +template struct is_union : public integral_constant {}; +#endif + +template struct is_union : public is_union{}; +template struct is_union : public is_union{}; +template struct is_union : public is_union{}; + +} // namespace boost + +#endif // BOOST_TT_IS_UNION_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_unscoped_enum.hpp b/Slang/boost/type_traits/is_unscoped_enum.hpp new file mode 100644 index 0000000..99f9acb --- /dev/null +++ b/Slang/boost/type_traits/is_unscoped_enum.hpp @@ -0,0 +1,25 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_IS_UNSCOPED_ENUM_HPP_INCLUDED +#define BOOST_TT_IS_UNSCOPED_ENUM_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + +template +struct is_unscoped_enum + : conjunction, is_convertible >::type { }; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/is_unsigned.hpp b/Slang/boost/type_traits/is_unsigned.hpp new file mode 100644 index 0000000..38b9162 --- /dev/null +++ b/Slang/boost/type_traits/is_unsigned.hpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_IS_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_IS_UNSIGNED_HPP_INCLUDED + +#include +#include +#include + +#include + +namespace boost { + +#if !defined( BOOST_CODEGEARC ) + +#if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) &&\ + !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ + !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) + +namespace detail{ + +template +struct is_unsigned_values +{ + // + // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's + // rather than "real" static constants simply doesn't work or give + // the correct answer. + // + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_ununsigned_helper +{ + BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); +}; + +template +struct is_unsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; + +template <> +struct is_unsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_unsigned +{ + typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral::value || ::boost::is_enum::value > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +} // namespace detail + +template struct is_unsigned : public integral_constant::value> {}; + +#else + +template struct is_unsigned : public false_type{}; + +#endif + +#else // defined( BOOST_CODEGEARC ) +template struct is_unsigned : public integral_constant {}; +#endif + +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; + +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< short> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< int> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned< long> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#ifdef BOOST_HAS_LONG_LONG +template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; + +template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#if defined(CHAR_MIN) +#if CHAR_MIN == 0 +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +#else +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#endif +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(WCHAR_MIN) +#if WCHAR_MIN == 0 +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +template <> struct is_unsigned : public true_type{}; +#else +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +template <> struct is_unsigned : public false_type{}; +#endif +#endif +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_virtual_base_of.hpp b/Slang/boost/type_traits/is_virtual_base_of.hpp new file mode 100644 index 0000000..c665078 --- /dev/null +++ b/Slang/boost/type_traits/is_virtual_base_of.hpp @@ -0,0 +1,146 @@ +// (C) Copyright Daniel Frey and Robert Ramey 2009. +// (C) Copyright Balint Cserni 2017 +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED +#define BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + namespace detail { + + +#ifdef BOOST_MSVC +#pragma warning( push ) +#pragma warning( disable : 4584 4250 4594) +#elif defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif + +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_NULLPTR) && !BOOST_WORKAROUND(BOOST_GCC, < 40800) + + // Implementation based on the standard's rules of explicit type conversions. + // A pointer to an object of *derived* class type may be explicitly converted to a pointer to an *unambiguous* *base* class type. + // A pointer to an object of an *unambiguous* *non-virtual* *base* class type may be explicitly converted to a pointer of a *derived* class type. + // Therefore Derived has a virtual base Base if and only if + // (1) a Derived* can be converted to Base* (so the base class is unambiguous, which comes necessarily from virtual inheritance) + // (2) a Base* cannot be converted to Derived* (so the base class is either ambiguous or virtual) + // With both conditions true, Base must be a virtual base of Derived. + // The "is_base_of" is only needed so the compiler can (but is not required to) error out if the types are incomplete. + // This is in league with the the expected behaviour. + + template + constexpr bool is_virtual_base_impl(...) { return true; } + + // C-style casts have the power to ignore inheritance visibility while still act as a static_cast. + // They can also fall back to the behaviour of reinterpret_cast, which allows is_virtual_base_of to work on non-class types too. + // Note that because we are casting pointers there can be no user-defined operators to interfere. + template()))>::type* = + nullptr> + constexpr bool is_virtual_base_impl(int) { return false; } + + } // namespace detail + + template + struct is_virtual_base_of : public + boost::integral_constant< + bool, + boost::is_base_of::value && + detail::is_virtual_base_impl(0) && + !detail::is_virtual_base_impl(0) + > {}; + +#else + + template + struct is_virtual_base_of_impl + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_virtual_base_of_impl + { + union max_align + { + unsigned u; + unsigned long ul; + void* v; + double d; + long double ld; +#ifndef BOOST_NO_LONG_LONG + long long ll; +#endif + }; +#ifdef BOOST_BORLANDC + struct boost_type_traits_internal_struct_X : public virtual Derived, public virtual Base + { + boost_type_traits_internal_struct_X(); + boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&); + boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&); + ~boost_type_traits_internal_struct_X()throw(); + max_align data[4]; + }; + struct boost_type_traits_internal_struct_Y : public virtual Derived + { + boost_type_traits_internal_struct_Y(); + boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&); + boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&); + ~boost_type_traits_internal_struct_Y()throw(); + max_align data[4]; + }; +#else + struct boost_type_traits_internal_struct_X : public Derived, virtual Base + { + boost_type_traits_internal_struct_X(); + boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&); + boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&); + ~boost_type_traits_internal_struct_X()throw(); + max_align data[16]; + }; + struct boost_type_traits_internal_struct_Y : public Derived + { + boost_type_traits_internal_struct_Y(); + boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&); + boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&); + ~boost_type_traits_internal_struct_Y()throw(); + max_align data[16]; + }; +#endif + BOOST_STATIC_CONSTANT(bool, value = (sizeof(boost_type_traits_internal_struct_X) == sizeof(boost_type_traits_internal_struct_Y))); + }; + + template + struct is_virtual_base_of_impl2 + { + typedef boost::integral_constant::value && !boost::is_same::value)> tag_type; + typedef is_virtual_base_of_impl imp; + BOOST_STATIC_CONSTANT(bool, value = imp::value); + }; + +} // namespace detail + +template struct is_virtual_base_of : public integral_constant::value)> {}; + +#endif + +template struct is_virtual_base_of : public false_type{}; +template struct is_virtual_base_of : public false_type{}; +template struct is_virtual_base_of : public false_type{}; + +#ifdef BOOST_MSVC +#pragma warning( pop ) +#endif + +} // namespace boost + +#endif diff --git a/Slang/boost/type_traits/is_void.hpp b/Slang/boost/type_traits/is_void.hpp new file mode 100644 index 0000000..183f8ab --- /dev/null +++ b/Slang/boost/type_traits/is_void.hpp @@ -0,0 +1,26 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_VOID_HPP_INCLUDED +#define BOOST_TT_IS_VOID_HPP_INCLUDED + +#include + +namespace boost { + +template +struct is_void : public false_type {}; + +template<> struct is_void : public true_type {}; +template<> struct is_void : public true_type{}; +template<> struct is_void : public true_type{}; +template<> struct is_void : public true_type{}; + +} // namespace boost + +#endif // BOOST_TT_IS_VOID_HPP_INCLUDED diff --git a/Slang/boost/type_traits/is_volatile.hpp b/Slang/boost/type_traits/is_volatile.hpp new file mode 100644 index 0000000..3f9b063 --- /dev/null +++ b/Slang/boost/type_traits/is_volatile.hpp @@ -0,0 +1,46 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED +#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED + +#include // size_t +#include + +namespace boost { + +#if defined( BOOST_CODEGEARC ) + + template + struct is_volatile : public integral_constant {}; + +#else + + template + struct is_volatile : public false_type {}; + template struct is_volatile : public true_type{}; + template struct is_volatile : public true_type{}; + template struct is_volatile : public true_type{}; + +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/make_signed.hpp b/Slang/boost/type_traits/make_signed.hpp new file mode 100644 index 0000000..6d8b1fb --- /dev/null +++ b/Slang/boost/type_traits/make_signed.hpp @@ -0,0 +1,137 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_SIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_SIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct make_signed +{ +private: + BOOST_STATIC_ASSERT_MSG(( ::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_signed must be an integer or enum type."); + BOOST_STATIC_ASSERT_MSG(!(::boost::is_same::type, bool>::value), "The template argument to make_signed must not be the type bool."); + + typedef typename remove_cv::type t_no_cv; + typedef typename conditional< + (::boost::is_signed::value + && ::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + T, + typename conditional< + (::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + typename conditional< + is_same::value, + signed char, + typename conditional< + is_same::value, + signed short, + typename conditional< + is_same::value, + int, + typename conditional< + is_same::value, + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned char), + signed char, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned short), + signed short, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned int), + int, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned long), + long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::long_long_type), + boost::long_long_type, + boost::int128_type + >::type +#else + boost::long_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + __int64 +#else + long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename conditional< + is_const::value, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; +public: + // Add back any volatile qualifier: + typedef typename conditional< + is_volatile::value, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using make_signed_t = typename make_signed::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/make_unsigned.hpp b/Slang/boost/type_traits/make_unsigned.hpp new file mode 100644 index 0000000..17a8a5b --- /dev/null +++ b/Slang/boost/type_traits/make_unsigned.hpp @@ -0,0 +1,136 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED +#define BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +template +struct make_unsigned +{ +private: + BOOST_STATIC_ASSERT_MSG((::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_unsigned must be an integer or enum type."); + BOOST_STATIC_ASSERT_MSG((! ::boost::is_same::type, bool>::value), "The template argument to make_unsigned must not be the type bool"); + + typedef typename remove_cv::type t_no_cv; + typedef typename conditional< + (::boost::is_unsigned::value && ::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + T, + typename conditional< + (::boost::is_integral::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value + && ! ::boost::is_same::value), + typename conditional< + is_same::value, + unsigned char, + typename conditional< + is_same::value, + unsigned short, + typename conditional< + is_same::value, + unsigned int, + typename conditional< + is_same::value, + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type, + // Not a regular integer type: + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename conditional< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, +#if defined(BOOST_HAS_LONG_LONG) +#ifdef BOOST_HAS_INT128 + typename conditional< + sizeof(t_no_cv) == sizeof(boost::ulong_long_type), + boost::ulong_long_type, + boost::uint128_type + >::type +#else + boost::ulong_long_type +#endif +#elif defined(BOOST_HAS_MS_INT64) + unsigned __int64 +#else + unsigned long +#endif + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + // Add back any const qualifier: + typedef typename conditional< + is_const::value, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; +public: + // Add back any volatile qualifier: + typedef typename conditional< + is_volatile::value, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using make_unsigned_t = typename make_unsigned::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED + diff --git a/Slang/boost/type_traits/make_void.hpp b/Slang/boost/type_traits/make_void.hpp new file mode 100644 index 0000000..b8a72ef --- /dev/null +++ b/Slang/boost/type_traits/make_void.hpp @@ -0,0 +1,52 @@ +/* +Copyright 2017 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED +#define BOOST_TT_MAKE_VOID_HPP_INCLUDED + +#include + +namespace boost { + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +struct make_void { + typedef void type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using void_t = typename make_void::type; +#endif + +#else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */ + +template +struct make_void { + typedef void type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using void_t = typename make_void::type; +#endif + +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/negation.hpp b/Slang/boost/type_traits/negation.hpp new file mode 100644 index 0000000..939e7a7 --- /dev/null +++ b/Slang/boost/type_traits/negation.hpp @@ -0,0 +1,23 @@ +/* +Copyright 2020 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_NEGATION_HPP_INCLUDED +#define BOOST_TT_NEGATION_HPP_INCLUDED + +#include + +namespace boost { + +template +struct negation + : integral_constant { }; + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/nonesuch.hpp b/Slang/boost/type_traits/nonesuch.hpp new file mode 100644 index 0000000..7ba98c4 --- /dev/null +++ b/Slang/boost/type_traits/nonesuch.hpp @@ -0,0 +1,35 @@ +/* +Copyright 2017 Glen Joseph Fernandes +(glenjofe@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) +*/ + +#ifndef BOOST_TT_NONESUCH_HPP_INCLUDED +#define BOOST_TT_NONESUCH_HPP_INCLUDED + +#include + +namespace boost { + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +struct nonesuch { + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(const nonesuch&) = delete; + void operator=(const nonesuch&) = delete; +}; +#else +class nonesuch { + nonesuch(); + ~nonesuch(); + nonesuch(const nonesuch&); + void operator=(const nonesuch&); +}; +#endif + +} /* boost */ + +#endif diff --git a/Slang/boost/type_traits/object_traits.hpp b/Slang/boost/type_traits/object_traits.hpp new file mode 100644 index 0000000..c812a62 --- /dev/null +++ b/Slang/boost/type_traits/object_traits.hpp @@ -0,0 +1,33 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines object traits classes: +// is_object, is_scalar, is_class, is_compound, is_pod, +// has_trivial_constructor, has_trivial_copy, has_trivial_assign, +// has_trivial_destructor, is_empty. +// + +#ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED +#define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED diff --git a/Slang/boost/type_traits/promote.hpp b/Slang/boost/type_traits/promote.hpp new file mode 100644 index 0000000..1678e1c --- /dev/null +++ b/Slang/boost/type_traits/promote.hpp @@ -0,0 +1,26 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_type_traits_promote_hpp_INCLUDED +#define FILE_boost_type_traits_promote_hpp_INCLUDED + +#include +#include +#include + +namespace boost { + +template struct promote : public integral_promotion::type>{}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using promote_t = typename promote::type; + +#endif + +} + +#endif // #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED + diff --git a/Slang/boost/type_traits/rank.hpp b/Slang/boost/type_traits/rank.hpp new file mode 100644 index 0000000..db06cbd --- /dev/null +++ b/Slang/boost/type_traits/rank.hpp @@ -0,0 +1,87 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_RANK_HPP_INCLUDED +#define BOOST_TT_RANK_HPP_INCLUDED + +#include // size_t +#include + +namespace boost { + +#if !defined( BOOST_CODEGEARC ) + +namespace detail{ + +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = N); +}; +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; + +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; + +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; + +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; + +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; +template +struct rank_imp +{ + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::rank_imp::value)); +}; +#endif +#endif +} + +#endif // !defined( BOOST_CODEGEARC ) + +#if defined( BOOST_CODEGEARC ) +template struct rank : public integral_constant{}; +#else +template struct rank : public integral_constant::value)>{}; +#endif + +} // namespace boost + +#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/reference_traits.hpp b/Slang/boost/type_traits/reference_traits.hpp new file mode 100644 index 0000000..1607b3d --- /dev/null +++ b/Slang/boost/type_traits/reference_traits.hpp @@ -0,0 +1,15 @@ +// (C) Copyright David Abrahams Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000-2002. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED +#define BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_all_extents.hpp b/Slang/boost/type_traits/remove_all_extents.hpp new file mode 100644 index 0000000..4da725a --- /dev/null +++ b/Slang/boost/type_traits/remove_all_extents.hpp @@ -0,0 +1,41 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_ALL_EXTENTS_HPP_INCLUDED +#define BOOST_TT_REMOVE_ALL_EXTENTS_HPP_INCLUDED + +#include +#include // size_t +#include + +namespace boost { + +template struct remove_all_extents{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +template struct remove_all_extents : public remove_all_extents{}; +#endif +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_all_extents_t = typename remove_all_extents::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_bounds.hpp b/Slang/boost/type_traits/remove_bounds.hpp new file mode 100644 index 0000000..cd0565d --- /dev/null +++ b/Slang/boost/type_traits/remove_bounds.hpp @@ -0,0 +1,28 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED +#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED + +#include + +namespace boost +{ + +template struct remove_bounds : public remove_extent {}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + +template using remove_bounds_t = typename remove_bounds::type; + +#endif + + +} // namespace boost + +#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_const.hpp b/Slang/boost/type_traits/remove_const.hpp new file mode 100644 index 0000000..045c6b8 --- /dev/null +++ b/Slang/boost/type_traits/remove_const.hpp @@ -0,0 +1,39 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED +#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED + +#include +#include // size_t +#include + +namespace boost { + + // convert a type T to a non-cv-qualified type - remove_const + template struct remove_const{ typedef T type; }; + template struct remove_const{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) + template struct remove_const{ typedef T type[N]; }; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + template struct remove_const{ typedef T type[]; }; +#endif +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_const_t = typename remove_const::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_cv.hpp b/Slang/boost/type_traits/remove_cv.hpp new file mode 100644 index 0000000..2a68af5 --- /dev/null +++ b/Slang/boost/type_traits/remove_cv.hpp @@ -0,0 +1,45 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED +#define BOOST_TT_REMOVE_CV_HPP_INCLUDED + +#include +#include +#include // size_t + +namespace boost { + + // convert a type T to a non-cv-qualified type - remove_cv +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; +template struct remove_cv{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct remove_cv{ typedef T type[N]; }; +template struct remove_cv{ typedef T type[N]; }; +template struct remove_cv{ typedef T type[N]; }; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +template struct remove_cv{ typedef T type[]; }; +template struct remove_cv{ typedef T type[]; }; +template struct remove_cv{ typedef T type[]; }; +#endif +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_cv_t = typename remove_cv::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_cv_ref.hpp b/Slang/boost/type_traits/remove_cv_ref.hpp new file mode 100644 index 0000000..118945a --- /dev/null +++ b/Slang/boost/type_traits/remove_cv_ref.hpp @@ -0,0 +1,30 @@ + +// (C) Copyright Peter Dimov 2017. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_CV_REF_HPP_INCLUDED +#define BOOST_TT_REMOVE_CV_REF_HPP_INCLUDED + +#include +#include +#include + +namespace boost { + + template struct remove_cv_ref: remove_cv::type> {}; + + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_cv_ref_t = typename remove_cv_ref::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_CV_REF_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_extent.hpp b/Slang/boost/type_traits/remove_extent.hpp new file mode 100644 index 0000000..866f4bc --- /dev/null +++ b/Slang/boost/type_traits/remove_extent.hpp @@ -0,0 +1,41 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_EXTENT_HPP_INCLUDED +#define BOOST_TT_REMOVE_EXTENT_HPP_INCLUDED + +#include +#include +#include // size_t + +namespace boost { + +template struct remove_extent{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template struct remove_extent { typedef T type; }; +template struct remove_extent { typedef T const type; }; +template struct remove_extent { typedef T volatile type; }; +template struct remove_extent { typedef T const volatile type; }; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +template struct remove_extent { typedef T type; }; +template struct remove_extent { typedef T const type; }; +template struct remove_extent { typedef T volatile type; }; +template struct remove_extent { typedef T const volatile type; }; +#endif +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_extent_t = typename remove_extent::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_pointer.hpp b/Slang/boost/type_traits/remove_pointer.hpp new file mode 100644 index 0000000..ce32f18 --- /dev/null +++ b/Slang/boost/type_traits/remove_pointer.hpp @@ -0,0 +1,84 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED +#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED + +#include +#include + +#if defined(BOOST_MSVC) +#include +#include +#endif + +namespace boost { + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1900) + +namespace detail{ + + // + // We need all this crazy indirection because a type such as: + // + // T (*const)(U) + // + // Does not bind to a or partial specialization with VC10 and earlier + // + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp3 + { + typedef typename remove_pointer_imp::type>::type type; + }; + + template + struct remove_pointer_imp3 + { + typedef T type; + }; + + template + struct remove_pointer_imp2 + { + typedef typename remove_pointer_imp3::value>::type type; + }; +} + +template struct remove_pointer{ typedef typename boost::detail::remove_pointer_imp2::type type; }; + +#else + +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; +template struct remove_pointer{ typedef T type; }; + +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_pointer_t = typename remove_pointer::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_reference.hpp b/Slang/boost/type_traits/remove_reference.hpp new file mode 100644 index 0000000..70949fb --- /dev/null +++ b/Slang/boost/type_traits/remove_reference.hpp @@ -0,0 +1,59 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED + +#include +#include + +namespace boost { + + +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#endif + +} // namespace detail + +template struct remove_reference{ typedef typename boost::detail::remove_rvalue_ref::type type; }; +template struct remove_reference{ typedef T type; }; + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +template struct remove_reference{ typedef T type; }; +template struct remove_reference{ typedef T type; }; +template struct remove_reference{ typedef T type; }; +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_reference_t = typename remove_reference::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/remove_volatile.hpp b/Slang/boost/type_traits/remove_volatile.hpp new file mode 100644 index 0000000..162d0c2 --- /dev/null +++ b/Slang/boost/type_traits/remove_volatile.hpp @@ -0,0 +1,39 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard +// Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + + +#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED +#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED + +#include +#include +#include // size_t + +namespace boost { + + // convert a type T to a non-cv-qualified type - remove_volatile + template struct remove_volatile{ typedef T type; }; + template struct remove_volatile{ typedef T type; }; + +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) + template struct remove_volatile{ typedef T type[N]; }; +#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + template struct remove_volatile{ typedef T type[]; }; +#endif +#endif + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + template using remove_volatile_t = typename remove_volatile::type; + +#endif + +} // namespace boost + +#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED diff --git a/Slang/boost/type_traits/same_traits.hpp b/Slang/boost/type_traits/same_traits.hpp new file mode 100644 index 0000000..dab7dac --- /dev/null +++ b/Slang/boost/type_traits/same_traits.hpp @@ -0,0 +1,15 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines is_same: + +#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED +#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/transform_traits.hpp b/Slang/boost/type_traits/transform_traits.hpp new file mode 100644 index 0000000..7a82f1c --- /dev/null +++ b/Slang/boost/type_traits/transform_traits.hpp @@ -0,0 +1,21 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. +// +// defines traits classes for transforming one type to another: +// remove_reference, add_reference, remove_bounds, remove_pointer. +// + +#ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED +#define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED + +#include +#include +#include +#include +#include + +#endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED diff --git a/Slang/boost/type_traits/type_identity.hpp b/Slang/boost/type_traits/type_identity.hpp new file mode 100644 index 0000000..4a03a13 --- /dev/null +++ b/Slang/boost/type_traits/type_identity.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED +#define BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED + +// +// Copyright 2015 Peter Dimov +// +// Distributed under the 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 + +namespace boost +{ + +template struct type_identity +{ + typedef T type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + +template using type_identity_t = typename type_identity::type; + +#endif + + +} // namespace boost + +#endif // #ifndef BOOST_TYPE_TRAITS_TYPE_IDENTITY_HPP_INCLUDED diff --git a/Slang/boost/type_traits/type_with_alignment.hpp b/Slang/boost/type_traits/type_with_alignment.hpp new file mode 100644 index 0000000..e4860f9 --- /dev/null +++ b/Slang/boost/type_traits/type_with_alignment.hpp @@ -0,0 +1,260 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED +#define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + +#include +#include +#include +#include +#include // size_t +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4121) // alignment is sensitive to packing +#endif + +#ifdef _MSC_VER +#include +#endif + +namespace boost { +#ifndef BOOST_BORLANDC + namespace detail{ + + union max_align + { + char c; + short s; + int i; + long l; +#ifndef BOOST_NO_LONG_LONG + boost::long_long_type ll; +#endif +#ifdef BOOST_HAS_INT128 + boost::int128_type i128; +#endif + float f; + double d; + long double ld; +#ifdef BOOST_HAS_FLOAT128 + __float128 f128; +#endif + }; + +template struct long_double_alignment{ typedef long double type; }; +template struct long_double_alignment{ typedef boost::detail::max_align type; }; + +template struct double_alignment{ typedef double type; }; +template struct double_alignment{ typedef typename long_double_alignment::value >= Target>::type type; }; + +#ifndef BOOST_NO_LONG_LONG +template struct long_long_alignment{ typedef boost::long_long_type type; }; +template struct long_long_alignment{ typedef typename double_alignment::value >= Target>::type type; }; +#endif + +template struct long_alignment{ typedef long type; }; +#ifndef BOOST_NO_LONG_LONG +template struct long_alignment{ typedef typename long_long_alignment::value >= Target>::type type; }; +#else +template struct long_alignment{ typedef typename double_alignment::value >= Target>::type type; }; +#endif + +template struct int_alignment{ typedef int type; }; +template struct int_alignment{ typedef typename long_alignment::value >= Target>::type type; }; + +template struct short_alignment{ typedef short type; }; +template struct short_alignment{ typedef typename int_alignment::value >= Target>::type type; }; + +template struct char_alignment{ typedef char type; }; +template struct char_alignment{ typedef typename short_alignment::value >= Target>::type type; }; + +} // namespace detail + +template +struct type_with_alignment +{ + typedef typename boost::detail::char_alignment::value >= Align>::type type; +}; + +#if (defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) || defined(__clang__)) && !defined(BOOST_TT_DISABLE_INTRINSICS) +namespace tt_align_ns { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +struct __attribute__((__aligned__(64))) a64 {}; +struct __attribute__((__aligned__(128))) a128 {}; +} + +template<> struct type_with_alignment<1> { public: typedef char type; }; +template<> struct type_with_alignment<2> { public: typedef tt_align_ns::a2 type; }; +template<> struct type_with_alignment<4> { public: typedef tt_align_ns::a4 type; }; +template<> struct type_with_alignment<8> { public: typedef tt_align_ns::a8 type; }; +template<> struct type_with_alignment<16> { public: typedef tt_align_ns::a16 type; }; +template<> struct type_with_alignment<32> { public: typedef tt_align_ns::a32 type; }; +template<> struct type_with_alignment<64> { public: typedef tt_align_ns::a64 type; }; +template<> struct type_with_alignment<128> { public: typedef tt_align_ns::a128 type; }; + +template<> struct is_pod< ::boost::tt_align_ns::a2> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a4> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a32> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a64> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; + +#endif +#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && !defined(BOOST_TT_DISABLE_INTRINSICS) +// +// MSVC supports types which have alignments greater than the normal +// maximum: these are used for example in the types __m64 and __m128 +// to provide types with alignment requirements which match the SSE +// registers. Therefore we extend type_with_alignment<> to support +// such types, however, we have to be careful to use a builtin type +// whenever possible otherwise we break previously working code: +// see https://lists.boost.org/Archives/boost/2014/03/212391.php +// for an example and test case. Thus types like a8 below will +// be used *only* if the existing implementation can't provide a type +// with suitable alignment. This does mean however, that type_with_alignment<> +// may return a type which cannot be passed through a function call +// by value (and neither can any type containing such a type like +// Boost.Optional). However, this only happens when we have no choice +// in the matter because no other "ordinary" type is available. +// +namespace tt_align_ns { +struct __declspec(align(8)) a8 { + char m[8]; + typedef a8 type; +}; +struct __declspec(align(16)) a16 { + char m[16]; + typedef a16 type; +}; +struct __declspec(align(32)) a32 { + char m[32]; + typedef a32 type; +}; +struct __declspec(align(64)) a64 +{ + char m[64]; + typedef a64 type; +}; +struct __declspec(align(128)) a128 { + char m[128]; + typedef a128 type; +}; +} + +template<> struct type_with_alignment<8> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 8, + tt_align_ns::a8, + boost::detail::char_alignment<8, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<16> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 16, + tt_align_ns::a16, + boost::detail::char_alignment<16, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<32> +{ + typedef boost::conditional< + ::boost::alignment_of::value < 32, + tt_align_ns::a32, + boost::detail::char_alignment<32, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<64> { + typedef boost::conditional< + ::boost::alignment_of::value < 64, + tt_align_ns::a64, + boost::detail::char_alignment<64, false> >::type t1; +public: + typedef t1::type type; +}; +template<> struct type_with_alignment<128> { + typedef boost::conditional< + ::boost::alignment_of::value < 128, + tt_align_ns::a128, + boost::detail::char_alignment<128, false> >::type t1; +public: + typedef t1::type type; +}; + +template<> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a32> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a64> : public true_type{}; +template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{}; + +#endif + +#else + +// +// Borland specific version, we have this for two reasons: +// 1) The version above doesn't always compile (with the new test cases for example) +// 2) Because of Borlands #pragma option we can create types with alignments that are +// greater that the largest aligned builtin type. + +namespace tt_align_ns{ +#pragma option push -a16 +struct a2{ short s; }; +struct a4{ int s; }; +struct a8{ double s; }; +struct a16{ long double s; }; +#pragma option pop +} + +namespace detail { + +typedef ::boost::tt_align_ns::a16 max_align; + +} +//#if ! BOOST_WORKAROUND(BOOST_CODEGEARC, BOOST_TESTED_AT(0x610)) +template <> struct is_pod< ::boost::tt_align_ns::a2> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a4> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a8> : public true_type{}; +template <> struct is_pod< ::boost::tt_align_ns::a16> : public true_type{}; +//#endif + +template struct type_with_alignment +{ + // We should never get to here, but if we do use the maximally + // aligned type: + // BOOST_STATIC_ASSERT(0); + typedef tt_align_ns::a16 type; +}; +template <> struct type_with_alignment<1>{ typedef char type; }; +template <> struct type_with_alignment<2>{ typedef tt_align_ns::a2 type; }; +template <> struct type_with_alignment<4>{ typedef tt_align_ns::a4 type; }; +template <> struct type_with_alignment<8>{ typedef tt_align_ns::a8 type; }; +template <> struct type_with_alignment<16>{ typedef tt_align_ns::a16 type; }; + +#endif + +} // namespace boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED + + diff --git a/Slang/boost/units/absolute.hpp b/Slang/boost/units/absolute.hpp new file mode 100644 index 0000000..2541594 --- /dev/null +++ b/Slang/boost/units/absolute.hpp @@ -0,0 +1,153 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +/// +/// \file +/// \brief Absolute units (points rather than vectors). +/// \details Operations between absolute units, and relative units like temperature differences. +/// + +#ifndef BOOST_UNITS_ABSOLUTE_HPP +#define BOOST_UNITS_ABSOLUTE_HPP + +#include + +#include + +namespace boost { + +namespace units { + +/// A wrapper to represent absolute units (points rather than vectors). Intended +/// originally for temperatures, this class implements operators for absolute units +/// so that addition of a relative unit to an absolute unit results in another +/// absolute unit : absolute +/- T -> absolute and subtraction of one absolute +/// unit from another results in a relative unit : absolute - absolute -> T. +template +class absolute +{ + public: + typedef absolute this_type; + typedef Y value_type; + + BOOST_CONSTEXPR absolute() : val_() { } + BOOST_CONSTEXPR absolute(const value_type& val) : val_(val) { } + BOOST_CONSTEXPR absolute(const this_type& source) : val_(source.val_) { } + + BOOST_CXX14_CONSTEXPR this_type& operator=(const this_type& source) { val_ = source.val_; return *this; } + + BOOST_CONSTEXPR const value_type& value() const { return val_; } + + BOOST_CXX14_CONSTEXPR const this_type& operator+=(const value_type& val) { val_ += val; return *this; } + BOOST_CXX14_CONSTEXPR const this_type& operator-=(const value_type& val) { val_ -= val; return *this; } + + private: + value_type val_; +}; + +/// add a relative value to an absolute one +template +BOOST_CONSTEXPR absolute operator+(const absolute& aval,const Y& rval) +{ + return absolute(aval.value()+rval); +} + +/// add a relative value to an absolute one +template +BOOST_CONSTEXPR absolute operator+(const Y& rval,const absolute& aval) +{ + return absolute(aval.value()+rval); +} + +/// subtract a relative value from an absolute one +template +BOOST_CONSTEXPR absolute operator-(const absolute& aval,const Y& rval) +{ + return absolute(aval.value()-rval); +} + +/// subtracting two absolutes gives a difference +template +BOOST_CONSTEXPR Y operator-(const absolute& aval1,const absolute& aval2) +{ + return Y(aval1.value()-aval2.value()); +} + +/// creates a quantity from an absolute unit and a raw value +template +BOOST_CONSTEXPR quantity >, T> operator*(const T& t, const absolute >&) +{ + return(quantity >, T>::from_value(t)); +} + +/// creates a quantity from an absolute unit and a raw value +template +BOOST_CONSTEXPR quantity >, T> operator*(const absolute >&, const T& t) +{ + return(quantity >, T>::from_value(t)); +} + +/// Print an absolute unit +template +std::basic_ostream& operator<<(std::basic_ostream& os,const absolute& aval) +{ + + os << "absolute " << aval.value(); + + return os; +} + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::absolute, (class)) + +#endif + +namespace boost { + +namespace units { + +/// Macro to define the offset between two absolute units. +/// Requires the value to be in the destination units e.g +/// @code +/// BOOST_UNITS_DEFINE_CONVERSION_OFFSET(celsius_base_unit, fahrenheit_base_unit, double, 32.0); +/// @endcode +/// @c BOOST_UNITS_DEFINE_CONVERSION_FACTOR is also necessary to +/// specify the conversion factor. Like @c BOOST_UNITS_DEFINE_CONVERSION_FACTOR +/// this macro defines both forward and reverse conversions so +/// defining, e.g., the conversion from celsius to fahrenheit as above will also +/// define the inverse conversion from fahrenheit to celsius. +#define BOOST_UNITS_DEFINE_CONVERSION_OFFSET(From, To, type_, value_) \ + namespace boost { \ + namespace units { \ + template<> \ + struct affine_conversion_helper< \ + reduce_unit::type, \ + reduce_unit::type> \ + { \ + BOOST_STATIC_CONSTEXPR bool is_defined = true; \ + typedef type_ type; \ + static BOOST_CONSTEXPR type value() { return(value_); } \ + }; \ + } \ + } \ + void boost_units_require_semicolon() + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ABSOLUTE_HPP diff --git a/Slang/boost/units/base_dimension.hpp b/Slang/boost/units/base_dimension.hpp new file mode 100644 index 0000000..b8d348e --- /dev/null +++ b/Slang/boost/units/base_dimension.hpp @@ -0,0 +1,107 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +/// \file +/// \brief base dimensions (mass, length, time...). +/// \details base dimension definition registration. + +#ifndef BOOST_UNITS_BASE_DIMENSION_HPP +#define BOOST_UNITS_BASE_DIMENSION_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// This must be in namespace boost::units so that ADL +/// will work with friend functions defined inline. +/// INTERNAL ONLY +template struct base_dimension_ordinal { }; + +/// INTERNAL ONLY +template struct base_dimension_pair { }; + +/// INTERNAL ONLY +template +struct check_base_dimension { + enum { + value = + sizeof(boost_units_is_registered(units::base_dimension_ordinal())) == sizeof(detail::yes) && + sizeof(boost_units_is_registered(units::base_dimension_pair())) != sizeof(detail::yes) + }; +}; + +/// Defines a base dimension. To define a dimension you need to provide +/// the derived class (CRTP) and a unique integer. +/// @code +/// struct my_dimension : boost::units::base_dimension {}; +/// @endcode +/// It is designed so that you will get an error message if you try +/// to use the same value in multiple definitions. +template::value + >::type +#endif +> +class base_dimension : + public ordinal +{ + public: + /// INTERNAL ONLY + typedef base_dimension this_type; + /// A convenience typedef. Equivalent to boost::units::derived_dimension::type. +#ifndef BOOST_UNITS_DOXYGEN + typedef list >, dimensionless_type> dimension_type; +#else + typedef detail::unspecified dimension_type; +#endif + /// Provided for mpl compatability. + typedef Derived type; + + private: + /// Check for C++0x. In C++0x, we have to have identical + /// arguments but a different return type to trigger an + /// error. Note that this is only needed for clang as + /// check_base_dimension will trigger an error earlier + /// for compilers with less strict name lookup. + /// INTERNAL ONLY + friend BOOST_CONSTEXPR Derived* + check_double_register(const units::base_dimension_ordinal&) + { return(0); } + + /// Register this ordinal + /// INTERNAL ONLY + friend BOOST_CONSTEXPR detail::yes + boost_units_is_registered(const units::base_dimension_ordinal&) + { return(detail::yes()); } + + /// But make sure we can identify the current instantiation! + /// INTERNAL ONLY + friend BOOST_CONSTEXPR detail::yes + boost_units_is_registered(const units::base_dimension_pair&) + { return(detail::yes()); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/base_unit.hpp b/Slang/boost/units/base_unit.hpp new file mode 100644 index 0000000..511bbb7 --- /dev/null +++ b/Slang/boost/units/base_unit.hpp @@ -0,0 +1,128 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +/// \file +/// \brief base unit (meter, kg, sec...). +/// \details base unit definition registration. + +#ifndef BOOST_UNITS_BASE_UNIT_HPP +#define BOOST_UNITS_BASE_UNIT_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// This must be in namespace boost::units so that ADL +/// will work with friend functions defined inline. +/// Base dimensions and base units are independent. +/// INTERNAL ONLY +template struct base_unit_ordinal { }; + +/// INTERNAL ONLY +template struct base_unit_pair { }; + +/// INTERNAL ONLY +template +struct check_base_unit { + enum { + value = + sizeof(boost_units_unit_is_registered(units::base_unit_ordinal())) == sizeof(detail::yes) && + sizeof(boost_units_unit_is_registered(units::base_unit_pair())) != sizeof(detail::yes) + }; +}; + +/// Defines a base unit. To define a unit you need to provide +/// the derived class (CRTP), a dimension list and a unique integer. +/// @code +/// struct my_unit : boost::units::base_unit {}; +/// @endcode +/// It is designed so that you will get an error message if you try +/// to use the same value in multiple definitions. +template::value + >::type +#endif +> +class base_unit : + public ordinal +{ + public: + /// INTERNAL ONLY + typedef void boost_units_is_base_unit_type; + /// INTERNAL ONLY + typedef base_unit this_type; + /// The dimensions of this base unit. + typedef Dim dimension_type; + + /// Provided for mpl compatability. + typedef Derived type; + + /// The unit corresponding to this base unit. +#ifndef BOOST_UNITS_DOXYGEN + typedef unit< + Dim, + heterogeneous_system< + heterogeneous_system_impl< + list< + heterogeneous_system_dim >, + dimensionless_type + >, + Dim, + no_scale + > + > + > unit_type; +#else + typedef detail::unspecified unit_type; +#endif + + private: + /// Check for C++0x. In C++0x, we have to have identical + /// arguments but a different return type to trigger an + /// error. Note that this is only needed for clang as + /// check_base_unit will trigger an error earlier + /// for compilers with less strict name lookup. + /// INTERNAL ONLY + friend BOOST_CONSTEXPR Derived* + check_double_register(const units::base_unit_ordinal&) + { return(0); } + + /// Register this ordinal + /// INTERNAL ONLY + friend BOOST_CONSTEXPR detail::yes + boost_units_unit_is_registered(const units::base_unit_ordinal&) + { return(detail::yes()); } + + /// But make sure we can identify the current instantiation! + /// INTERNAL ONLY + friend BOOST_CONSTEXPR detail::yes + boost_units_unit_is_registered(const units::base_unit_pair&) + { return(detail::yes()); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/angle/arcminute.hpp b/Slang/boost/units/base_units/angle/arcminute.hpp new file mode 100644 index 0000000..27570fb --- /dev/null +++ b/Slang/boost/units/base_units/angle/arcminute.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED +#define BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace angle { + +typedef scaled_base_unit > > arcminute_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("arcminute"); } + static BOOST_CONSTEXPR const char* symbol() { return("'"); } +}; + +} +} + +#endif // BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/angle/arcsecond.hpp b/Slang/boost/units/base_units/angle/arcsecond.hpp new file mode 100644 index 0000000..97851ff --- /dev/null +++ b/Slang/boost/units/base_units/angle/arcsecond.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace angle { + +//typedef scaled_base_unit > > arcsecond_base_unit; +typedef scaled_base_unit > > arcsecond_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("arcsecond"); } + static BOOST_CONSTEXPR const char* symbol() { return("\""); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/angle/degree.hpp b/Slang/boost/units/base_units/angle/degree.hpp new file mode 100644 index 0000000..63edb70 --- /dev/null +++ b/Slang/boost/units/base_units/angle/degree.hpp @@ -0,0 +1,27 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP +#define BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,degree,"degree","deg",6.28318530718/360.,boost::units::angle::radian_base_unit,-101); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::degree_base_unit) + +#endif + +#endif // BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/angle/gradian.hpp b/Slang/boost/units/base_units/angle/gradian.hpp new file mode 100644 index 0000000..7b291b4 --- /dev/null +++ b/Slang/boost/units/base_units/angle/gradian.hpp @@ -0,0 +1,27 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP +#define BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,gradian,"gradian","grad",6.28318530718/400.,boost::units::angle::radian_base_unit,-102); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::gradian_base_unit) + +#endif + +#endif // BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/angle/radian.hpp b/Slang/boost/units/base_units/angle/radian.hpp new file mode 100644 index 0000000..f2b5667 --- /dev/null +++ b/Slang/boost/units/base_units/angle/radian.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP +#define BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace angle { + +struct radian_base_unit : public base_unit +{ + static std::string name() { return("radian"); } + static std::string symbol() { return("rad"); } +}; + +} // namespace angle + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::radian_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/angle/revolution.hpp b/Slang/boost/units/base_units/angle/revolution.hpp new file mode 100644 index 0000000..3d57628 --- /dev/null +++ b/Slang/boost/units/base_units/angle/revolution.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP +#define BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace angle { + +typedef scaled_base_unit > > revolution_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("revolution"); } + static BOOST_CONSTEXPR const char* symbol() { return("rev"); } +}; + +} +} + +#endif // BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP diff --git a/Slang/boost/units/base_units/angle/steradian.hpp b/Slang/boost/units/base_units/angle/steradian.hpp new file mode 100644 index 0000000..5e8c5bd --- /dev/null +++ b/Slang/boost/units/base_units/angle/steradian.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP +#define BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace angle { + +struct steradian_base_unit : public base_unit +{ + static std::string name() { return("steradian"); } + static std::string symbol() { return("sr"); } +}; + +} // namespace angle + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::steradian_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/astronomical/astronomical_unit.hpp b/Slang/boost/units/base_units/astronomical/astronomical_unit.hpp new file mode 100644 index 0000000..4b1640d --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/astronomical_unit.hpp @@ -0,0 +1,27 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, astronomical_unit, "astronomical unit", "a.u.", 149597870691.0, boost::units::si::meter_base_unit, -207); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::astronomical_unit_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/light_day.hpp b/Slang/boost/units/base_units/astronomical/light_day.hpp new file mode 100644 index 0000000..a0ad93b --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/light_day.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace astronomical { + +typedef scaled_base_unit > > light_day_base_unit; + +} // namespace astronomical + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("light day"); } + static BOOST_CONSTEXPR const char* symbol() { return("ldy"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/light_hour.hpp b/Slang/boost/units/base_units/astronomical/light_hour.hpp new file mode 100644 index 0000000..91bc09a --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/light_hour.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace astronomical { + +typedef scaled_base_unit > > light_hour_base_unit; + +} // namespace astronomical + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("light hour"); } + static BOOST_CONSTEXPR const char* symbol() { return("lhr"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/light_minute.hpp b/Slang/boost/units/base_units/astronomical/light_minute.hpp new file mode 100644 index 0000000..6301745 --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/light_minute.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace astronomical { + +typedef scaled_base_unit > > light_minute_base_unit; + +} // namespace astronomical + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("light minute"); } + static BOOST_CONSTEXPR const char* symbol() { return("lmn"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/light_second.hpp b/Slang/boost/units/base_units/astronomical/light_second.hpp new file mode 100644 index 0000000..555a315 --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/light_second.hpp @@ -0,0 +1,27 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, light_second, "light second", "lsc", 2.99792458e8, boost::units::si::meter_base_unit, -201); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::light_second_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/light_year.hpp b/Slang/boost/units/base_units/astronomical/light_year.hpp new file mode 100644 index 0000000..f3434a7 --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/light_year.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace astronomical { + +typedef scaled_base_unit > > light_year_base_unit; + +} // namespace astronomical + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("light year"); } + static BOOST_CONSTEXPR const char* symbol() { return("ly"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/astronomical/parsec.hpp b/Slang/boost/units/base_units/astronomical/parsec.hpp new file mode 100644 index 0000000..dd116e5 --- /dev/null +++ b/Slang/boost/units/base_units/astronomical/parsec.hpp @@ -0,0 +1,27 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, parsec, "parsec", "psc", 3.0856775813e16, boost::units::si::meter_base_unit, -206); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::parsec_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/cgs/biot.hpp b/Slang/boost/units/base_units/cgs/biot.hpp new file mode 100644 index 0000000..1fa03f2 --- /dev/null +++ b/Slang/boost/units/base_units/cgs/biot.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP +#define BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef scaled_base_unit > > biot_base_unit; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/cgs/centimeter.hpp b/Slang/boost/units/base_units/cgs/centimeter.hpp new file mode 100644 index 0000000..1ff712e --- /dev/null +++ b/Slang/boost/units/base_units/cgs/centimeter.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP +#define BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef scaled_base_unit > > centimeter_base_unit; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/cgs/gram.hpp b/Slang/boost/units/base_units/cgs/gram.hpp new file mode 100644 index 0000000..1c2cc18 --- /dev/null +++ b/Slang/boost/units/base_units/cgs/gram.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP +#define BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP + +#include + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +struct gram_base_unit : public base_unit +{ + static std::string name() { return("gram"); } + static std::string symbol() { return("g"); } +}; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::cgs::gram_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/conversions.hpp b/Slang/boost/units/base_units/imperial/conversions.hpp new file mode 100644 index 0000000..54cf638 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/conversions.hpp @@ -0,0 +1,46 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// No include guards. This header is intended to be included +// multiple times. + +// imperial units + +#if 0 + +#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED) &&\ + !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED) + #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gallon_base_unit, double, 1./8.); +#endif + +#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED) &&\ + !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED) + #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::quart_base_unit, double, 1./2.); +#endif + +#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED) &&\ + !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED) + #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gill_base_unit, double, 4.); +#endif + +#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED) &&\ + !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED) + #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::fluid_ounce_base_unit, double, 20.); +#endif + +#endif diff --git a/Slang/boost/units/base_units/imperial/drachm.hpp b/Slang/boost/units/base_units/imperial/drachm.hpp new file mode 100644 index 0000000..b965040 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/drachm.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > drachm_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("drachm"); } + static BOOST_CONSTEXPR const char* symbol() { return("drachm"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/fluid_ounce.hpp b/Slang/boost/units/base_units/imperial/fluid_ounce.hpp new file mode 100644 index 0000000..b318fb2 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/fluid_ounce.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > fluid_ounce_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("fluid ounce (imp.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("fl oz"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/foot.hpp b/Slang/boost/units/base_units/imperial/foot.hpp new file mode 100644 index 0000000..429c77c --- /dev/null +++ b/Slang/boost/units/base_units/imperial/foot.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > foot_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("foot"); } + static BOOST_CONSTEXPR const char* symbol() { return("ft"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/furlong.hpp b/Slang/boost/units/base_units/imperial/furlong.hpp new file mode 100644 index 0000000..8851f2c --- /dev/null +++ b/Slang/boost/units/base_units/imperial/furlong.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > furlong_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("furlong"); } + static BOOST_CONSTEXPR const char* symbol() { return("furlong"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/gallon.hpp b/Slang/boost/units/base_units/imperial/gallon.hpp new file mode 100644 index 0000000..c0e1513 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/gallon.hpp @@ -0,0 +1,40 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +//typedef scaled_base_unit > > gallon_base_unit; +typedef scaled_base_unit > > gallon_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("gallon (imp.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("gal"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/gill.hpp b/Slang/boost/units/base_units/imperial/gill.hpp new file mode 100644 index 0000000..353a46b --- /dev/null +++ b/Slang/boost/units/base_units/imperial/gill.hpp @@ -0,0 +1,40 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +//typedef scaled_base_unit > > gill_base_unit; +typedef scaled_base_unit > > gill_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("gill (imp.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("gill"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/grain.hpp b/Slang/boost/units/base_units/imperial/grain.hpp new file mode 100644 index 0000000..7567f99 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/grain.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > grain_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("grain"); } + static BOOST_CONSTEXPR const char* symbol() { return("grain"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/hundredweight.hpp b/Slang/boost/units/base_units/imperial/hundredweight.hpp new file mode 100644 index 0000000..8f03763 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/hundredweight.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > hundredweight_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("hundredweight"); } + static BOOST_CONSTEXPR const char* symbol() { return("cwt"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/inch.hpp b/Slang/boost/units/base_units/imperial/inch.hpp new file mode 100644 index 0000000..d39c332 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/inch.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > inch_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("inch"); } + static BOOST_CONSTEXPR const char* symbol() { return("in"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/league.hpp b/Slang/boost/units/base_units/imperial/league.hpp new file mode 100644 index 0000000..87c0cfb --- /dev/null +++ b/Slang/boost/units/base_units/imperial/league.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > league_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("league"); } + static BOOST_CONSTEXPR const char* symbol() { return("league"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/mile.hpp b/Slang/boost/units/base_units/imperial/mile.hpp new file mode 100644 index 0000000..230537f --- /dev/null +++ b/Slang/boost/units/base_units/imperial/mile.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > mile_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("mile"); } + static BOOST_CONSTEXPR const char* symbol() { return("mi"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/ounce.hpp b/Slang/boost/units/base_units/imperial/ounce.hpp new file mode 100644 index 0000000..05bfcc1 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/ounce.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > ounce_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("ounce"); } + static BOOST_CONSTEXPR const char* symbol() { return("oz"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/pint.hpp b/Slang/boost/units/base_units/imperial/pint.hpp new file mode 100644 index 0000000..1a1440f --- /dev/null +++ b/Slang/boost/units/base_units/imperial/pint.hpp @@ -0,0 +1,29 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED + +#include + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pint, "pint (imp.)", "pt", 4.54609e-3/8., si::volume, -303); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pint_base_unit) + +#endif + +#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/pound.hpp b/Slang/boost/units/base_units/imperial/pound.hpp new file mode 100644 index 0000000..c586e6d --- /dev/null +++ b/Slang/boost/units/base_units/imperial/pound.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include + +// can't define in terms of kilogram because it is a scaled_base_unit +//BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 0.45359237, si::kilogram_base_unit, -302); // exact conversion +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -302); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pound_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/quart.hpp b/Slang/boost/units/base_units/imperial/quart.hpp new file mode 100644 index 0000000..f4c0a00 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/quart.hpp @@ -0,0 +1,40 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +//typedef scaled_base_unit > > quart_base_unit; +typedef scaled_base_unit > > quart_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("quart (imp.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("qt"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/quarter.hpp b/Slang/boost/units/base_units/imperial/quarter.hpp new file mode 100644 index 0000000..912d51d --- /dev/null +++ b/Slang/boost/units/base_units/imperial/quarter.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > quarter_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("quarter"); } + static BOOST_CONSTEXPR const char* symbol() { return("quarter"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/stone.hpp b/Slang/boost/units/base_units/imperial/stone.hpp new file mode 100644 index 0000000..1b260a2 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/stone.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > stone_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("stone"); } + static BOOST_CONSTEXPR const char* symbol() { return("st"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/imperial/thou.hpp b/Slang/boost/units/base_units/imperial/thou.hpp new file mode 100644 index 0000000..af1f911 --- /dev/null +++ b/Slang/boost/units/base_units/imperial/thou.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP +#define BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > thou_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("thou"); } + static BOOST_CONSTEXPR const char* symbol() { return("thou"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/imperial/ton.hpp b/Slang/boost/units/base_units/imperial/ton.hpp new file mode 100644 index 0000000..a1f709e --- /dev/null +++ b/Slang/boost/units/base_units/imperial/ton.hpp @@ -0,0 +1,40 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace imperial { + +typedef scaled_base_unit > > ton_base_unit; + +} // namespace imperial + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("long ton"); } + static BOOST_CONSTEXPR const char* symbol() { return("t"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED + diff --git a/Slang/boost/units/base_units/imperial/yard.hpp b/Slang/boost/units/base_units/imperial/yard.hpp new file mode 100644 index 0000000..d15b99d --- /dev/null +++ b/Slang/boost/units/base_units/imperial/yard.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP +#define BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP + +#include + +#include +#include +#include +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, yard, "yard", "yd", 0.9144, si::meter_base_unit, -301); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::yard_base_unit) + +#endif + +#endif // BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/information/bit.hpp b/Slang/boost/units/base_units/information/bit.hpp new file mode 100644 index 0000000..28a413e --- /dev/null +++ b/Slang/boost/units/base_units/information/bit.hpp @@ -0,0 +1,41 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED + +#include + +#include +#include +#include + +namespace boost { +namespace units { +namespace information { + +struct bit_base_unit : public base_unit +{ + static std::string name() { return("bit"); } + static std::string symbol() { return("b"); } +}; + +} // namespace information +} // namespace units +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::information::bit_base_unit) + +#endif + +#endif // BOOST_UNITS_BASE_UNITS_INFORMATION_BIT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/information/byte.hpp b/Slang/boost/units/base_units/information/byte.hpp new file mode 100644 index 0000000..6dcfde2 --- /dev/null +++ b/Slang/boost/units/base_units/information/byte.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_BYTE_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_INFORMATION_BYTE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace information { + +typedef scaled_base_unit > > byte_base_unit; + +} // namespace information + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("byte"); } + static BOOST_CONSTEXPR const char* symbol() { return("B"); } +}; + +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_INFORMATION_BYTE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/information/hartley.hpp b/Slang/boost/units/base_units/information/hartley.hpp new file mode 100644 index 0000000..c3df2d2 --- /dev/null +++ b/Slang/boost/units/base_units/information/hartley.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_HARTLEY_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_INFORMATION_HARTLEY_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(information, hartley, + "hartley", "Hart", + 3.321928094887363, + boost::units::information::bit_base_unit, + -703); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::information::hartley_base_unit) + +#endif + +#endif // BOOST_UNITS_BASE_UNITS_INFORMATION_HARTLEY_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/information/nat.hpp b/Slang/boost/units/base_units/information/nat.hpp new file mode 100644 index 0000000..a307215 --- /dev/null +++ b/Slang/boost/units/base_units/information/nat.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_NAT_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_INFORMATION_NAT_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(information, nat, + "nat", "nat", + 1.442695040888964, + boost::units::information::bit_base_unit, + -702); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::information::nat_base_unit) + +#endif + +#endif // BOOST_UNITS_BASE_UNITS_INFORMATION_NAT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/information/shannon.hpp b/Slang/boost/units/base_units/information/shannon.hpp new file mode 100644 index 0000000..60e37b2 --- /dev/null +++ b/Slang/boost/units/base_units/information/shannon.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_INFORMATION_SHANNON_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_INFORMATION_SHANNON_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace information { + +typedef scaled_base_unit > > shannon_base_unit; + +} // namespace information + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("shannon"); } + static BOOST_CONSTEXPR const char* symbol() { return("Sh"); } +}; + +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_INFORMATION_SHANNON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/angstrom.hpp b/Slang/boost/units/base_units/metric/angstrom.hpp new file mode 100644 index 0000000..64cc337 --- /dev/null +++ b/Slang/boost/units/base_units/metric/angstrom.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > angstrom_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("angstrom"); } + static BOOST_CONSTEXPR const char* symbol() { return("A"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/are.hpp b/Slang/boost/units/base_units/metric/are.hpp new file mode 100644 index 0000000..bd697f4 --- /dev/null +++ b/Slang/boost/units/base_units/metric/are.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, are, "are", "a", 1.0e2, si::area, 10); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/atmosphere.hpp b/Slang/boost/units/base_units/metric/atmosphere.hpp new file mode 100644 index 0000000..b714e90 --- /dev/null +++ b/Slang/boost/units/base_units/metric/atmosphere.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, atmosphere, "atmosphere", "atm", 1.01325e5, si::pressure, 33); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/bar.hpp b/Slang/boost/units/base_units/metric/bar.hpp new file mode 100644 index 0000000..682d54f --- /dev/null +++ b/Slang/boost/units/base_units/metric/bar.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, bar, "bar", "bar", 1.0e5, si::pressure, 14); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/barn.hpp b/Slang/boost/units/base_units/metric/barn.hpp new file mode 100644 index 0000000..ae2b28c --- /dev/null +++ b/Slang/boost/units/base_units/metric/barn.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, barn, "barn", "b", 1.0e-28, si::area, 11); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/day.hpp b/Slang/boost/units/base_units/metric/day.hpp new file mode 100644 index 0000000..ac111c9 --- /dev/null +++ b/Slang/boost/units/base_units/metric/day.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_OTHER_DAY_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_OTHER_DAY_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace metric { + +typedef scaled_base_unit > > day_base_unit; + +} // namespace metric + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("day"); } + static BOOST_CONSTEXPR const char* symbol() { return("d"); } +}; + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/base_units/metric/fermi.hpp b/Slang/boost/units/base_units/metric/fermi.hpp new file mode 100644 index 0000000..f12c903 --- /dev/null +++ b/Slang/boost/units/base_units/metric/fermi.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > fermi_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("fermi"); } + static BOOST_CONSTEXPR const char* symbol() { return("fm"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/hectare.hpp b/Slang/boost/units/base_units/metric/hectare.hpp new file mode 100644 index 0000000..476b0fc --- /dev/null +++ b/Slang/boost/units/base_units/metric/hectare.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, hectare, "hectare", "ha", 1.0e4, si::area, 12); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/hour.hpp b/Slang/boost/units/base_units/metric/hour.hpp new file mode 100644 index 0000000..65657ce --- /dev/null +++ b/Slang/boost/units/base_units/metric/hour.hpp @@ -0,0 +1,37 @@ + // Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > hour_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("hour"); } + static BOOST_CONSTEXPR const char* symbol() { return("h"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/knot.hpp b/Slang/boost/units/base_units/metric/knot.hpp new file mode 100644 index 0000000..6b85e6e --- /dev/null +++ b/Slang/boost/units/base_units/metric/knot.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, knot, "knot", "kt", 1852./3600., boost::units::si::velocity, -403); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/liter.hpp b/Slang/boost/units/base_units/metric/liter.hpp new file mode 100644 index 0000000..da90175 --- /dev/null +++ b/Slang/boost/units/base_units/metric/liter.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, liter, "liter", "L", 1.0e-3, si::volume, 13); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/micron.hpp b/Slang/boost/units/base_units/metric/micron.hpp new file mode 100644 index 0000000..c169cfd --- /dev/null +++ b/Slang/boost/units/base_units/metric/micron.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > micron_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("micron"); } + static BOOST_CONSTEXPR const char* symbol() { return("u"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/minute.hpp b/Slang/boost/units/base_units/metric/minute.hpp new file mode 100644 index 0000000..3c0a68f --- /dev/null +++ b/Slang/boost/units/base_units/metric/minute.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > minute_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("minute"); } + static BOOST_CONSTEXPR const char* symbol() { return("min"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/mmHg.hpp b/Slang/boost/units/base_units/metric/mmHg.hpp new file mode 100644 index 0000000..93e3869 --- /dev/null +++ b/Slang/boost/units/base_units/metric/mmHg.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, mmHg, "millimeters mercury", "mmHg", 133.322, si::pressure, -404); + +#endif // BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/nautical_mile.hpp b/Slang/boost/units/base_units/metric/nautical_mile.hpp new file mode 100644 index 0000000..4f20951 --- /dev/null +++ b/Slang/boost/units/base_units/metric/nautical_mile.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > nautical_mile_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("nautical mile"); } + static BOOST_CONSTEXPR const char* symbol() { return("nmi"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/ton.hpp b/Slang/boost/units/base_units/metric/ton.hpp new file mode 100644 index 0000000..4f8e964 --- /dev/null +++ b/Slang/boost/units/base_units/metric/ton.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED + +#include +#include +#include +#include +#include +//#include + +namespace boost { +namespace units { +namespace metric { + +//typedef scaled_base_unit > > ton_base_unit; +typedef scaled_base_unit > > ton_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("metric ton"); } + static BOOST_CONSTEXPR const char* symbol() { return("t"); } +}; + +} +} + +#endif // BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/metric/torr.hpp b/Slang/boost/units/base_units/metric/torr.hpp new file mode 100644 index 0000000..08fd29a --- /dev/null +++ b/Slang/boost/units/base_units/metric/torr.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_METRIC_TORR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_METRIC_TORR_HPP_INCLUDED + +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, torr, "torr", "Torr", 1.01325e5/760.0, si::pressure, -401); + +#endif diff --git a/Slang/boost/units/base_units/metric/year.hpp b/Slang/boost/units/base_units/metric/year.hpp new file mode 100644 index 0000000..5d715e2 --- /dev/null +++ b/Slang/boost/units/base_units/metric/year.hpp @@ -0,0 +1,38 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_OTHER_YEAR_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_OTHER_YEAR_HPP_INCLUDED + +#include +#include +#include +#include + +// Julian year = 365.25 days exactly = 8766 hours exactly + +namespace boost { +namespace units { +namespace metric { + +typedef scaled_base_unit > > year_base_unit; + +} + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("Julian year"); } + static BOOST_CONSTEXPR const char* symbol() { return("yr"); } +}; + +} +} + +#endif diff --git a/Slang/boost/units/base_units/si/ampere.hpp b/Slang/boost/units/base_units/si/ampere.hpp new file mode 100644 index 0000000..0c21d67 --- /dev/null +++ b/Slang/boost/units/base_units/si/ampere.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP +#define BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct ampere_base_unit : public base_unit +{ + static std::string name() { return("ampere"); } + static std::string symbol() { return("A"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::ampere_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/si/candela.hpp b/Slang/boost/units/base_units/si/candela.hpp new file mode 100644 index 0000000..ab7a795 --- /dev/null +++ b/Slang/boost/units/base_units/si/candela.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP +#define BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct candela_base_unit : public base_unit +{ + static std::string name() { return("candela"); } + static std::string symbol() { return("cd"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::candela_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/si/kelvin.hpp b/Slang/boost/units/base_units/si/kelvin.hpp new file mode 100644 index 0000000..78fe1dd --- /dev/null +++ b/Slang/boost/units/base_units/si/kelvin.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP +#define BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct kelvin_base_unit : public base_unit +{ + static std::string name() { return("kelvin"); } + static std::string symbol() { return("K"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::kelvin_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/si/kilogram.hpp b/Slang/boost/units/base_units/si/kilogram.hpp new file mode 100644 index 0000000..0f8b0a6 --- /dev/null +++ b/Slang/boost/units/base_units/si/kilogram.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP +#define BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef scaled_base_unit > > kilogram_base_unit; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/si/meter.hpp b/Slang/boost/units/base_units/si/meter.hpp new file mode 100644 index 0000000..3a5fed2 --- /dev/null +++ b/Slang/boost/units/base_units/si/meter.hpp @@ -0,0 +1,50 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_METER_BASE_UNIT_HPP +#define BOOST_UNITS_SI_METER_BASE_UNIT_HPP + +#include + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct meter_base_unit : public base_unit +{ + static std::string name() { return("meter"); } + static std::string symbol() { return("m"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::meter_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_METER_BASE_UNIT_HPP + diff --git a/Slang/boost/units/base_units/si/mole.hpp b/Slang/boost/units/base_units/si/mole.hpp new file mode 100644 index 0000000..5b73313 --- /dev/null +++ b/Slang/boost/units/base_units/si/mole.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP +#define BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct mole_base_unit : public base_unit +{ + static std::string name() { return("mole"); } + static std::string symbol() { return("mol"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::mole_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/si/second.hpp b/Slang/boost/units/base_units/si/second.hpp new file mode 100644 index 0000000..946c671 --- /dev/null +++ b/Slang/boost/units/base_units/si/second.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP +#define BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +struct second_base_unit : public base_unit +{ + static std::string name() { return("second"); } + static std::string symbol() { return("s"); } +}; + +} // namespace si + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::second_base_unit) + +#endif + +//#include + +#endif // BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/temperature/celsius.hpp b/Slang/boost/units/base_units/temperature/celsius.hpp new file mode 100644 index 0000000..dff70a1 --- /dev/null +++ b/Slang/boost/units/base_units/temperature/celsius.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP +#define BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace temperature { + +struct celsius_base_unit : public base_unit +{ + static std::string name() { return("celsius"); } + static std::string symbol() { return("C"); } +}; + +} // namespace temperature + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature::celsius_base_unit) + +#endif + +#include + +#endif // BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/temperature/conversions.hpp b/Slang/boost/units/base_units/temperature/conversions.hpp new file mode 100644 index 0000000..e4e45de --- /dev/null +++ b/Slang/boost/units/base_units/temperature/conversions.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// No include guards. This header is intended to be included +// multiple times. + +// units of temperature + +#if defined(BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP) &&\ + !defined(BOOST_UNITS_SYSTEMS_KELVIN_TO_CELSIUS_CONVERSION_DEFINED) + #define BOOST_UNITS_SYSTEMS_KELVIN_TO_CELSIUS_CONVERSION_DEFINED + #include + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::si::kelvin_base_unit, boost::units::temperature::celsius_base_unit, one, make_one()); + BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::si::kelvin_base_unit, boost::units::temperature::celsius_base_unit, double, -273.15); +#endif + +#if defined(BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP) &&\ + !defined(BOOST_UNITS_SYSTEMS_KELVIN_TO_FAHRENHEIT_CONVERSION_DEFINED) + #define BOOST_UNITS_SYSTEMS_KELVIN_TO_FAHRENHEIT_CONVERSION_DEFINED + #include + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::si::kelvin_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 9.0/5.0); + BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::si::kelvin_base_unit, boost::units::temperature::fahrenheit_base_unit, double, -273.15 * 9.0 / 5.0 + 32.0); +#endif + +#if defined(BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP) &&\ + !defined(BOOST_UNITS_SYSTEMS_CELSUIS_TO_FAHRENHEIT_CONVERSION_DEFINED) + #define BOOST_UNITS_SYSTEMS_CELSUIS_TO_FAHRENHEIT_CONVERSION_DEFINED + #include + #include + BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::temperature::celsius_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 9.0/5.0); + BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::temperature::celsius_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 32.0); +#endif + diff --git a/Slang/boost/units/base_units/temperature/fahrenheit.hpp b/Slang/boost/units/base_units/temperature/fahrenheit.hpp new file mode 100644 index 0000000..ff0149f --- /dev/null +++ b/Slang/boost/units/base_units/temperature/fahrenheit.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP +#define BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP + +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace temperature { + +struct fahrenheit_base_unit : public base_unit +{ + static std::string name() { return("fahrenheit"); } + static std::string symbol() { return("F"); } +}; + +} // namespace temperature + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature::fahrenheit_base_unit) + +#endif + +#include + +#endif // BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/us/cup.hpp b/Slang/boost/units/base_units/us/cup.hpp new file mode 100644 index 0000000..86b4083 --- /dev/null +++ b/Slang/boost/units/base_units/us/cup.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > cup_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("cup"); } + static BOOST_CONSTEXPR const char* symbol() { return("c"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/dram.hpp b/Slang/boost/units/base_units/us/dram.hpp new file mode 100644 index 0000000..29e08d9 --- /dev/null +++ b/Slang/boost/units/base_units/us/dram.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED +#define BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > dram_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("dram (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("dr"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/fluid_dram.hpp b/Slang/boost/units/base_units/us/fluid_dram.hpp new file mode 100644 index 0000000..0b9c60d --- /dev/null +++ b/Slang/boost/units/base_units/us/fluid_dram.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > fluid_dram_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("fluid dram (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("fl dr"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/fluid_ounce.hpp b/Slang/boost/units/base_units/us/fluid_ounce.hpp new file mode 100644 index 0000000..c7f0f07 --- /dev/null +++ b/Slang/boost/units/base_units/us/fluid_ounce.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > fluid_ounce_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("fluid ounce (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("fl oz"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/foot.hpp b/Slang/boost/units/base_units/us/foot.hpp new file mode 100644 index 0000000..16cbf6d --- /dev/null +++ b/Slang/boost/units/base_units/us/foot.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_US_FOOT_BASE_UNIT_HPP +#define BOOST_UNITS_US_FOOT_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > foot_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("foot"); } + static BOOST_CONSTEXPR const char* symbol() { return("ft"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_US_FOOT_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/us/gallon.hpp b/Slang/boost/units/base_units/us/gallon.hpp new file mode 100644 index 0000000..1b54b28 --- /dev/null +++ b/Slang/boost/units/base_units/us/gallon.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > gallon_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("gallon (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("gal"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/gill.hpp b/Slang/boost/units/base_units/us/gill.hpp new file mode 100644 index 0000000..c654386 --- /dev/null +++ b/Slang/boost/units/base_units/us/gill.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > gill_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("gill (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("gi"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/grain.hpp b/Slang/boost/units/base_units/us/grain.hpp new file mode 100644 index 0000000..485b687 --- /dev/null +++ b/Slang/boost/units/base_units/us/grain.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED +#define BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > grain_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("grain"); } + static BOOST_CONSTEXPR const char* symbol() { return("gr"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/hundredweight.hpp b/Slang/boost/units/base_units/us/hundredweight.hpp new file mode 100644 index 0000000..2ac991b --- /dev/null +++ b/Slang/boost/units/base_units/us/hundredweight.hpp @@ -0,0 +1,40 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED +#define BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +//typedef scaled_base_unit > > hundredweight_base_unit; +typedef scaled_base_unit > > hundredweight_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("hundredweight (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("cwt"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/inch.hpp b/Slang/boost/units/base_units/us/inch.hpp new file mode 100644 index 0000000..e7bd91d --- /dev/null +++ b/Slang/boost/units/base_units/us/inch.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_US_INCH_BASE_UNIT_HPP +#define BOOST_UNITS_US_INCH_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > inch_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("inch"); } + static BOOST_CONSTEXPR const char* symbol() { return("in"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_US_INCH_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/us/mil.hpp b/Slang/boost/units/base_units/us/mil.hpp new file mode 100644 index 0000000..e3276fe --- /dev/null +++ b/Slang/boost/units/base_units/us/mil.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_US_MIL_BASE_UNIT_HPP +#define BOOST_UNITS_US_MIL_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > mil_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("mil"); } + static BOOST_CONSTEXPR const char* symbol() { return("mil"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_US_MIL_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/us/mile.hpp b/Slang/boost/units/base_units/us/mile.hpp new file mode 100644 index 0000000..c62c0d5 --- /dev/null +++ b/Slang/boost/units/base_units/us/mile.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_US_MILE_BASE_UNIT_HPP +#define BOOST_UNITS_US_MILE_BASE_UNIT_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > mile_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("mile"); } + static BOOST_CONSTEXPR const char* symbol() { return("mi"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_US_MILE_BASE_UNIT_HPP diff --git a/Slang/boost/units/base_units/us/minim.hpp b/Slang/boost/units/base_units/us/minim.hpp new file mode 100644 index 0000000..d877e26 --- /dev/null +++ b/Slang/boost/units/base_units/us/minim.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > minim_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("minim (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("minim"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/ounce.hpp b/Slang/boost/units/base_units/us/ounce.hpp new file mode 100644 index 0000000..9a4ec3e --- /dev/null +++ b/Slang/boost/units/base_units/us/ounce.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > ounce_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("ounce"); } + static BOOST_CONSTEXPR const char* symbol() { return("oz"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/pint.hpp b/Slang/boost/units/base_units/us/pint.hpp new file mode 100644 index 0000000..3a923b8 --- /dev/null +++ b/Slang/boost/units/base_units/us/pint.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED + +#include +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pint, "pint (U.S.)", "pt", 0.4731765e-3, si::volume, -503); + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pint_base_unit) + +#endif + +#endif // BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/pound.hpp b/Slang/boost/units/base_units/us/pound.hpp new file mode 100644 index 0000000..bef6cde --- /dev/null +++ b/Slang/boost/units/base_units/us/pound.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -502); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/pound_force.hpp b/Slang/boost/units/base_units/us/pound_force.hpp new file mode 100644 index 0000000..9749d5e --- /dev/null +++ b/Slang/boost/units/base_units/us/pound_force.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2009 Matthias Christian Schabel +// Copyright (C) 2007-2009 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED +#define BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED + +#include + +#include +#include +//#include +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound_force, "pound-force", "lbf", 4.4482216152605, si::force, -600); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_force_base_unit) + +#endif + +#endif // BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/quart.hpp b/Slang/boost/units/base_units/us/quart.hpp new file mode 100644 index 0000000..b39252a --- /dev/null +++ b/Slang/boost/units/base_units/us/quart.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > quart_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("quart (U.S.)"); } + static BOOST_CONSTEXPR const char* symbol() { return("qt"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/tablespoon.hpp b/Slang/boost/units/base_units/us/tablespoon.hpp new file mode 100644 index 0000000..43418ed --- /dev/null +++ b/Slang/boost/units/base_units/us/tablespoon.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > tablespoon_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("tablespoon"); } + static BOOST_CONSTEXPR const char* symbol() { return("tbsp"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/teaspoon.hpp b/Slang/boost/units/base_units/us/teaspoon.hpp new file mode 100644 index 0000000..94fe655 --- /dev/null +++ b/Slang/boost/units/base_units/us/teaspoon.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED +#define BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > teaspoon_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("teaspoon"); } + static BOOST_CONSTEXPR const char* symbol() { return("tsp"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/ton.hpp b/Slang/boost/units/base_units/us/ton.hpp new file mode 100644 index 0000000..d1f52e8 --- /dev/null +++ b/Slang/boost/units/base_units/us/ton.hpp @@ -0,0 +1,39 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED +#define BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace us { + +typedef scaled_base_unit > > ton_base_unit; + +} // namespace us + +template<> +struct base_unit_info { + static BOOST_CONSTEXPR const char* name() { return("short ton"); } + static BOOST_CONSTEXPR const char* symbol() { return("t"); } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED diff --git a/Slang/boost/units/base_units/us/yard.hpp b/Slang/boost/units/base_units/us/yard.hpp new file mode 100644 index 0000000..b609eae --- /dev/null +++ b/Slang/boost/units/base_units/us/yard.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP +#define BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP + +#include + +#include +#include +#include +#include +#include + +BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, yard, "yard", "yd", 0.9144, si::meter_base_unit, -501); // exact conversion + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::yard_base_unit) + +#endif + +#endif // BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP diff --git a/Slang/boost/units/cmath.hpp b/Slang/boost/units/cmath.hpp new file mode 100644 index 0000000..da3da46 --- /dev/null +++ b/Slang/boost/units/cmath.hpp @@ -0,0 +1,729 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CMATH_HPP +#define BOOST_UNITS_CMATH_HPP + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +/// \file +/// \brief Overloads of functions in \ for quantities. +/// \details Only functions for which a dimensionally-correct result type +/// can be determined are overloaded. +/// All functions work with dimensionless quantities. + +// BOOST_PREVENT_MACRO_SUBSTITUTION is needed on certain compilers that define +// some functions as macros; it is used for all functions even though it +// isn't necessary -- I didn't want to think :) +// +// the form using namespace detail; return(f(x)); is used +// to enable ADL for UDTs. + +namespace boost { + +namespace units { + +template +inline +BOOST_CONSTEXPR +bool +isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::isfinite; + return isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isinf BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::isinf; + return isinf BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isnan BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::isnan; + return isnan BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::isnormal; + return isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isless BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return isless BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +bool +isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + return isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()); +} + +template +inline +BOOST_CONSTEXPR +quantity +abs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using std::abs; + + typedef quantity quantity_type; + + return quantity_type::from_value(abs BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +ceil BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using std::ceil; + + typedef quantity quantity_type; + + return quantity_type::from_value(ceil BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +copysign BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using boost::math::copysign; + + typedef quantity quantity_type; + + return quantity_type::from_value(copysign BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +fabs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using std::fabs; + + typedef quantity quantity_type; + + return quantity_type::from_value(fabs BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +floor BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using std::floor; + + typedef quantity quantity_type; + + return quantity_type::from_value(floor BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +fdim BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(fdim BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +#if 0 + +template +inline +BOOST_CONSTEXPR +typename add_typeof_helper< + typename multiply_typeof_helper, + quantity >::type, + quantity >::type +fma BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2, + const quantity& q3) +{ + using namespace detail; + + typedef quantity type1; + typedef quantity type2; + typedef quantity type3; + + typedef typename multiply_typeof_helper::type prod_type; + typedef typename add_typeof_helper::type quantity_type; + + return quantity_type::from_value(fma BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value(),q3.value())); +} + +#endif + +template +inline +BOOST_CONSTEXPR +quantity +fmax BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(fmax BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +fmin BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(fmin BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +template +inline +BOOST_CONSTEXPR +int +fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::fpclassify; + + return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +typename root_typeof_helper< + typename add_typeof_helper< + typename power_typeof_helper, + static_rational<2> >::type, + typename power_typeof_helper, + static_rational<2> >::type>::type, + static_rational<2> >::type +hypot BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1,const quantity& q2) +{ + using boost::math::hypot; + + typedef quantity type1; + + typedef typename power_typeof_helper >::type pow_type; + typedef typename add_typeof_helper::type add_type; + typedef typename root_typeof_helper >::type quantity_type; + + return quantity_type::from_value(hypot BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +// does ISO C++ support long long? g++ claims not +//template +//inline +//BOOST_CONSTEXPR +//quantity +//llrint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +//{ +// using namespace detail; +// +// typedef quantity quantity_type; +// +// return quantity_type::from_value(llrint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +//} + +// does ISO C++ support long long? g++ claims not +//template +//inline +//BOOST_CONSTEXPR +//quantity +//llround BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +//{ +// using namespace detail; +// +// typedef quantity quantity_type; +// +// return quantity_type::from_value(llround BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +//} + +#if 0 + +template +inline +BOOST_CONSTEXPR +quantity +nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +#endif + +template +inline +BOOST_CONSTEXPR +quantity nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + using boost::math::nextafter; + + typedef quantity quantity_type; + + return quantity_type::from_value(nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} +template +inline +BOOST_CONSTEXPR +quantity nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q1, + const quantity& q2) +{ + // the only difference between nextafter and nexttowards is + // in the argument types. Since we are requiring identical + // argument types, there is no difference. + using boost::math::nextafter; + + typedef quantity quantity_type; + + return quantity_type::from_value(nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value())); +} + +#if 0 + +template +inline +BOOST_CONSTEXPR +quantity +rint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(rint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +#endif + +template +inline +BOOST_CONSTEXPR +quantity +round BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::round; + + typedef quantity quantity_type; + + return quantity_type::from_value(round BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +int +signbit BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using boost::math::signbit; + + return signbit BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()); +} + +template +inline +BOOST_CONSTEXPR +quantity +trunc BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity& q) +{ + using namespace detail; + + typedef quantity quantity_type; + + return quantity_type::from_value(trunc BOOST_PREVENT_MACRO_SUBSTITUTION (q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +fmod(const quantity& q1, const quantity& q2) +{ + using std::fmod; + + typedef quantity quantity_type; + + return quantity_type::from_value(fmod(q1.value(), q2.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +modf(const quantity& q1, quantity* q2) +{ + using std::modf; + + typedef quantity quantity_type; + + return quantity_type::from_value(modf(q1.value(), &quantity_cast(*q2))); +} + +template +inline +BOOST_CONSTEXPR +quantity +frexp(const quantity& q,Int* ex) +{ + using std::frexp; + + typedef quantity quantity_type; + + return quantity_type::from_value(frexp(q.value(),ex)); +} + +/// For non-dimensionless quantities, integral and rational powers +/// and roots can be computed by @c pow and @c root respectively. +template +inline +BOOST_CONSTEXPR +quantity +pow(const quantity& q1, + const quantity& q2) +{ + using std::pow; + + typedef quantity quantity_type; + + return quantity_type::from_value(pow(q1.value(), q2.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +exp(const quantity& q) +{ + using std::exp; + + typedef quantity quantity_type; + + return quantity_type::from_value(exp(q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +ldexp(const quantity& q,const Int& ex) +{ + using std::ldexp; + + typedef quantity quantity_type; + + return quantity_type::from_value(ldexp(q.value(), ex)); +} + +template +inline +BOOST_CONSTEXPR +quantity +log(const quantity& q) +{ + using std::log; + + typedef quantity quantity_type; + + return quantity_type::from_value(log(q.value())); +} + +template +inline +BOOST_CONSTEXPR +quantity +log10(const quantity& q) +{ + using std::log10; + + typedef quantity quantity_type; + + return quantity_type::from_value(log10(q.value())); +} + +template +inline +BOOST_CONSTEXPR +typename root_typeof_helper< + quantity, + static_rational<2> + >::type +sqrt(const quantity& q) +{ + using std::sqrt; + + typedef typename root_typeof_helper< + quantity, + static_rational<2> + >::type quantity_type; + + return quantity_type::from_value(sqrt(q.value())); +} + +} // namespace units + +} // namespace boost + +namespace boost { + +namespace units { + +// trig functions with si argument/return types + +/// cos of theta in radians +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +cos(const quantity& theta) +{ + using std::cos; + return cos(theta.value()); +} + +/// sin of theta in radians +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +sin(const quantity& theta) +{ + using std::sin; + return sin(theta.value()); +} + +/// tan of theta in radians +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +tan(const quantity& theta) +{ + using std::tan; + return tan(theta.value()); +} + +/// cos of theta in other angular units +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +cos(const quantity,Y>& theta) +{ + return cos(quantity(theta)); +} + +/// sin of theta in other angular units +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +sin(const quantity,Y>& theta) +{ + return sin(quantity(theta)); +} + +/// tan of theta in other angular units +template +BOOST_CONSTEXPR +typename dimensionless_quantity::type +tan(const quantity,Y>& theta) +{ + return tan(quantity(theta)); +} + +/// acos of dimensionless quantity returning angle in same system +template +BOOST_CONSTEXPR +quantity >,Y> +acos(const quantity >,Y>& val) +{ + using std::acos; + return quantity >,Y>(acos(val.value())*si::radians); +} + +/// acos of dimensionless quantity returning angle in radians +template +BOOST_CONSTEXPR +quantity +acos(const quantity,Y>& val) +{ + using std::acos; + return quantity::from_value(acos(val.value())); +} + +/// asin of dimensionless quantity returning angle in same system +template +BOOST_CONSTEXPR +quantity >,Y> +asin(const quantity >,Y>& val) +{ + using std::asin; + return quantity >,Y>(asin(val.value())*si::radians); +} + +/// asin of dimensionless quantity returning angle in radians +template +BOOST_CONSTEXPR +quantity +asin(const quantity,Y>& val) +{ + using std::asin; + return quantity::from_value(asin(val.value())); +} + +/// atan of dimensionless quantity returning angle in same system +template +BOOST_CONSTEXPR +quantity >,Y> +atan(const quantity >, Y>& val) +{ + using std::atan; + return quantity >,Y>(atan(val.value())*si::radians); +} + +/// atan of dimensionless quantity returning angle in radians +template +BOOST_CONSTEXPR +quantity +atan(const quantity, Y>& val) +{ + using std::atan; + return quantity::from_value(atan(val.value())); +} + +/// atan2 of @c value_type returning angle in radians +template +BOOST_CONSTEXPR +quantity >, Y> +atan2(const quantity >, Y>& y, + const quantity >, Y>& x) +{ + using std::atan2; + return quantity >, Y>(atan2(y.value(),x.value())*si::radians); +} + +/// atan2 of @c value_type returning angle in radians +template +BOOST_CONSTEXPR +quantity +atan2(const quantity >, Y>& y, + const quantity >, Y>& x) +{ + using std::atan2; + return quantity::from_value(atan2(y.value(),x.value())); +} + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CMATH_HPP diff --git a/Slang/boost/units/config.hpp b/Slang/boost/units/config.hpp new file mode 100644 index 0000000..64e9025 --- /dev/null +++ b/Slang/boost/units/config.hpp @@ -0,0 +1,98 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CONFIG_HPP +#define BOOST_UNITS_CONFIG_HPP + +#include +#include + +#ifndef BOOST_UNITS_HAS_BOOST_TYPEOF + #if (BOOST_VERSION >= 103400) + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_BOOST_TYPEOF 1 + #else + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_BOOST_TYPEOF 0 + #endif +#endif + +#if (BOOST_UNITS_HAS_BOOST_TYPEOF) + #include + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_TYPEOF 1 +#else + #if (__GNUC__ && __cplusplus) + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_TYPEOF 1 + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_GNU_TYPEOF 1 + #elif defined(__MWERKS__) + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_TYPEOF 1 + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_MWERKS_TYPEOF 1 + #else + ///INTERNAL ONLY + #define BOOST_UNITS_HAS_TYPEOF 0 + #endif +#endif + +// uncomment this to test without typeof support at all +//#undef BOOST_UNITS_HAS_TYPEOF +//#define BOOST_UNITS_HAS_TYPEOF 0 + +#ifndef BOOST_UNITS_NO_COMPILER_CHECK + + #ifdef BOOST_NO_MEMBER_TEMPLATES + #error Boost.Units requires member template + #endif + + #ifdef BOOST_NO_MEMBER_TEMPLATE_KEYWORD + #error Boost.Units requires member template keyword + #endif + + #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION + #error Boost.Units requires in class member initialization + #endif + + #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + #error Boost.Units requires function template partial ordering + #endif + + +#endif + +#ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY + ///INTERNAL ONLY + #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b))) +#else + ///INTERNAL ONLY + #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) +#endif + +#ifdef BOOST_UNITS_DOXYGEN + +/// If defined will trigger a static assertion if quantity +/// is not layout compatible with T +#define BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY + +/// If defined will disable a preprocessor check that the +/// compiler is able to handle the library. +#define BOOST_UNITS_NO_COMPILER_CHECK + +/// Enable checking to verify that a homogeneous system +/// is actually capable of representing all the dimensions +/// that it is used with. Off by default. +#define BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS + +#endif + +#endif diff --git a/Slang/boost/units/conversion.hpp b/Slang/boost/units/conversion.hpp new file mode 100644 index 0000000..f5d4a1e --- /dev/null +++ b/Slang/boost/units/conversion.hpp @@ -0,0 +1,186 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CONVERSION_HPP +#define BOOST_UNITS_CONVERSION_HPP + +/// \file +/// \brief Template for defining conversions between quantities. + +#include + +namespace boost { + +namespace units { + +template +struct conversion_helper; + +#ifdef BOOST_UNITS_DOXYGEN + +/// Template for defining conversions between +/// quantities. This template should be specialized +/// for every quantity that allows conversions. +/// For example, if you have a two units +/// called pair and dozen you would write +/// @code +/// namespace boost { +/// namespace units { +/// template +/// struct conversion_helper, quantity > +/// { +/// static quantity convert(const quantity& source) +/// { +/// return(quantity::from_value(6 * source.value())); +/// } +/// }; +/// } +/// } +/// @endcode +/// +/// In most cases, the predefined specializations for @c unit +/// and @c absolute should be sufficient, so users should rarely +/// need to use this. +template +struct conversion_helper +{ + static BOOST_CONSTEXPR To convert(const From&); +}; + +#endif + +/// Defines the conversion factor from a base unit to any unit +/// or to another base unit with the correct dimensions. Uses +/// of this macro must appear at global scope. +/// If the destination unit is a base unit or a unit that contains +/// only one base unit which is raised to the first power (e.g. feet->meters) +/// the reverse (meters->feet in this example) need not be defined explicitly. +#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR(Source, Destination, type_, value_) \ + namespace boost { \ + namespace units { \ + template<> \ + struct select_base_unit_converter< \ + unscale::type, \ + unscale::type>::type \ + > \ + { \ + typedef Source source_type; \ + typedef reduce_unit::type destination_type; \ + }; \ + template<> \ + struct base_unit_converter::type> \ + { \ + BOOST_STATIC_CONSTEXPR bool is_defined = true; \ + typedef type_ type; \ + static BOOST_CONSTEXPR type value() { return(value_); } \ + }; \ + } \ + } \ + void boost_units_require_semicolon() + +/// Defines the conversion factor from a base unit to any other base +/// unit with the same dimensions. Params should be a Boost.Preprocessor +/// Seq of template parameters, such as (class T1)(class T2) +/// All uses of must appear at global scope. The reverse conversion will +/// be defined automatically. This macro is a little dangerous, because, +/// unlike the non-template form, it will silently fail if either base +/// unit is scaled. This is probably not an issue if both the source +/// and destination types depend on the template parameters, but be aware +/// that a generic conversion to kilograms is not going to work. +#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE(Params, Source, Destination, type_, value_) \ + namespace boost { \ + namespace units { \ + template \ + struct base_unit_converter< \ + Source, \ + BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(Destination, typename Source::dimension_type)\ + > \ + { \ + BOOST_STATIC_CONSTEXPR bool is_defined = true; \ + typedef type_ type; \ + static BOOST_CONSTEXPR type value() { return(value_); } \ + }; \ + } \ + } \ + void boost_units_require_semicolon() + +/// Specifies the default conversion to be applied when +/// no direct conversion is available. +/// Source is a base unit. Dest is any unit with the +/// same dimensions. +#define BOOST_UNITS_DEFAULT_CONVERSION(Source, Dest) \ + namespace boost { \ + namespace units { \ + template<> \ + struct unscaled_get_default_conversion::type> \ + { \ + BOOST_STATIC_CONSTEXPR bool is_defined = true; \ + typedef Dest::unit_type type; \ + }; \ + } \ + } \ + void boost_units_require_semicolon() + +/// Specifies the default conversion to be applied when +/// no direct conversion is available. +/// Params is a PP Sequence of template arguments. +/// Source is a base unit. Dest is any unit with the +/// same dimensions. The source must not be a scaled +/// base unit. +#define BOOST_UNITS_DEFAULT_CONVERSION_TEMPLATE(Params, Source, Dest) \ + namespace boost { \ + namespace units { \ + template \ + struct unscaled_get_default_conversion \ + { \ + BOOST_STATIC_CONSTEXPR bool is_defined = true; \ + typedef typename Dest::unit_type type; \ + }; \ + } \ + } \ + void boost_units_require_semicolon() + +/// INTERNAL ONLY +/// Users should not create their units in namespace boost::units. +/// If we want to make this public it needs to allow better control over +/// the namespaces. --SJW. +/// template that defines a base_unit and conversion to another dimensionally-consistent unit +#define BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string_, symbol_string_, factor, unit, id)\ +namespace boost { \ +namespace units { \ +namespace namespace_ { \ +struct name_ ## _base_unit \ + : base_unit { \ + static BOOST_CONSTEXPR const char* name() { return(name_string_); } \ + static BOOST_CONSTEXPR const char* symbol() { return(symbol_string_); } \ +}; \ +} \ +} \ +} \ +BOOST_UNITS_DEFINE_CONVERSION_FACTOR(namespace_::name_ ## _base_unit, unit, double, factor); \ +BOOST_UNITS_DEFAULT_CONVERSION(namespace_::name_ ## _base_unit, unit) + +/// Find the conversion factor between two units. +template +inline +BOOST_CONSTEXPR +typename one_to_double_type< + typename detail::conversion_factor_helper::type +>::type +conversion_factor(const FromUnit&,const ToUnit&) +{ + return(one_to_double(detail::conversion_factor_helper::value())); +} + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CONVERSION_HPP diff --git a/Slang/boost/units/derived_dimension.hpp b/Slang/boost/units/derived_dimension.hpp new file mode 100644 index 0000000..54cc46a --- /dev/null +++ b/Slang/boost/units/derived_dimension.hpp @@ -0,0 +1,208 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// A utility class for defining composite dimensions with integer powers. +template +struct derived_dimension +{ +#ifdef BOOST_UNITS_DOXYGEN + typedef detail::unspecified type; +#else + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, + list< dim< DT4,static_rational >, + list< dim< DT5,static_rational >, + list< dim< DT6,static_rational >, + list< dim< DT7,static_rational >, + list< dim< DT8,static_rational >, dimensionless_type > > > > > > > > >::type type; +#endif +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, dimensionless_type > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, dimensionless_type > > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + DT3, E3, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, dimensionless_type > > > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + DT3, E3, + DT4, E4, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, + list< dim< DT4,static_rational >, dimensionless_type > > > > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + DT3, E3, + DT4, E4, + DT5, E5, + dimensionless_type,0, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, + list< dim< DT4,static_rational >, + list< dim< DT5,static_rational >, dimensionless_type > > > > > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + DT3, E3, + DT4, E4, + DT5, E5, + DT6, E6, + dimensionless_type,0, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, + list< dim< DT4,static_rational >, + list< dim< DT5,static_rational >, + list< dim< DT6,static_rational >, dimensionless_type > > > > > > >::type type; +}; + +/// INTERNAL ONLY +template +struct derived_dimension< + DT1, E1, + DT2, E2, + DT3, E3, + DT4, E4, + DT5, E5, + DT6, E6, + DT7, E7, + dimensionless_type,0> +{ + typedef typename + make_dimension_list< list< dim< DT1,static_rational >, + list< dim< DT2,static_rational >, + list< dim< DT3,static_rational >, + list< dim< DT4,static_rational >, + list< dim< DT5,static_rational >, + list< dim< DT6,static_rational >, + list< dim< DT7,static_rational >, dimensionless_type > > > > > > > >::type type; +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/detail/absolute_impl.hpp b/Slang/boost/units/detail/absolute_impl.hpp new file mode 100644 index 0000000..ffd8b21 --- /dev/null +++ b/Slang/boost/units/detail/absolute_impl.hpp @@ -0,0 +1,104 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ABSOLUTE_IMPL_HPP +#define BOOST_UNITS_ABSOLUTE_IMPL_HPP + +#include + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// INTERNAL ONLY +template +struct reduce_unit > > +{ + typedef absolute >::type> type; +}; + +namespace detail { + +struct undefined_affine_conversion_base { + BOOST_STATIC_CONSTEXPR bool is_defined = false; +}; + +} // namespace detail + +/// INTERNAL ONLY +template +struct affine_conversion_helper : detail::undefined_affine_conversion_base { }; + +namespace detail { + +template +struct affine_conversion_impl; + +template +struct affine_conversion_impl +{ + template + struct apply { + static BOOST_CONSTEXPR T1 value(const T0& t0) + { + return( + t0 * + conversion_factor(Unit1(), Unit2()) + + affine_conversion_helper::type, typename reduce_unit::type>::value()); + } + }; +}; + +template<> +struct affine_conversion_impl +{ + template + struct apply + { + static BOOST_CONSTEXPR T1 value(const T0& t0) + { + return( + (t0 - affine_conversion_helper::type, typename reduce_unit::type>::value()) * + conversion_factor(Unit1(), Unit2())); + } + }; +}; + +} // namespace detail + +/// INTERNAL ONLY +template +struct conversion_helper, T1>, quantity, T2> > +{ + typedef quantity, T1> from_quantity_type; + typedef quantity, T2> to_quantity_type; + static BOOST_CONSTEXPR to_quantity_type convert(const from_quantity_type& source) + { + return( + to_quantity_type::from_value( + detail::affine_conversion_impl< + affine_conversion_helper::type, typename reduce_unit::type>::is_defined, + affine_conversion_helper::type, typename reduce_unit::type>::is_defined + >::template apply::value(source.value()) + ) + ); + } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ABSOLUTE_IMPL_HPP diff --git a/Slang/boost/units/detail/cmath_impl.hpp b/Slang/boost/units/detail/cmath_impl.hpp new file mode 100644 index 0000000..d5bec14 --- /dev/null +++ b/Slang/boost/units/detail/cmath_impl.hpp @@ -0,0 +1,154 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CMATH_IMPL_HPP +#define BOOST_UNITS_CMATH_IMPL_HPP + +#include +#include + +namespace boost { +namespace units { +namespace detail { + +template +inline bool isgreater BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false; + else return v1 > v2; +} + +template +inline bool isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false; + else return v1 >= v2; +} + +template +inline bool isless BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false; + else return v1 < v2; +} + +template +inline bool islessequal BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false; + else return v1 <= v2; +} + +template +inline bool islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false; + else return v1 < v2 || v1 > v2; +} + +template +inline bool isunordered BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + return (boost::math::isnan)(v1) || (boost::math::isnan)(v2); +} + +template +inline Y fdim BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1)) return v1; + else if((boost::math::isnan)(v2)) return v2; + else if(v1 > v2) return(v1 - v2); + else return(Y(0)); +} + +#if 0 + +template +struct fma_issue_warning { + enum { value = false }; +}; + +template +inline Y fma(const Y& v1,const Y& v2,const Y& v3) +{ + //this implementation does *not* meet the + //requirement of infinite intermediate precision + BOOST_STATIC_WARNING((fma_issue_warning::value)); + + return v1 * v2 + v3; +} + +#endif + +template +inline Y fmax BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1)) return(v2); + else if((boost::math::isnan)(v2)) return(v1); + else if(v1 > v2) return(v1); + else return(v2); +} + +template +inline Y fmin BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2) +{ + if((boost::math::isnan)(v1)) return(v2); + else if((boost::math::isnan)(v2)) return(v1); + else if(v1 < v2) return(v1); + else return(v2); +} + +//template +//inline long long llrint(const Y& val) +//{ +// return static_cast(rint(val)); +//} +// +//template +//inline long long llround(const Y& val) +//{ +// return static_cast(round(val)); +//} + +#if 0 + +template +inline Y nearbyint(const Y& val) +{ + //this is not really correct. + //the result should be according to the + //current rounding mode. + using boost::math::round; + return round(val); +} + +template +inline Y rint(const Y& val) +{ + //I don't feel like trying to figure out + //how to raise a floating pointer exception + return nearbyint(val); +} + +#endif + +template +inline Y trunc BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& val) +{ + if(val > 0) return std::floor(val); + else if(val < 0) return std::ceil(val); + else return val; +} + +} +} +} + +#endif // BOOST_UNITS_CMATH_IMPL_HPP diff --git a/Slang/boost/units/detail/conversion_impl.hpp b/Slang/boost/units/detail/conversion_impl.hpp new file mode 100644 index 0000000..f3cc195 --- /dev/null +++ b/Slang/boost/units/detail/conversion_impl.hpp @@ -0,0 +1,452 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_CONVERSION_IMPL_HPP +#define BOOST_UNITS_DETAIL_CONVERSION_IMPL_HPP + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + +namespace units { + +namespace detail { + +template +struct conversion_factor_helper; + +template +struct call_base_unit_converter; + +} + +/// INTERNAL ONLY +struct undefined_base_unit_converter_base { + BOOST_STATIC_CONSTEXPR bool is_defined = false; +}; + +/// INTERNAL ONLY +struct no_default_conversion { + BOOST_STATIC_CONSTEXPR bool is_defined = false; +}; + +/// INTERNAL ONLY +template +struct unscaled_get_default_conversion : no_default_conversion { }; + +/// INTERNAL ONLY +template +struct unscaled_get_default_conversion_impl; + +/// INTERNAL ONLY +template<> +struct unscaled_get_default_conversion_impl +{ + template + struct apply + { + typedef typename unscaled_get_default_conversion::type>::type type; + }; +}; + +/// INTERNAL ONLY +template<> +struct unscaled_get_default_conversion_impl +{ + template + struct apply + { + typedef typename T::unit_type type; + }; +}; + +/// INTERNAL ONLY +template +struct get_default_conversion +{ + typedef typename unscaled_get_default_conversion_impl< + unscaled_get_default_conversion::type>::is_defined + >::template apply::type type; +}; + +/// INTERNAL ONLY +template +struct select_base_unit_converter +{ + typedef Source source_type; + typedef Destination destination_type; +}; + +/// INTERNAL ONLY +template +struct base_unit_converter_base : undefined_base_unit_converter_base { +}; + +/// INTERNAL ONLY +template +struct base_unit_converter_base +{ + BOOST_STATIC_CONSTEXPR bool is_defined = true; + typedef one type; + static BOOST_CONSTEXPR type value() { + return(one()); + } +}; + +/// INTERNAL ONLY +template +struct base_unit_converter : base_unit_converter_base { }; + +namespace detail { + +template +struct do_call_base_unit_converter { + typedef select_base_unit_converter::type, typename unscale::type> selector; + typedef typename selector::source_type source_type; + typedef typename selector::destination_type destination_type; + typedef base_unit_converter converter; + typedef typename mpl::divides::type, typename get_scale_list::type>::type source_factor; + typedef typename mpl::divides::type, typename get_scale_list::type>::type destination_factor; + typedef typename mpl::divides::type factor; + typedef eval_scale_list eval_factor; + typedef typename multiply_typeof_helper::type type; + static BOOST_CONSTEXPR type value() + { + return(converter::value() * eval_factor::value()); + } +}; + +template +struct call_base_unit_converter_base_unit_impl; + +template<> +struct call_base_unit_converter_base_unit_impl +{ + template + struct apply + : do_call_base_unit_converter + { + }; +}; + +template<> +struct call_base_unit_converter_base_unit_impl +{ + template + struct apply + : do_call_base_unit_converter + { + }; +}; + +template<> +struct call_base_unit_converter_base_unit_impl +{ + template + struct apply + { + typedef do_call_base_unit_converter converter; + typedef typename divide_typeof_helper::type type; + static BOOST_CONSTEXPR type value() { + return(one() / converter::value()); + } + }; +}; + +template<> +struct call_base_unit_converter_base_unit_impl +{ + template + struct apply + { + typedef typename reduce_unit::type>::type new_source; + typedef typename reduce_unit::type>::type new_dest; + typedef call_base_unit_converter start; + typedef detail::conversion_factor_helper< + new_source, + new_dest + > conversion; + typedef call_base_unit_converter end; + typedef typename divide_typeof_helper< + typename multiply_typeof_helper< + typename start::type, + typename conversion::type + >::type, + typename end::type + >::type type; + static BOOST_CONSTEXPR type value() { + return(start::value() * conversion::value() / end::value()); + } + }; +}; + +template +struct get_default_conversion_impl +{ + template + struct apply + { + typedef typename Begin::item source_pair; + typedef typename source_pair::value_type exponent; + typedef typename source_pair::tag_type source; + typedef typename reduce_unit::type>::type new_source; + typedef typename get_default_conversion_impl::template apply next_iteration; + typedef typename multiply_typeof_helper::type, typename next_iteration::unit_type>::type unit_type; + typedef call_base_unit_converter conversion; + typedef typename multiply_typeof_helper::type type; + static BOOST_CONSTEXPR type value() { + return(static_rational_power(conversion::value()) * next_iteration::value()); + } + }; +}; + +template<> +struct get_default_conversion_impl<0> +{ + template + struct apply + { + typedef unit > > unit_type; + typedef one type; + static BOOST_CONSTEXPR one value() { + return(one()); + } + }; +}; + +template +struct call_base_unit_converter_impl; + +template<> +struct call_base_unit_converter_impl +{ + template + struct apply + : do_call_base_unit_converter + { + }; +}; + +template<> +struct call_base_unit_converter_impl +{ + template + struct apply { + typedef typename reduce_unit::type>::type new_source; + typedef typename Dest::system_type::type system_list; + typedef typename get_default_conversion_impl::template apply impl; + typedef typename impl::unit_type new_dest; + typedef call_base_unit_converter start; + typedef conversion_factor_helper conversion; + typedef typename divide_typeof_helper< + typename multiply_typeof_helper< + typename start::type, + typename conversion::type + >::type, + typename impl::type + >::type type; + static BOOST_CONSTEXPR type value() { + return(start::value() * conversion::value() / impl::value()); + } + }; +}; + +#define BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Source, Dest)\ + base_unit_converter<\ + typename select_base_unit_converter::type, typename unscale::type>::source_type,\ + typename select_base_unit_converter::type, typename unscale::type>::destination_type\ + >::is_defined + +template +struct call_base_unit_converter : call_base_unit_converter_impl::template apply +{ +}; + +template +struct call_base_unit_converter : + call_base_unit_converter_base_unit_impl< + BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Source, typename Dest::unit_type), + BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Dest, typename Source::unit_type) + >::template apply +{ +}; + +template +struct conversion_impl +{ + template + struct apply + { + typedef typename conversion_impl::template apply< + typename Begin::next, + DestinationSystem + > next_iteration; + typedef typename Begin::item unit_pair; + typedef typename unit_pair::tag_type unit; + typedef typename unit::dimension_type dimensions; + typedef typename reduce_unit >::type reduced_unit; + typedef detail::call_base_unit_converter converter; + typedef typename multiply_typeof_helper::type type; + static BOOST_CONSTEXPR type value() { return(static_rational_power(converter::value()) * next_iteration::value()); } + }; +}; + +template<> +struct conversion_impl<0> +{ + template + struct apply + { + typedef one type; + static BOOST_CONSTEXPR type value() { return(one()); } + }; +}; + +} // namespace detail + +/// forward to conversion_factor (intentionally allowing ADL) +/// INTERNAL ONLY +template +struct conversion_helper, quantity > +{ + /// INTERNAL ONLY + typedef quantity destination_type; + static BOOST_CONSTEXPR destination_type convert(const quantity& source) + { + return(destination_type::from_value(static_cast(source.value() * conversion_factor(Unit1(), Unit2())))); + } +}; + +namespace detail { + +template +struct conversion_factor_helper; + +template +struct conversion_factor_helper >, unit > > + : conversion_factor_helper< + typename reduce_unit > >::type, + typename reduce_unit > >::type + > +{ + //typedef typename reduce_unit > >::type source_unit; + //typedef typename source_unit::system_type::type unit_list; + //typedef typename detail::conversion_impl::template apply< + // unit_list, + // homogeneous_system + //> impl; + //typedef typename impl::type type; + //static BOOST_CONSTEXPR type value() + //{ + // return(impl::value()); + //} +}; + +template +struct conversion_factor_helper >, unit > > + : conversion_factor_helper< + typename reduce_unit > >::type, + typename reduce_unit > >::type + > +{ + //typedef typename detail::conversion_impl::template apply< + // typename L1::type, + // homogeneous_system + //> impl; + //typedef eval_scale_list scale; + //typedef typename multiply_typeof_helper::type type; + //static BOOST_CONSTEXPR type value() + //{ + // return(impl::value() * scale::value()); + //} +}; + +// There is no simple algorithm for doing this conversion +// other than just defining it as the reverse of the +// heterogeneous->homogeneous case +template +struct conversion_factor_helper >, unit > > + : conversion_factor_helper< + typename reduce_unit > >::type, + typename reduce_unit > >::type + > +{ + //typedef typename detail::conversion_impl::template apply< + // typename L2::type, + // homogeneous_system + //> impl; + //typedef eval_scale_list scale; + //typedef typename multiply_typeof_helper::type type; + //static BOOST_CONSTEXPR type value() + //{ + // return(one() / (impl::value() * scale::value())); + //} +}; + +/// Requires that all possible conversions +/// between base units are defined. +template +struct conversion_factor_helper >, unit > > +{ + /// INTERNAL ONLY + typedef typename detail::extract_base_units::template apply< + typename S1::type, + dimensionless_type + >::type from_base_units; + /// INTERNAL ONLY + typedef typename detail::extract_base_units::template apply< + typename S2::type, + from_base_units + >::type all_base_units; + /// INTERNAL ONLY + typedef typename detail::make_homogeneous_system::type system; + typedef typename detail::conversion_impl::template apply< + typename S1::type, + system + > conversion1; + typedef typename detail::conversion_impl::template apply< + typename S2::type, + system + > conversion2; + typedef eval_scale_list::type> scale; + typedef typename multiply_typeof_helper< + typename conversion1::type, + typename divide_typeof_helper::type + >::type type; + static BOOST_CONSTEXPR type value() + { + return(conversion1::value() * (scale::value() / conversion2::value())); + } +}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CONVERSION_IMPL_HPP diff --git a/Slang/boost/units/detail/dim_impl.hpp b/Slang/boost/units/detail/dim_impl.hpp new file mode 100644 index 0000000..85792b8 --- /dev/null +++ b/Slang/boost/units/detail/dim_impl.hpp @@ -0,0 +1,90 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIM_IMPL_HPP +#define BOOST_UNITS_DIM_IMPL_HPP + +#include +#include + +#include + +/// \file +/// \brief Class encapsulating a dimension tag/value pair + +namespace boost { + +namespace units { + +namespace detail { + +struct dim_tag; + +} + +} + +namespace mpl { + +/// Less than comparison for sorting @c dim. +template<> +struct less_impl +{ + template + struct apply : mpl::less {}; +}; + +} + +namespace units { + +template +struct dim; + +template +class static_rational; + +namespace detail { + +/// Extract @c tag_type from a @c dim. +template +struct get_tag +{ + typedef typename T::tag_type type; +}; + +/// Extract @c value_type from a @c dim. +template +struct get_value +{ + typedef typename T::value_type type; +}; + +/// Determine if a @c dim is empty (has a zero exponent). +template +struct is_empty_dim; + +template +struct is_empty_dim< dim > > : + mpl::true_ +{ }; + +template +struct is_empty_dim< dim > : + mpl::false_ +{ }; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DIM_IMPL_HPP diff --git a/Slang/boost/units/detail/dimension_impl.hpp b/Slang/boost/units/detail/dimension_impl.hpp new file mode 100644 index 0000000..dbe77af --- /dev/null +++ b/Slang/boost/units/detail/dimension_impl.hpp @@ -0,0 +1,347 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSION_IMPL_HPP +#define BOOST_UNITS_DIMENSION_IMPL_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/// \file +/// \brief Core class and metaprogramming utilities for compile-time dimensional analysis. + +namespace boost { + +namespace units { + +namespace detail { + +template +struct insertion_sort_dims_insert; + +template +struct insertion_sort_dims_comparison_impl; + +// have to recursively add the element to the next sequence. +template<> +struct insertion_sort_dims_comparison_impl { + template + struct apply { + typedef list< + typename Begin::item, + typename insertion_sort_dims_insert::template apply< + typename Begin::next, + T + >::type + > type; + }; +}; + +// either prepend the current element or join it to +// the first remaining element of the sequence. +template<> +struct insertion_sort_dims_comparison_impl { + template + struct apply { + typedef typename push_front_or_add::type type; + }; +}; + +template +struct insertion_sort_dims_insert { + template + struct apply { + typedef typename insertion_sort_dims_comparison_impl::value>::template apply< + Begin, + N, + T + >::type type; + }; +}; + +template<> +struct insertion_sort_dims_insert<0> { + template + struct apply { + typedef list type; + }; +}; + +template +struct insertion_sort_dims_mpl_sequence { + template + struct apply { + typedef typename insertion_sort_dims_mpl_sequence::template apply::type>::type next; + typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply::type>::type type; + }; +}; + +template<> +struct insertion_sort_dims_mpl_sequence<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct insertion_sort_dims_impl { + template + struct apply { + typedef typename insertion_sort_dims_impl::template apply::type next; + typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply::type type; + }; +}; + +template<> +struct insertion_sort_dims_impl<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct sort_dims +{ + typedef typename insertion_sort_dims_mpl_sequence::value>::template apply::type>::type type; +}; + + +template +struct sort_dims > +{ + typedef typename insertion_sort_dims_impl::size::value>::template apply >::type type; +}; + +/// sorted sequences can be merged in linear time +template +struct merge_dimensions_func; + +template +struct merge_dimensions_impl; + +template<> +struct merge_dimensions_func +{ + template + struct apply + { + typedef list< + typename Begin1::item, + typename merge_dimensions_impl::template apply< + typename Begin1::next, + Begin2 + >::type + > type; + }; +}; + +template<> +struct merge_dimensions_func { + template + struct apply + { + typedef list< + typename Begin2::item, + typename merge_dimensions_impl::template apply< + typename Begin2::next, + Begin1 + >::type + > type; + }; +}; + +template<> +struct merge_dimensions_func { + template + struct apply + { + typedef typename mpl::plus::type combined; + typedef typename push_front_if::value>::template apply< + typename merge_dimensions_impl::template apply< + typename Begin1::next, + typename Begin2::next + >::type, + combined + >::type type; + }; +}; + +template +struct merge_dimensions_impl { + template + struct apply + { + typedef typename Begin1::item dim1; + typedef typename Begin2::item dim2; + + typedef typename merge_dimensions_func<(mpl::less::value == true), + (mpl::less::value == true)>::template apply< + Begin1, + Begin2, + N1, + N2 + >::type type; + }; +}; + +template +struct merge_dimensions +{ + typedef typename detail::merge_dimensions_impl::template + apply< + Sequence1, + Sequence2 + >::type type; +}; + +template +struct iterator_to_list +{ + template + struct apply + { + typedef list< + typename Begin::item, + typename iterator_to_list::template apply< + typename Begin::next + >::type + > type; + }; +}; + +template<> +struct iterator_to_list<0> +{ + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct merge_dimensions_impl +{ + template + struct apply + { + typedef typename iterator_to_list::template apply::type type; + }; +}; + +template +struct merge_dimensions_impl<0, N> +{ + template + struct apply + { + typedef typename iterator_to_list::template apply::type type; + }; +}; + +template<> +struct merge_dimensions_impl<0, 0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +template +struct static_inverse_impl +{ + template + struct apply { + typedef list< + typename mpl::negate::type, + typename static_inverse_impl::template apply< + typename Begin::next + >::type + > type; + }; +}; + +template<> +struct static_inverse_impl<0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +template +struct static_power_impl +{ + template + struct apply + { + typedef list< + typename mpl::times::type, + typename detail::static_power_impl::template apply::type + > type; + }; +}; + +template<> +struct static_power_impl<0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +template +struct static_root_impl { + template + struct apply { + typedef list< + typename mpl::divides::type, + typename detail::static_root_impl::template apply::type + > type; + }; +}; + +template<> +struct static_root_impl<0> { + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DIMENSION_IMPL_HPP diff --git a/Slang/boost/units/detail/dimension_list.hpp b/Slang/boost/units/detail/dimension_list.hpp new file mode 100644 index 0000000..fc05547 --- /dev/null +++ b/Slang/boost/units/detail/dimension_list.hpp @@ -0,0 +1,133 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSION_LIST_HPP +#define BOOST_UNITS_DIMENSION_LIST_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + +namespace units { + +struct dimensionless_type; + +namespace detail { + +struct dimension_list_tag { }; + +} // namespace detail + +template +struct list +{ + typedef detail::dimension_list_tag tag; + typedef list type; + typedef Item item; + typedef Next next; + typedef typename mpl::next::type size; +}; + +} // namespace units + +namespace mpl { + +// INTERNAL ONLY +template<> +struct size_impl +{ + template struct apply : public L::size { }; +}; + +// INTERNAL ONLY +template<> +struct begin_impl +{ + template + struct apply + { + typedef L type; + }; +}; + +// INTERNAL ONLY +template<> +struct end_impl +{ + template + struct apply + { + typedef units::dimensionless_type type; + }; +}; + +// INTERNAL ONLY +template<> +struct push_front_impl +{ + template + struct apply + { + typedef units::list type; + }; +}; + +// INTERNAL ONLY +template<> +struct pop_front_impl +{ + template + struct apply + { + typedef typename L::next type; + }; +}; + +// INTERNAL ONLY +template<> +struct front_impl +{ + template + struct apply + { + typedef typename L::item type; + }; +}; + +// INTERNAL ONLY +template +struct deref > +{ + typedef Item type; +}; + +} // namespace mpl + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::list, 2) + +#endif + +#include + +#endif // BOOST_UNITS_DIMENSION_LIST_HPP diff --git a/Slang/boost/units/detail/dimensionless_unit.hpp b/Slang/boost/units/detail/dimensionless_unit.hpp new file mode 100644 index 0000000..291bec4 --- /dev/null +++ b/Slang/boost/units/detail/dimensionless_unit.hpp @@ -0,0 +1,88 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_DIMENSIONLESS_UNIT_HPP +#define BOOST_UNITS_DETAIL_DIMENSIONLESS_UNIT_HPP + +#include +#include + +namespace boost { +namespace units { + +template +struct heterogeneous_system; + +template +struct homogeneous_system; + +template +struct heterogeneous_system_impl; + +typedef boost::units::heterogeneous_system< + boost::units::heterogeneous_system_impl< + boost::units::dimensionless_type, + boost::units::dimensionless_type, + boost::units::dimensionless_type + > +> heterogeneous_dimensionless_system; + +namespace detail { + +template +struct void_if_dimensionless { + typedef int type; +}; + +template +struct void_if_dimensionless > { + typedef void type; +}; + +template<> +struct void_if_dimensionless { + typedef void type; +}; + +template +struct void_if_heterogeneous { + typedef void type; +}; + +template +struct void_if_heterogeneous::type> { + typedef int type; +}; + +template +struct is_dimensionless_system : mpl::false_ {}; + +template +struct is_dimensionless_system::type> : mpl::true_ {}; + +#define BOOST_UNITS_DIMENSIONLESS_UNIT(T)\ + boost::units::unit<\ + boost::units::dimensionless_type,\ + T,\ + typename ::boost::units::detail::void_if_dimensionless::type\ + > + +#define BOOST_UNITS_HETEROGENEOUS_DIMENSIONLESS_UNIT(T)\ + boost::units::unit<\ + boost::units::dimensionless_type,\ + T,\ + typename ::boost::units::detail::void_if_heterogeneous::type\ + > + +} +} +} + +#endif diff --git a/Slang/boost/units/detail/heterogeneous_conversion.hpp b/Slang/boost/units/detail/heterogeneous_conversion.hpp new file mode 100644 index 0000000..bfdf987 --- /dev/null +++ b/Slang/boost/units/detail/heterogeneous_conversion.hpp @@ -0,0 +1,309 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_HETEROGENEOUS_CONVERSION_HPP +#define BOOST_UNITS_DETAIL_HETEROGENEOUS_CONVERSION_HPP + +#include +#include + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +struct solve_end { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +struct no_solution {}; + +template +struct solve_normal { + template + struct apply { + typedef typename Begin::next next; + typedef list< + typename mpl::minus< + typename mpl::times::type, + typename mpl::times::type + >::type, + typename Next::template apply::type + > type; + }; +}; + +template +struct solve_leading_zeroes { + template + struct apply { + typedef list< + typename Begin::item, + typename Next::template apply::type + > type; + }; + typedef solve_leading_zeroes type; +}; + +template<> +struct solve_leading_zeroes { + typedef no_solution type; +}; + +template +struct solve_first_non_zero { + template + struct apply { + typedef typename Next::template apply< + typename Begin::next, + typename Begin::item + >::type type; + }; +}; + +template +struct solve_internal_zero { + template + struct apply { + typedef list< + typename Begin::item, + typename Next::template apply::type + > type; + }; +}; + +template +struct make_solve_list_internal_zero { + template + struct apply { + typedef solve_normal type; + }; +}; + +template<> +struct make_solve_list_internal_zero > { + template + struct apply { + typedef solve_internal_zero type; + }; +}; + +template +struct make_solve_list_normal { + template + struct apply { + typedef typename make_solve_list_internal_zero< + typename Begin::item + >::template apply< + typename make_solve_list_normal::template apply::type, + X + >::type type; + }; +}; + +template<> +struct make_solve_list_normal<0> { + template + struct apply { + typedef solve_end type; + }; +}; + +template +struct make_solve_list_leading_zeroes; + +template +struct make_solve_list_first_non_zero { + template + struct apply { + typedef solve_first_non_zero< + typename make_solve_list_normal::template apply< + typename Begin::next, + typename Begin::item + >::type + > type; + }; +}; + +template<> +struct make_solve_list_first_non_zero > { + template + struct apply { + typedef typename solve_leading_zeroes< + typename make_solve_list_leading_zeroes::template apply< + typename Begin::next + >::type + >::type type; + }; +}; + +template +struct make_solve_list_leading_zeroes { + template + struct apply { + typedef typename make_solve_list_first_non_zero::template apply::type type; + }; +}; + +template<> +struct make_solve_list_leading_zeroes<0> { + template + struct apply { + typedef no_solution type; + }; +}; + +template +struct try_add_unit_impl { + template + struct apply { + typedef typename try_add_unit_impl::template apply::type next; + typedef typename Begin::item::template apply::type type; + BOOST_STATIC_ASSERT((next::size::value - 1 == type::size::value)); + }; +}; + +template<> +struct try_add_unit_impl<0> { + template + struct apply { + typedef L type; + }; +}; + +template +struct make_homogeneous_system_impl; + +template +struct make_homogeneous_system_func; + +template +struct make_homogeneous_system_func { + template + struct apply { + typedef typename make_homogeneous_system_impl::template apply< + typename Begin::next, + list, + list, + Dimensions + >::type type; + }; +}; + +template +struct make_homogeneous_system_func { + template + struct apply { + typedef list type; + }; +}; + +template<> +struct make_homogeneous_system_func { + template + struct apply { + typedef typename make_homogeneous_system_impl::template apply< + typename Begin::next, + Current, + Units, + Dimensions + >::type type; + }; +}; + +template<> +struct make_homogeneous_system_func { + template + struct apply { + typedef typename make_homogeneous_system_impl::template apply< + typename Begin::next, + Current, + Units, + Dimensions + >::type type; + }; +}; + +template +struct make_homogeneous_system_impl { + template + struct apply { + typedef typename expand_dimensions::template apply< + Dimensions, + typename Begin::item::dimension_type + >::type dimensions; + typedef typename try_add_unit_impl::template apply::type new_element; + typedef typename make_solve_list_leading_zeroes::template apply::type new_func; + typedef typename make_homogeneous_system_func< + new_func, + ((Current::size::value)+1) == (Dimensions::size::value) + >::template apply::type type; + }; +}; + +template<> +struct make_homogeneous_system_impl<0> { + template + struct apply { + typedef Units type; + }; +}; + +template +struct make_homogeneous_system { + typedef typename find_base_dimensions::type base_dimensions; + typedef homogeneous_system< + typename insertion_sort< + typename make_homogeneous_system_impl< + Units::size::value + >::template apply< + Units, + dimensionless_type, + dimensionless_type, + base_dimensions + >::type + >::type + > type; +}; + +template +struct extract_base_units { + template + struct apply { + typedef list< + typename Begin::item::tag_type, + typename extract_base_units::template apply::type + > type; + }; +}; + +template<> +struct extract_base_units<0> { + template + struct apply { + typedef T type; + }; +}; + +} + +} + +} + +#endif diff --git a/Slang/boost/units/detail/linear_algebra.hpp b/Slang/boost/units/detail/linear_algebra.hpp new file mode 100644 index 0000000..17ed34b --- /dev/null +++ b/Slang/boost/units/detail/linear_algebra.hpp @@ -0,0 +1,1060 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_LINEAR_ALGEBRA_HPP +#define BOOST_UNITS_DETAIL_LINEAR_ALGEBRA_HPP + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +// typedef list equation; + +template +struct eliminate_from_pair_of_equations_impl; + +template +struct eliminate_from_pair_of_equations; + +template +struct elimination_impl; + +template +struct elimination_skip_leading_zeros_impl; + +template +struct substitute; + +template +struct substitute_impl; + +template +struct solve_impl; + +template +struct solve; + +template +struct check_extra_equations_impl; + +template +struct normalize_units_impl; + +struct inconsistent {}; + +// generally useful utilies. + +template +struct divide_equation { + template + struct apply { + typedef list::type, typename divide_equation::template apply::type> type; + }; +}; + +template<> +struct divide_equation<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +// eliminate_from_pair_of_equations takes a pair of +// equations and eliminates the first variable. +// +// equation eliminate_from_pair_of_equations(equation l1, equation l2) { +// rational x1 = l1.front(); +// rational x2 = l2.front(); +// return(transform(pop_front(l1), pop_front(l2), _1 * x2 - _2 * x1)); +// } + +template +struct eliminate_from_pair_of_equations_impl { + template + struct apply { + typedef list< + typename mpl::minus< + typename mpl::times::type, + typename mpl::times::type + >::type, + typename eliminate_from_pair_of_equations_impl::template apply< + typename Begin1::next, + typename Begin2::next, + X1, + X2 + >::type + > type; + }; +}; + +template<> +struct eliminate_from_pair_of_equations_impl<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct eliminate_from_pair_of_equations { + typedef E1 begin1; + typedef E2 begin2; + typedef typename eliminate_from_pair_of_equations_impl<(E1::size::value - 1)>::template apply< + typename begin1::next, + typename begin2::next, + typename begin1::item, + typename begin2::item + >::type type; +}; + + + +// Stage 1. Determine which dimensions should +// have dummy base units. For this purpose +// row reduce the matrix. + +template +struct make_zero_vector { + typedef list, typename make_zero_vector::type> type; +}; +template<> +struct make_zero_vector<0> { + typedef dimensionless_type type; +}; + +template +struct create_row_of_identity { + typedef list, typename create_row_of_identity::type> type; +}; +template +struct create_row_of_identity<0, TotalColumns> { + typedef list, typename make_zero_vector::type> type; +}; +template +struct create_row_of_identity { + // error +}; + +template +struct determine_extra_equations_impl; + +template +struct determine_extra_equations_skip_zeros_impl; + +// not the last row and not zero. +template<> +struct determine_extra_equations_skip_zeros_impl { + template + struct apply { + // remove the equation being eliminated against from the set of equations. + typedef typename determine_extra_equations_impl::template apply::type next_equations; + // since this column was present, strip it out. + typedef Result type; + }; +}; + +// the last row but not zero. +template<> +struct determine_extra_equations_skip_zeros_impl { + template + struct apply { + // remove this equation. + typedef dimensionless_type next_equations; + // since this column was present, strip it out. + typedef Result type; + }; +}; + + +// the first columns is zero but it is not the last column. +// continue with the same loop. +template<> +struct determine_extra_equations_skip_zeros_impl { + template + struct apply { + typedef typename RowsBegin::next::item next_row; + typedef typename determine_extra_equations_skip_zeros_impl< + next_row::item::Numerator == 0, + RemainingRows == 2 // the next one will be the last. + >::template apply< + typename RowsBegin::next, + RemainingRows - 1, + CurrentColumn, + TotalColumns, + Result + > next; + typedef list next_equations; + typedef typename next::type type; + }; +}; + +// all the elements in this column are zero. +template<> +struct determine_extra_equations_skip_zeros_impl { + template + struct apply { + typedef list next_equations; + typedef list::type, Result> type; + }; +}; + +template +struct determine_extra_equations_impl { + template + struct apply { + typedef list< + typename eliminate_from_pair_of_equations::type, + typename determine_extra_equations_impl::template apply::type + > type; + }; +}; + +template<> +struct determine_extra_equations_impl<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct determine_extra_equations { + template + struct apply { + typedef typename RowsBegin::item top_row; + typedef typename determine_extra_equations_skip_zeros_impl< + top_row::item::Numerator == 0, + RowsBegin::size::value == 1 + >::template apply< + RowsBegin, + RowsBegin::size::value, + TotalColumns - RemainingColumns, + TotalColumns, + Result + > column_info; + typedef typename determine_extra_equations< + RemainingColumns - 1, + column_info::next_equations::size::value == 0 + >::template apply< + typename column_info::next_equations, + TotalColumns, + typename column_info::type + >::type type; + }; +}; + +template +struct determine_extra_equations { + template + struct apply { + typedef typename determine_extra_equations::template apply< + RowsBegin, + TotalColumns, + list::type, Result> + >::type type; + }; +}; + +template<> +struct determine_extra_equations<0, true> { + template + struct apply { + typedef Result type; + }; +}; + +// Stage 2 +// invert the matrix using Gauss-Jordan elimination + + +template +struct invert_strip_leading_zeroes; + +template +struct invert_handle_after_pivot_row; + +// When processing column N, none of the first N rows +// can be the pivot column. +template +struct invert_handle_inital_rows { + template + struct apply { + typedef typename invert_handle_inital_rows::template apply< + typename RowsBegin::next, + typename IdentityBegin::next + > next; + typedef typename RowsBegin::item current_row; + typedef typename IdentityBegin::item current_identity_row; + typedef typename next::pivot_row pivot_row; + typedef typename next::identity_pivot_row identity_pivot_row; + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_row::size::value) - 1>::template apply< + typename current_row::next, + pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::new_matrix + > new_matrix; + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply< + current_identity_row, + identity_pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::identity_result + > identity_result; + }; +}; + +// This handles the switch to searching for a pivot column. +// The pivot row will be propagated up in the typedefs +// pivot_row and identity_pivot_row. It is inserted here. +template<> +struct invert_handle_inital_rows<0> { + template + struct apply { + typedef typename RowsBegin::item current_row; + typedef typename invert_strip_leading_zeroes< + (current_row::item::Numerator == 0), + (RowsBegin::size::value == 1) + >::template apply< + RowsBegin, + IdentityBegin + > next; + // results + typedef list new_matrix; + typedef list identity_result; + typedef typename next::pivot_row pivot_row; + typedef typename next::identity_pivot_row identity_pivot_row; + }; +}; + +// The first internal element which is not zero. +template<> +struct invert_strip_leading_zeroes { + template + struct apply { + typedef typename RowsBegin::item current_row; + typedef typename current_row::item current_value; + typedef typename divide_equation<(current_row::size::value - 1)>::template apply::type new_equation; + typedef typename divide_equation<(IdentityBegin::item::size::value)>::template apply::type transformed_identity_equation; + typedef typename invert_handle_after_pivot_row<(RowsBegin::size::value - 1)>::template apply< + typename RowsBegin::next, + typename IdentityBegin::next, + new_equation, + transformed_identity_equation + > next; + + // results + // Note that we don't add the pivot row to the + // results here, because it needs to propagated up + // to the diagonal. + typedef typename next::new_matrix new_matrix; + typedef typename next::identity_result identity_result; + typedef new_equation pivot_row; + typedef transformed_identity_equation identity_pivot_row; + }; +}; + +// The one and only non-zero element--at the end +template<> +struct invert_strip_leading_zeroes { + template + struct apply { + typedef typename RowsBegin::item current_row; + typedef typename current_row::item current_value; + typedef typename divide_equation<(current_row::size::value - 1)>::template apply::type new_equation; + typedef typename divide_equation<(IdentityBegin::item::size::value)>::template apply::type transformed_identity_equation; + + // results + // Note that we don't add the pivot row to the + // results here, because it needs to propagated up + // to the diagonal. + typedef dimensionless_type identity_result; + typedef dimensionless_type new_matrix; + typedef new_equation pivot_row; + typedef transformed_identity_equation identity_pivot_row; + }; +}; + +// One of the initial zeroes +template<> +struct invert_strip_leading_zeroes { + template + struct apply { + typedef typename RowsBegin::item current_row; + typedef typename RowsBegin::next::item next_row; + typedef typename invert_strip_leading_zeroes< + next_row::item::Numerator == 0, + RowsBegin::size::value == 2 + >::template apply< + typename RowsBegin::next, + typename IdentityBegin::next + > next; + typedef typename IdentityBegin::item current_identity_row; + // these are propagated up. + typedef typename next::pivot_row pivot_row; + typedef typename next::identity_pivot_row identity_pivot_row; + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_row::size::value - 1)>::template apply< + typename current_row::next, + pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::new_matrix + > new_matrix; + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply< + current_identity_row, + identity_pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::identity_result + > identity_result; + }; +}; + +// the last element, and is zero. +// Should never happen. +template<> +struct invert_strip_leading_zeroes { +}; + +template +struct invert_handle_after_pivot_row { + template + struct apply { + typedef typename invert_handle_after_pivot_row::template apply< + typename RowsBegin::next, + typename IdentityBegin::next, + MatrixPivot, + IdentityPivot + > next; + typedef typename RowsBegin::item current_row; + typedef typename IdentityBegin::item current_identity_row; + typedef MatrixPivot pivot_row; + typedef IdentityPivot identity_pivot_row; + + // results + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_row::size::value - 1)>::template apply< + typename current_row::next, + pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::new_matrix + > new_matrix; + typedef list< + typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply< + current_identity_row, + identity_pivot_row, + typename current_row::item, + static_rational<1> + >::type, + typename next::identity_result + > identity_result; + }; +}; + +template<> +struct invert_handle_after_pivot_row<0> { + template + struct apply { + typedef dimensionless_type new_matrix; + typedef dimensionless_type identity_result; + }; +}; + +template +struct invert_impl { + template + struct apply { + typedef typename invert_handle_inital_rows::template apply process_column; + typedef typename invert_impl::template apply< + typename process_column::new_matrix, + typename process_column::identity_result + >::type type; + }; +}; + +template<> +struct invert_impl<0> { + template + struct apply { + typedef IdentityBegin type; + }; +}; + +template +struct make_identity { + template + struct apply { + typedef list::type, typename make_identity::template apply::type> type; + }; +}; + +template<> +struct make_identity<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct make_square_and_invert { + typedef typename Matrix::item top_row; + typedef typename determine_extra_equations<(top_row::size::value), false>::template apply< + Matrix, // RowsBegin + top_row::size::value, // TotalColumns + Matrix // Result + >::type invertible; + typedef typename invert_impl::template apply< + invertible, + typename make_identity::template apply::type + >::type type; +}; + + +// find_base_dimensions takes a list of +// base_units and returns a sorted list +// of all the base_dimensions they use. +// +// list find_base_dimensions(list l) { +// set dimensions; +// for_each(base_unit unit : l) { +// for_each(dim d : unit.dimension_type) { +// dimensions = insert(dimensions, d.tag_type); +// } +// } +// return(sort(dimensions, _1 > _2, front_inserter(list()))); +// } + +typedef char set_no; +struct set_yes { set_no dummy[2]; }; + +template +struct wrap {}; + +struct set_end { + static set_no lookup(...); + typedef mpl::long_<0> size; +}; + +template +struct set : Next { + using Next::lookup; + static set_yes lookup(wrap*); + typedef T item; + typedef Next next; + typedef typename mpl::next::type size; +}; + +template +struct set_insert; + +template<> +struct set_insert { + template + struct apply { + typedef Set type; + }; +}; + +template<> +struct set_insert { + template + struct apply { + typedef set type; + }; +}; + +template +struct has_key { + BOOST_STATIC_CONSTEXPR long size = sizeof(Set::lookup((wrap*)0)); + BOOST_STATIC_CONSTEXPR bool value = (size == sizeof(set_yes)); +}; + +template +struct find_base_dimensions_impl_impl { + template + struct apply { + typedef typename find_base_dimensions_impl_impl::template apply< + typename Begin::next, + S + >::type next; + + typedef typename set_insert< + (has_key::value) + >::template apply< + next, + typename Begin::item::tag_type + >::type type; + }; +}; + +template<> +struct find_base_dimensions_impl_impl<0> { + template + struct apply { + typedef S type; + }; +}; + +template +struct find_base_dimensions_impl { + template + struct apply { + typedef typename find_base_dimensions_impl_impl<(Begin::item::dimension_type::size::value)>::template apply< + typename Begin::item::dimension_type, + typename find_base_dimensions_impl::template apply::type + >::type type; + }; +}; + +template<> +struct find_base_dimensions_impl<0> { + template + struct apply { + typedef set_end type; + }; +}; + +template +struct find_base_dimensions { + typedef typename insertion_sort< + typename find_base_dimensions_impl< + (T::size::value) + >::template apply::type + >::type type; +}; + +// calculate_base_dimension_coefficients finds +// the coefficients corresponding to the first +// base_dimension in each of the dimension_lists. +// It returns two values. The first result +// is a list of the coefficients. The second +// is a list with all the incremented iterators. +// When we encounter a base_dimension that is +// missing from a dimension_list, we do not +// increment the iterator and we set the +// coefficient to zero. + +template +struct calculate_base_dimension_coefficients_func; + +template<> +struct calculate_base_dimension_coefficients_func { + template + struct apply { + typedef typename T::item::value_type type; + typedef typename T::next next; + }; +}; + +template<> +struct calculate_base_dimension_coefficients_func { + template + struct apply { + typedef static_rational<0> type; + typedef T next; + }; +}; + +// begins_with_dimension returns true iff its first +// parameter is a valid iterator which yields its +// second parameter when dereferenced. + +template +struct begins_with_dimension { + template + struct apply : + boost::is_same< + Dim, + typename Iterator::item::tag_type + > {}; +}; + +template<> +struct begins_with_dimension { + template + struct apply : mpl::false_ {}; +}; + +template +struct calculate_base_dimension_coefficients_impl { + template + struct apply { + typedef typename calculate_base_dimension_coefficients_func< + begins_with_dimension::template apply< + Dim + >::value + >::template apply< + typename BaseUnitDimensions::item + > result; + typedef typename calculate_base_dimension_coefficients_impl::template apply< + typename BaseUnitDimensions::next, + Dim, + list + > next_; + typedef typename next_::type type; + typedef list next; + }; +}; + +template<> +struct calculate_base_dimension_coefficients_impl<0> { + template + struct apply { + typedef T type; + typedef dimensionless_type next; + }; +}; + +// add_zeroes pushs N zeroes onto the +// front of a list. +// +// list add_zeroes(list l, int N) { +// if(N == 0) { +// return(l); +// } else { +// return(push_front(add_zeroes(l, N-1), 0)); +// } +// } + +template +struct add_zeroes_impl { + // If you get an error here and your base units are + // in fact linearly independent, please report it. + BOOST_MPL_ASSERT_MSG((N > 0), base_units_are_probably_not_linearly_independent, (void)); + template + struct apply { + typedef list< + static_rational<0>, + typename add_zeroes_impl::template apply::type + > type; + }; +}; + +template<> +struct add_zeroes_impl<0> { + template + struct apply { + typedef T type; + }; +}; + +// expand_dimensions finds the exponents of +// a set of dimensions in a dimension_list. +// the second parameter is assumed to be +// a superset of the base_dimensions of +// the first parameter. +// +// list expand_dimensions(dimension_list, list); + +template +struct expand_dimensions { + template + struct apply { + typedef typename calculate_base_dimension_coefficients_func< + begins_with_dimension::template apply::value + >::template apply result; + typedef list< + typename result::type, + typename expand_dimensions::template apply::type + > type; + }; +}; + +template<> +struct expand_dimensions<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct create_unit_matrix { + template + struct apply { + typedef typename create_unit_matrix::template apply::type next; + typedef list::template apply::type, next> type; + }; +}; + +template<> +struct create_unit_matrix<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct normalize_units { + typedef typename find_base_dimensions::type dimensions; + typedef typename create_unit_matrix<(T::size::value)>::template apply< + T, + dimensions + >::type matrix; + typedef typename make_square_and_invert::type type; + BOOST_STATIC_CONSTEXPR long extra = (type::size::value) - (T::size::value); +}; + +// multiply_add_units computes M x V +// where M is a matrix and V is a horizontal +// vector +// +// list multiply_add_units(list >, list); + +template +struct multiply_add_units_impl { + template + struct apply { + typedef list< + typename mpl::plus< + typename mpl::times< + typename Begin2::item, + X + >::type, + typename Begin1::item + >::type, + typename multiply_add_units_impl::template apply< + typename Begin1::next, + typename Begin2::next, + X + >::type + > type; + }; +}; + +template<> +struct multiply_add_units_impl<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct multiply_add_units { + template + struct apply { + typedef typename multiply_add_units_impl< + (Begin2::item::size::value) + >::template apply< + typename multiply_add_units::template apply< + typename Begin1::next, + typename Begin2::next + >::type, + typename Begin2::item, + typename Begin1::item + >::type type; + }; +}; + +template<> +struct multiply_add_units<1> { + template + struct apply { + typedef typename add_zeroes_impl< + (Begin2::item::size::value) + >::template apply::type type1; + typedef typename multiply_add_units_impl< + (Begin2::item::size::value) + >::template apply< + type1, + typename Begin2::item, + typename Begin1::item + >::type type; + }; +}; + + +// strip_zeroes erases the first N elements of a list if +// they are all zero, otherwise returns inconsistent +// +// list strip_zeroes(list l, int N) { +// if(N == 0) { +// return(l); +// } else if(l.front == 0) { +// return(strip_zeroes(pop_front(l), N-1)); +// } else { +// return(inconsistent); +// } +// } + +template +struct strip_zeroes_impl; + +template +struct strip_zeroes_func { + template + struct apply { + typedef inconsistent type; + }; +}; + +template<> +struct strip_zeroes_func > { + template + struct apply { + typedef typename strip_zeroes_impl::template apply::type type; + }; +}; + +template +struct strip_zeroes_impl { + template + struct apply { + typedef typename strip_zeroes_func::template apply::type type; + }; +}; + +template<> +struct strip_zeroes_impl<0> { + template + struct apply { + typedef T type; + }; +}; + +// Given a list of base_units, computes the +// exponents of each base unit for a given +// dimension. +// +// list calculate_base_unit_exponents(list units, dimension_list dimensions); + +template +struct is_base_dimension_unit { + typedef mpl::false_ type; + typedef void base_dimension_type; +}; +template +struct is_base_dimension_unit >, dimensionless_type> > { + typedef mpl::true_ type; + typedef T base_dimension_type; +}; + +template +struct is_simple_system_impl { + template + struct apply { + typedef is_base_dimension_unit test; + typedef mpl::and_< + typename test::type, + mpl::less, + typename is_simple_system_impl::template apply< + typename Begin::next, + typename test::base_dimension_type + > + > type; + BOOST_STATIC_CONSTEXPR bool value = (type::value); + }; +}; + +template<> +struct is_simple_system_impl<0> { + template + struct apply : mpl::true_ { + }; +}; + +template +struct is_simple_system { + typedef T Begin; + typedef is_base_dimension_unit test; + typedef typename mpl::and_< + typename test::type, + typename is_simple_system_impl< + T::size::value - 1 + >::template apply< + typename Begin::next::type, + typename test::base_dimension_type + > + >::type type; + BOOST_STATIC_CONSTEXPR bool value = type::value; +}; + +template +struct calculate_base_unit_exponents_impl; + +template<> +struct calculate_base_unit_exponents_impl { + template + struct apply { + typedef typename expand_dimensions<(T::size::value)>::template apply< + typename find_base_dimensions::type, + Dimensions + >::type type; + }; +}; + +template<> +struct calculate_base_unit_exponents_impl { + template + struct apply { + // find the units that correspond to each base dimension + typedef normalize_units base_solutions; + // pad the dimension with zeroes so it can just be a + // list of numbers, making the multiplication easy + // e.g. if the arguments are list and + // list then this step will + // yield list<0,1,-2> + typedef typename expand_dimensions<(base_solutions::dimensions::size::value)>::template apply< + typename base_solutions::dimensions, + Dimensions + >::type dimensions; + // take the unit corresponding to each base unit + // multiply each of its exponents by the exponent + // of the base_dimension in the result and sum. + typedef typename multiply_add_units::template apply< + dimensions, + typename base_solutions::type + >::type units; + // Now, verify that the dummy units really + // cancel out and remove them. + typedef typename strip_zeroes_impl::template apply::type type; + }; +}; + +template +struct calculate_base_unit_exponents { + typedef typename calculate_base_unit_exponents_impl::value>::template apply::type type; +}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/one.hpp b/Slang/boost/units/detail/one.hpp new file mode 100644 index 0000000..1643e6a --- /dev/null +++ b/Slang/boost/units/detail/one.hpp @@ -0,0 +1,117 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_ONE_HPP +#define BOOST_UNITS_DETAIL_ONE_HPP + +#include + +namespace boost { + +namespace units { + +struct one { BOOST_CONSTEXPR one() {} }; + +// workaround for pathscale. +inline BOOST_CONSTEXPR one make_one() { + return(one()); +} + +template +struct multiply_typeof_helper +{ + typedef T type; +}; + +template +struct multiply_typeof_helper +{ + typedef T type; +}; + +template<> +struct multiply_typeof_helper +{ + typedef one type; +}; + +template +inline BOOST_CONSTEXPR T operator*(const one&, const T& t) +{ + return(t); +} + +template +inline BOOST_CONSTEXPR T operator*(const T& t, const one&) +{ + return(t); +} + +inline BOOST_CONSTEXPR one operator*(const one&, const one&) +{ + return(one()); +} + +template +struct divide_typeof_helper +{ + typedef T type; +}; + +template +struct divide_typeof_helper +{ + typedef T type; +}; + +template<> +struct divide_typeof_helper +{ + typedef one type; +}; + +template +inline BOOST_CONSTEXPR T operator/(const T& t, const one&) +{ + return(t); +} + +template +inline BOOST_CONSTEXPR T operator/(const one&, const T& t) +{ + return(1/t); +} + +inline BOOST_CONSTEXPR one operator/(const one&, const one&) +{ + return(one()); +} + +template +inline BOOST_CONSTEXPR bool operator>(const boost::units::one&, const T& t) { + return(1 > t); +} + +template +BOOST_CONSTEXPR T one_to_double(const T& t) { return t; } + +inline BOOST_CONSTEXPR double one_to_double(const one&) { return 1.0; } + +template +struct one_to_double_type { typedef T type; }; + +template<> +struct one_to_double_type { typedef double type; }; + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/ordinal.hpp b/Slang/boost/units/detail/ordinal.hpp new file mode 100644 index 0000000..eaf5bde --- /dev/null +++ b/Slang/boost/units/detail/ordinal.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED +#define BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace units { + +namespace detail { + +struct ordinal_tag {}; + +} + +template +struct ordinal { + typedef detail::ordinal_tag tag; + BOOST_STATIC_CONSTEXPR long value = N; +}; + +template +BOOST_CONSTEXPR_OR_CONST long ordinal::value; + +} + +namespace mpl { + +template<> +struct less_impl { + template + struct apply : bool_<(T1::value) < (T2::value)> {}; +}; + +} + +} + +#endif diff --git a/Slang/boost/units/detail/prevent_redefinition.hpp b/Slang/boost/units/detail/prevent_redefinition.hpp new file mode 100644 index 0000000..1f23575 --- /dev/null +++ b/Slang/boost/units/detail/prevent_redefinition.hpp @@ -0,0 +1,56 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP +#define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP + +#include + +namespace boost { + +namespace units { + +namespace detail { + +struct no { BOOST_CONSTEXPR no() : dummy() {} char dummy; }; +struct yes { no dummy[2]; }; + +template struct ordinal_has_already_been_defined; + +template<> +struct ordinal_has_already_been_defined { }; + +template<> +struct ordinal_has_already_been_defined { typedef void type; }; + +} + +/// This must be in namespace boost::units so that ADL +/// will work. we need a mangled name because it must +/// be found by ADL +/// INTERNAL ONLY +template +BOOST_CONSTEXPR +detail::no +boost_units_is_registered(const T&) +{ return(detail::no()); } + +/// INTERNAL ONLY +template +BOOST_CONSTEXPR +detail::no +boost_units_unit_is_registered(const T&) +{ return(detail::no()); } + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP diff --git a/Slang/boost/units/detail/push_front_if.hpp b/Slang/boost/units/detail/push_front_if.hpp new file mode 100644 index 0000000..b924a24 --- /dev/null +++ b/Slang/boost/units/detail/push_front_if.hpp @@ -0,0 +1,48 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP +#define BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP + +namespace boost { + +namespace units { + +template +struct list; + +namespace detail { + +template +struct push_front_if; + +template<> +struct push_front_if { + template + struct apply { + typedef list type; + }; +}; + +template<> +struct push_front_if { + template + struct apply { + typedef L type; + }; +}; + +} + +} + +} + +#endif diff --git a/Slang/boost/units/detail/push_front_or_add.hpp b/Slang/boost/units/detail/push_front_or_add.hpp new file mode 100644 index 0000000..a3092da --- /dev/null +++ b/Slang/boost/units/detail/push_front_or_add.hpp @@ -0,0 +1,84 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_OR_ADD_HPP +#define BOOST_UNITS_DETAIL_PUSH_FRONT_OR_ADD_HPP + +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { + +namespace units { + +template +struct list; + +namespace detail { + +template +struct is_empty_dim; + +/// add an instantiation of dim to Sequence. +template +struct push_front_or_add_impl; + +template<> +struct push_front_or_add_impl +{ + template + struct apply + { + typedef typename mpl::plus::type item; + typedef typename push_front_if::value>::template apply< + typename Sequence::next, + item + > type; + }; +}; + +template<> +struct push_front_or_add_impl +{ + template + struct apply + { + typedef list type; + }; +}; + +template +struct push_front_or_add +{ + typedef typename push_front_or_add_impl::value>::template apply< + Sequence, + T + >::type type; +}; + +template +struct push_front_or_add +{ + typedef list type; +}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/sort.hpp b/Slang/boost/units/detail/sort.hpp new file mode 100644 index 0000000..389adfe --- /dev/null +++ b/Slang/boost/units/detail/sort.hpp @@ -0,0 +1,109 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_SORT_HPP +#define BOOST_UNITS_DETAIL_SORT_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +template +struct insertion_sort_insert; + +template +struct insertion_sort_comparison_impl; + +// have to recursively add the element to the next sequence. +template<> +struct insertion_sort_comparison_impl { + template + struct apply { + typedef list< + typename Begin::item, + typename insertion_sort_insert::template apply< + typename Begin::next, + T + >::type + > type; + }; +}; + +// prepend the current element +template<> +struct insertion_sort_comparison_impl { + template + struct apply { + typedef list type; + }; +}; + +template +struct insertion_sort_insert { + template + struct apply { + typedef typename insertion_sort_comparison_impl::value>::template apply< + Begin, + N, + T + >::type type; + }; +}; + +template<> +struct insertion_sort_insert<0> { + template + struct apply { + typedef list type; + }; +}; + +template +struct insertion_sort_impl { + template + struct apply { + typedef typename insertion_sort_impl::template apply::type next; + typedef typename insertion_sort_insert<(next::size::value)>::template apply::type type; + }; +}; + +template<> +struct insertion_sort_impl<0> { + template + struct apply { + typedef dimensionless_type type; + }; +}; + +template +struct insertion_sort +{ + typedef typename insertion_sort_impl::template apply::type type; +}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/static_rational_power.hpp b/Slang/boost/units/detail/static_rational_power.hpp new file mode 100644 index 0000000..e8e62c7 --- /dev/null +++ b/Slang/boost/units/detail/static_rational_power.hpp @@ -0,0 +1,201 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_STATIC_RATIONAL_POWER_HPP +#define BOOST_UNITS_DETAIL_STATIC_RATIONAL_POWER_HPP + +#include + +#include +#include + +namespace boost { + +namespace units { + +template +class static_rational; + +namespace detail { + +namespace typeof_pow_adl_barrier { + +using std::pow; + +template +struct typeof_pow +{ +#if defined(BOOST_UNITS_HAS_BOOST_TYPEOF) + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, pow(typeof_::make(), 0.0)) + typedef typename nested::type type; +#elif defined(BOOST_UNITS_HAS_MWERKS_TYPEOF) + typedef __typeof__(pow(typeof_::make(), 0.0)) type; +#elif defined(BOOST_UNITS_HAS_GNU_TYPEOF) + typedef typeof(pow(typeof_::make(), 0.0)) type; +#else + typedef Y type; +#endif +}; + +} + +template +struct static_rational_power_impl +{ + typedef typename typeof_pow_adl_barrier::typeof_pow::type type; + static BOOST_CONSTEXPR type call(const Y& y) + { + using std::pow; + return(pow(y, static_cast(R::Numerator) / static_cast(R::Denominator))); + } +}; + +template +struct static_rational_power_impl +{ + typedef one type; + static BOOST_CONSTEXPR one call(const one&) + { + return(one()); + } +}; + +template +struct static_rational_power_impl, one> +{ + typedef one type; + static BOOST_CONSTEXPR one call(const one&) + { + return(one()); + } +}; + +template +struct static_int_power_impl; + +template +struct static_int_power_impl +{ + template + struct apply + { + typedef typename multiply_typeof_helper::type square_type; + typedef typename static_int_power_impl<(N >> 1)>::template apply next; + typedef typename next::type type; + static BOOST_CONSTEXPR type call(const Y& y, const R& r) + { + return(next::call(static_cast(y * y), r)); + } + }; +}; + +template +struct static_int_power_impl +{ + template + struct apply + { + typedef typename multiply_typeof_helper::type square_type; + typedef typename multiply_typeof_helper::type new_r; + typedef typename static_int_power_impl<(N >> 1)>::template apply next; + typedef typename next::type type; + static BOOST_CONSTEXPR type call(const Y& y, const R& r) + { + return(next::call(static_cast(y * y), y * r)); + } + }; +}; + +template<> +struct static_int_power_impl<1, false> +{ + template + struct apply + { + typedef typename multiply_typeof_helper::type type; + static BOOST_CONSTEXPR type call(const Y& y, const R& r) + { + return(y * r); + } + }; +}; + +template<> +struct static_int_power_impl<0, true> +{ + template + struct apply + { + typedef R type; + static BOOST_CONSTEXPR R call(const Y&, const R& r) + { + return(r); + } + }; +}; + +template +struct static_int_power_sign_impl; + +template +struct static_int_power_sign_impl +{ + template + struct apply + { + typedef typename static_int_power_impl::template apply impl; + typedef typename impl::type type; + static BOOST_CONSTEXPR type call(const Y& y) + { + return(impl::call(y, one())); + } + }; +}; + +template +struct static_int_power_sign_impl +{ + template + struct apply + { + typedef typename static_int_power_impl<-N>::template apply impl; + typedef typename divide_typeof_helper::type type; + static BOOST_CONSTEXPR type call(const Y& y) + { + return(one()/impl::call(y, one())); + } + }; +}; + +template +struct static_rational_power_impl, Y> +{ + typedef typename static_int_power_sign_impl::template apply impl; + typedef typename impl::type type; + static BOOST_CONSTEXPR type call(const Y& y) + { + return(impl::call(y)); + } +}; + +template +BOOST_CONSTEXPR +typename detail::static_rational_power_impl::type static_rational_power(const Y& y) +{ + return(detail::static_rational_power_impl::call(y)); +} + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/unscale.hpp b/Slang/boost/units/detail/unscale.hpp new file mode 100644 index 0000000..e221756 --- /dev/null +++ b/Slang/boost/units/detail/unscale.hpp @@ -0,0 +1,249 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DETAIL_UNSCALE_HPP_INCLUDED +#define BOOST_UNITS_DETAIL_UNSCALE_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +template +struct heterogeneous_system; + +template +struct heterogeneous_system_impl; + +template +struct heterogeneous_system_dim; + +template +struct scaled_base_unit; + +/// removes all scaling from a unit or a base unit. +template +struct unscale +{ +#ifndef BOOST_UNITS_DOXYGEN + typedef T type; +#else + typedef detail::unspecified type; +#endif +}; + +/// INTERNAL ONLY +template +struct unscale > +{ + typedef typename unscale::type type; +}; + +/// INTERNAL ONLY +template +struct unscale > +{ + typedef unit::type> type; +}; + +/// INTERNAL ONLY +template +struct scale_list_dim; + +/// INTERNAL ONLY +template +struct get_scale_list +{ + typedef dimensionless_type type; +}; + +/// INTERNAL ONLY +template +struct get_scale_list > +{ + typedef typename mpl::times, dimensionless_type>, typename get_scale_list::type>::type type; +}; + +/// INTERNAL ONLY +template +struct get_scale_list > +{ + typedef typename get_scale_list::type type; +}; + +/// INTERNAL ONLY +struct scale_dim_tag {}; + +/// INTERNAL ONLY +template +struct scale_list_dim : Scale +{ + typedef scale_dim_tag tag; + typedef scale_list_dim type; +}; + +} // namespace units + +#ifndef BOOST_UNITS_DOXYGEN + +namespace mpl { + +/// INTERNAL ONLY +template<> +struct less_impl +{ + template + struct apply : mpl::bool_<((T0::base) < (T1::base))> {}; +}; + +} + +#endif + +namespace units { + +namespace detail { + +template +struct is_empty_dim > : mpl::false_ {}; + +template +struct is_empty_dim > > > : mpl::true_ {}; + +template +struct eval_scale_list_impl +{ + template + struct apply + { + typedef typename eval_scale_list_impl::template apply next_iteration; + typedef typename multiply_typeof_helper::type type; + static BOOST_CONSTEXPR type value() + { + return(next_iteration::value() * Begin::item::value()); + } + }; +}; + +template<> +struct eval_scale_list_impl<0> +{ + template + struct apply + { + typedef one type; + static BOOST_CONSTEXPR one value() + { + return(one()); + } + }; +}; + +} + +/// INTERNAL ONLY +template +struct eval_scale_list : detail::eval_scale_list_impl::template apply {}; + +} // namespace units + +#ifndef BOOST_UNITS_DOXYGEN + +namespace mpl { + +/// INTERNAL ONLY +template<> +struct plus_impl +{ + template + struct apply + { + typedef boost::units::scale_list_dim< + boost::units::scale< + (T0::base), + typename mpl::plus::type + > + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct negate_impl +{ + template + struct apply + { + typedef boost::units::scale_list_dim< + boost::units::scale< + (T0::base), + typename mpl::negate::type + > + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct times_impl +{ + template + struct apply + { + typedef boost::units::scale_list_dim< + boost::units::scale< + (T0::base), + typename mpl::times::type + > + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct divides_impl +{ + template + struct apply + { + typedef boost::units::scale_list_dim< + boost::units::scale< + (T0::base), + typename mpl::divides::type + > + > type; + }; +}; + +} // namespace mpl + +#endif + +} // namespace boost + +#endif diff --git a/Slang/boost/units/detail/utility.hpp b/Slang/boost/units/detail/utility.hpp new file mode 100644 index 0000000..1ffa3dc --- /dev/null +++ b/Slang/boost/units/detail/utility.hpp @@ -0,0 +1,57 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_UTILITY_HPP +#define BOOST_UNITS_UTILITY_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +inline +std::string +demangle(const char* name) +{ + std::string demangled = core::demangle(name); + + const std::string::size_type prefix_len = sizeof("boost::units::") - 1; + std::string::size_type i = 0; + for (;;) + { + std::string::size_type pos = demangled.find("boost::units::", i, prefix_len); + if (pos == std::string::npos) + break; + + demangled.erase(pos, prefix_len); + i = pos; + } + + return demangled; +} + +} // namespace detail + +template +inline std::string simplify_typename(const L& /*source*/) +{ + return detail::demangle(typeid(L).name()); +} + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_UTILITY_HPP diff --git a/Slang/boost/units/dim.hpp b/Slang/boost/units/dim.hpp new file mode 100644 index 0000000..eb28131 --- /dev/null +++ b/Slang/boost/units/dim.hpp @@ -0,0 +1,167 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIM_HPP +#define BOOST_UNITS_DIM_HPP + +#include + +#include + +#include + +#include +#include +#include + +/// \file dim.hpp +/// \brief Handling of fundamental dimension/exponent pairs. + +namespace boost { + +namespace units { + +namespace detail { + +struct dim_tag { }; + +} + +/// \brief Dimension tag/exponent pair for a single fundamental dimension. +/// +/// \details +/// The dim class represents a single dimension tag/dimension exponent pair. +/// That is, @c dim is a pair where @c tag_type represents the +/// fundamental dimension being represented and @c value_type represents the +/// exponent of that fundamental dimension as a @c static_rational. @c tag_type must +/// be a derived from a specialization of @c base_dimension. +/// Specialization of the following Boost.MPL metafunctions are provided +/// +/// - @c mpl::plus for two @c dims +/// - @c mpl::minus for two @c dims +/// - @c mpl::negate for a @c dim +/// +/// These metafunctions all operate on the exponent, and require +/// that the @c dim operands have the same base dimension tag. +/// In addition, multiplication and division by @c static_rational +/// is supported. +/// +/// - @c mpl::times for a @c static_rational and a @c dim in either order +/// - @c mpl::divides for a @c static_rational and a @c dim in either order +/// +/// These metafunctions likewise operate on the exponent only. +template +struct dim +{ + typedef dim type; + typedef detail::dim_tag tag; + typedef T tag_type; + typedef V value_type; +}; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2) + +#endif + +#ifndef BOOST_UNITS_DOXYGEN + +namespace boost { + +namespace mpl { + +// define MPL operators acting on dim + +template<> +struct plus_impl +{ + template + struct apply + { + BOOST_STATIC_ASSERT((boost::is_same::value == true)); + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct minus_impl +{ + template + struct apply + { + BOOST_STATIC_ASSERT((boost::is_same::value == true)); + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct times_impl +{ + template + struct apply + { + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct times_impl +{ + template + struct apply + { + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct divides_impl +{ + template + struct apply + { + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct divides_impl +{ + template + struct apply + { + typedef boost::units::dim::type> type; + }; +}; + +template<> +struct negate_impl +{ + template + struct apply + { + typedef boost::units::dim::type> type; + }; +}; + +} // namespace mpl + +} // namespace boost + +#endif + +#endif // BOOST_UNITS_DIM_HPP diff --git a/Slang/boost/units/dimension.hpp b/Slang/boost/units/dimension.hpp new file mode 100644 index 0000000..90334a1 --- /dev/null +++ b/Slang/boost/units/dimension.hpp @@ -0,0 +1,150 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSION_HPP +#define BOOST_UNITS_DIMENSION_HPP + +#include + +#include + +#include + +#include +#include +#include + +/// \file +/// \brief Core metaprogramming utilities for compile-time dimensional analysis. + +namespace boost { + +namespace units { + +/// Reduce dimension list to cardinal form. This algorithm collapses duplicate +/// base dimension tags and sorts the resulting list by the tag ordinal value. +/// Dimension lists that resolve to the same dimension are guaranteed to be +/// represented by an identical type. +/// +/// The argument should be an MPL forward sequence containing instances +/// of the @c dim template. +/// +/// The result is also an MPL forward sequence. It also supports the +/// following metafunctions to allow use as a dimension. +/// +/// - @c mpl::plus is defined only on two equal dimensions and returns the argument unchanged. +/// - @c mpl::minus is defined only for two equal dimensions and returns the argument unchanged. +/// - @c mpl::negate will return its argument unchanged. +/// - @c mpl::times is defined for any dimensions and adds corresponding exponents. +/// - @c mpl::divides is defined for any dimensions and subtracts the exponents of the +/// right had argument from the corresponding exponents of the left had argument. +/// Missing base dimension tags are assumed to have an exponent of zero. +/// - @c static_power takes a dimension and a static_rational and multiplies all +/// the exponents of the dimension by the static_rational. +/// - @c static_root takes a dimension and a static_rational and divides all +/// the exponents of the dimension by the static_rational. +template +struct make_dimension_list +{ + typedef typename detail::sort_dims::type type; +}; + +/// Raise a dimension list to a scalar power. +template +struct static_power +{ + typedef typename detail::static_power_impl::template apply< + DL, + Ex + >::type type; +}; + +/// Take a scalar root of a dimension list. +template +struct static_root +{ + typedef typename detail::static_root_impl::template apply< + DL, + Rt + >::type type; +}; + +} // namespace units + +#ifndef BOOST_UNITS_DOXYGEN + +namespace mpl { + +template<> +struct plus_impl +{ + template + struct apply + { + BOOST_STATIC_ASSERT((boost::is_same::value == true)); + typedef T0 type; + }; +}; + +template<> +struct minus_impl +{ + template + struct apply + { + BOOST_STATIC_ASSERT((boost::is_same::value == true)); + typedef T0 type; + }; +}; + +template<> +struct times_impl +{ + template + struct apply + { + typedef typename boost::units::detail::merge_dimensions::type type; + }; +}; + +template<> +struct divides_impl +{ + template + struct apply + { + typedef typename boost::units::detail::merge_dimensions< + T0, + typename boost::units::detail::static_inverse_impl< + T1::size::value + >::template apply< + T1 + >::type + >::type type; + }; +}; + +template<> +struct negate_impl +{ + template + struct apply + { + typedef T0 type; + }; +}; + +} // namespace mpl + +#endif + +} // namespace boost + +#endif // BOOST_UNITS_DIMENSION_HPP diff --git a/Slang/boost/units/dimensionless_quantity.hpp b/Slang/boost/units/dimensionless_quantity.hpp new file mode 100644 index 0000000..7ac6bfb --- /dev/null +++ b/Slang/boost/units/dimensionless_quantity.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP +#define BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP + +/// +/// \file +/// \brief Utility class to simplify construction of dimensionless quantities. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Utility class to simplify construction of dimensionless quantities. +template +struct dimensionless_quantity +{ + typedef quantity::type,Y> type; +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP diff --git a/Slang/boost/units/dimensionless_type.hpp b/Slang/boost/units/dimensionless_type.hpp new file mode 100644 index 0000000..c8dae9f --- /dev/null +++ b/Slang/boost/units/dimensionless_type.hpp @@ -0,0 +1,55 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSIONLESS_TYPE_HPP +#define BOOST_UNITS_DIMENSIONLESS_TYPE_HPP + +/// +/// \file +/// \brief Dimension lists in which all exponents resolve to zero reduce to @c dimensionless_type. +/// + +#include +#include +#include + +#include + +namespace boost { + +namespace units { + +namespace detail { + +struct dimension_list_tag; + +} + +/// Dimension lists in which all exponents resolve to zero reduce to @c dimensionless_type. +struct dimensionless_type +{ + typedef dimensionless_type type; + typedef detail::dimension_list_tag tag; + typedef mpl::long_<0> size; +}; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::dimensionless_type) + +#endif + +#endif // BOOST_UNITS_DIMENSIONLESS_TYPE_HPP diff --git a/Slang/boost/units/dimensionless_unit.hpp b/Slang/boost/units/dimensionless_unit.hpp new file mode 100644 index 0000000..8e6368f --- /dev/null +++ b/Slang/boost/units/dimensionless_unit.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DIMENSIONLESS_UNIT_HPP +#define BOOST_UNITS_DIMENSIONLESS_UNIT_HPP + +/// +/// \file +/// \brief Utility class to simplify construction of dimensionless units in a system. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Utility class to simplify construction of dimensionless units in a system. +template +struct dimensionless_unit +{ + typedef unit type; +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DIMENSIONLESS_UNIT_HPP diff --git a/Slang/boost/units/get_dimension.hpp b/Slang/boost/units/get_dimension.hpp new file mode 100644 index 0000000..c0a7ab9 --- /dev/null +++ b/Slang/boost/units/get_dimension.hpp @@ -0,0 +1,54 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_GET_DIMENSION_HPP +#define BOOST_UNITS_GET_DIMENSION_HPP + +/// +/// \file +/// \brief Get the dimension of a unit, absolute unit and quantity. +/// \details +/// + +#include + +namespace boost { + +namespace units { + +template +struct get_dimension {}; + +/// Get the dimension of a unit. +template +struct get_dimension< unit > +{ + typedef Dim type; +}; + +/// Get the dimension of an absolute unit. +template +struct get_dimension< absolute > +{ + typedef typename get_dimension::type type; +}; + +/// Get the dimension of a quantity. +template +struct get_dimension< quantity > +{ + typedef typename get_dimension::type type; +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_GET_DIMENSION_HPP diff --git a/Slang/boost/units/get_system.hpp b/Slang/boost/units/get_system.hpp new file mode 100644 index 0000000..ce4e59f --- /dev/null +++ b/Slang/boost/units/get_system.hpp @@ -0,0 +1,51 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_GET_SYSTEM_HPP +#define BOOST_UNITS_GET_SYSTEM_HPP + +/// \file +/// \brief Get the system of a unit, absolute unit or quantity. + +#include + +namespace boost { + +namespace units { + +template +struct get_system {}; + +/// Get the system of a unit. +template +struct get_system< unit > +{ + typedef System type; +}; + +/// Get the system of an absolute unit. +template +struct get_system< absolute > +{ + typedef typename get_system::type type; +}; + +/// Get the system of a quantity. +template +struct get_system< quantity > +{ + typedef typename get_system::type type; +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_GET_SYSTEM_HPP diff --git a/Slang/boost/units/heterogeneous_system.hpp b/Slang/boost/units/heterogeneous_system.hpp new file mode 100644 index 0000000..966797a --- /dev/null +++ b/Slang/boost/units/heterogeneous_system.hpp @@ -0,0 +1,428 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_HETEROGENEOUS_SYSTEM_HPP +#define BOOST_UNITS_HETEROGENEOUS_SYSTEM_HPP + +/// \file +/// \brief A heterogeneous system is a sorted list of base unit/exponent pairs. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +// A normal system is a sorted list of base units. +// A heterogeneous system is a sorted list of base unit/exponent pairs. +// As long as we don't need to convert heterogeneous systems +// directly everything is cool. + +template +struct is_zero : mpl::false_ {}; + +template<> +struct is_zero > : mpl::true_ {}; + +} // namespace detail + +/// INTERNAL ONLY +template +struct heterogeneous_system_impl +{ + typedef L type; + typedef Dimensions dimensions; + typedef Scale scale; +}; + +/// INTERNAL ONLY +typedef dimensionless_type no_scale; + +/// A system that can represent any possible combination +/// of units at the expense of not preserving information +/// about how it was created. Do not create specializations +/// of this template directly. Instead use @c reduce_unit and +/// @c base_unit<...>::unit_type. +template +struct heterogeneous_system : T {}; + +/// INTERNAL ONLY +struct heterogeneous_system_dim_tag {}; + +/// INTERNAL ONLY +template +struct heterogeneous_system_dim +{ + typedef heterogeneous_system_dim_tag tag; + typedef heterogeneous_system_dim type; + typedef Unit tag_type; + typedef Exponent value_type; +}; + +/// INTERNAL ONLY +#define BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(BaseUnit, Dimensions) \ + boost::units::unit< \ + Dimensions, \ + boost::units::heterogeneous_system< \ + boost::units::heterogeneous_system_impl< \ + boost::units::list< \ + boost::units::heterogeneous_system_dim< \ + BaseUnit, \ + boost::units::static_rational<1> \ + >, \ + boost::units::dimensionless_type \ + >, \ + Dimensions, \ + boost::units::no_scale \ + > \ + > \ + > + +} // namespace units + +} // namespace boost + + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system_impl, (class)(class)(class)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system, (class)) +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system_dim, (class)(class)) + +#endif + +namespace boost { + +namespace mpl { + +/// INTERNAL ONLY +template<> +struct less_impl +{ + template + struct apply : mpl::less {}; +}; + +} + +namespace units { + +namespace detail { + +template +struct is_empty_dim > : detail::is_zero {}; + +} // namespace detail + +} // namespace units + +namespace mpl { + +/// INTERNAL ONLY +template<> +struct plus_impl +{ + template + struct apply + { + typedef boost::units::heterogeneous_system_dim< + typename T0::tag_type, + typename mpl::plus::type + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct times_impl +{ + template + struct apply + { + typedef boost::units::heterogeneous_system_dim< + typename T0::tag_type, + typename mpl::times::type + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct divides_impl +{ + template + struct apply + { + typedef boost::units::heterogeneous_system_dim< + typename T0::tag_type, + typename mpl::divides::type + > type; + }; +}; + +/// INTERNAL ONLY +template<> +struct negate_impl +{ + template + struct apply + { + typedef boost::units::heterogeneous_system_dim::type> type; + }; +}; + +} // namespace mpl + +namespace units { + +namespace detail { + +template +struct make_heterogeneous_system_impl +{ + template + struct apply + { + typedef typename push_front_if::value)>::template apply< + typename make_heterogeneous_system_impl::template apply< + typename UnitsBegin::next, + typename ExponentsBegin::next + >::type, + heterogeneous_system_dim + >::type type; + }; +}; + +template<> +struct make_heterogeneous_system_impl<0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +template +struct make_heterogeneous_system +{ + typedef typename calculate_base_unit_exponents::type exponents; + BOOST_MPL_ASSERT_MSG((!boost::is_same::value), the_specified_dimension_is_not_representible_in_the_given_system, (types)); + typedef typename make_heterogeneous_system_impl::template apply< + typename System::type, + exponents + >::type unit_list; + typedef heterogeneous_system > type; +}; + +template +struct make_heterogeneous_system > +{ + typedef heterogeneous_system type; +}; + +template +struct multiply_systems +{ + typedef heterogeneous_system< + heterogeneous_system_impl< + typename mpl::times::type, + typename mpl::times::type, + typename mpl::times::type + > + > type; +}; + +template +struct divide_systems +{ + typedef heterogeneous_system< + heterogeneous_system_impl< + typename mpl::divides::type, + typename mpl::divides::type, + typename mpl::divides::type + > + > type; +}; + +} // namespace detail + +/// INTERNAL ONLY +template +struct static_power, static_rational > +{ + typedef heterogeneous_system< + heterogeneous_system_impl< + typename static_power >::type, + typename static_power >::type, + typename static_power >::type + > + > type; +}; + +/// INTERNAL ONLY +template +struct static_root, static_rational > +{ + typedef heterogeneous_system< + heterogeneous_system_impl< + typename static_root >::type, + typename static_root >::type, + typename static_root >::type + > + > type; +}; + +namespace detail { + +template +struct unscale_heterogeneous_system_impl +{ + template + struct apply + { + typedef typename push_front_or_add< + typename unscale_heterogeneous_system_impl::template apply< + typename Begin::next + >::type, + typename unscale::type + >::type type; + }; +}; + +template<> +struct unscale_heterogeneous_system_impl<0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +} // namespace detail + +/// Unscale all the base units. e.g +/// km s -> m s +/// cm km -> m^2 +/// INTERNAL ONLY +template +struct unscale > +{ + typedef heterogeneous_system< + heterogeneous_system_impl< + typename detail::unscale_heterogeneous_system_impl< + T::type::size::value + >::template apply< + typename T::type + >::type, + typename T::dimensions, + no_scale + > + > type; +}; + +/// INTERNAL ONLY +template +struct unscale > +{ + typedef heterogeneous_system_dim::type, Exponent> type; +}; + +namespace detail { + +template +struct get_scale_list_of_heterogeneous_system_impl +{ + template + struct apply + { + typedef typename mpl::times< + typename get_scale_list_of_heterogeneous_system_impl::template apply< + typename Begin::next + >::type, + typename get_scale_list::type + >::type type; + }; +}; + +template<> +struct get_scale_list_of_heterogeneous_system_impl<0> +{ + template + struct apply + { + typedef dimensionless_type type; + }; +}; + +} // namespace detail + +/// INTERNAL ONLY +template +struct get_scale_list > +{ + typedef typename mpl::times< + typename detail::get_scale_list_of_heterogeneous_system_impl< + T::type::size::value + >::template apply::type, + typename T::scale + >::type type; +}; + +/// INTERNAL ONLY +template +struct get_scale_list > +{ + typedef typename static_power::type, Exponent>::type type; +}; + +namespace detail { + +template +struct check_system : mpl::false_ {}; + +template +struct check_system >, Dimension> : mpl::true_ {}; + +} // namespace detail + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/homogeneous_system.hpp b/Slang/boost/units/homogeneous_system.hpp new file mode 100644 index 0000000..aa3b056 --- /dev/null +++ b/Slang/boost/units/homogeneous_system.hpp @@ -0,0 +1,105 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_HOMOGENEOUS_SYSTEM_HPP_INCLUDED +#define BOOST_UNITS_HOMOGENEOUS_SYSTEM_HPP_INCLUDED + +#include + +#include +#include + +#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS + +#include +#include + +#include + +#endif + +namespace boost { + +namespace units { + +/// A system that can uniquely represent any unit +/// which can be composed from a linearly independent set +/// of base units. It is safe to rebind a unit with +/// such a system to different dimensions. +/// +/// Do not construct this template directly. Use +/// make_system instead. +template +struct homogeneous_system { + /// INTERNAL ONLY + typedef L type; +}; + +template +struct static_power; + +template +struct static_root; + +/// INTERNAL ONLY +template +struct static_power, static_rational > +{ + typedef homogeneous_system type; +}; + +/// INTERNAL ONLY +template +struct static_root, static_rational > +{ + typedef homogeneous_system type; +}; + +namespace detail { + +template +struct check_system; + +#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS + +template +struct check_system, Dimensions> : + boost::mpl::not_< + boost::is_same< + typename calculate_base_unit_exponents< + L, + Dimensions + >::type, + inconsistent + > + > {}; + +#else + +template +struct check_system, Dimensions> : mpl::true_ {}; + +#endif + +} // namespace detail + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::homogeneous_system, (class)) + +#endif + +#endif diff --git a/Slang/boost/units/io.hpp b/Slang/boost/units/io.hpp new file mode 100644 index 0000000..31f4d64 --- /dev/null +++ b/Slang/boost/units/io.hpp @@ -0,0 +1,1076 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2010 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IO_HPP +#define BOOST_UNITS_IO_HPP + +/// \file +/// \brief Stream input and output for rationals, units and quantities. +/// \details Functions and manipulators for output and input of units and quantities. +/// symbol and name format, and engineering and binary autoprefix. +/// Serialization output is also supported. + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace serialization { + +/// Boost Serialization library support for units. +template +inline void serialize(Archive& /*ar*/,boost::units::unit&,const unsigned int /*version*/) +{ } + +/// Boost Serialization library support for quantities. +template +inline void serialize(Archive& ar,boost::units::quantity& q,const unsigned int /*version*/) +{ + ar & boost::serialization::make_nvp("value", units::quantity_cast(q)); +} + +} // namespace serialization + +namespace units { + +// get string representation of arbitrary type. +template std::string to_string(const T& t) +{ + std::stringstream sstr; + + sstr << t; + + return sstr.str(); +} + +/// get string representation of integral-valued @c static_rational. +template std::string to_string(const static_rational&) +{ + return to_string(N); +} + +/// get string representation of @c static_rational. +template std::string to_string(const static_rational&) +{ + return '(' + to_string(N) + '/' + to_string(D) + ')'; +} + +/// Write @c static_rational to @c std::basic_ostream. +template +inline std::basic_ostream& operator<<(std::basic_ostream& os,const static_rational& r) +{ + os << to_string(r); + return os; +} + +/// traits template for unit names. +template +struct base_unit_info +{ + /// INTERNAL ONLY + typedef void base_unit_info_primary_template; + /// The full name of the unit (returns BaseUnit::name() by default) + static std::string name() + { + return(BaseUnit::name()); + } + /// The symbol for the base unit (Returns BaseUnit::symbol() by default) + static std::string symbol() + { + return(BaseUnit::symbol()); /// \returns BaseUnit::symbol(), for example "m" + } +}; + +/// \enum format_mode format of output of units, for example "m" or "meter". +enum format_mode +{ + symbol_fmt = 0, /// default - reduces unit names to known symbols for both base and derived units. + name_fmt = 1, /// output full unit names for base and derived units, for example "meter". + raw_fmt = 2, /// output only symbols for base units (but not derived units), for example "m". + typename_fmt = 3, /// output demangled typenames (useful only for diagnosis). + fmt_mask = 3 /// Bits used for format. +}; + +/// \enum autoprefix_mode automatic scaling and prefix (controlled by value of quantity) a, if any, +enum autoprefix_mode +{ + autoprefix_none = 0, /// No automatic prefix. + autoprefix_engineering = 4, /// Scale and prefix with 10^3 multiples, 1234.5 m output as 1.2345 km. + autoprefix_binary = 8, /// Scale and prefix with 2^10 (1024) multiples, 1024 as 1 kb. + autoprefix_mask = 12 /// Bits used for autoprefix. +}; + +namespace detail { + +template +struct xalloc_key_holder +{ + static int value; + static bool initialized; +}; + +template +int xalloc_key_holder::value = 0; + +template +bool xalloc_key_holder::initialized = 0; + +struct xalloc_key_initializer_t +{ + xalloc_key_initializer_t() + { + if (!xalloc_key_holder::initialized) + { + xalloc_key_holder::value = std::ios_base::xalloc(); + xalloc_key_holder::initialized = true; + } + } +}; + +namespace /**/ { + +xalloc_key_initializer_t xalloc_key_initializer; + +} // namespace + +} // namespace detail + +/// returns flags controlling output. +inline long get_flags(std::ios_base& ios, long mask) +{ + return(ios.iword(detail::xalloc_key_holder::value) & mask); +} + +/// Set new flags controlling output format. +inline void set_flags(std::ios_base& ios, long new_flags, long mask) +{ + BOOST_ASSERT((~mask & new_flags) == 0); + long& flags = ios.iword(detail::xalloc_key_holder::value); + flags = (flags & ~mask) | new_flags; +} + +/// returns flags controlling output format. +inline format_mode get_format(std::ios_base& ios) +{ + return(static_cast((get_flags)(ios, fmt_mask))); +} + +/// Set new flags controlling output format. +inline void set_format(std::ios_base& ios, format_mode new_mode) +{ + (set_flags)(ios, new_mode, fmt_mask); +} + +/// Set new flags for type_name output format. +inline std::ios_base& typename_format(std::ios_base& ios) +{ + (set_format)(ios, typename_fmt); + return(ios); +} + +/// set new flag for raw format output, for example "m". +inline std::ios_base& raw_format(std::ios_base& ios) +{ + (set_format)(ios, raw_fmt); + return(ios); +} + +/// set new format flag for symbol output, for example "m". +inline std::ios_base& symbol_format(std::ios_base& ios) +{ + (set_format)(ios, symbol_fmt); + return(ios); +} + +/// set new format for name output, for example "meter". +inline std::ios_base& name_format(std::ios_base& ios) +{ + (set_format)(ios, name_fmt); + return(ios); +} + +/// get autoprefix flags for output. +inline autoprefix_mode get_autoprefix(std::ios_base& ios) +{ + return static_cast((get_flags)(ios, autoprefix_mask)); +} + +/// Get format for output. +inline void set_autoprefix(std::ios_base& ios, autoprefix_mode new_mode) +{ + (set_flags)(ios, new_mode, autoprefix_mask); +} + +/// Clear autoprefix flags. +inline std::ios_base& no_prefix(std::ios_base& ios) +{ + (set_autoprefix)(ios, autoprefix_none); + return ios; +} + +/// Set flag for engineering prefix, so 1234.5 m displays as "1.2345 km". +inline std::ios_base& engineering_prefix(std::ios_base& ios) +{ + (set_autoprefix)(ios, autoprefix_engineering); + return ios; +} + +/// Set flag for binary prefix, so 1024 byte displays as "1 Kib". +inline std::ios_base& binary_prefix(std::ios_base& ios) +{ + (set_autoprefix)(ios, autoprefix_binary); + return ios; +} + +namespace detail { + +/// \return exponent string like "^1/2". +template +inline std::string exponent_string(const static_rational& r) +{ + return '^' + to_string(r); +} + +/// \return empty exponent string for integer rational like 2. +template<> +inline std::string exponent_string(const static_rational<1>&) +{ + return ""; +} + +template +inline std::string base_unit_symbol_string(const T&) +{ + return base_unit_info::symbol() + exponent_string(typename T::value_type()); +} + +template +inline std::string base_unit_name_string(const T&) +{ + return base_unit_info::name() + exponent_string(typename T::value_type()); +} + +// stringify with symbols. +template +struct symbol_string_impl +{ + template + struct apply + { + typedef typename symbol_string_impl::template apply next; + static void value(std::string& str) + { + str += base_unit_symbol_string(typename Begin::item()) + ' '; + next::value(str); + } + }; +}; + +template<> +struct symbol_string_impl<1> +{ + template + struct apply + { + static void value(std::string& str) + { + str += base_unit_symbol_string(typename Begin::item()); + } + }; +}; + +template<> +struct symbol_string_impl<0> +{ + template + struct apply + { + static void value(std::string& str) + { + // better shorthand for dimensionless? + str += "dimensionless"; + } + }; +}; + +template +struct scale_symbol_string_impl +{ + template + struct apply + { + static void value(std::string& str) + { + str += Begin::item::symbol(); + scale_symbol_string_impl::template apply::value(str); + } + }; +}; + +template<> +struct scale_symbol_string_impl<0> +{ + template + struct apply + { + static void value(std::string&) { } + }; +}; + +// stringify with names. +template +struct name_string_impl +{ + template + struct apply + { + typedef typename name_string_impl::template apply next; + static void value(std::string& str) + { + str += base_unit_name_string(typename Begin::item()) + ' '; + next::value(str); + } + }; +}; + +template<> +struct name_string_impl<1> +{ + template + struct apply + { + static void value(std::string& str) + { + str += base_unit_name_string(typename Begin::item()); + } + }; +}; + +template<> +struct name_string_impl<0> +{ + template + struct apply + { + static void value(std::string& str) + { + str += "dimensionless"; + } + }; +}; + +template +struct scale_name_string_impl +{ + template + struct apply + { + static void value(std::string& str) + { + str += Begin::item::name(); + scale_name_string_impl::template apply::value(str); + } + }; +}; + +template<> +struct scale_name_string_impl<0> +{ + template + struct apply + { + static void value(std::string&) { } + }; +}; + +} // namespace detail + +namespace detail { + +// These two overloads of symbol_string and name_string will +// will pick up homogeneous_systems. They simply call the +// appropriate function with a heterogeneous_system. +template +inline std::string +to_string_impl(const unit&, SubFormatter f) +{ + return f(typename reduce_unit >::type()); +} + +/// INTERNAL ONLY +// this overload picks up heterogeneous units that are not scaled. +template +inline std::string +to_string_impl(const unit > >&, Subformatter f) +{ + std::string str; + f.template append_units_to(str); + return(str); +} + +// This overload is a special case for heterogeneous_system which +// is really unitless +/// INTERNAL ONLY +template +inline std::string +to_string_impl(const unit > >&, Subformatter) +{ + return("dimensionless"); +} + +// this overload deals with heterogeneous_systems which are unitless +// but scaled. +/// INTERNAL ONLY +template +inline std::string +to_string_impl(const unit > >&, Subformatter f) +{ + std::string str; + f.template append_scale_to(str); + return(str); +} + +// this overload deals with scaled units. +/// INTERNAL ONLY +template +inline std::string +to_string_impl(const unit > >&, Subformatter f) +{ + std::string str; + + f.template append_scale_to(str); + + std::string without_scale = f(unit > >()); + + if (f.is_default_string(without_scale, unit > >())) + { + str += "("; + str += without_scale; + str += ")"; + } + else + { + str += without_scale; + } + + return(str); +} + +// This overload catches scaled units that have a single base unit +// raised to the first power. It causes si::nano * si::meters to not +// put parentheses around the meters. i.e. nm rather than n(m) +/// INTERNAL ONLY +template +inline std::string +to_string_impl(const unit >,dimensionless_type>, Dimension, Scale> > >&, Subformatter f) +{ + std::string str; + + f.template append_scale_to(str); + str += f(unit >, dimensionless_type>, Dimension, dimensionless_type> > >()); + + return(str); +} + +// This overload is necessary to disambiguate. +// it catches units that are unscaled and have a single +// base unit raised to the first power. It is treated the +// same as any other unscaled unit. +/// INTERNAL ONLY +template +inline std::string +to_string_impl(const unit >,dimensionless_type>, Dimension, dimensionless_type> > >&, Subformatter f) +{ + std::string str; + f.template append_units_to >,dimensionless_type> >(str); + return(str); +} + +// This overload catches scaled units that have a single scaled base unit +// raised to the first power. It moves that scaling on the base unit +// to the unit level scaling and recurses. By doing this we make sure that +// si::milli * si::kilograms will print g rather than mkg. +// +// This transformation will not be applied if base_unit_info is specialized +// for the scaled base unit. +// +/// INTERNAL ONLY +template +inline std::string +to_string_impl( + const unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + list, static_rational<1> >, dimensionless_type>, + Dimension, + Scale + > + > + >&, + Subformatter f, + typename base_unit_info >::base_unit_info_primary_template* = 0) +{ + return(f( + unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + list >, dimensionless_type>, + Dimension, + typename mpl::times, dimensionless_type> >::type + > + > + >())); +} + +// this overload disambuguates between the overload for an unscaled unit +// and the overload for a scaled base unit raised to the first power. +/// INTERNAL ONLY +template +inline std::string +to_string_impl( + const unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + list, static_rational<1> >, dimensionless_type>, + Dimension, + dimensionless_type + > + > + >&, + Subformatter f, + typename base_unit_info >::base_unit_info_primary_template* = 0) +{ + std::string str; + f.template append_units_to, static_rational<1> >, dimensionless_type> >(str); + return(str); +} + +struct format_raw_symbol_impl { + template + void append_units_to(std::string& str) { + detail::symbol_string_impl::template apply::value(str); + } + template + void append_scale_to(std::string& str) { + detail::scale_symbol_string_impl::template apply::value(str); + } + template + std::string operator()(const Unit& u) { + return(to_string_impl(u, *this)); + } + template + bool is_default_string(const std::string&, const Unit&) { + return(true); + } +}; + +struct format_symbol_impl : format_raw_symbol_impl { + template + std::string operator()(const Unit& u) { + return(symbol_string(u)); + } + template + bool is_default_string(const std::string& str, const Unit& u) { + return(str == to_string_impl(u, format_raw_symbol_impl())); + } +}; + +struct format_raw_name_impl { + template + void append_units_to(std::string& str) { + detail::name_string_impl<(Units::size::value)>::template apply::value(str); + } + template + void append_scale_to(std::string& str) { + detail::scale_name_string_impl::template apply::value(str); + } + template + std::string operator()(const Unit& u) { + return(to_string_impl(u, *this)); + } + template + bool is_default_string(const std::string&, const Unit&) { + return(true); + } +}; + +struct format_name_impl : format_raw_name_impl { + template + std::string operator()(const Unit& u) { + return(name_string(u)); + } + template + bool is_default_string(const std::string& str, const Unit& u) { + return(str == to_string_impl(u, format_raw_name_impl())); + } +}; + +template +inline void do_print(std::basic_ostream& os, const std::string& s) +{ + os << s.c_str(); +} + +inline void do_print(std::ostream& os, const std::string& s) +{ + os << s; +} + +template +inline void do_print(std::basic_ostream& os, const char* s) +{ + os << s; +} + +// For automatically applying the appropriate prefixes. + +} + +#ifdef BOOST_UNITS_DOXYGEN + +/// ADL customization point for automatic prefixing. +/// Returns a non-negative value. Implemented as std::abs +/// for built-in types. +template +double autoprefix_norm(const T& arg); + +#else + +template::value> +struct autoprefix_norm_impl; + +template +struct autoprefix_norm_impl +{ + typedef double type; + static BOOST_CONSTEXPR double call(const T& arg) { return std::abs(arg); } +}; + +template +struct autoprefix_norm_impl +{ + typedef one type; + static BOOST_CONSTEXPR one call(const T&) { return one(); } +}; + +template +BOOST_CONSTEXPR +typename autoprefix_norm_impl::type autoprefix_norm(const T& arg) +{ + return autoprefix_norm_impl::call(arg); +} + +#endif + +namespace detail { + +template +BOOST_CONSTEXPR +bool find_matching_scale_impl(End, End, Prev, T, double, F) +{ + return false; +} + +template +BOOST_CXX14_CONSTEXPR +bool find_matching_scale_impl(Begin, End end, Prev prev, T t, double x, F f) +{ + if(Begin::item::value() > x) { + f(prev, t); + return true; + } else { + return detail::find_matching_scale_impl( + typename Begin::next(), + end, + typename Begin::item(), + t, + x, + f + ); + } +} + +template +BOOST_CONSTEXPR +bool find_matching_scale_i(End, End, T, double, F) +{ + return false; +} + +template +BOOST_CXX14_CONSTEXPR +bool find_matching_scale_i(Begin, End end, T t, double x, F f) +{ + if(Begin::item::value() > x) { + return false; + } else { + return detail::find_matching_scale_impl(typename Begin::next(), end, typename Begin::item(), t, x, f); + } +} + +template +BOOST_CXX14_CONSTEXPR +bool find_matching_scale(T t, double x, F f) +{ + return detail::find_matching_scale_i(Scales(), dimensionless_type(), t, x, f); +} + +typedef list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + dimensionless_type> > > > > > > > > > > > > > > > > > engineering_prefixes; + +typedef list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + list >, + dimensionless_type> > > > > > > > > binary_prefixes; + +template +struct print_default_t { + typedef void result_type; + void operator()() const + { + *os << q->value() << ' ' << typename Quantity::unit_type(); + } + Os* os; + const Quantity* q; +}; + +template +print_default_t print_default(Os& os, const Quantity& q) +{ + print_default_t result = { &os, &q }; + return result; +} + +template +struct print_scale_t { + typedef void result_type; + template + void operator()(Prefix, const T& t) const + { + *prefixed = true; + *os << t / Prefix::value() << ' '; + switch(units::get_format(*os)) { + case name_fmt: do_print(*os, Prefix::name()); break; + case raw_fmt: + case symbol_fmt: do_print(*os, Prefix::symbol()); break; + case typename_fmt: do_print(*os, units::simplify_typename(Prefix())); *os << ' '; break; + } + } + template + void operator()(scale >, const T& t) const + { + *prefixed = false; + *os << t << ' '; + } + Os* os; + bool* prefixed; +}; + +template +print_scale_t print_scale(Os& os, bool& prefixed) +{ + print_scale_t result = { &os, &prefixed }; + return result; +} + +// puts parentheses around a unit +/// INTERNAL ONLY +template +inline std::string +maybe_parenthesize(const unit > >&, Subformatter f) +{ + std::string str; + + std::string without_scale = f(unit > >()); + + if (f.is_default_string(without_scale, unit > >())) + { + str += "("; + str += without_scale; + str += ")"; + } + else + { + str += without_scale; + } + + return(str); +} + +// This overload catches scaled units that have a single base unit +// raised to the first power. It causes si::nano * si::meters to not +// put parentheses around the meters. i.e. nm rather than n(m) +/// INTERNAL ONLY +template +inline std::string +maybe_parenthesize(const unit >,dimensionless_type>, Dimension, Scale> > >&, Subformatter f) +{ + return f(unit >, dimensionless_type>, Dimension, dimensionless_type> > >()); +} + +template +void do_print_prefixed_impl(std::basic_ostream& os, const quantity& q, F default_) +{ + bool prefixed; + if(detail::find_matching_scale(q.value(), autoprefix_norm(q.value()), detail::print_scale(os, prefixed))) { + if(prefixed) { + switch(units::get_format(os)) { + case symbol_fmt: do_print(os, maybe_parenthesize(Unit(), format_symbol_impl())); break; + case raw_fmt: do_print(os, maybe_parenthesize(Unit(), format_raw_symbol_impl())); break; + case name_fmt: do_print(os, maybe_parenthesize(Unit(), format_name_impl())); break; + case typename_fmt: do_print(os, simplify_typename(Unit())); break; + } + } else { + os << Unit(); + } + } else { + default_(); + } +} + +// Handle units like si::kilograms that have a scale embedded in the +// base unit. This overload is disabled if the scaled base unit has +// a user-defined string representation. +template +typename base_unit_info< + scaled_base_unit +>::base_unit_info_primary_template +do_print_prefixed( + std::basic_ostream& os, + const quantity< + unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + list< + heterogeneous_system_dim< + scaled_base_unit, + static_rational<1> + >, + dimensionless_type + >, + Dimension, + Scale + > + > + >, + T + >& q) +{ + quantity< + unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + list< + heterogeneous_system_dim >, + dimensionless_type + >, + Dimension, + dimensionless_type + > + > + >, + T + > unscaled(q); + detail::do_print_prefixed_impl(os, unscaled, detail::print_default(os, q)); +} + +template +void do_print_prefixed( + std::basic_ostream& os, + const quantity< + unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + L, + Dimension, + Scale + > + > + >, + T + >& q) +{ + quantity< + unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + L, + Dimension, + dimensionless_type + > + > + >, + T + > unscaled(q); + detail::do_print_prefixed_impl(os, unscaled, detail::print_default(os, q)); +} + +template +void do_print_prefixed(std::basic_ostream& os, const quantity, T>& q) +{ + detail::do_print_prefixed(os, quantity::type>, T>(q)); +} + +template +void do_print_prefixed(std::basic_ostream& os, const quantity& q) +{ + detail::print_default(os, q)(); +} + +template +void maybe_print_prefixed(std::basic_ostream& os, const quantity& q, mpl::true_) +{ + detail::do_print_prefixed(os, q); +} + +template +void maybe_print_prefixed(std::basic_ostream& os, const quantity& q, mpl::false_) +{ + detail::print_default(os, q)(); +} + +inline BOOST_CONSTEXPR mpl::true_ test_norm(double) { return mpl::true_(); } +inline BOOST_CONSTEXPR mpl::false_ test_norm(one) { return mpl::false_(); } + +} // namespace detail + +template +inline std::string +typename_string(const unit&) +{ + return simplify_typename(typename reduce_unit< unit >::type()); +} + +template +inline std::string +symbol_string(const unit&) +{ + return detail::to_string_impl(unit(), detail::format_symbol_impl()); +} + +template +inline std::string +name_string(const unit&) +{ + return detail::to_string_impl(unit(), detail::format_name_impl()); +} + +/// Print a @c unit as a list of base units and their exponents. +/// +/// for @c symbol_format outputs e.g. "m s^-1" or "J". +/// for @c name_format outputs e.g. "meter second^-1" or "joule". +/// for @c raw_format outputs e.g. "m s^-1" or "meter kilogram^2 second^-2". +/// for @c typename_format outputs the typename itself (currently demangled only on GCC). +template +inline std::basic_ostream& operator<<(std::basic_ostream& os, const unit& u) +{ + if (units::get_format(os) == typename_fmt) + { + detail::do_print(os, typename_string(u)); + } + else if (units::get_format(os) == raw_fmt) + { + detail::do_print(os, detail::to_string_impl(u, detail::format_raw_symbol_impl())); + } + else if (units::get_format(os) == symbol_fmt) + { + detail::do_print(os, symbol_string(u)); + } + else if (units::get_format(os) == name_fmt) + { + detail::do_print(os, name_string(u)); + } + else + { + BOOST_ASSERT_MSG(false, "The format mode must be one of: typename_format, raw_format, name_format, symbol_format"); + } + + return(os); +} + +/// \brief Print a @c quantity. +/// \details Prints the value followed by the unit. +/// If the engineering_prefix, or binary_prefix is set, +/// tries to scale the value appropriately. +/// For example, it might print 12.345 km instead of 12345 m. +/// (Note does @b not attempt to automatically scale scalars like double, float...) +template +inline std::basic_ostream& operator<<(std::basic_ostream& os, const quantity& q) +{ + if (units::get_autoprefix(os) == autoprefix_none) + { + os << q.value() << ' ' << Unit(); + } + else if (units::get_autoprefix(os) == autoprefix_engineering) + { + detail::maybe_print_prefixed(os, q, detail::test_norm(autoprefix_norm(q.value()))); + } + else if (units::get_autoprefix(os) == autoprefix_binary) + { + detail::maybe_print_prefixed(os, q, detail::test_norm(autoprefix_norm(q.value()))); + } + else + { + BOOST_ASSERT_MSG(false, "Autoprefixing must be one of: no_prefix, engineering_prefix, binary_prefix"); + } + return(os); +} + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/is_dim.hpp b/Slang/boost/units/is_dim.hpp new file mode 100644 index 0000000..d6a6b54 --- /dev/null +++ b/Slang/boost/units/is_dim.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_DIM_HPP +#define BOOST_UNITS_IS_DIM_HPP + +/// +/// \file +/// \brief Check that a type is a valid @c dim. +/// + +#include + +#include + +namespace boost { + +namespace units { + +/// Check that a type is a valid @c dim. +template +struct is_dim : + public mpl::false_ +{ }; + +template +struct is_dim< dim > : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_DIM_HPP diff --git a/Slang/boost/units/is_dimension_list.hpp b/Slang/boost/units/is_dimension_list.hpp new file mode 100644 index 0000000..b2494d7 --- /dev/null +++ b/Slang/boost/units/is_dimension_list.hpp @@ -0,0 +1,47 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_DIMENSION_LIST_HPP +#define BOOST_UNITS_IS_DIMENSION_LIST_HPP + +/// +/// \file +/// \brief Check that a type is a valid dimension list. +/// + +#include + +#include + +namespace boost { + +namespace units { + +/// Check that a type is a valid dimension list. +template +struct is_dimension_list : + public mpl::false_ +{ }; + +template +struct is_dimension_list > : + public mpl::true_ +{ }; + +template<> +struct is_dimension_list : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_DIMENSION_LIST_HPP diff --git a/Slang/boost/units/is_dimensionless.hpp b/Slang/boost/units/is_dimensionless.hpp new file mode 100644 index 0000000..158a420 --- /dev/null +++ b/Slang/boost/units/is_dimensionless.hpp @@ -0,0 +1,47 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_DIMENSIONLESS_HPP +#define BOOST_UNITS_IS_DIMENSIONLESS_HPP + +/// +/// \file +/// \brief Check if a unit or quantity is dimensionless. +/// + +#include +#include + +namespace boost { + +namespace units { + +template +struct is_dimensionless : + public mpl::false_ +{ }; + +/// Check if a unit is dimensionless. +template +struct is_dimensionless< unit > : + public mpl::true_ +{ }; + +/// Check if a quantity is dimensionless. +template +struct is_dimensionless< quantity > : + public is_dimensionless +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_DIMENSIONLESS_HPP diff --git a/Slang/boost/units/is_dimensionless_quantity.hpp b/Slang/boost/units/is_dimensionless_quantity.hpp new file mode 100644 index 0000000..fa0dbce --- /dev/null +++ b/Slang/boost/units/is_dimensionless_quantity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP +#define BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP + +/// \file +/// \brief check that a type is a dimensionless quantity + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a dimensionless quantity. +template +struct is_dimensionless_quantity : + public is_quantity_of_dimension +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP diff --git a/Slang/boost/units/is_dimensionless_unit.hpp b/Slang/boost/units/is_dimensionless_unit.hpp new file mode 100644 index 0000000..09d4da5 --- /dev/null +++ b/Slang/boost/units/is_dimensionless_unit.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP +#define BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP + +/// \file +/// \brief Check that a type is a dimensionless unit. + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a dimensionless unit. +template +struct is_dimensionless_unit : + public is_unit_of_dimension +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP diff --git a/Slang/boost/units/is_quantity.hpp b/Slang/boost/units/is_quantity.hpp new file mode 100644 index 0000000..dd0ae08 --- /dev/null +++ b/Slang/boost/units/is_quantity.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_QUANTITY_HPP +#define BOOST_UNITS_IS_QUANTITY_HPP + +/// +/// \file +/// \brief Check that a type is a quantity. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a quantity. +template +struct is_quantity : + public mpl::false_ +{ }; + +template +struct is_quantity< quantity > : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_QUANTITY_HPP diff --git a/Slang/boost/units/is_quantity_of_dimension.hpp b/Slang/boost/units/is_quantity_of_dimension.hpp new file mode 100644 index 0000000..f3ec409 --- /dev/null +++ b/Slang/boost/units/is_quantity_of_dimension.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP +#define BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP + +/// +/// \file +/// \brief Check that a type is a quantity of the specified dimension. +/// + +#include +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a quantity of the specified dimension. +template +struct is_quantity_of_dimension : + public mpl::false_ +{ }; + +template +struct is_quantity_of_dimension< quantity< Unit,Y>,Dim > : + public is_unit_of_dimension +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP diff --git a/Slang/boost/units/is_quantity_of_system.hpp b/Slang/boost/units/is_quantity_of_system.hpp new file mode 100644 index 0000000..18546eb --- /dev/null +++ b/Slang/boost/units/is_quantity_of_system.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP +#define BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP + +/// +/// \file +/// \brief Check that a type is a quantity in a specified system. +/// + +#include +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a quantity in a specified system. +template +struct is_quantity_of_system : + public mpl::false_ +{ }; + +template +struct is_quantity_of_system< quantity< Unit,Y>,System > : + public is_unit_of_system +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP diff --git a/Slang/boost/units/is_unit.hpp b/Slang/boost/units/is_unit.hpp new file mode 100644 index 0000000..195c42f --- /dev/null +++ b/Slang/boost/units/is_unit.hpp @@ -0,0 +1,41 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_UNIT_HPP +#define BOOST_UNITS_IS_UNIT_HPP + +/// +/// \file +/// \brief Check that a type is a unit. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a unit. +template +struct is_unit : + public mpl::false_ +{ }; + +template +struct is_unit< unit > : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_UNIT_HPP diff --git a/Slang/boost/units/is_unit_of_dimension.hpp b/Slang/boost/units/is_unit_of_dimension.hpp new file mode 100644 index 0000000..4fc878b --- /dev/null +++ b/Slang/boost/units/is_unit_of_dimension.hpp @@ -0,0 +1,46 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP +#define BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP + +/// +/// \file +/// \brief Check that a type is a unit of the specified dimension. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a unit of the specified dimension. +template +struct is_unit_of_dimension : + public mpl::false_ +{ }; + +template +struct is_unit_of_dimension< unit,Dim > : + public mpl::true_ +{ }; + +template +struct is_unit_of_dimension< absolute >,Dim > : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP diff --git a/Slang/boost/units/is_unit_of_system.hpp b/Slang/boost/units/is_unit_of_system.hpp new file mode 100644 index 0000000..3c3eaa7 --- /dev/null +++ b/Slang/boost/units/is_unit_of_system.hpp @@ -0,0 +1,46 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP +#define BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP + +/// +/// \file +/// \brief Check that a type is a unit in a specified system. +/// + +#include +#include + +namespace boost { + +namespace units { + +/// Check that a type is a unit in a specified system. +template +struct is_unit_of_system : + public mpl::false_ +{ }; + +template +struct is_unit_of_system< unit,System > : + public mpl::true_ +{ }; + +template +struct is_unit_of_system< absolute >,System > : + public mpl::true_ +{ }; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP diff --git a/Slang/boost/units/lambda.hpp b/Slang/boost/units/lambda.hpp new file mode 100644 index 0000000..9014cca --- /dev/null +++ b/Slang/boost/units/lambda.hpp @@ -0,0 +1,593 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// $Id: lambda.hpp 27 2008-06-16 14:50:58Z maehne $ + +#ifndef BOOST_UNITS_LAMBDA_HPP +#define BOOST_UNITS_LAMBDA_HPP + + +//////////////////////////////////////////////////////////////////////// +/// +/// \file lambda.hpp +/// +/// \brief Definitions to ease the usage of Boost.Units' quantity, +/// unit, and absolute types in functors created with the +/// Boost.Lambda library. +/// +/// \author Torsten Maehne +/// \date 2008-06-16 +/// +/// Boost.Lambda's return type deduction system is extented to make +/// use of Boost.Units' typeof_helper trait classes for Boost.Units' +/// quantity, absolute, and unit template classes. +/// +//////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include + +namespace boost { + +namespace lambda { + + /// Partial specialization of return type trait for action + /// unit * Y. + template + struct plain_return_type_2, + boost::units::unit, + Y > { + typedef typename boost::units::multiply_typeof_helper< + boost::units::unit, Y >::type type; + }; + +} // namespace lambda + +namespace units { + + template + struct multiply_typeof_helper, boost::lambda::lambda_functor > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple >::type, boost::lambda::lambda_functor > + > + > type; + }; + + /// Disambiguating overload for action + /// unit * lambda_functor + /// based on \. + template + inline const typename multiply_typeof_helper, boost::lambda::lambda_functor >::type + operator*(const boost::units::unit& a, + const boost::lambda::lambda_functor& b) { + return typename multiply_typeof_helper, boost::lambda::lambda_functor >::type::inherited + (tuple >::type, + boost::lambda::lambda_functor > + (a, b)); + } + +} // namespace units + +namespace lambda { + + /// Partial specialization of return type trait for action + /// unit / Y. + template + struct plain_return_type_2, + boost::units::unit, + Y > { + typedef typename boost::units::divide_typeof_helper< + boost::units::unit, Y >::type type; + }; + +} // namespace lambda + +namespace units { + + template + struct divide_typeof_helper, boost::lambda::lambda_functor > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple >::type, boost::lambda::lambda_functor > + > + > type; + }; + + /// Disambiguating overload for action + /// unit / lambda_functor + /// based on \. + template + inline const typename divide_typeof_helper, boost::lambda::lambda_functor >::type + operator/(const boost::units::unit& a, + const boost::lambda::lambda_functor& b) { + return typename divide_typeof_helper, boost::lambda::lambda_functor >::type::inherited + (tuple >::type, + boost::lambda::lambda_functor > + (a, b)); + } + +} // namespace units + +namespace lambda { + + /// Partial specialization of return type trait for action + /// Y * unit. + template + struct plain_return_type_2, + Y, + boost::units::unit > { + typedef typename boost::units::multiply_typeof_helper< + Y, boost::units::unit >::type type; + }; + +} // namespace lambda + +namespace units { + + template + struct multiply_typeof_helper, boost::units::unit > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple, typename boost::lambda::const_copy_argument >::type> + > + > type; + }; + + /// Disambiguating overload for action + /// lambda_functor * unit + /// based on \. + template + inline const typename multiply_typeof_helper, boost::units::unit >::type + operator*(const boost::lambda::lambda_functor& a, + const boost::units::unit& b) { + return typename multiply_typeof_helper, boost::units::unit >::type::inherited + (tuple, + typename boost::lambda::const_copy_argument >::type> + (a, b)); + } + +} // namespace units + +namespace lambda { + + /// Partial specialization of return type trait for action + /// Y / unit. + template + struct plain_return_type_2, + Y, + boost::units::unit > { + typedef typename boost::units::divide_typeof_helper< + Y, boost::units::unit >::type type; + }; + +} // namespace lambda + +namespace units { + + template + struct divide_typeof_helper, boost::units::unit > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple, typename boost::lambda::const_copy_argument >::type> + > + > type; + }; + + /// Disambiguating overload for action + /// lambda_functor / unit + /// based on \. + template + inline const typename divide_typeof_helper, boost::units::unit >::type + operator/(const boost::lambda::lambda_functor& a, + const boost::units::unit& b) { + return typename divide_typeof_helper, boost::units::unit >::type::inherited + (tuple, + typename boost::lambda::const_copy_argument >::type> + (a, b)); + } + +} // namespace units + +namespace lambda { + + /// Partial specialization of return type trait for action + /// quantity * X. + template + struct plain_return_type_2, + boost::units::quantity, + X> { + typedef typename boost::units::multiply_typeof_helper< + boost::units::quantity, X>::type type; + }; + + /// Partial specialization of return type trait for action + /// X * quantity. + template + struct plain_return_type_2, + X, + boost::units::quantity > { + typedef typename boost::units::multiply_typeof_helper< + X, boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity / X. + template + struct plain_return_type_2, + boost::units::quantity, + X> { + typedef typename boost::units::divide_typeof_helper< + boost::units::quantity, X>::type type; + }; + + /// Partial specialization of return type trait for action + /// X / quantity. + template + struct plain_return_type_2, + X, + boost::units::quantity > { + typedef typename boost::units::divide_typeof_helper< + X, boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit * quantity. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::quantity > { + typedef typename boost::units::multiply_typeof_helper< + boost::units::unit, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit / quantity. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::quantity > { + typedef typename boost::units::divide_typeof_helper< + boost::units::unit, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity * unit. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::unit > { + typedef typename boost::units::multiply_typeof_helper< + boost::units::quantity, + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity / unit. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::unit > { + typedef typename boost::units::divide_typeof_helper< + boost::units::quantity, + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// +quantity. + template + struct plain_return_type_1, + boost::units::quantity > { + typedef typename boost::units::unary_plus_typeof_helper< + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// -quantity. + template + struct plain_return_type_1, + boost::units::quantity > { + typedef typename boost::units::unary_minus_typeof_helper< + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity + quantity. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::quantity > { + typedef typename boost::units::add_typeof_helper< + boost::units::quantity, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity + Y. + template + struct plain_return_type_2, + boost::units::quantity, + Y> { + typedef typename boost::units::add_typeof_helper< + boost::units::quantity, + Y>::type type; + }; + + /// Partial specialization of return type trait for action + /// X + quantity. + template + struct plain_return_type_2, + X, + boost::units::quantity > { + typedef typename boost::units::add_typeof_helper< + X, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity - quantity. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::quantity > { + typedef typename boost::units::subtract_typeof_helper< + boost::units::quantity, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity - Y. + template + struct plain_return_type_2, + boost::units::quantity, + Y> { + typedef typename boost::units::subtract_typeof_helper< + boost::units::quantity, + Y>::type type; + }; + + /// Partial specialization of return type trait for action + /// X - quantity. + template + struct plain_return_type_2, + X, + boost::units::quantity > { + typedef typename boost::units::subtract_typeof_helper< + X, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity * quantity. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::quantity > { + typedef typename boost::units::multiply_typeof_helper< + boost::units::quantity, + boost::units::quantity >::type type; + }; + + /// Partial specialization of return type trait for action + /// quantity / quantity. + template + struct plain_return_type_2, + boost::units::quantity, + boost::units::quantity > { + typedef typename boost::units::divide_typeof_helper< + boost::units::quantity, + boost::units::quantity >::type type; + }; + + + //////////////////////////////////////////////////////////////////////// + // Partial specialization of Boost.Lambda's trait classes for all + // operators overloaded in + //////////////////////////////////////////////////////////////////////// + + /// Partial specialization of return type trait for action + /// +unit. + template + struct plain_return_type_1, + boost::units::unit > { + typedef typename boost::units::unary_plus_typeof_helper< + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// -unit. + template + struct plain_return_type_1, + boost::units::unit > { + typedef typename boost::units::unary_minus_typeof_helper< + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit + unit. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::unit > { + typedef typename boost::units::add_typeof_helper< + boost::units::unit, + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit - unit. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::unit > { + typedef typename boost::units::subtract_typeof_helper< + boost::units::unit, + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit * unit. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::unit > { + typedef typename boost::units::multiply_typeof_helper< + boost::units::unit, + boost::units::unit >::type type; + }; + + /// Partial specialization of return type trait for action + /// unit / unit. + template + struct plain_return_type_2, + boost::units::unit, + boost::units::unit > { + typedef typename boost::units::divide_typeof_helper< + boost::units::unit, + boost::units::unit >::type type; + }; + + + //////////////////////////////////////////////////////////////////////// + // Partial specialization of Boost.Lambda's trait classes for all + // operators overloaded in + //////////////////////////////////////////////////////////////////////// + + + /// Partial specialization of return type trait for action + /// absolute + Y. + template + struct plain_return_type_2, + boost::units::absolute, + Y> { + typedef typename boost::units::absolute type; + }; + + /// Partial specialization of return type trait for action + /// Y + absolute. + template + struct plain_return_type_2, + Y, + boost::units::absolute > { + typedef typename boost::units::absolute type; + }; + + /// Partial specialization of return type trait for action + /// absolute - Y. + template + struct plain_return_type_2, + boost::units::absolute, + Y> { + typedef typename boost::units::absolute type; + }; + + /// Partial specialization of return type trait for action + /// absolute - absolute. + template + struct plain_return_type_2, + boost::units::absolute, + boost::units::absolute > { + typedef Y type; + }; + + /// Partial specialization of return type trait for action + /// T * absolute >. + template + struct plain_return_type_2, + T, + boost::units::absolute > > { + typedef typename boost::units::quantity< + boost::units::absolute >, T> type; + }; + +} // namespace lambda + +namespace units { + + template + struct multiply_typeof_helper, boost::units::absolute > > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple, + typename boost::lambda::const_copy_argument > >::type> + > + > type; + }; + + /// Disambiguating overload for action + /// lambda_functor * absolute > + /// based on \. + template + inline const typename multiply_typeof_helper, boost::units::absolute > >::type + operator*(const boost::lambda::lambda_functor& a, + const boost::units::absolute >& b) { + return typename multiply_typeof_helper, boost::units::absolute > >::type::inherited + (tuple, + typename boost::lambda::const_copy_argument > >::type> + (a, b)); + } + +} // namespace units + +namespace lambda { + + /// Partial specialization of return type trait for action + /// absolute > * T. + template + struct plain_return_type_2, + boost::units::absolute >, + T> { + typedef typename boost::units::quantity< + boost::units::absolute >, T> type; + }; + +} // namespace lambda + +namespace units { + + template + struct multiply_typeof_helper >, boost::lambda::lambda_functor > { + typedef boost::lambda::lambda_functor< + boost::lambda::lambda_functor_base< + boost::lambda::arithmetic_action, + tuple > >::type, + boost::lambda::lambda_functor > + > + > type; + }; + + /// Disambiguating overload for action + /// absolute > * lambda_functor + /// based on \. + template + inline const typename multiply_typeof_helper >, boost::lambda::lambda_functor >::type + operator*(const boost::units::absolute >& a, + const boost::lambda::lambda_functor& b) { + return typename multiply_typeof_helper >, boost::lambda::lambda_functor >::type::inherited + (tuple > >::type, + boost::lambda::lambda_functor > + (a, b)); + } + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_LAMBDA_HPP diff --git a/Slang/boost/units/limits.hpp b/Slang/boost/units/limits.hpp new file mode 100644 index 0000000..7886d69 --- /dev/null +++ b/Slang/boost/units/limits.hpp @@ -0,0 +1,76 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_LIMITS_HPP +#define BOOST_UNITS_LIMITS_HPP + +/// +/// \file +/// \brief specialize std::numeric_limits for units. +/// + +#include + +#include +#include + +namespace std { + +template +class numeric_limits< ::boost::units::quantity > +{ + public: + typedef ::boost::units::quantity quantity_type; + BOOST_STATIC_CONSTEXPR bool is_specialized = std::numeric_limits::is_specialized; + static BOOST_CONSTEXPR quantity_type (min)() { return(quantity_type::from_value((std::numeric_limits::min)())); } + static BOOST_CONSTEXPR quantity_type (max)() { return(quantity_type::from_value((std::numeric_limits::max)())); } +#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS + static BOOST_CONSTEXPR quantity_type (lowest)() { return(quantity_type::from_value((std::numeric_limits::lowest)())); } +#endif + BOOST_STATIC_CONSTEXPR int digits = std::numeric_limits::digits; + BOOST_STATIC_CONSTEXPR int digits10 = std::numeric_limits::digits10; +#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS + BOOST_STATIC_CONSTEXPR int max_digits10 = std::numeric_limits::max_digits10; +#endif + BOOST_STATIC_CONSTEXPR bool is_signed = std::numeric_limits::is_signed; + BOOST_STATIC_CONSTEXPR bool is_integer = std::numeric_limits::is_integer; + BOOST_STATIC_CONSTEXPR bool is_exact = std::numeric_limits::is_exact; + BOOST_STATIC_CONSTEXPR int radix = std::numeric_limits::radix; + static BOOST_CONSTEXPR quantity_type epsilon() { return(quantity_type::from_value(std::numeric_limits::epsilon())); } + static BOOST_CONSTEXPR quantity_type round_error() { return(quantity_type::from_value(std::numeric_limits::round_error())); } + BOOST_STATIC_CONSTEXPR int min_exponent = std::numeric_limits::min_exponent; + BOOST_STATIC_CONSTEXPR int min_exponent10 = std::numeric_limits::min_exponent10; + BOOST_STATIC_CONSTEXPR int max_exponent = std::numeric_limits::max_exponent; + BOOST_STATIC_CONSTEXPR int max_exponent10 = std::numeric_limits::max_exponent10; + BOOST_STATIC_CONSTEXPR bool has_infinity = std::numeric_limits::has_infinity; + BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = std::numeric_limits::has_quiet_NaN; + BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = std::numeric_limits::has_signaling_NaN; + BOOST_STATIC_CONSTEXPR bool has_denorm_loss = std::numeric_limits::has_denorm_loss; + static BOOST_CONSTEXPR quantity_type infinity() { return(quantity_type::from_value(std::numeric_limits::infinity())); } + static BOOST_CONSTEXPR quantity_type quiet_NaN() { return(quantity_type::from_value(std::numeric_limits::quiet_NaN())); } + static BOOST_CONSTEXPR quantity_type signaling_NaN() { return(quantity_type::from_value(std::numeric_limits::signaling_NaN())); } + static BOOST_CONSTEXPR quantity_type denorm_min() { return(quantity_type::from_value(std::numeric_limits::denorm_min())); } + BOOST_STATIC_CONSTEXPR bool is_iec559 = std::numeric_limits::is_iec559; + BOOST_STATIC_CONSTEXPR bool is_bounded = std::numeric_limits::is_bounded; + BOOST_STATIC_CONSTEXPR bool is_modulo = std::numeric_limits::is_modulo; + BOOST_STATIC_CONSTEXPR bool traps = std::numeric_limits::traps; + BOOST_STATIC_CONSTEXPR bool tinyness_before = std::numeric_limits::tinyness_before; +#if defined(_STLP_STATIC_CONST_INIT_BUG) + BOOST_STATIC_CONSTEXPR int has_denorm = std::numeric_limits::has_denorm; + BOOST_STATIC_CONSTEXPR int round_style = std::numeric_limits::round_style; +#else + BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = std::numeric_limits::has_denorm; + BOOST_STATIC_CONSTEXPR float_round_style round_style = std::numeric_limits::round_style; +#endif +}; + +} + +#endif // BOOST_UNITS_LIMITS_HPP diff --git a/Slang/boost/units/make_scaled_unit.hpp b/Slang/boost/units/make_scaled_unit.hpp new file mode 100644 index 0000000..d9740ff --- /dev/null +++ b/Slang/boost/units/make_scaled_unit.hpp @@ -0,0 +1,60 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MAKE_SCALED_UNIT_HPP_INCLUDED +#define BOOST_UNITS_MAKE_SCALED_UNIT_HPP_INCLUDED + +#include +#include +#include + +namespace boost { +namespace units { + +template +struct make_scaled_unit { + typedef typename make_scaled_unit::type, Scale>::type type; +}; + +template +struct make_scaled_unit > >, Scale> { + typedef unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + UnitList, + Dimension, + typename mpl::times< + OldScale, + list, dimensionless_type> + >::type + > + > + > type; +}; + +template +struct make_scaled_unit > >, scale > > { + typedef unit< + Dimension, + heterogeneous_system< + heterogeneous_system_impl< + UnitList, + Dimension, + OldScale + > + > + > type; +}; + +} +} + +#endif diff --git a/Slang/boost/units/make_system.hpp b/Slang/boost/units/make_system.hpp new file mode 100644 index 0000000..1918268 --- /dev/null +++ b/Slang/boost/units/make_system.hpp @@ -0,0 +1,145 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MAKE_SYSTEM_HPP +#define BOOST_UNITS_MAKE_SYSTEM_HPP + +/// \file +/// \brief Metafunction returning a homogeneous system that can +/// represent any combination of the base units. +/// \details +/// Metafunction make_system returning a homogeneous system that can +/// represent any combination of the base units. There must +/// be no way to represent any of the base units in terms +/// of the others. make_system::type +/// is not allowed, for example. + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +#ifdef BOOST_UNITS_DOXYGEN + +namespace detail { + +struct unspecified {}; + +} + +/// Metafunction returning a homogeneous system that can +/// represent any combination of the base units. There must +/// be no way to represent any of the base units in terms +/// of the others. make_system::type +/// is not allowed, for example. +template +struct make_system +{ + typedef homogeneous_system type; +}; + +#else + +struct na {}; + +template< + class U0 = na, + class U1 = na, + class U2 = na, + class U3 = na, + class U4 = na, + class U5 = na, + class U6 = na, + class U7 = na, + class U8 = na, + class U9 = na +> +struct make_system; + +template<> +struct make_system<> +{ + typedef homogeneous_system type; +}; + +// Codewarrior 9.2 doesn't like using the defaults. Need +// to specify na explicitly. +template +struct make_system +{ + typedef homogeneous_system > type; +}; + +template +struct make_system +{ + typedef homogeneous_system > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > > > > > >::type> type; +}; + +template +struct make_system +{ + typedef homogeneous_system > > > > > > > > > >::type> type; +}; + +#endif + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/operators.hpp b/Slang/boost/units/operators.hpp new file mode 100644 index 0000000..6941aaf --- /dev/null +++ b/Slang/boost/units/operators.hpp @@ -0,0 +1,164 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_OPERATORS_HPP +#define BOOST_UNITS_OPERATORS_HPP + + +/// +/// \file +/// \brief Compile time operators and typeof helper classes. +/// \details +/// These operators declare the compile-time operators needed to support dimensional +/// analysis algebra. They require the use of Boost.Typeof, emulation or native. +/// Typeof helper classes define result type for heterogeneous operators on value types. +/// These must be defined through specialization for powers and roots. +/// + +#include +#include + +#include + +namespace boost { +namespace units { + +#if BOOST_UNITS_HAS_TYPEOF + +#ifndef BOOST_UNITS_DOXYGEN + +// to avoid need for default constructor and eliminate divide by zero errors. +namespace typeof_ { + +/// INTERNAL ONLY +template T make(); + +} // namespace typeof_ + +#endif + +#if (BOOST_UNITS_HAS_BOOST_TYPEOF) + +template struct unary_plus_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (+typeof_::make())) + typedef typename nested::type type; +}; + +template struct unary_minus_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (-typeof_::make())) + typedef typename nested::type type; +}; + +template struct add_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make()+typeof_::make())) + typedef typename nested::type type; +}; + +template struct subtract_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make()-typeof_::make())) + typedef typename nested::type type; +}; + +template struct multiply_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make()*typeof_::make())) + typedef typename nested::type type; +}; + +template struct divide_typeof_helper +{ + BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make()/typeof_::make())) + typedef typename nested::type type; +}; + +#elif (BOOST_UNITS_HAS_MWERKS_TYPEOF) + +template struct unary_plus_typeof_helper { typedef __typeof__((+typeof_::make())) type; }; +template struct unary_minus_typeof_helper { typedef __typeof__((-typeof_::make())) type; }; + +template struct add_typeof_helper { typedef __typeof__((typeof_::make()+typeof_::make())) type; }; +template struct subtract_typeof_helper { typedef __typeof__((typeof_::make()-typeof_::make())) type; }; +template struct multiply_typeof_helper { typedef __typeof__((typeof_::make()*typeof_::make())) type; }; +template struct divide_typeof_helper { typedef __typeof__((typeof_::make()/typeof_::make())) type; }; + +#elif (BOOST_UNITS_HAS_GNU_TYPEOF) || defined(BOOST_UNITS_DOXYGEN) + +template struct unary_plus_typeof_helper { typedef typeof((+typeof_::make())) type; }; +template struct unary_minus_typeof_helper { typedef typeof((-typeof_::make())) type; }; + +template struct add_typeof_helper { typedef typeof((typeof_::make()+typeof_::make())) type; }; +template struct subtract_typeof_helper { typedef typeof((typeof_::make()-typeof_::make())) type; }; +template struct multiply_typeof_helper { typedef typeof((typeof_::make()*typeof_::make())) type; }; +template struct divide_typeof_helper { typedef typeof((typeof_::make()/typeof_::make())) type; }; + +#endif + +#else // BOOST_UNITS_HAS_TYPEOF + +template struct unary_plus_typeof_helper { typedef X type; }; +template struct unary_minus_typeof_helper { typedef X type; }; + +template struct add_typeof_helper { BOOST_STATIC_ASSERT((is_same::value == true)); typedef X type; }; +template struct subtract_typeof_helper { BOOST_STATIC_ASSERT((is_same::value == true)); typedef X type; }; +template struct multiply_typeof_helper { BOOST_STATIC_ASSERT((is_same::value == true)); typedef X type; }; +template struct divide_typeof_helper { BOOST_STATIC_ASSERT((is_same::value == true)); typedef X type; }; + +#endif // BOOST_UNITS_HAS_TYPEOF + +template struct power_typeof_helper; +template struct root_typeof_helper; + +#ifdef BOOST_UNITS_DOXYGEN + +/// A helper used by @c pow to raise +/// a runtime object to a compile time +/// known exponent. This template is intended to +/// be specialized. All specializations must +/// conform to the interface shown here. +/// @c Exponent will be either the exponent +/// passed to @c pow or @c static_rational +/// for and integer argument, N. +template +struct power_typeof_helper +{ + /// specifies the result type + typedef detail::unspecified type; + /// Carries out the runtime calculation. + static BOOST_CONSTEXPR type value(const BaseType& base); +}; + +/// A helper used by @c root to take a root +/// of a runtime object using a compile time +/// known index. This template is intended to +/// be specialized. All specializations must +/// conform to the interface shown here. +/// @c Index will be either the type +/// passed to @c pow or @c static_rational +/// for and integer argument, N. +template +struct root_typeof_helper +{ + /// specifies the result type + typedef detail::unspecified type; + /// Carries out the runtime calculation. + static BOOST_CONSTEXPR type value(const Radicand& base); +}; + +#endif + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_OPERATORS_HPP diff --git a/Slang/boost/units/physical_dimensions.hpp b/Slang/boost/units/physical_dimensions.hpp new file mode 100644 index 0000000..4137e1e --- /dev/null +++ b/Slang/boost/units/physical_dimensions.hpp @@ -0,0 +1,90 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2010 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_PHYSICAL_UNITS_HPP +#define BOOST_UNITS_PHYSICAL_UNITS_HPP + +/// +/// \file +/// \brief Physical dimensions according to the SI system. +/// \details This header includes all physical dimension headers for both base +/// and derived dimensions. +/// + +// Include all of the physical_dimension headers. + +// SI seven fundamental dimensions. +#include +#include +#include +#include +#include +#include +#include + +// Base dimensions are extended to include plane and solid angle for convenience. +#include +#include + +// Derived dimensions. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UNITS_PHYSICAL_UNITS_HPP diff --git a/Slang/boost/units/physical_dimensions/absorbed_dose.hpp b/Slang/boost/units/physical_dimensions/absorbed_dose.hpp new file mode 100644 index 0000000..c62ed09 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/absorbed_dose.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for absorbed dose : L^2 T^-2 +typedef derived_dimension::type absorbed_dose_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/acceleration.hpp b/Slang/boost/units/physical_dimensions/acceleration.hpp new file mode 100644 index 0000000..8f25c86 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/acceleration.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for acceleration : L T^-2 +typedef derived_dimension::type acceleration_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/action.hpp b/Slang/boost/units/physical_dimensions/action.hpp new file mode 100644 index 0000000..cf38d32 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/action.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for action : L^2 M T^-1 +typedef derived_dimension::type action_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/activity.hpp b/Slang/boost/units/physical_dimensions/activity.hpp new file mode 100644 index 0000000..035cd44 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/activity.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for activity : T^-1 +typedef derived_dimension::type activity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/amount.hpp b/Slang/boost/units/physical_dimensions/amount.hpp new file mode 100644 index 0000000..6d9d4b3 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/amount.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP +#define BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of amount +struct amount_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::amount_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of amount of substance (N) +typedef amount_base_dimension::dimension_type amount_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/angular_acceleration.hpp b/Slang/boost/units/physical_dimensions/angular_acceleration.hpp new file mode 100644 index 0000000..79a3a14 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/angular_acceleration.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for angular acceleration : T^-2 QP +typedef derived_dimension::type angular_acceleration_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/angular_momentum.hpp b/Slang/boost/units/physical_dimensions/angular_momentum.hpp new file mode 100644 index 0000000..0a86f88 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/angular_momentum.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for angular momentum : L^2 M T^-1 QP^-1 +typedef derived_dimension::type angular_momentum_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/angular_velocity.hpp b/Slang/boost/units/physical_dimensions/angular_velocity.hpp new file mode 100644 index 0000000..5d7ea87 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/angular_velocity.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for angular velocity : T^-1 QP +typedef derived_dimension::type angular_velocity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/area.hpp b/Slang/boost/units/physical_dimensions/area.hpp new file mode 100644 index 0000000..0d8cb09 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/area.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for area : L^2 +typedef derived_dimension::type area_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/capacitance.hpp b/Slang/boost/units/physical_dimensions/capacitance.hpp new file mode 100644 index 0000000..e7019a7 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/capacitance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for capacitance : L^-2 M^-1 T^4 I^2 +typedef derived_dimension::type capacitance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/conductance.hpp b/Slang/boost/units/physical_dimensions/conductance.hpp new file mode 100644 index 0000000..8405f92 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/conductance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for conductance : L^-2 M^-1 T^3 I^2 +typedef derived_dimension::type conductance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/conductivity.hpp b/Slang/boost/units/physical_dimensions/conductivity.hpp new file mode 100644 index 0000000..d255915 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/conductivity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for conductivity : L^-3 M^-1 T^3 I^2 +typedef derived_dimension::type conductivity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/current.hpp b/Slang/boost/units/physical_dimensions/current.hpp new file mode 100644 index 0000000..6fa0e89 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/current.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP +#define BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of current +struct current_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::current_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of electric current (I) +typedef current_base_dimension::dimension_type current_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/dose_equivalent.hpp b/Slang/boost/units/physical_dimensions/dose_equivalent.hpp new file mode 100644 index 0000000..ae13d2f --- /dev/null +++ b/Slang/boost/units/physical_dimensions/dose_equivalent.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for dose equivalent : L^2 T^-2 +typedef derived_dimension::type dose_equivalent_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/dynamic_viscosity.hpp b/Slang/boost/units/physical_dimensions/dynamic_viscosity.hpp new file mode 100644 index 0000000..029f1fa --- /dev/null +++ b/Slang/boost/units/physical_dimensions/dynamic_viscosity.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for dynamic viscosity : M L^-1 T^-1 +typedef derived_dimension::type dynamic_viscosity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/electric_charge.hpp b/Slang/boost/units/physical_dimensions/electric_charge.hpp new file mode 100644 index 0000000..3683646 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/electric_charge.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for electric charge : T^1 I^1 +typedef derived_dimension::type electric_charge_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/electric_potential.hpp b/Slang/boost/units/physical_dimensions/electric_potential.hpp new file mode 100644 index 0000000..1ef028c --- /dev/null +++ b/Slang/boost/units/physical_dimensions/electric_potential.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for electric potential : L^2 M T^-3 I^-1 +typedef derived_dimension::type electric_potential_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/energy.hpp b/Slang/boost/units/physical_dimensions/energy.hpp new file mode 100644 index 0000000..bf0dbe3 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/energy.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for energy : L^2 M T^-2 +typedef derived_dimension::type energy_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/energy_density.hpp b/Slang/boost/units/physical_dimensions/energy_density.hpp new file mode 100644 index 0000000..d30e1e1 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/energy_density.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for energy density : L^-1 M^1 T^-2 +typedef derived_dimension::type energy_density_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/force.hpp b/Slang/boost/units/physical_dimensions/force.hpp new file mode 100644 index 0000000..a1ed955 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/force.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for force : L M T^-2 +typedef derived_dimension::type force_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/frequency.hpp b/Slang/boost/units/physical_dimensions/frequency.hpp new file mode 100644 index 0000000..e2af7ee --- /dev/null +++ b/Slang/boost/units/physical_dimensions/frequency.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for frequency : T^-1 +typedef derived_dimension::type frequency_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/heat_capacity.hpp b/Slang/boost/units/physical_dimensions/heat_capacity.hpp new file mode 100644 index 0000000..3cbfa57 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/heat_capacity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for heat capacity : L^2 M T^-2 Theta^-1 +typedef derived_dimension::type heat_capacity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/illuminance.hpp b/Slang/boost/units/physical_dimensions/illuminance.hpp new file mode 100644 index 0000000..a24daf4 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/illuminance.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for illuminance : L^-2 I QS +typedef derived_dimension::type illuminance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/impedance.hpp b/Slang/boost/units/physical_dimensions/impedance.hpp new file mode 100644 index 0000000..177fc60 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/impedance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for impedance : L^2 M T^-3 I^-2 +typedef derived_dimension::type impedance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/inductance.hpp b/Slang/boost/units/physical_dimensions/inductance.hpp new file mode 100644 index 0000000..1506364 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/inductance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for inductance : L^2 M T^-2 I^-2 +typedef derived_dimension::type inductance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/information.hpp b/Slang/boost/units/physical_dimensions/information.hpp new file mode 100644 index 0000000..c0c7145 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/information.hpp @@ -0,0 +1,44 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_INFORMATION_BASE_DIMENSION_HPP +#define BOOST_UNITS_INFORMATION_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { +namespace units { + +/// base dimension of information +struct information_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::information_base_dimension) + +#endif + +namespace boost { +namespace units { + +/// dimension of information +typedef information_base_dimension::dimension_type information_dimension; + +} // namespace units +} // namespace boost + +#endif diff --git a/Slang/boost/units/physical_dimensions/kinematic_viscosity.hpp b/Slang/boost/units/physical_dimensions/kinematic_viscosity.hpp new file mode 100644 index 0000000..e5c5261 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/kinematic_viscosity.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for kinematic viscosity : L^2 T^-1 +typedef derived_dimension::type kinematic_viscosity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/length.hpp b/Slang/boost/units/physical_dimensions/length.hpp new file mode 100644 index 0000000..22bbec4 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/length.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP +#define BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of length +struct length_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::length_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of length (L) +typedef length_base_dimension::dimension_type length_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/luminance.hpp b/Slang/boost/units/physical_dimensions/luminance.hpp new file mode 100644 index 0000000..f2e6f24 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/luminance.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for luminance : L^-2 I +typedef derived_dimension::type luminance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/luminous_flux.hpp b/Slang/boost/units/physical_dimensions/luminous_flux.hpp new file mode 100644 index 0000000..4c725ef --- /dev/null +++ b/Slang/boost/units/physical_dimensions/luminous_flux.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for luminous flux : I QS +typedef derived_dimension::type luminous_flux_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/luminous_intensity.hpp b/Slang/boost/units/physical_dimensions/luminous_intensity.hpp new file mode 100644 index 0000000..1da041d --- /dev/null +++ b/Slang/boost/units/physical_dimensions/luminous_intensity.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP +#define BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of luminous intensity +struct luminous_intensity_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::luminous_intensity_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of luminous intensity (J) +typedef luminous_intensity_base_dimension::dimension_type luminous_intensity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/magnetic_field_intensity.hpp b/Slang/boost/units/physical_dimensions/magnetic_field_intensity.hpp new file mode 100644 index 0000000..665e5bc --- /dev/null +++ b/Slang/boost/units/physical_dimensions/magnetic_field_intensity.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for magnetic field intensity : L^-1 I +typedef derived_dimension::type magnetic_field_intensity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/magnetic_flux.hpp b/Slang/boost/units/physical_dimensions/magnetic_flux.hpp new file mode 100644 index 0000000..c247e56 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/magnetic_flux.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for magnetic flux : L^2 M T^-2 I^-1 +typedef derived_dimension::type magnetic_flux_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/magnetic_flux_density.hpp b/Slang/boost/units/physical_dimensions/magnetic_flux_density.hpp new file mode 100644 index 0000000..d7fb7bb --- /dev/null +++ b/Slang/boost/units/physical_dimensions/magnetic_flux_density.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for magnetic flux density : M T^-2 I^-1 +typedef derived_dimension::type magnetic_flux_density_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/mass.hpp b/Slang/boost/units/physical_dimensions/mass.hpp new file mode 100644 index 0000000..7aaa75c --- /dev/null +++ b/Slang/boost/units/physical_dimensions/mass.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MASS_BASE_DIMENSION_HPP +#define BOOST_UNITS_MASS_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of mass +struct mass_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::mass_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of mass (M) +typedef mass_base_dimension::dimension_type mass_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MASS_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/mass_density.hpp b/Slang/boost/units/physical_dimensions/mass_density.hpp new file mode 100644 index 0000000..e632f24 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/mass_density.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for mass density : L^-3 M +typedef derived_dimension::type mass_density_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/molar_energy.hpp b/Slang/boost/units/physical_dimensions/molar_energy.hpp new file mode 100644 index 0000000..2f83bbf --- /dev/null +++ b/Slang/boost/units/physical_dimensions/molar_energy.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for molar energy : L^2 M T^-2 N^-1 +typedef derived_dimension::type molar_energy_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/molar_heat_capacity.hpp b/Slang/boost/units/physical_dimensions/molar_heat_capacity.hpp new file mode 100644 index 0000000..48e147b --- /dev/null +++ b/Slang/boost/units/physical_dimensions/molar_heat_capacity.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for molar heat capacity : L^2 M T^-2 Theta^-1 N^-1 +typedef derived_dimension::type molar_heat_capacity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/moment_of_inertia.hpp b/Slang/boost/units/physical_dimensions/moment_of_inertia.hpp new file mode 100644 index 0000000..58c85c8 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/moment_of_inertia.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for moment of inertia : L^2 M QP^-2 +typedef derived_dimension::type moment_of_inertia_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/momentum.hpp b/Slang/boost/units/physical_dimensions/momentum.hpp new file mode 100644 index 0000000..13e8b8c --- /dev/null +++ b/Slang/boost/units/physical_dimensions/momentum.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for linear momentum : L M T^-1 +typedef derived_dimension::type momentum_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/permeability.hpp b/Slang/boost/units/physical_dimensions/permeability.hpp new file mode 100644 index 0000000..a0ea30c --- /dev/null +++ b/Slang/boost/units/physical_dimensions/permeability.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for permeability : L M T^-2 I^-2 +typedef derived_dimension::type permeability_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/permittivity.hpp b/Slang/boost/units/physical_dimensions/permittivity.hpp new file mode 100644 index 0000000..01994c5 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/permittivity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for permittivity : L^-3 M^-1 T^4 I^2 +typedef derived_dimension::type permittivity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/plane_angle.hpp b/Slang/boost/units/physical_dimensions/plane_angle.hpp new file mode 100644 index 0000000..ae70032 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/plane_angle.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP +#define BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of plane angle +struct plane_angle_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::plane_angle_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// base dimension of plane angle (QP) +typedef plane_angle_base_dimension::dimension_type plane_angle_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/power.hpp b/Slang/boost/units/physical_dimensions/power.hpp new file mode 100644 index 0000000..77e04cf --- /dev/null +++ b/Slang/boost/units/physical_dimensions/power.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for power : L^2 M T^-3 +typedef derived_dimension::type power_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/pressure.hpp b/Slang/boost/units/physical_dimensions/pressure.hpp new file mode 100644 index 0000000..666b4c7 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/pressure.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for pressure : L^-1 M T^-2 +typedef derived_dimension::type pressure_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/reluctance.hpp b/Slang/boost/units/physical_dimensions/reluctance.hpp new file mode 100644 index 0000000..56be33b --- /dev/null +++ b/Slang/boost/units/physical_dimensions/reluctance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for reluctance : L^-2 M^-1 T^2 I^2 +typedef derived_dimension::type reluctance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/resistance.hpp b/Slang/boost/units/physical_dimensions/resistance.hpp new file mode 100644 index 0000000..3b1491d --- /dev/null +++ b/Slang/boost/units/physical_dimensions/resistance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for resistance : L^2 M T^-3 I^-2 +typedef derived_dimension::type resistance_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/resistivity.hpp b/Slang/boost/units/physical_dimensions/resistivity.hpp new file mode 100644 index 0000000..a82b900 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/resistivity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for resistivity : L^3 M T^-3 I^-2 +typedef derived_dimension::type resistivity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/solid_angle.hpp b/Slang/boost/units/physical_dimensions/solid_angle.hpp new file mode 100644 index 0000000..1d035c0 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/solid_angle.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP +#define BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of solid angle +struct solid_angle_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::solid_angle_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// base dimension of solid angle (QS) +typedef solid_angle_base_dimension::dimension_type solid_angle_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/specific_energy.hpp b/Slang/boost/units/physical_dimensions/specific_energy.hpp new file mode 100644 index 0000000..e74a293 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/specific_energy.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for specific energy : L^2 T^-2 +typedef derived_dimension::type specific_energy_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/specific_heat_capacity.hpp b/Slang/boost/units/physical_dimensions/specific_heat_capacity.hpp new file mode 100644 index 0000000..9e48fae --- /dev/null +++ b/Slang/boost/units/physical_dimensions/specific_heat_capacity.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for specific heat capacity : L^2 T^-2 Theta^-1 +typedef derived_dimension::type specific_heat_capacity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/specific_volume.hpp b/Slang/boost/units/physical_dimensions/specific_volume.hpp new file mode 100644 index 0000000..85ed889 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/specific_volume.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for specific volume : L^3 M^-1 +typedef derived_dimension::type specific_volume_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/stress.hpp b/Slang/boost/units/physical_dimensions/stress.hpp new file mode 100644 index 0000000..d989c8c --- /dev/null +++ b/Slang/boost/units/physical_dimensions/stress.hpp @@ -0,0 +1,32 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for stress : L^-1 M T^-2 +typedef derived_dimension::type stress_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/surface_density.hpp b/Slang/boost/units/physical_dimensions/surface_density.hpp new file mode 100644 index 0000000..898e8f4 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/surface_density.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for surface density : L^-2 M +typedef derived_dimension::type surface_density_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/surface_tension.hpp b/Slang/boost/units/physical_dimensions/surface_tension.hpp new file mode 100644 index 0000000..630509f --- /dev/null +++ b/Slang/boost/units/physical_dimensions/surface_tension.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for surface tension : M T^-2 +typedef derived_dimension::type surface_tension_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/temperature.hpp b/Slang/boost/units/physical_dimensions/temperature.hpp new file mode 100644 index 0000000..f6bc788 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/temperature.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP +#define BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of temperature +struct temperature_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of temperature (Theta) +typedef temperature_base_dimension::dimension_type temperature_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/thermal_conductivity.hpp b/Slang/boost/units/physical_dimensions/thermal_conductivity.hpp new file mode 100644 index 0000000..abc82c7 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/thermal_conductivity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for thermal_conductivity : L^1 M^1 T^-3 Theta^-1 +typedef derived_dimension::type thermal_conductivity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/time.hpp b/Slang/boost/units/physical_dimensions/time.hpp new file mode 100644 index 0000000..0b9a3e1 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/time.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_TIME_BASE_DIMENSION_HPP +#define BOOST_UNITS_TIME_BASE_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// base dimension of time +struct time_base_dimension : + boost::units::base_dimension +{ }; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TYPE(boost::units::time_base_dimension) + +#endif + +namespace boost { + +namespace units { + +/// dimension of time (T) +typedef time_base_dimension::dimension_type time_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_TIME_BASE_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/torque.hpp b/Slang/boost/units/physical_dimensions/torque.hpp new file mode 100644 index 0000000..61c41a1 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/torque.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for torque : L^2 M T^-2 QP^-1 +typedef derived_dimension::type torque_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/velocity.hpp b/Slang/boost/units/physical_dimensions/velocity.hpp new file mode 100644 index 0000000..eb3d412 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/velocity.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for velocity : L T^-1 +typedef derived_dimension::type velocity_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/volume.hpp b/Slang/boost/units/physical_dimensions/volume.hpp new file mode 100644 index 0000000..a2cdd88 --- /dev/null +++ b/Slang/boost/units/physical_dimensions/volume.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for volume : l^3 +typedef derived_dimension::type volume_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/physical_dimensions/wavenumber.hpp b/Slang/boost/units/physical_dimensions/wavenumber.hpp new file mode 100644 index 0000000..abaf0ac --- /dev/null +++ b/Slang/boost/units/physical_dimensions/wavenumber.hpp @@ -0,0 +1,28 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP +#define BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP + +#include +#include + +namespace boost { + +namespace units { + +/// derived dimension for wavenumber : L^-1 +typedef derived_dimension::type wavenumber_dimension; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP diff --git a/Slang/boost/units/pow.hpp b/Slang/boost/units/pow.hpp new file mode 100644 index 0000000..a6772ee --- /dev/null +++ b/Slang/boost/units/pow.hpp @@ -0,0 +1,115 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_POW_HPP +#define BOOST_UNITS_POW_HPP + +#include + +#include +#include +#include + +/// \file +/// \brief Raise values to exponents known at compile-time. + +namespace boost { + +namespace units { + +/// raise a value to a @c static_rational power. +template +BOOST_CONSTEXPR +inline typename power_typeof_helper::type +pow(const Y& x) +{ + return power_typeof_helper::value(x); +} + +/// raise a value to an integer power. +template +BOOST_CONSTEXPR +inline typename power_typeof_helper >::type +pow(const Y& x) +{ + return power_typeof_helper >::value(x); +} + +#ifndef BOOST_UNITS_DOXYGEN + +/// raise @c T to a @c static_rational power. +template +struct power_typeof_helper > +{ + typedef typename mpl::if_, double, T>::type internal_type; + typedef detail::static_rational_power_impl, internal_type> impl; + typedef typename impl::type type; + + static BOOST_CONSTEXPR type value(const T& x) + { + return impl::call(x); + } +}; + +/// raise @c float to a @c static_rational power. +template +struct power_typeof_helper > +{ + // N.B. pathscale doesn't accept inheritance for some reason. + typedef power_typeof_helper > base; + typedef typename base::type type; + static BOOST_CONSTEXPR type value(const double& x) + { + return base::value(x); + } +}; + +#endif + +/// take the @c static_rational root of a value. +template +BOOST_CONSTEXPR +typename root_typeof_helper::type +root(const Y& x) +{ + return root_typeof_helper::value(x); +} + +/// take the integer root of a value. +template +BOOST_CONSTEXPR +typename root_typeof_helper >::type +root(const Y& x) +{ + return root_typeof_helper >::value(x); +} + +#ifndef BOOST_UNITS_DOXYGEN + +/// take @c static_rational root of an @c T +template +struct root_typeof_helper > +{ + // N.B. pathscale doesn't accept inheritance for some reason. + typedef power_typeof_helper > base; + typedef typename base::type type; + static BOOST_CONSTEXPR type value(const T& x) + { + return(base::value(x)); + } +}; + +#endif + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_STATIC_RATIONAL_HPP diff --git a/Slang/boost/units/quantity.hpp b/Slang/boost/units/quantity.hpp new file mode 100644 index 0000000..c6ae6e7 --- /dev/null +++ b/Slang/boost/units/quantity.hpp @@ -0,0 +1,1280 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_QUANTITY_HPP +#define BOOST_UNITS_QUANTITY_HPP + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace detail { + +template +struct is_base_unit : mpl::false_ {}; + +template +struct is_base_unit : mpl::true_ {}; + +template +struct is_narrowing_conversion_impl : mpl::bool_<(sizeof(Source) > sizeof(Destination))> {}; + +template +struct is_non_narrowing_conversion : + mpl::and_< + boost::is_convertible, + mpl::not_< + mpl::and_< + boost::is_arithmetic, + boost::is_arithmetic, + mpl::or_< + mpl::and_< + is_integral, + mpl::not_ > + >, + is_narrowing_conversion_impl + > + > + > + > +{}; + +template<> +struct is_non_narrowing_conversion : mpl::false_ {}; + +// msvc 7.1 needs extra disambiguation +template +struct disable_if_is_same +{ + typedef void type; +}; + +template +struct disable_if_is_same {}; + +} + +/// class declaration +template +class quantity +{ + // base units are not the same as units. + BOOST_MPL_ASSERT_NOT((detail::is_base_unit)); + enum { force_instantiation_of_unit = sizeof(Unit) }; + typedef void (quantity::*unspecified_null_pointer_constant_type)(int*******); + public: + typedef quantity this_type; + + typedef Y value_type; + typedef Unit unit_type; + + BOOST_CONSTEXPR quantity() : val_() + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + BOOST_CONSTEXPR quantity(unspecified_null_pointer_constant_type) : val_() + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + BOOST_CONSTEXPR quantity(const this_type& source) : val_(source.val_) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + // Need to make sure that the destructor of + // Unit which contains the checking is instantiated, + // on sun. + #ifdef __SUNPRO_CC + ~quantity() { + unit_type force_unit_instantiation; + } + #endif + + //~quantity() { } + + BOOST_CXX14_CONSTEXPR this_type& operator=(const this_type& source) + { + val_ = source.val_; + + return *this; + } + + #ifndef BOOST_NO_SFINAE + + /// implicit conversion between value types is allowed if allowed for value types themselves + template + BOOST_CONSTEXPR quantity(const quantity& source, + typename boost::enable_if >::type* = 0) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + /// implicit conversion between value types is not allowed if not allowed for value types themselves + template + explicit BOOST_CONSTEXPR quantity(const quantity& source, + typename boost::disable_if >::type* = 0) : + val_(static_cast(source.value())) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + #else + + /// implicit conversion between value types is allowed if allowed for value types themselves + template + BOOST_CONSTEXPR quantity(const quantity& source) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + #endif + + /// implicit assignment between value types is allowed if allowed for value types themselves + template + BOOST_CXX14_CONSTEXPR this_type& operator=(const quantity& source) + { + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + + *this = this_type(source); + + return *this; + } + + #ifndef BOOST_NO_SFINAE + + /// explicit conversion between different unit systems is allowed if implicit conversion is disallowed + template + explicit + BOOST_CONSTEXPR quantity(const quantity& source, + typename boost::disable_if< + mpl::and_< + //is_implicitly_convertible should be undefined when the + //units are not convertible at all + typename is_implicitly_convertible::type, + detail::is_non_narrowing_conversion + >, + typename detail::disable_if_is_same::type + >::type* = 0) + : val_(conversion_helper,this_type>::convert(source).value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + /// implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible + template + BOOST_CONSTEXPR quantity(const quantity& source, + typename boost::enable_if< + mpl::and_< + typename is_implicitly_convertible::type, + detail::is_non_narrowing_conversion + >, + typename detail::disable_if_is_same::type + >::type* = 0) + : val_(conversion_helper,this_type>::convert(source).value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + #else + + /// without SFINAE we can't distinguish between explicit and implicit conversions so + /// the conversion is always explicit + template + explicit BOOST_CONSTEXPR quantity(const quantity& source) + : val_(conversion_helper,this_type>::convert(source).value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + #endif + + /// implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible + template + BOOST_CXX14_CONSTEXPR this_type& operator=(const quantity& source) + { + + BOOST_STATIC_ASSERT((is_implicitly_convertible::value == true)); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + + *this = this_type(source); + + return *this; + } + + BOOST_CONSTEXPR const value_type& value() const { return val_; } ///< constant accessor to value + + ///< can add a quantity of the same type if add_typeof_helper::type is convertible to value_type + template + BOOST_CXX14_CONSTEXPR this_type& operator+=(const quantity& source) + { + BOOST_STATIC_ASSERT((boost::is_same::type, Unit>::value)); + val_ += source.value(); + return *this; + } + + ///< can subtract a quantity of the same type if subtract_typeof_helper::type is convertible to value_type + template + BOOST_CXX14_CONSTEXPR this_type& operator-=(const quantity& source) + { + BOOST_STATIC_ASSERT((boost::is_same::type, Unit>::value)); + val_ -= source.value(); + return *this; + } + + template + BOOST_CXX14_CONSTEXPR this_type& operator*=(const quantity& source) + { + BOOST_STATIC_ASSERT((boost::is_same::type, Unit>::value)); + val_ *= source.value(); + return *this; + } + + template + BOOST_CXX14_CONSTEXPR this_type& operator/=(const quantity& source) + { + BOOST_STATIC_ASSERT((boost::is_same::type, Unit>::value)); + val_ /= source.value(); + return *this; + } + + ///< can multiply a quantity by a scalar value_type if multiply_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator*=(const value_type& source) { val_ *= source; return *this; } + ///< can divide a quantity by a scalar value_type if divide_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator/=(const value_type& source) { val_ /= source; return *this; } + + /// Construct quantity directly from @c value_type (potentially dangerous). + static BOOST_CONSTEXPR this_type from_value(const value_type& val) { return this_type(val, 0); } + + protected: + explicit BOOST_CONSTEXPR quantity(const value_type& val, int) : val_(val) { } + + private: + value_type val_; +}; + +/// Specialization for dimensionless quantities. Implicit conversions between +/// unit systems are allowed because all dimensionless quantities are equivalent. +/// Implicit construction and assignment from and conversion to @c value_type is +/// also allowed. +template +class quantity +{ + public: + typedef quantity,Y> this_type; + + typedef Y value_type; + typedef System system_type; + typedef dimensionless_type dimension_type; + typedef unit unit_type; + + BOOST_CONSTEXPR quantity() : val_() + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + /// construction from raw @c value_type is allowed + BOOST_CONSTEXPR quantity(value_type val) : val_(val) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + BOOST_CONSTEXPR quantity(const this_type& source) : val_(source.val_) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + //~quantity() { } + + BOOST_CXX14_CONSTEXPR this_type& operator=(const this_type& source) + { + val_ = source.val_; + + return *this; + } + + #ifndef BOOST_NO_SFINAE + + /// implicit conversion between value types is allowed if allowed for value types themselves + template + BOOST_CONSTEXPR quantity(const quantity,YY>& source, + typename boost::enable_if >::type* = 0) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + /// implicit conversion between value types is not allowed if not allowed for value types themselves + template + explicit BOOST_CONSTEXPR quantity(const quantity,YY>& source, + typename boost::disable_if >::type* = 0) : + val_(static_cast(source.value())) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + #else + + /// implicit conversion between value types is allowed if allowed for value types themselves + template + BOOST_CONSTEXPR quantity(const quantity,YY>& source) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + #endif + + /// implicit assignment between value types is allowed if allowed for value types themselves + template + BOOST_CXX14_CONSTEXPR this_type& operator=(const quantity,YY>& source) + { + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + + *this = this_type(source); + + return *this; + } + + #if 1 + + /// implicit conversion between different unit systems is allowed + template + BOOST_CONSTEXPR quantity(const quantity,Y2>& source, + #ifdef __SUNPRO_CC + typename boost::enable_if< + boost::mpl::and_< + detail::is_non_narrowing_conversion, + detail::is_dimensionless_system + > + >::type* = 0 + #else + typename boost::enable_if >::type* = 0, + typename detail::disable_if_is_same::type* = 0, + typename boost::enable_if >::type* = 0 + #endif + ) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + /// implicit conversion between different unit systems is allowed + template + explicit BOOST_CONSTEXPR quantity(const quantity,Y2>& source, + #ifdef __SUNPRO_CC + typename boost::enable_if< + boost::mpl::and_< + boost::mpl::not_ >, + detail::is_dimensionless_system + > + >::type* = 0 + #else + typename boost::disable_if >::type* = 0, + typename detail::disable_if_is_same::type* = 0, + typename boost::enable_if >::type* = 0 + #endif + ) : + val_(static_cast(source.value())) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + #else + + /// implicit conversion between different unit systems is allowed + template + BOOST_CONSTEXPR quantity(const quantity >,Y2>& source) : + val_(source.value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + BOOST_STATIC_ASSERT((boost::is_convertible::value == true)); + } + + #endif + + /// conversion between different unit systems is explicit when + /// the units are not equivalent. + template + explicit BOOST_CONSTEXPR quantity(const quantity,Y2>& source, + typename boost::disable_if >::type* = 0) : + val_(conversion_helper,Y2>, this_type>::convert(source).value()) + { + BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y); + } + + #ifndef __SUNPRO_CC + + /// implicit assignment between different unit systems is allowed + template + BOOST_CXX14_CONSTEXPR this_type& operator=(const quantity& source) + { + *this = this_type(source); + + return *this; + } + + #endif + + /// implicit conversion to @c value_type is allowed + BOOST_CONSTEXPR operator value_type() const { return val_; } + + BOOST_CONSTEXPR const value_type& value() const { return val_; } ///< constant accessor to value + + ///< can add a quantity of the same type if add_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator+=(const this_type& source) { val_ += source.val_; return *this; } + + ///< can subtract a quantity of the same type if subtract_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator-=(const this_type& source) { val_ -= source.val_; return *this; } + + ///< can multiply a quantity by a scalar value_type if multiply_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator*=(const value_type& val) { val_ *= val; return *this; } + + ///< can divide a quantity by a scalar value_type if divide_typeof_helper::type is convertible to value_type + BOOST_CXX14_CONSTEXPR this_type& operator/=(const value_type& val) { val_ /= val; return *this; } + + /// Construct quantity directly from @c value_type. + static BOOST_CONSTEXPR this_type from_value(const value_type& val) { return this_type(val); } + + private: + value_type val_; +}; + +#ifdef BOOST_MSVC +// HACK: For some obscure reason msvc 8.0 needs these specializations +template +class quantity, T> {}; +template +class quantity {}; +#endif + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::quantity, 2) + +#endif + +namespace boost { + +namespace units { + +namespace detail { + +/// helper class for quantity_cast +template struct quantity_cast_helper; + +/// specialization for casting to the value type +template +struct quantity_cast_helper > +{ + typedef Y type; + + BOOST_CONSTEXPR type operator()(quantity& source) const { return const_cast(source.value()); } +}; + +/// specialization for casting to the value type +template +struct quantity_cast_helper > +{ + typedef Y type; + + BOOST_CONSTEXPR type operator()(const quantity& source) const { return source.value(); } +}; + +} // namespace detail + +/// quantity_cast provides mutating access to underlying quantity value_type +template +inline +BOOST_CONSTEXPR +X +quantity_cast(Y& source) +{ + return detail::quantity_cast_helper()(source); +} + +template +inline +BOOST_CONSTEXPR +X +quantity_cast(const Y& source) +{ + return detail::quantity_cast_helper()(source); +} + +/// swap quantities +template +inline void swap(quantity& lhs, quantity& rhs) +{ + using std::swap; + swap(quantity_cast(lhs),quantity_cast(rhs)); +} + +/// specialize unary plus typeof helper +/// INTERNAL ONLY +template +struct unary_plus_typeof_helper< quantity > +{ + typedef typename unary_plus_typeof_helper::type value_type; + typedef typename unary_plus_typeof_helper::type unit_type; + typedef quantity type; +}; + +/// specialize unary minus typeof helper +/// INTERNAL ONLY +template +struct unary_minus_typeof_helper< quantity > +{ + typedef typename unary_minus_typeof_helper::type value_type; + typedef typename unary_minus_typeof_helper::type unit_type; + typedef quantity type; +}; + +/// specialize add typeof helper +/// INTERNAL ONLY +template +struct add_typeof_helper< quantity,quantity > +{ + typedef typename add_typeof_helper::type value_type; + typedef typename add_typeof_helper::type unit_type; + typedef quantity type; +}; + +/// for sun CC we need to invoke SFINAE at +/// the top level, otherwise it will silently +/// return int. +template +struct add_typeof_helper< quantity,X>,quantity,Y> > +{ +}; + +template +struct add_typeof_helper< quantity,X>,quantity,Y> > +{ + typedef typename add_typeof_helper::type value_type; + typedef unit unit_type; + typedef quantity type; +}; + +/// specialize subtract typeof helper +/// INTERNAL ONLY +template +struct subtract_typeof_helper< quantity,quantity > +{ + typedef typename subtract_typeof_helper::type value_type; + typedef typename subtract_typeof_helper::type unit_type; + typedef quantity type; +}; + +// Force adding different units to fail on sun. +template +struct subtract_typeof_helper< quantity,X>,quantity,Y> > +{ +}; + +template +struct subtract_typeof_helper< quantity,X>,quantity,Y> > +{ + typedef typename subtract_typeof_helper::type value_type; + typedef unit unit_type; + typedef quantity type; +}; + +/// scalar times unit typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< X,unit > +{ + typedef X value_type; + typedef unit unit_type; + typedef quantity type; +}; + +/// unit times scalar typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< unit,X > +{ + typedef X value_type; + typedef unit unit_type; + typedef quantity type; +}; + +/// scalar times quantity typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< X,quantity > +{ + typedef typename multiply_typeof_helper::type value_type; + typedef Unit unit_type; + typedef quantity type; +}; + +/// disambiguate +/// INTERNAL ONLY +template +struct multiply_typeof_helper< one,quantity > +{ + typedef quantity type; +}; + +/// quantity times scalar typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< quantity,Y > +{ + typedef typename multiply_typeof_helper::type value_type; + typedef Unit unit_type; + typedef quantity type; +}; + +/// disambiguate +/// INTERNAL ONLY +template +struct multiply_typeof_helper< quantity,one > +{ + typedef quantity type; +}; + +/// unit times quantity typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< unit,quantity > +{ + typedef X value_type; + typedef typename multiply_typeof_helper< unit,Unit >::type unit_type; + typedef quantity type; +}; + +/// quantity times unit typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< quantity,unit > +{ + typedef X value_type; + typedef typename multiply_typeof_helper< Unit,unit >::type unit_type; + typedef quantity type; +}; + +/// quantity times quantity typeof helper +/// INTERNAL ONLY +template +struct multiply_typeof_helper< quantity,quantity > +{ + typedef typename multiply_typeof_helper::type value_type; + typedef typename multiply_typeof_helper::type unit_type; + typedef quantity type; +}; + +/// scalar divided by unit typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< X,unit > +{ + typedef X value_type; + typedef typename power_typeof_helper< unit,static_rational<-1> >::type unit_type; + typedef quantity type; +}; + +/// unit divided by scalar typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< unit,X > +{ + typedef typename divide_typeof_helper::type value_type; + typedef unit unit_type; + typedef quantity type; +}; + +/// scalar divided by quantity typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< X,quantity > +{ + typedef typename divide_typeof_helper::type value_type; + typedef typename power_typeof_helper< Unit,static_rational<-1> >::type unit_type; + typedef quantity type; +}; + +/// disambiguate +/// INTERNAL ONLY +template +struct divide_typeof_helper< one,quantity > +{ + typedef quantity type; +}; + +/// quantity divided by scalar typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< quantity,Y > +{ + typedef typename divide_typeof_helper::type value_type; + typedef Unit unit_type; + typedef quantity type; +}; + +/// disambiguate +/// INTERNAL ONLY +template +struct divide_typeof_helper< quantity,one > +{ + typedef quantity type; +}; + +/// unit divided by quantity typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< unit,quantity > +{ + typedef typename divide_typeof_helper::type value_type; + typedef typename divide_typeof_helper< unit,Unit >::type unit_type; + typedef quantity type; +}; + +/// quantity divided by unit typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< quantity,unit > +{ + typedef X value_type; + typedef typename divide_typeof_helper< Unit,unit >::type unit_type; + typedef quantity type; +}; + +/// quantity divided by quantity typeof helper +/// INTERNAL ONLY +template +struct divide_typeof_helper< quantity,quantity > +{ + typedef typename divide_typeof_helper::type value_type; + typedef typename divide_typeof_helper::type unit_type; + typedef quantity type; +}; + +/// specialize power typeof helper +/// INTERNAL ONLY +template +struct power_typeof_helper< quantity,static_rational > +{ + typedef typename power_typeof_helper >::type value_type; + typedef typename power_typeof_helper >::type unit_type; + typedef quantity type; + + static BOOST_CONSTEXPR type value(const quantity& x) + { + return type::from_value(power_typeof_helper >::value(x.value())); + } +}; + +/// specialize root typeof helper +/// INTERNAL ONLY +template +struct root_typeof_helper< quantity,static_rational > +{ + typedef typename root_typeof_helper >::type value_type; + typedef typename root_typeof_helper >::type unit_type; + typedef quantity type; + + static BOOST_CONSTEXPR type value(const quantity& x) + { + return type::from_value(root_typeof_helper >::value(x.value())); + } +}; + +/// runtime unit times scalar +/// INTERNAL ONLY +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< unit,Y >::type +operator*(const unit&,const Y& rhs) +{ + typedef typename multiply_typeof_helper< unit,Y >::type type; + + return type::from_value(rhs); +} + +/// runtime unit divided by scalar +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< unit,Y >::type +operator/(const unit&,const Y& rhs) +{ + typedef typename divide_typeof_helper,Y>::type type; + + return type::from_value(Y(1)/rhs); +} + +/// runtime scalar times unit +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< Y,unit >::type +operator*(const Y& lhs,const unit&) +{ + typedef typename multiply_typeof_helper< Y,unit >::type type; + + return type::from_value(lhs); +} + +/// runtime scalar divided by unit +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< Y,unit >::type +operator/(const Y& lhs,const unit&) +{ + typedef typename divide_typeof_helper< Y,unit >::type type; + + return type::from_value(lhs); +} + +///// runtime quantity times scalar +//template +//inline +//BOOST_CONSTEXPR +//typename multiply_typeof_helper< quantity,Y >::type +//operator*(const quantity& lhs,const Y& rhs) +//{ +// typedef typename multiply_typeof_helper< quantity,Y >::type type; +// +// return type::from_value(lhs.value()*rhs); +//} +// +///// runtime scalar times quantity +//template +//inline +//BOOST_CONSTEXPR +//typename multiply_typeof_helper< X,quantity >::type +//operator*(const X& lhs,const quantity& rhs) +//{ +// typedef typename multiply_typeof_helper< X,quantity >::type type; +// +// return type::from_value(lhs*rhs.value()); +//} + +/// runtime quantity times scalar +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< quantity,X >::type +operator*(const quantity& lhs,const X& rhs) +{ + typedef typename multiply_typeof_helper< quantity,X >::type type; + + return type::from_value(lhs.value()*rhs); +} + +/// runtime scalar times quantity +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< X,quantity >::type +operator*(const X& lhs,const quantity& rhs) +{ + typedef typename multiply_typeof_helper< X,quantity >::type type; + + return type::from_value(lhs*rhs.value()); +} + +///// runtime quantity divided by scalar +//template +//inline +//BOOST_CONSTEXPR +//typename divide_typeof_helper< quantity,Y >::type +//operator/(const quantity& lhs,const Y& rhs) +//{ +// typedef typename divide_typeof_helper< quantity,Y >::type type; +// +// return type::from_value(lhs.value()/rhs); +//} +// +///// runtime scalar divided by quantity +//template +//inline +//BOOST_CONSTEXPR +//typename divide_typeof_helper< X,quantity >::type +//operator/(const X& lhs,const quantity& rhs) +//{ +// typedef typename divide_typeof_helper< X,quantity >::type type; +// +// return type::from_value(lhs/rhs.value()); +//} + +/// runtime quantity divided by scalar +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< quantity,X >::type +operator/(const quantity& lhs,const X& rhs) +{ + typedef typename divide_typeof_helper< quantity,X >::type type; + + return type::from_value(lhs.value()/rhs); +} + +/// runtime scalar divided by quantity +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< X,quantity >::type +operator/(const X& lhs,const quantity& rhs) +{ + typedef typename divide_typeof_helper< X,quantity >::type type; + + return type::from_value(lhs/rhs.value()); +} + +/// runtime unit times quantity +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< unit,quantity >::type +operator*(const unit&,const quantity& rhs) +{ + typedef typename multiply_typeof_helper< unit,quantity >::type type; + + return type::from_value(rhs.value()); +} + +/// runtime unit divided by quantity +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< unit,quantity >::type +operator/(const unit&,const quantity& rhs) +{ + typedef typename divide_typeof_helper< unit,quantity >::type type; + + return type::from_value(Y(1)/rhs.value()); +} + +/// runtime quantity times unit +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< quantity,unit >::type +operator*(const quantity& lhs,const unit&) +{ + typedef typename multiply_typeof_helper< quantity,unit >::type type; + + return type::from_value(lhs.value()); +} + +/// runtime quantity divided by unit +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< quantity,unit >::type +operator/(const quantity& lhs,const unit&) +{ + typedef typename divide_typeof_helper< quantity,unit >::type type; + + return type::from_value(lhs.value()); +} + +/// runtime unary plus quantity +template +BOOST_CONSTEXPR +typename unary_plus_typeof_helper< quantity >::type +operator+(const quantity& val) +{ + typedef typename unary_plus_typeof_helper< quantity >::type type; + + return type::from_value(+val.value()); +} + +/// runtime unary minus quantity +template +BOOST_CONSTEXPR +typename unary_minus_typeof_helper< quantity >::type +operator-(const quantity& val) +{ + typedef typename unary_minus_typeof_helper< quantity >::type type; + + return type::from_value(-val.value()); +} + +/// runtime quantity plus quantity +template +inline +BOOST_CONSTEXPR +typename add_typeof_helper< quantity,quantity >::type +operator+(const quantity& lhs, + const quantity& rhs) +{ + typedef typename add_typeof_helper< quantity,quantity >::type type; + + return type::from_value(lhs.value()+rhs.value()); +} + +/// runtime quantity minus quantity +template +inline +BOOST_CONSTEXPR +typename subtract_typeof_helper< quantity,quantity >::type +operator-(const quantity& lhs, + const quantity& rhs) +{ + typedef typename subtract_typeof_helper< quantity,quantity >::type type; + + return type::from_value(lhs.value()-rhs.value()); +} + +/// runtime quantity times quantity +template +inline +BOOST_CONSTEXPR +typename multiply_typeof_helper< quantity,quantity >::type +operator*(const quantity& lhs, + const quantity& rhs) +{ + typedef typename multiply_typeof_helper< quantity, + quantity >::type type; + + return type::from_value(lhs.value()*rhs.value()); +} + +/// runtime quantity divided by quantity +template +inline +BOOST_CONSTEXPR +typename divide_typeof_helper< quantity,quantity >::type +operator/(const quantity& lhs, + const quantity& rhs) +{ + typedef typename divide_typeof_helper< quantity, + quantity >::type type; + + return type::from_value(lhs.value()/rhs.value()); +} + +/// runtime operator== +template +inline +BOOST_CONSTEXPR +bool +operator==(const quantity& val1, + const quantity& val2) +{ + return val1.value() == val2.value(); +} + +/// runtime operator!= +template +inline +BOOST_CONSTEXPR +bool +operator!=(const quantity& val1, + const quantity& val2) +{ + return val1.value() != val2.value(); +} + +/// runtime operator< +template +inline +BOOST_CONSTEXPR +bool +operator<(const quantity& val1, + const quantity& val2) +{ + return val1.value() < val2.value(); +} + +/// runtime operator<= +template +inline +BOOST_CONSTEXPR +bool +operator<=(const quantity& val1, + const quantity& val2) +{ + return val1.value() <= val2.value(); +} + +/// runtime operator> +template +inline +BOOST_CONSTEXPR +bool +operator>(const quantity& val1, + const quantity& val2) +{ + return val1.value() > val2.value(); +} + +/// runtime operator>= +template +inline +BOOST_CONSTEXPR +bool +operator>=(const quantity& val1, + const quantity& val2) +{ + return val1.value() >= val2.value(); +} + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_QUANTITY_HPP diff --git a/Slang/boost/units/reduce_unit.hpp b/Slang/boost/units/reduce_unit.hpp new file mode 100644 index 0000000..fe0050a --- /dev/null +++ b/Slang/boost/units/reduce_unit.hpp @@ -0,0 +1,41 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_REDUCE_UNIT_HPP_INCLUDED +#define BOOST_UNITS_REDUCE_UNIT_HPP_INCLUDED + +/// \file +/// \brief Returns a unique type for every unit. + +namespace boost { +namespace units { + +#ifdef BOOST_UNITS_DOXYGEN + +/// Returns a unique type for every unit. +template +struct reduce_unit { + typedef detail::unspecified type; +}; + +#else + +// default implementation: return Unit unchanged. +template +struct reduce_unit { + typedef Unit type; +}; + +#endif + +} +} + +#endif diff --git a/Slang/boost/units/scale.hpp b/Slang/boost/units/scale.hpp new file mode 100644 index 0000000..7d64cd5 --- /dev/null +++ b/Slang/boost/units/scale.hpp @@ -0,0 +1,145 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SCALE_HPP_INCLUDED +#define BOOST_UNITS_SCALE_HPP_INCLUDED + +/// +/// \file +/// \brief 10^3 Engineering & 2^10 binary scaling factors for autoprefixing. +/// \details +/// + +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +template +struct scaled_base_unit; + +/// class representing a scaling factor such as 10^3 +/// The exponent must be a static rational. +template +struct scale +{ + BOOST_STATIC_CONSTEXPR long base = Base; + typedef Exponent exponent; + typedef double value_type; + static BOOST_CONSTEXPR value_type value() { return(detail::static_rational_power(static_cast(base))); } + // These need to be defined in specializations for + // printing to work. + // static std::string name(); + // static std::string symbol(); +}; + +template +BOOST_CONSTEXPR_OR_CONST long scale::base; + +/// INTERNAL ONLY +template +struct scale > +{ + BOOST_STATIC_CONSTEXPR long base = Base; + typedef static_rational<0> exponent; + typedef one value_type; + static BOOST_CONSTEXPR one value() { return(one()); } + static std::string name() { return(""); } + static std::string symbol() { return(""); } +}; + +template +BOOST_CONSTEXPR_OR_CONST long scale >::base; + +template +std::string symbol_string(const scale&) +{ + return scale::symbol(); +} + +template +std::string name_string(const scale&) +{ + return scale::name(); +} + +#ifndef BOOST_UNITS_DOXYGEN + +#define BOOST_UNITS_SCALE_SPECIALIZATION(base_,exponent_,val_,name_,symbol_) \ +template<> \ +struct scale \ +{ \ + BOOST_STATIC_CONSTEXPR long base = base_; \ + typedef exponent_ exponent; \ + typedef double value_type; \ + static BOOST_CONSTEXPR value_type value() { return(val_); } \ + static std::string name() { return(#name_); } \ + static std::string symbol() { return(#symbol_); } \ +} + +#define BOOST_UNITS_SCALE_DEF(exponent_,value_,name_,symbol_) \ +BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational,value_, name_, symbol_) + +BOOST_UNITS_SCALE_DEF(-24, 1e-24, yocto, y); +BOOST_UNITS_SCALE_DEF(-21, 1e-21, zepto, z); +BOOST_UNITS_SCALE_DEF(-18, 1e-18, atto, a); +BOOST_UNITS_SCALE_DEF(-15, 1e-15, femto, f); +BOOST_UNITS_SCALE_DEF(-12, 1e-12, pico, p); +BOOST_UNITS_SCALE_DEF(-9, 1e-9, nano, n); +BOOST_UNITS_SCALE_DEF(-6, 1e-6, micro, u); +BOOST_UNITS_SCALE_DEF(-3, 1e-3, milli, m); +BOOST_UNITS_SCALE_DEF(-2, 1e-2, centi, c); +BOOST_UNITS_SCALE_DEF(-1, 1e-1, deci, d); + +BOOST_UNITS_SCALE_DEF(1, 1e1, deka, da); +BOOST_UNITS_SCALE_DEF(2, 1e2, hecto, h); +BOOST_UNITS_SCALE_DEF(3, 1e3, kilo, k); +BOOST_UNITS_SCALE_DEF(6, 1e6, mega, M); +BOOST_UNITS_SCALE_DEF(9, 1e9, giga, G); +BOOST_UNITS_SCALE_DEF(12, 1e12, tera, T); +BOOST_UNITS_SCALE_DEF(15, 1e15, peta, P); +BOOST_UNITS_SCALE_DEF(18, 1e18, exa, E); +BOOST_UNITS_SCALE_DEF(21, 1e21, zetta, Z); +BOOST_UNITS_SCALE_DEF(24, 1e24, yotta, Y); + +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<10>, 1024.0, kibi, Ki); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<20>, 1048576.0, mebi, Mi); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<30>, 1073741824.0, gibi, Gi); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<40>, 1099511627776.0, tebi, Ti); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<50>, 1125899906842624.0, pebi, Pi); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<60>, 1152921504606846976.0, exbi, Ei); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<70>, 1180591620717411303424.0, zebi, Zi); +BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<80>, 1208925819614629174706176.0, yobi, Yi); + +#undef BOOST_UNITS_SCALE_DEF +#undef BOOST_UNITS_SCALE_SPECIALIZATION + +#endif + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::scale, (long)(class)) + +#endif + +#endif diff --git a/Slang/boost/units/scaled_base_unit.hpp b/Slang/boost/units/scaled_base_unit.hpp new file mode 100644 index 0000000..24f9f4f --- /dev/null +++ b/Slang/boost/units/scaled_base_unit.hpp @@ -0,0 +1,144 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SCALED_BASE_UNIT_HPP_INCLUDED +#define BOOST_UNITS_SCALED_BASE_UNIT_HPP_INCLUDED + +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +template +struct heterogeneous_system; + +template +struct heterogeneous_system_impl; + +template +struct heterogeneous_system_dim; + +template +struct base_unit_info; + +/// INTERNAL ONLY +struct scaled_base_unit_tag {}; + +template +struct scaled_base_unit +{ + /// INTERNAL ONLY + typedef void boost_units_is_base_unit_type; + typedef scaled_base_unit type; + typedef scaled_base_unit_tag tag; + typedef S system_type; + typedef Scale scale_type; + typedef typename S::dimension_type dimension_type; + +#ifdef BOOST_UNITS_DOXYGEN + + typedef detail::unspecified unit_type; + +#else + + typedef unit< + dimension_type, + heterogeneous_system< + heterogeneous_system_impl< + list< + heterogeneous_system_dim >, + dimensionless_type + >, + dimension_type, + dimensionless_type + > + > + > unit_type; + +#endif + + static std::string symbol() + { + return(Scale::symbol() + base_unit_info::symbol()); + } + static std::string name() + { + return(Scale::name() + base_unit_info::name()); + } +}; + +} // namespace units + +} // namespace boost + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::scaled_base_unit, (class)(class)) + +#endif + +namespace boost { + +#ifndef BOOST_UNITS_DOXYGEN + +namespace mpl { + +/// INTERNAL ONLY +template +struct less_impl +{ + template + struct apply : mpl::bool_< + mpl::less::value || + (boost::is_same::value && ((T0::scale_type::exponent::Numerator) < 0)) > {}; +}; + +/// INTERNAL ONLY +template +struct less_impl +{ + template + struct apply : mpl::bool_< + mpl::less::value || + (boost::is_same::value && ((T1::scale_type::exponent::Numerator) > 0)) > {}; +}; + +/// INTERNAL ONLY +template<> +struct less_impl +{ + template + struct apply : mpl::bool_< + mpl::less::value || + ((boost::is_same::value) && + ((T0::scale_type::base) < (T1::scale_type::base) || + ((T0::scale_type::base) == (T1::scale_type::base) && + mpl::less::value))) > {}; +}; + +} // namespace mpl + +#endif + +} // namespace boost + +#endif diff --git a/Slang/boost/units/static_constant.hpp b/Slang/boost/units/static_constant.hpp new file mode 100644 index 0000000..d3646ad --- /dev/null +++ b/Slang/boost/units/static_constant.hpp @@ -0,0 +1,62 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_STATIC_CONSTANT_HPP +#define BOOST_UNITS_STATIC_CONSTANT_HPP + +#include + +#if defined(BOOST_NO_CXX11_CONSTEXPR) || defined(BOOST_UNITS_DOXYGEN) +/// A convenience macro that allows definition of static +/// constants in headers in an ODR-safe way. +# define BOOST_UNITS_STATIC_CONSTANT(name, type) \ +template \ +struct name##_instance_t \ +{ \ + static const type instance; \ +}; \ + \ +namespace \ +{ \ + static const type& name = name##_instance_t::instance; \ +} \ + \ +template \ +const type name##_instance_t::instance +#else +# define BOOST_UNITS_STATIC_CONSTANT(name, type) \ +BOOST_STATIC_CONSTEXPR type name +#endif + +/// A convenience macro for static constants with auto +/// type deduction. +#if BOOST_UNITS_HAS_TYPEOF + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ +BOOST_TYPEOF_NESTED_TYPEDEF(name##_nested_t, value) \ +BOOST_UNITS_STATIC_CONSTANT(name, name##_nested_t::type) = (value) + +#elif BOOST_UNITS_HAS_MWERKS_TYPEOF + +#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ +BOOST_UNITS_STATIC_CONSTANT(name, __typeof__(value)) = (value) + +#elif BOOST_UNITS_HAS_GNU_TYPEOF + +#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value) \ +BOOST_UNITS_STATIC_CONSTANT(name, typeof(value)) = (value) + +#endif // BOOST_UNITS_HAS_BOOST_TYPEOF + +#endif // BOOST_UNITS_HAS_TYPEOF + +#endif // BOOST_UNITS_STATIC_CONSTANT_HPP diff --git a/Slang/boost/units/static_rational.hpp b/Slang/boost/units/static_rational.hpp new file mode 100644 index 0000000..63c3181 --- /dev/null +++ b/Slang/boost/units/static_rational.hpp @@ -0,0 +1,349 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_STATIC_RATIONAL_HPP +#define BOOST_UNITS_STATIC_RATIONAL_HPP + +#include +#include +#include + +#ifdef BOOST_BORLANDC +#include +#include +#include +#endif + +#include +#include + +/// \file +/// \brief Compile-time rational numbers and operators. + +namespace boost { + +namespace units { + +namespace detail { + +struct static_rational_tag {}; + +} + +typedef long integer_type; + +/// Compile time absolute value. +template +struct static_abs +{ + BOOST_STATIC_CONSTANT(integer_type,value = Value < 0 ? -Value : Value); +}; + +// Compile time rational number. +/** +This is an implementation of a compile time rational number, where @c static_rational represents +a rational number with numerator @c N and denominator @c D. Because of the potential for ambiguity arising +from multiple equivalent values of @c static_rational (e.g. @c static_rational<6,2>==static_rational<3>), +static rationals should always be accessed through @c static_rational::type. Template specialization +prevents instantiation of zero denominators (i.e. @c static_rational). The following compile-time +arithmetic operators are provided for static_rational variables only (no operators are defined between +long and static_rational): + - @c mpl::negate + - @c mpl::plus + - @c mpl::minus + - @c mpl::times + - @c mpl::divides + +Neither @c static_power nor @c static_root are defined for @c static_rational. This is because template types +may not be floating point values, while powers and roots of rational numbers can produce floating point +values. +*/ +#ifdef BOOST_BORLANDC + +template +struct make_integral_c { + typedef boost::mpl::integral_c type; +}; + +template +class static_rational +{ + public: + + typedef static_rational this_type; + + typedef boost::mpl::integral_c N_type; + typedef boost::mpl::integral_c D_type; + + typedef typename make_integral_c< + (::boost::integer::static_gcd< + ::boost::units::static_abs::value, + ::boost::units::static_abs::value + >::value)>::type gcd_type; + typedef typename boost::mpl::eval_if< + boost::mpl::less< + D_type, + boost::mpl::integral_c + >, + boost::mpl::negate, + gcd_type + >::type den_type; + + public: + // for mpl arithmetic support + typedef detail::static_rational_tag tag; + + BOOST_STATIC_CONSTANT(integer_type, Numerator = + (::boost::mpl::divides::value)); + BOOST_STATIC_CONSTANT(integer_type, Denominator = + (::boost::mpl::divides::value)); + + /// INTERNAL ONLY + typedef static_rational this_type; + + /// static_rational reduced by GCD + typedef static_rational< + (::boost::mpl::divides::value), + (::boost::mpl::divides::value) + > type; + + static BOOST_CONSTEXPR integer_type numerator() { return Numerator; } + static BOOST_CONSTEXPR integer_type denominator() { return Denominator; } + + // INTERNAL ONLY + BOOST_CONSTEXPR static_rational() { } + //~static_rational() { } +}; +#else +template +class static_rational +{ + private: + + BOOST_STATIC_CONSTEXPR integer_type nabs = static_abs::value, + dabs = static_abs::value; + + /// greatest common divisor of N and D + // need cast to signed because static_gcd returns unsigned long + BOOST_STATIC_CONSTEXPR integer_type den = + static_cast(boost::integer::static_gcd::value) * ((D < 0) ? -1 : 1); + + public: + // for mpl arithmetic support + typedef detail::static_rational_tag tag; + + BOOST_STATIC_CONSTEXPR integer_type Numerator = N/den, + Denominator = D/den; + + /// INTERNAL ONLY + typedef static_rational this_type; + + /// static_rational reduced by GCD + typedef static_rational type; + + static BOOST_CONSTEXPR integer_type numerator() { return Numerator; } + static BOOST_CONSTEXPR integer_type denominator() { return Denominator; } + + // INTERNAL ONLY + BOOST_CONSTEXPR static_rational() { } + //~static_rational() { } +}; +#endif + +} + +} + +#if BOOST_UNITS_HAS_BOOST_TYPEOF + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::static_rational, (long)(long)) + +#endif + +namespace boost { + +namespace units { + +// prohibit zero denominator +template class static_rational; + +/// get decimal value of @c static_rational +template +inline BOOST_CONSTEXPR typename divide_typeof_helper::type +value(const static_rational&) +{ + return T(N)/T(D); +} + +} // namespace units + +#ifndef BOOST_UNITS_DOXYGEN + +namespace mpl { + +#ifdef BOOST_BORLANDC + +template<> +struct plus_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + ::boost::mpl::plus< + boost::mpl::times, + boost::mpl::times + >::value, + ::boost::mpl::times::value + >::type type; + }; +}; + +template<> +struct minus_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + ::boost::mpl::minus< + boost::mpl::times, + boost::mpl::times + >::value, + ::boost::mpl::times::value + >::type type; + }; +}; + +template<> +struct times_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + ::boost::mpl::times::value, + ::boost::mpl::times::value + >::type type; + }; +}; + +template<> +struct divides_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + ::boost::mpl::times::value, + ::boost::mpl::times::value + >::type type; + }; +}; + +template<> +struct negate_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + ::boost::mpl::negate::value, + ::boost::mpl::identity::type::Denominator + >::type type; + }; +}; + +template<> +struct less_impl +{ + template + struct apply + { + typedef mpl::bool_<((mpl::minus::type::Numerator) < 0)> type; + }; +}; + +#else + +template<> +struct plus_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + T0::Numerator*T1::Denominator+T1::Numerator*T0::Denominator, + T0::Denominator*T1::Denominator + >::type type; + }; +}; + +template<> +struct minus_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + T0::Numerator*T1::Denominator-T1::Numerator*T0::Denominator, + T0::Denominator*T1::Denominator + >::type type; + }; +}; + +template<> +struct times_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + T0::Numerator*T1::Numerator, + T0::Denominator*T1::Denominator + >::type type; + }; +}; + +template<> +struct divides_impl +{ + template + struct apply { + typedef typename boost::units::static_rational< + T0::Numerator*T1::Denominator, + T0::Denominator*T1::Numerator + >::type type; + }; +}; + +template<> +struct negate_impl +{ + template + struct apply { + typedef typename boost::units::static_rational<-T0::Numerator,T0::Denominator>::type type; + }; +}; + +template<> +struct less_impl +{ + template + struct apply + { + typedef mpl::bool_<((mpl::minus::type::Numerator) < 0)> type; + }; +}; + +#endif + + +} + +#endif + +} // namespace boost + +#endif // BOOST_UNITS_STATIC_RATIONAL_HPP diff --git a/Slang/boost/units/systems/abstract.hpp b/Slang/boost/units/systems/abstract.hpp new file mode 100644 index 0000000..9b449d6 --- /dev/null +++ b/Slang/boost/units/systems/abstract.hpp @@ -0,0 +1,139 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ABSTRACT_HPP +#define BOOST_UNITS_ABSTRACT_HPP + +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace abstract { + +struct length_unit_tag : base_unit { }; +struct mass_unit_tag : base_unit { }; +struct time_unit_tag : base_unit { }; +struct current_unit_tag : base_unit { }; +struct temperature_unit_tag : base_unit { }; +struct amount_unit_tag : base_unit { }; +struct luminous_intensity_unit_tag : base_unit { }; +struct plane_angle_unit_tag : base_unit { }; +struct solid_angle_unit_tag : base_unit { }; + +typedef make_system< + length_unit_tag, + mass_unit_tag, + time_unit_tag, + current_unit_tag, + temperature_unit_tag, + amount_unit_tag, + luminous_intensity_unit_tag, + plane_angle_unit_tag, + solid_angle_unit_tag +>::type system; + +typedef unit length; ///< abstract unit of length +typedef unit mass; ///< abstract unit of mass +typedef unit time; ///< abstract unit of time +typedef unit current; ///< abstract unit of current +typedef unit temperature; ///< abstract unit of temperature +typedef unit amount; ///< abstract unit of amount +typedef unit luminous_intensity; ///< abstract unit of luminous intensity +typedef unit plane_angle; ///< abstract unit of plane angle +typedef unit solid_angle; ///< abstract unit of solid angle + +} // namespace abstract + +template<> +struct base_unit_info +{ + static std::string name() { return "[Length]"; } + static std::string symbol() { return "[L]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Mass]"; } + static std::string symbol() { return "[M]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Time]"; } + static std::string symbol() { return "[T]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Electric Current]"; } + static std::string symbol() { return "[I]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Temperature]"; } + static std::string symbol() { return "[Theta]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Amount]"; } + static std::string symbol() { return "[N]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Luminous Intensity]"; } + static std::string symbol() { return "[J]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Plane Angle]"; } + static std::string symbol() { return "[QP]"; } +}; + +template<> +struct base_unit_info +{ + static std::string name() { return "[Solid Angle]"; } + static std::string symbol() { return "[QS]"; } +}; + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ABSTRACT_HPP diff --git a/Slang/boost/units/systems/angle/degrees.hpp b/Slang/boost/units/systems/angle/degrees.hpp new file mode 100644 index 0000000..df0c5e9 --- /dev/null +++ b/Slang/boost/units/systems/angle/degrees.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_DEGREE_HPP +#define BOOST_UNITS_ANGLE_DEGREE_HPP + +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace degree { + +typedef make_system::type system; + +typedef unit dimensionless; +typedef unit plane_angle; ///< angle degree unit constant + +BOOST_UNITS_STATIC_CONSTANT(degree,plane_angle); +BOOST_UNITS_STATIC_CONSTANT(degrees,plane_angle); + +} // namespace degree + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGLE_DEGREE_HPP diff --git a/Slang/boost/units/systems/angle/gradians.hpp b/Slang/boost/units/systems/angle/gradians.hpp new file mode 100644 index 0000000..f44709e --- /dev/null +++ b/Slang/boost/units/systems/angle/gradians.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_GRADIANS_HPP +#define BOOST_UNITS_ANGLE_GRADIANS_HPP + +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace gradian { + +typedef make_system::type system; + +typedef unit dimensionless; +typedef unit plane_angle; ///< angle gradian unit constant + +BOOST_UNITS_STATIC_CONSTANT(gradian,plane_angle); +BOOST_UNITS_STATIC_CONSTANT(gradians,plane_angle); + +} // namespace gradian + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGLE_GRADIANS_HPP diff --git a/Slang/boost/units/systems/angle/revolutions.hpp b/Slang/boost/units/systems/angle/revolutions.hpp new file mode 100644 index 0000000..0006e51 --- /dev/null +++ b/Slang/boost/units/systems/angle/revolutions.hpp @@ -0,0 +1,42 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_ANGLE_REVOLUTIONS_HPP +#define BOOST_UNITS_ANGLE_REVOLUTIONS_HPP + +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace revolution { + +typedef make_system::type system; + +typedef unit dimensionless; +typedef unit plane_angle; ///< angle revolution unit constant + +BOOST_UNITS_STATIC_CONSTANT(revolution,plane_angle); +BOOST_UNITS_STATIC_CONSTANT(revolutions,plane_angle); + +} // namespace revolution + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_ANGLE_REVOLUTIONS_HPP diff --git a/Slang/boost/units/systems/cgs.hpp b/Slang/boost/units/systems/cgs.hpp new file mode 100644 index 0000000..0d61bfc --- /dev/null +++ b/Slang/boost/units/systems/cgs.hpp @@ -0,0 +1,44 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_HPP +#define BOOST_UNITS_CGS_HPP + +/// \file +/// Includes all the cgs unit headers + +#include + +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UNITS_CGS_HPP diff --git a/Slang/boost/units/systems/cgs/acceleration.hpp b/Slang/boost/units/systems/cgs/acceleration.hpp new file mode 100644 index 0000000..f84c715 --- /dev/null +++ b/Slang/boost/units/systems/cgs/acceleration.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_ACCELERATION_HPP +#define BOOST_UNITS_CGS_ACCELERATION_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit acceleration; + +BOOST_UNITS_STATIC_CONSTANT(gal,acceleration); +BOOST_UNITS_STATIC_CONSTANT(gals,acceleration); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_ACCELERATION_HPP diff --git a/Slang/boost/units/systems/cgs/area.hpp b/Slang/boost/units/systems/cgs/area.hpp new file mode 100644 index 0000000..1069251 --- /dev/null +++ b/Slang/boost/units/systems/cgs/area.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_AREA_HPP +#define BOOST_UNITS_CGS_AREA_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit area; + +BOOST_UNITS_STATIC_CONSTANT(square_centimeter,area); +BOOST_UNITS_STATIC_CONSTANT(square_centimeters,area); +BOOST_UNITS_STATIC_CONSTANT(square_centimetre,area); +BOOST_UNITS_STATIC_CONSTANT(square_centimetres,area); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_AREA_HPP diff --git a/Slang/boost/units/systems/cgs/base.hpp b/Slang/boost/units/systems/cgs/base.hpp new file mode 100644 index 0000000..bc53606 --- /dev/null +++ b/Slang/boost/units/systems/cgs/base.hpp @@ -0,0 +1,46 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_BASE_HPP +#define BOOST_UNITS_CGS_BASE_HPP + +#include + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +/// placeholder class defining cgs unit system +typedef make_system::type system; + +/// various unit typedefs for convenience +typedef unit dimensionless; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_BASE_HPP diff --git a/Slang/boost/units/systems/cgs/current.hpp b/Slang/boost/units/systems/cgs/current.hpp new file mode 100644 index 0000000..f80821e --- /dev/null +++ b/Slang/boost/units/systems/cgs/current.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_CURRENT_HPP +#define BOOST_UNITS_CGS_CURRENT_HPP + +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit current; + +BOOST_UNITS_STATIC_CONSTANT(biot,current); +BOOST_UNITS_STATIC_CONSTANT(biots,current); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_CURRENT_HPP diff --git a/Slang/boost/units/systems/cgs/dimensionless.hpp b/Slang/boost/units/systems/cgs/dimensionless.hpp new file mode 100644 index 0000000..7f2b3c2 --- /dev/null +++ b/Slang/boost/units/systems/cgs/dimensionless.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_DIMENSIONLESS_HPP +#define BOOST_UNITS_CGS_DIMENSIONLESS_HPP + +#include + +namespace boost { + +namespace units { + +namespace cgs { + +BOOST_UNITS_STATIC_CONSTANT(cgs_dimensionless,dimensionless); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_DIMENSIONLESS_HPP diff --git a/Slang/boost/units/systems/cgs/dynamic_viscosity.hpp b/Slang/boost/units/systems/cgs/dynamic_viscosity.hpp new file mode 100644 index 0000000..af1a170 --- /dev/null +++ b/Slang/boost/units/systems/cgs/dynamic_viscosity.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP +#define BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit dynamic_viscosity; + +BOOST_UNITS_STATIC_CONSTANT(poise,dynamic_viscosity); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP diff --git a/Slang/boost/units/systems/cgs/energy.hpp b/Slang/boost/units/systems/cgs/energy.hpp new file mode 100644 index 0000000..f710996 --- /dev/null +++ b/Slang/boost/units/systems/cgs/energy.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_ENERGY_HPP +#define BOOST_UNITS_CGS_ENERGY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit energy; + +BOOST_UNITS_STATIC_CONSTANT(erg,energy); +BOOST_UNITS_STATIC_CONSTANT(ergs,energy); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_ENERGY_HPP diff --git a/Slang/boost/units/systems/cgs/force.hpp b/Slang/boost/units/systems/cgs/force.hpp new file mode 100644 index 0000000..3328b5d --- /dev/null +++ b/Slang/boost/units/systems/cgs/force.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_FORCE_HPP +#define BOOST_UNITS_CGS_FORCE_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit force; + +BOOST_UNITS_STATIC_CONSTANT(dyne,force); +BOOST_UNITS_STATIC_CONSTANT(dynes,force); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_FORCE_HPP diff --git a/Slang/boost/units/systems/cgs/frequency.hpp b/Slang/boost/units/systems/cgs/frequency.hpp new file mode 100644 index 0000000..ef90aea --- /dev/null +++ b/Slang/boost/units/systems/cgs/frequency.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_FREQUENCY_HPP +#define BOOST_UNITS_CGS_FREQUENCY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit frequency; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_FREQUENCY_HPP diff --git a/Slang/boost/units/systems/cgs/io.hpp b/Slang/boost/units/systems/cgs/io.hpp new file mode 100644 index 0000000..6f57b1e --- /dev/null +++ b/Slang/boost/units/systems/cgs/io.hpp @@ -0,0 +1,50 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_IO_HPP +#define BOOST_UNITS_CGS_IO_HPP + +#include +#include +#include + +namespace boost { + +namespace units { + +inline std::string name_string(const reduce_unit::type&) { return "galileo"; } +inline std::string symbol_string(const reduce_unit::type&) { return "Gal"; } + +inline std::string name_string(const reduce_unit::type&) { return "biot"; } +inline std::string symbol_string(const reduce_unit::type&) { return "Bi"; } + +inline std::string name_string(const reduce_unit::type&) { return "poise"; } +inline std::string symbol_string(const reduce_unit::type&) { return "P"; } + +inline std::string name_string(const reduce_unit::type&) { return "erg"; } +inline std::string symbol_string(const reduce_unit::type&) { return "erg"; } + +inline std::string name_string(const reduce_unit::type&) { return "dyne"; } +inline std::string symbol_string(const reduce_unit::type&) { return "dyn"; } + +inline std::string name_string(const reduce_unit::type&) { return "stoke"; } +inline std::string symbol_string(const reduce_unit::type&) { return "St"; } + +inline std::string name_string(const reduce_unit::type&) { return "barye"; } +inline std::string symbol_string(const reduce_unit::type&) { return "Ba"; } + +inline std::string name_string(const reduce_unit::type&) { return "kayser"; } +inline std::string symbol_string(const reduce_unit::type&) { return "K"; } + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_IO_HPP diff --git a/Slang/boost/units/systems/cgs/kinematic_viscosity.hpp b/Slang/boost/units/systems/cgs/kinematic_viscosity.hpp new file mode 100644 index 0000000..185582b --- /dev/null +++ b/Slang/boost/units/systems/cgs/kinematic_viscosity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP +#define BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit kinematic_viscosity; + +BOOST_UNITS_STATIC_CONSTANT(stoke,kinematic_viscosity); +BOOST_UNITS_STATIC_CONSTANT(stokes,kinematic_viscosity); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP diff --git a/Slang/boost/units/systems/cgs/length.hpp b/Slang/boost/units/systems/cgs/length.hpp new file mode 100644 index 0000000..6d04cfe --- /dev/null +++ b/Slang/boost/units/systems/cgs/length.hpp @@ -0,0 +1,35 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_LENGTH_HPP +#define BOOST_UNITS_CGS_LENGTH_HPP + +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit length; + +BOOST_UNITS_STATIC_CONSTANT(centimeter,length); +BOOST_UNITS_STATIC_CONSTANT(centimeters,length); +BOOST_UNITS_STATIC_CONSTANT(centimetre,length); +BOOST_UNITS_STATIC_CONSTANT(centimetres,length); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_LENGTH_HPP diff --git a/Slang/boost/units/systems/cgs/mass.hpp b/Slang/boost/units/systems/cgs/mass.hpp new file mode 100644 index 0000000..70bf7c4 --- /dev/null +++ b/Slang/boost/units/systems/cgs/mass.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_MASS_HPP +#define BOOST_UNITS_CGS_MASS_HPP + +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit mass; + +BOOST_UNITS_STATIC_CONSTANT(gram,mass); +BOOST_UNITS_STATIC_CONSTANT(grams,mass); +BOOST_UNITS_STATIC_CONSTANT(gramme,mass); +BOOST_UNITS_STATIC_CONSTANT(grammes,mass); + + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_MASS_HPP diff --git a/Slang/boost/units/systems/cgs/mass_density.hpp b/Slang/boost/units/systems/cgs/mass_density.hpp new file mode 100644 index 0000000..5b2ce9e --- /dev/null +++ b/Slang/boost/units/systems/cgs/mass_density.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_MASS_DENSITY_HPP +#define BOOST_UNITS_CGS_MASS_DENSITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit mass_density; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_MASS_DENSITY_HPP diff --git a/Slang/boost/units/systems/cgs/momentum.hpp b/Slang/boost/units/systems/cgs/momentum.hpp new file mode 100644 index 0000000..6325a95 --- /dev/null +++ b/Slang/boost/units/systems/cgs/momentum.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_MOMENTUM_HPP +#define BOOST_UNITS_CGS_MOMENTUM_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit momentum; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_MOMENTUM_HPP diff --git a/Slang/boost/units/systems/cgs/power.hpp b/Slang/boost/units/systems/cgs/power.hpp new file mode 100644 index 0000000..3ecb353 --- /dev/null +++ b/Slang/boost/units/systems/cgs/power.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_POWER_HPP +#define BOOST_UNITS_CGS_POWER_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit power; + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_POWER_HPP diff --git a/Slang/boost/units/systems/cgs/pressure.hpp b/Slang/boost/units/systems/cgs/pressure.hpp new file mode 100644 index 0000000..faef178 --- /dev/null +++ b/Slang/boost/units/systems/cgs/pressure.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_PRESSURE_HPP +#define BOOST_UNITS_CGS_PRESSURE_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit pressure; + +BOOST_UNITS_STATIC_CONSTANT(barye,pressure); +BOOST_UNITS_STATIC_CONSTANT(baryes,pressure); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_PRESSURE_HPP diff --git a/Slang/boost/units/systems/cgs/time.hpp b/Slang/boost/units/systems/cgs/time.hpp new file mode 100644 index 0000000..2ac3b04 --- /dev/null +++ b/Slang/boost/units/systems/cgs/time.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_TIME_HPP +#define BOOST_UNITS_CGS_TIME_HPP + +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit time; + +BOOST_UNITS_STATIC_CONSTANT(second,time); +BOOST_UNITS_STATIC_CONSTANT(seconds,time); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_TIME_HPP diff --git a/Slang/boost/units/systems/cgs/velocity.hpp b/Slang/boost/units/systems/cgs/velocity.hpp new file mode 100644 index 0000000..152240a --- /dev/null +++ b/Slang/boost/units/systems/cgs/velocity.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_VELOCITY_HPP +#define BOOST_UNITS_CGS_VELOCITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit velocity; + +BOOST_UNITS_STATIC_CONSTANT(centimeter_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(centimeters_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(centimetre_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(centimetres_per_second,velocity); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_VELOCITY_HPP diff --git a/Slang/boost/units/systems/cgs/volume.hpp b/Slang/boost/units/systems/cgs/volume.hpp new file mode 100644 index 0000000..5e40cba --- /dev/null +++ b/Slang/boost/units/systems/cgs/volume.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_VOLUME_HPP +#define BOOST_UNITS_CGS_VOLUME_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit volume; + +BOOST_UNITS_STATIC_CONSTANT(cubic_centimeter,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_centimeters,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_centimetre,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_centimetres,volume); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_VOLUME_HPP diff --git a/Slang/boost/units/systems/cgs/wavenumber.hpp b/Slang/boost/units/systems/cgs/wavenumber.hpp new file mode 100644 index 0000000..69c99ca --- /dev/null +++ b/Slang/boost/units/systems/cgs/wavenumber.hpp @@ -0,0 +1,38 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CGS_WAVENUMBER_HPP +#define BOOST_UNITS_CGS_WAVENUMBER_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace cgs { + +typedef unit wavenumber; + +BOOST_UNITS_STATIC_CONSTANT(kayser,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(kaysers,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimeter,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimeters,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetre,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetres,wavenumber); + +} // namespace cgs + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CGS_WAVENUMBER_HPP diff --git a/Slang/boost/units/systems/detail/constants.hpp b/Slang/boost/units/systems/detail/constants.hpp new file mode 100644 index 0000000..692efa4 --- /dev/null +++ b/Slang/boost/units/systems/detail/constants.hpp @@ -0,0 +1,278 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CONSTANTS_HPP +#define BOOST_UNITS_CONSTANTS_HPP + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +template +struct constant +{ + typedef typename Base::value_type value_type; + BOOST_CONSTEXPR operator value_type() const { return Base().value(); } + BOOST_CONSTEXPR value_type value() const { return Base().value(); } + BOOST_CONSTEXPR value_type uncertainty() const { return Base().uncertainty(); } + BOOST_CONSTEXPR value_type lower_bound() const { return Base().lower_bound(); } + BOOST_CONSTEXPR value_type upper_bound() const { return Base().upper_bound(); } +}; + +template +struct physical_constant +{ + typedef typename Base::value_type value_type; + BOOST_CONSTEXPR operator value_type() const { return Base().value(); } + BOOST_CONSTEXPR value_type value() const { return Base().value(); } + BOOST_CONSTEXPR value_type uncertainty() const { return Base().uncertainty(); } + BOOST_CONSTEXPR value_type lower_bound() const { return Base().lower_bound(); } + BOOST_CONSTEXPR value_type upper_bound() const { return Base().upper_bound(); } +}; + +#define BOOST_UNITS_DEFINE_HELPER(name, symbol, template_name) \ + \ +template \ +struct name ## _typeof_helper, template_name >\ +{ \ + typedef typename name ## _typeof_helper >::type type;\ +}; \ + \ +template \ +struct name ## _typeof_helper, constant >\ +{ \ + typedef typename name ## _typeof_helper, typename T::value_type>::type type;\ +}; \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper >::type \ +operator symbol(const constant& t, const template_name& u)\ +{ \ + return(t.value() symbol u); \ +} \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper, typename T::value_type>::type \ +operator symbol(const template_name& u, const constant& t)\ +{ \ + return(u symbol t.value()); \ +} + +BOOST_UNITS_DEFINE_HELPER(add, +, unit) +BOOST_UNITS_DEFINE_HELPER(add, +, quantity) +BOOST_UNITS_DEFINE_HELPER(subtract, -, unit) +BOOST_UNITS_DEFINE_HELPER(subtract, -, quantity) +BOOST_UNITS_DEFINE_HELPER(multiply, *, unit) +BOOST_UNITS_DEFINE_HELPER(multiply, *, quantity) +BOOST_UNITS_DEFINE_HELPER(divide, /, unit) +BOOST_UNITS_DEFINE_HELPER(divide, /, quantity) + +#undef BOOST_UNITS_DEFINE_HELPER + +#define BOOST_UNITS_DEFINE_HELPER(name, symbol) \ + \ +template \ +struct name ## _typeof_helper, constant > \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const constant& t, const constant& u) \ +{ \ + return(t.value() symbol u.value()); \ +} \ + \ +template \ +struct name ## _typeof_helper, T2> \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +struct name ## _typeof_helper > \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const constant& t, const T2& u) \ +{ \ + return(t.value() symbol u); \ +} \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const T1& t, const constant& u) \ +{ \ + return(t symbol u.value()); \ +} + +BOOST_UNITS_DEFINE_HELPER(add, +) +BOOST_UNITS_DEFINE_HELPER(subtract, -) +BOOST_UNITS_DEFINE_HELPER(multiply, *) +BOOST_UNITS_DEFINE_HELPER(divide, /) + +#undef BOOST_UNITS_DEFINE_HELPER + +#define BOOST_UNITS_DEFINE_HELPER(name, symbol) \ + \ +template \ +struct name ## _typeof_helper, one> \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +struct name ## _typeof_helper > \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const constant& t, const one& u) \ +{ \ + return(t.value() symbol u); \ +} \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const one& t, const constant& u) \ +{ \ + return(t symbol u.value()); \ +} + +BOOST_UNITS_DEFINE_HELPER(multiply, *) +BOOST_UNITS_DEFINE_HELPER(divide, /) + +#undef BOOST_UNITS_DEFINE_HELPER + +template +struct power_typeof_helper, static_rational > +{ + typedef power_typeof_helper > base; + typedef typename base::type type; + static BOOST_CONSTEXPR type value(const constant& arg) + { + return base::value(arg.value()); + } +}; + +#define BOOST_UNITS_DEFINE_HELPER(name, symbol) \ + \ +template \ +struct name ## _typeof_helper > \ +{ \ + typedef typename name ## _typeof_helper::type type;\ +}; \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const constant& t, const one& u) \ +{ \ + return(t.value() symbol u); \ +} \ + \ +template \ +BOOST_CONSTEXPR \ +typename name ## _typeof_helper::type \ +operator symbol(const one& t, const constant& u) \ +{ \ + return(t symbol u.value()); \ +} + +#define BOOST_UNITS_PHYSICAL_CONSTANT(name, type, value_, uncertainty_) \ +struct name ## _t { \ + typedef type value_type; \ + BOOST_CONSTEXPR operator value_type() const { return value_; } \ + BOOST_CONSTEXPR value_type value() const { return value_; } \ + BOOST_CONSTEXPR value_type uncertainty() const { return uncertainty_; } \ + BOOST_CONSTEXPR value_type lower_bound() const { return value_-uncertainty_; } \ + BOOST_CONSTEXPR value_type upper_bound() const { return value_+uncertainty_; } \ +}; \ +BOOST_UNITS_STATIC_CONSTANT(name, boost::units::constant >) = { } + +// stream output +template +inline +std::basic_ostream& operator<<(std::basic_ostream& os,const physical_constant& val) +{ + boost::io::ios_precision_saver precision_saver(os); + //boost::io::ios_width_saver width_saver(os); + boost::io::ios_flags_saver flags_saver(os); + + //os << std::setw(21); + typedef typename Y::value_type value_type; + + if (val.uncertainty() > value_type()) + { + const double relative_uncertainty = std::abs(val.uncertainty()/val.value()); + + const double exponent = std::log10(relative_uncertainty); + const long digits_of_precision = static_cast(std::ceil(std::abs(exponent)))+3; + + // should try to replicate NIST CODATA syntax + os << std::setprecision(digits_of_precision) + //<< std::setw(digits_of_precision+8) + //<< std::scientific + << val.value(); +// << long(10*(relative_uncertainty/std::pow(Y(10),Y(exponent)))); + + os << " (rel. unc. = " + << std::setprecision(1) + //<< std::setw(7) + << std::scientific + << relative_uncertainty << ")"; + } + else + { + os << val.value() << " (exact)"; + } + + return os; +} + +// stream output +template +inline +std::basic_ostream& operator<<(std::basic_ostream& os,const constant&) +{ + os << Y(); + return os; +} + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/information.hpp b/Slang/boost/units/systems/information.hpp new file mode 100644 index 0000000..a3ceb65 --- /dev/null +++ b/Slang/boost/units/systems/information.hpp @@ -0,0 +1,20 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_INFORMATION_HPP +#define BOOST_UNITS_INFORMATION_HPP + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/Slang/boost/units/systems/information/bit.hpp b/Slang/boost/units/systems/information/bit.hpp new file mode 100644 index 0000000..bd8f34b --- /dev/null +++ b/Slang/boost/units/systems/information/bit.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_BIT_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_BIT_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace units { +namespace information { + +namespace hu { +namespace bit { +typedef unit::type> info; +} // namespace bit +} // namespace hu + +BOOST_UNITS_STATIC_CONSTANT(bit, hu::bit::info); +BOOST_UNITS_STATIC_CONSTANT(bits, hu::bit::info); + +} // namespace information +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_BIT_HPP_INCLUDED diff --git a/Slang/boost/units/systems/information/byte.hpp b/Slang/boost/units/systems/information/byte.hpp new file mode 100644 index 0000000..8ea743c --- /dev/null +++ b/Slang/boost/units/systems/information/byte.hpp @@ -0,0 +1,45 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED + +#include +#include +#include + +#include + +namespace boost { +namespace units { +namespace information { + +typedef make_system::type system; + +typedef unit dimensionless; + +namespace hu { +namespace byte { +typedef unit info; +} // namespace bit +} // namespace hu + +BOOST_UNITS_STATIC_CONSTANT(byte, hu::byte::info); +BOOST_UNITS_STATIC_CONSTANT(bytes, hu::byte::info); + +// I'm going to define boost::units::information::info (the "default") +// to be hu::byte::info -- other variants such as hu::bit::info, hu::nat::info, etc +// must be explicitly referred to +typedef hu::byte::info info; + +} // namespace information +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_BYTE_HPP_INCLUDED diff --git a/Slang/boost/units/systems/information/hartley.hpp b/Slang/boost/units/systems/information/hartley.hpp new file mode 100644 index 0000000..d0b25b7 --- /dev/null +++ b/Slang/boost/units/systems/information/hartley.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_HARTLEY_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_HARTLEY_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace units { +namespace information { + +namespace hu { +namespace hartley { +typedef unit::type> info; +} // namespace bit +} // namespace hu + +BOOST_UNITS_STATIC_CONSTANT(hartley, hu::hartley::info); +BOOST_UNITS_STATIC_CONSTANT(hartleys, hu::hartley::info); + +} // namespace information +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_HARTLEY_HPP_INCLUDED diff --git a/Slang/boost/units/systems/information/nat.hpp b/Slang/boost/units/systems/information/nat.hpp new file mode 100644 index 0000000..eb24178 --- /dev/null +++ b/Slang/boost/units/systems/information/nat.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_NAT_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_NAT_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace units { +namespace information { + +namespace hu { +namespace nat { +typedef unit::type> info; +} // namespace bit +} // namespace hu + +BOOST_UNITS_STATIC_CONSTANT(nat, hu::nat::info); +BOOST_UNITS_STATIC_CONSTANT(nats, hu::nat::info); + +} // namespace information +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_NAT_HPP_INCLUDED diff --git a/Slang/boost/units/systems/information/prefixes.hpp b/Slang/boost/units/systems/information/prefixes.hpp new file mode 100644 index 0000000..1c092f9 --- /dev/null +++ b/Slang/boost/units/systems/information/prefixes.hpp @@ -0,0 +1,45 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED + +#include +#include +#include + +#include + +#define BOOST_UNITS_INFOSYS_PREFIX(exponent, name) \ + typedef make_scaled_unit > >::type name ## _pf_type; \ + BOOST_UNITS_STATIC_CONSTANT(name, name ## _pf_type) + +namespace boost { +namespace units { +namespace information { + +// Note, these are defined (somewhat arbitrarily) against the 'byte' system. +// They work smoothly with bit_information, nat_information, etc, so it is +// transparent to the user. +BOOST_UNITS_INFOSYS_PREFIX(10, kibi); +BOOST_UNITS_INFOSYS_PREFIX(20, mebi); +BOOST_UNITS_INFOSYS_PREFIX(30, gibi); +BOOST_UNITS_INFOSYS_PREFIX(40, tebi); +BOOST_UNITS_INFOSYS_PREFIX(50, pebi); +BOOST_UNITS_INFOSYS_PREFIX(60, exbi); +BOOST_UNITS_INFOSYS_PREFIX(70, zebi); +BOOST_UNITS_INFOSYS_PREFIX(80, yobi); + +} // namespace information +} // namespace units +} // namespace boost + +#undef BOOST_UNITS_INFOSYS_PREFIX + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED diff --git a/Slang/boost/units/systems/information/shannon.hpp b/Slang/boost/units/systems/information/shannon.hpp new file mode 100644 index 0000000..e3069c9 --- /dev/null +++ b/Slang/boost/units/systems/information/shannon.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2014 Erik Erlandson +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SYSTEMS_INFORMATION_SHANNON_HPP_INCLUDED +#define BOOST_UNITS_SYSTEMS_INFORMATION_SHANNON_HPP_INCLUDED + +#include +#include + +namespace boost { +namespace units { +namespace information { + +namespace hu { +namespace shannon { +typedef unit::type> info; +} // namespace bit +} // namespace hu + +BOOST_UNITS_STATIC_CONSTANT(shannon, hu::shannon::info); +BOOST_UNITS_STATIC_CONSTANT(shannons, hu::shannon::info); + +} // namespace information +} // namespace units +} // namespace boost + +#endif // BOOST_UNITS_SYSTEMS_INFORMATION_SHANNON_HPP_INCLUDED diff --git a/Slang/boost/units/systems/si.hpp b/Slang/boost/units/systems/si.hpp new file mode 100644 index 0000000..727982b --- /dev/null +++ b/Slang/boost/units/systems/si.hpp @@ -0,0 +1,77 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_HPP +#define BOOST_UNITS_SI_HPP + +/// \file +/// Includes all the si unit headers + +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UNITS_SI_HPP diff --git a/Slang/boost/units/systems/si/absorbed_dose.hpp b/Slang/boost/units/systems/si/absorbed_dose.hpp new file mode 100644 index 0000000..f59ec51 --- /dev/null +++ b/Slang/boost/units/systems/si/absorbed_dose.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ABSORBED_DOSE_HPP +#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit absorbed_dose; + +BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose); +BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ABSORBED_DOSE_HPP diff --git a/Slang/boost/units/systems/si/acceleration.hpp b/Slang/boost/units/systems/si/acceleration.hpp new file mode 100644 index 0000000..54ac29f --- /dev/null +++ b/Slang/boost/units/systems/si/acceleration.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACCELERATION_HPP +#define BOOST_UNITS_SI_ACCELERATION_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit acceleration; + +BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACCELERATION_HPP diff --git a/Slang/boost/units/systems/si/action.hpp b/Slang/boost/units/systems/si/action.hpp new file mode 100644 index 0000000..43b6629 --- /dev/null +++ b/Slang/boost/units/systems/si/action.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACTION_HPP +#define BOOST_UNITS_SI_ACTION_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit action; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACTION_HPP diff --git a/Slang/boost/units/systems/si/activity.hpp b/Slang/boost/units/systems/si/activity.hpp new file mode 100644 index 0000000..d31f002 --- /dev/null +++ b/Slang/boost/units/systems/si/activity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACTIVITY_HPP +#define BOOST_UNITS_SI_ACTIVITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit activity; + +BOOST_UNITS_STATIC_CONSTANT(becquerel,activity); +BOOST_UNITS_STATIC_CONSTANT(becquerels,activity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACTIVITY_HPP diff --git a/Slang/boost/units/systems/si/amount.hpp b/Slang/boost/units/systems/si/amount.hpp new file mode 100644 index 0000000..7fe8f41 --- /dev/null +++ b/Slang/boost/units/systems/si/amount.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_AMOUNT_HPP +#define BOOST_UNITS_SI_AMOUNT_HPP + +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit amount; + +BOOST_UNITS_STATIC_CONSTANT(mole,amount); +BOOST_UNITS_STATIC_CONSTANT(moles,amount); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_AMOUNT_HPP diff --git a/Slang/boost/units/systems/si/angular_acceleration.hpp b/Slang/boost/units/systems/si/angular_acceleration.hpp new file mode 100644 index 0000000..ff20102 --- /dev/null +++ b/Slang/boost/units/systems/si/angular_acceleration.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP +#define BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit angular_acceleration; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP diff --git a/Slang/boost/units/systems/si/angular_momentum.hpp b/Slang/boost/units/systems/si/angular_momentum.hpp new file mode 100644 index 0000000..7c20f5b --- /dev/null +++ b/Slang/boost/units/systems/si/angular_momentum.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP +#define BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit angular_momentum; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP diff --git a/Slang/boost/units/systems/si/angular_velocity.hpp b/Slang/boost/units/systems/si/angular_velocity.hpp new file mode 100644 index 0000000..3149dc6 --- /dev/null +++ b/Slang/boost/units/systems/si/angular_velocity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP +#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit angular_velocity; + +BOOST_UNITS_STATIC_CONSTANT(radian_per_second,angular_velocity); +BOOST_UNITS_STATIC_CONSTANT(radians_per_second,angular_velocity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP diff --git a/Slang/boost/units/systems/si/area.hpp b/Slang/boost/units/systems/si/area.hpp new file mode 100644 index 0000000..568b80a --- /dev/null +++ b/Slang/boost/units/systems/si/area.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_AREA_HPP +#define BOOST_UNITS_SI_AREA_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit area; + +BOOST_UNITS_STATIC_CONSTANT(square_meter,area); +BOOST_UNITS_STATIC_CONSTANT(square_meters,area); +BOOST_UNITS_STATIC_CONSTANT(square_metre,area); +BOOST_UNITS_STATIC_CONSTANT(square_metres,area); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_AREA_HPP diff --git a/Slang/boost/units/systems/si/base.hpp b/Slang/boost/units/systems/si/base.hpp new file mode 100644 index 0000000..469b294 --- /dev/null +++ b/Slang/boost/units/systems/si/base.hpp @@ -0,0 +1,56 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_BASE_HPP +#define BOOST_UNITS_SI_BASE_HPP + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +/// placeholder class defining si unit system +typedef make_system::type system; + +/// dimensionless si unit +typedef unit dimensionless; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_BASE_HPP diff --git a/Slang/boost/units/systems/si/capacitance.hpp b/Slang/boost/units/systems/si/capacitance.hpp new file mode 100644 index 0000000..076de71 --- /dev/null +++ b/Slang/boost/units/systems/si/capacitance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CAPACITANCE_HPP +#define BOOST_UNITS_SI_CAPACITANCE_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +typedef unit capacitance; + +BOOST_UNITS_STATIC_CONSTANT(farad,capacitance); +BOOST_UNITS_STATIC_CONSTANT(farads,capacitance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CAPACITANCE_HPP diff --git a/Slang/boost/units/systems/si/catalytic_activity.hpp b/Slang/boost/units/systems/si/catalytic_activity.hpp new file mode 100644 index 0000000..2a2e538 --- /dev/null +++ b/Slang/boost/units/systems/si/catalytic_activity.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP +#define BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP + +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +/// catalytic activity : T^-1 A^1 +typedef derived_dimension::type catalytic_activity_dim; + +typedef unit catalytic_activity; + +BOOST_UNITS_STATIC_CONSTANT(katal,catalytic_activity); +BOOST_UNITS_STATIC_CONSTANT(katals,catalytic_activity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP diff --git a/Slang/boost/units/systems/si/codata/alpha_constants.hpp b/Slang/boost/units/systems/si/codata/alpha_constants.hpp new file mode 100644 index 0000000..fa6e7f5 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/alpha_constants.hpp @@ -0,0 +1,66 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// alpha particle mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha,quantity,6.64465620e-27*kilograms,3.3e-34*kilograms); +/// alpha-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_e,quantity,7294.2995365*dimensionless(),3.1e-6*dimensionless()); +/// alpha-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_p,quantity,3.97259968951*dimensionless(),4.1e-10*dimensionless()); +/// alpha molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha,quantity,4.001506179127e-3*kilograms/mole,6.2e-14*kilograms/mole); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/atomic-nuclear_constants.hpp b/Slang/boost/units/systems/si/codata/atomic-nuclear_constants.hpp new file mode 100644 index 0000000..80b4c27 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/atomic-nuclear_constants.hpp @@ -0,0 +1,56 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +// ATOMIC AND NUCLEAR +/// fine structure constant +BOOST_UNITS_PHYSICAL_CONSTANT(alpha,quantity,7.2973525376e-3*dimensionless(),5.0e-12*dimensionless()); +/// Rydberg constant +BOOST_UNITS_PHYSICAL_CONSTANT(R_infinity,quantity,10973731.568527/meter,7.3e-5/meter); +/// Bohr radius +BOOST_UNITS_PHYSICAL_CONSTANT(a_0,quantity,0.52917720859e-10*meters,3.6e-20*meters); +/// Hartree energy +BOOST_UNITS_PHYSICAL_CONSTANT(E_h,quantity,4.35974394e-18*joules,2.2e-25*joules); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/deuteron_constants.hpp b/Slang/boost/units/systems/si/codata/deuteron_constants.hpp new file mode 100644 index 0000000..167c576 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/deuteron_constants.hpp @@ -0,0 +1,82 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// deuteron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_d,quantity,3.34358320e-27*kilograms,1.7e-34*kilograms); +/// deuteron-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_e,quantity,3670.4829654*dimensionless(),1.6e-6*dimensionless()); +/// deuteron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_p,quantity,1.99900750108*dimensionless(),2.2e-10*dimensionless()); +/// deuteron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_d,quantity,2.013553212724e-3*kilograms/mole,7.8e-14*kilograms/mole); +/// deuteron rms charge radius +BOOST_UNITS_PHYSICAL_CONSTANT(R_d,quantity,2.1402e-15*meters,2.8e-18*meters); +/// deuteron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d,quantity,0.433073465e-26*joules/tesla,1.1e-34*joules/tesla); +/// deuteron-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_B,quantity,0.4669754556e-3*dimensionless(),3.9e-12*dimensionless()); +/// deuteron-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_N,quantity,0.8574382308*dimensionless(),7.2e-9*dimensionless()); +/// deuteron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_d,quantity,0.8574382308*dimensionless(),7.2e-9*dimensionless()); +/// deuteron-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_e,quantity,-4.664345537e-4*dimensionless(),3.9e-12*dimensionless()); +/// deuteron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_p,quantity,0.3070122070*dimensionless(),2.4e-9*dimensionless()); +/// deuteron-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n,quantity,-0.44820652*dimensionless(),1.1e-7*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/electromagnetic_constants.hpp b/Slang/boost/units/systems/si/codata/electromagnetic_constants.hpp new file mode 100644 index 0000000..bad7be5 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/electromagnetic_constants.hpp @@ -0,0 +1,75 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP + +/// +/// \file +/// \brief CODATA recommended values of fundamental electromagnetic constants. +/// \details CODATA recommended values of the fundamental physical constants: NIST SP 961 +/// CODATA 2006 values as of 2007/03/30 +/// + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +// ELECTROMAGNETIC +/// elementary charge +BOOST_UNITS_PHYSICAL_CONSTANT(e,quantity,1.602176487e-19*coulombs,4.0e-27*coulombs); +/// elementary charge to Planck constant ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_h,quantity,2.417989454e14*amperes/joule,6.0e6*amperes/joule); +/// magnetic flux quantum +BOOST_UNITS_PHYSICAL_CONSTANT(Phi_0,quantity,2.067833667e-15*webers,5.2e-23*webers); +/// conductance quantum +BOOST_UNITS_PHYSICAL_CONSTANT(G_0,quantity,7.7480917004e-5*siemens,5.3e-14*siemens); +/// Josephson constant +BOOST_UNITS_PHYSICAL_CONSTANT(K_J,quantity,483597.891e9*hertz/volt,1.2e7*hertz/volt); +/// von Klitzing constant +BOOST_UNITS_PHYSICAL_CONSTANT(R_K,quantity,25812.807557*ohms,1.77e-5*ohms); +/// Bohr magneton +BOOST_UNITS_PHYSICAL_CONSTANT(mu_B,quantity,927.400915e-26*joules/tesla,2.3e-31*joules/tesla); +/// nuclear magneton +BOOST_UNITS_PHYSICAL_CONSTANT(mu_N,quantity,5.05078324e-27*joules/tesla,1.3e-34*joules/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/electron_constants.hpp b/Slang/boost/units/systems/si/codata/electron_constants.hpp new file mode 100644 index 0000000..4582c79 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/electron_constants.hpp @@ -0,0 +1,106 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// electron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_e,quantity,9.10938215e-31*kilograms,4.5e-38*kilograms); +/// electron-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_mu,quantity,4.83633171e-3*dimensionless(),1.2e-10*dimensionless()); +/// electron-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_tau,quantity,2.87564e-4*dimensionless(),4.7e-8*dimensionless()); +/// electron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_p,quantity,5.4461702177e-4*dimensionless(),2.4e-13*dimensionless()); +/// electron-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_n,quantity,5.4386734459e-4*dimensionless(),3.3e-13*dimensionless()); +/// electron-deuteron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_d,quantity,2.7244371093e-4*dimensionless(),1.2e-13*dimensionless()); +/// electron-alpha particle mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_alpha,quantity,1.37093355570e-4*dimensionless(),5.8e-14*dimensionless()); +/// electron charge to mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_e,quantity,1.758820150e11*coulombs/kilogram,4.4e3*coulombs/kilogram); +/// electron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_e,quantity,5.4857990943e-7*kilograms/mole,2.3e-16*kilograms/mole); +/// Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C,quantity,2.4263102175e-12*meters,3.3e-21*meters); +/// classical electron radius +BOOST_UNITS_PHYSICAL_CONSTANT(r_e,quantity,2.8179402894e-15*meters,5.8e-24*meters); +/// Thompson cross section +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_e,quantity,0.6652458558e-28*square_meters,2.7e-37*square_meters); +/// electron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e,quantity,-928.476377e-26*joules/tesla,2.3e-31*joules/tesla); +/// electron-Bohr magenton moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_B,quantity,-1.00115965218111*dimensionless(),7.4e-13*dimensionless()); +/// electron-nuclear magneton moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_N,quantity,-183.28197092*dimensionless(),8.0e-7*dimensionless()); +/// electron magnetic moment anomaly +BOOST_UNITS_PHYSICAL_CONSTANT(a_e,quantity,1.15965218111e-3*dimensionless(),7.4e-13*dimensionless()); +/// electron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_e,quantity,-2.0023193043622*dimensionless(),1.5e-12*dimensionless()); +/// electron-muon magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_mu,quantity,206.7669877*dimensionless(),5.2e-6*dimensionless()); +/// electron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p,quantity,-658.2106848*dimensionless(),5.4e-6*dimensionless()); +/// electron-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p_prime,quantity,-658.2275971*dimensionless(),7.2e-6*dimensionless()); +/// electron-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_n,quantity,960.92050*dimensionless(),2.3e-4*dimensionless()); +/// electron-deuteron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_d,quantity,-2143.923498*dimensionless(),1.8e-5*dimensionless()); +/// electron-shielded helion magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_h_prime,quantity,864.058257*dimensionless(),1.0e-5*dimensionless()); +/// electron gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e,quantity,1.760859770e11/second/tesla,4.4e3/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/helion_constants.hpp b/Slang/boost/units/systems/si/codata/helion_constants.hpp new file mode 100644 index 0000000..4e88242 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/helion_constants.hpp @@ -0,0 +1,78 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// helion mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_h,quantity,5.00641192e-27*kilograms,2.5e-34*kilograms); +/// helion-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_e,quantity,5495.8852765*dimensionless(),5.2e-6*dimensionless()); +/// helion-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_p,quantity,2.9931526713*dimensionless(),2.6e-9*dimensionless()); +/// helion molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_h,quantity,3.0149322473e-3*kilograms/mole,2.6e-12*kilograms/mole); +/// helion shielded magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime,quantity,-1.074552982e-26*joules/tesla,3.0e-34*joules/tesla); +/// shielded helion-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_B,quantity,-1.158671471e-3*dimensionless(),1.4e-11*dimensionless()); +/// shielded helion-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_N,quantity,-2.127497718*dimensionless(),2.5e-8*dimensionless()); +/// shielded helion-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p,quantity,-0.761766558*dimensionless(),1.1e-8*dimensionless()); +/// shielded helion-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p_prime,quantity,-0.7617861313*dimensionless(),3.3e-8*dimensionless()); +/// shielded helion gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime,quantity,2.037894730e8/second/tesla,5.6e-0/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/muon_constants.hpp b/Slang/boost/units/systems/si/codata/muon_constants.hpp new file mode 100644 index 0000000..c580e3c --- /dev/null +++ b/Slang/boost/units/systems/si/codata/muon_constants.hpp @@ -0,0 +1,84 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// muon mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu,quantity,1.88353130e-28*kilograms,1.1e-35*kilograms); +/// muon-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_e,quantity,206.7682823*dimensionless(),5.2e-6*dimensionless()); +/// muon-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_tau,quantity,5.94592e-2*dimensionless(),9.7e-6*dimensionless()); +/// muon-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_p,quantity,0.1126095261*dimensionless(),2.9e-9*dimensionless()); +/// muon-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_n,quantity,0.1124545167*dimensionless(),2.9e-9*dimensionless()); +/// muon molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_mu,quantity,0.1134289256e-3*kilograms/mole,2.9e-12*kilograms/mole); +/// muon Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_mu,quantity,11.73444104e-15*meters,3.0e-22*meters); +/// muon magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu,quantity,-4.49044786e-26*joules/tesla,1.6e-33*joules/tesla); +/// muon-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_B,quantity,-4.84197049e-3*dimensionless(),1.2e-10*dimensionless()); +/// muon-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_N,quantity,-8.89059705*dimensionless(),2.3e-7*dimensionless()); +/// muon magnetic moment anomaly +BOOST_UNITS_PHYSICAL_CONSTANT(a_mu,quantity,1.16592069e-3*dimensionless(),6.0e-10*dimensionless()); +/// muon g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_mu,quantity,-2.0023318414*dimensionless(),1.2e-9*dimensionless()); +/// muon-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p,quantity,-3.183345137*dimensionless(),8.5e-8*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/neutron_constants.hpp b/Slang/boost/units/systems/si/codata/neutron_constants.hpp new file mode 100644 index 0000000..fb97124 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/neutron_constants.hpp @@ -0,0 +1,84 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// neutron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_n,quantity,1.674927211e-27*kilograms,8.4e-35*kilograms); +/// neutron-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_e,quantity,1838.6836605*dimensionless(),1.1e-6*dimensionless()); +/// neutron-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_mu,quantity,8.89248409*dimensionless(),2.3e-7*dimensionless()); +/// neutron-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_tau,quantity,0.528740*dimensionless(),8.6e-5*dimensionless()); +/// neutron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_p,quantity,1.00137841918*dimensionless(),4.6e-10*dimensionless()); +/// neutron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_n,quantity,1.00866491597e-3*kilograms/mole,4.3e-13*kilograms/mole); +/// neutron Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_n,quantity,1.3195908951e-15*meters,2.0e-24*meters); +/// neutron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n,quantity,-0.96623641e-26*joules/tesla,2.3e-33*joules/tesla); +/// neutron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_n,quantity,-3.82608545*dimensionless(),9.0e-7*dimensionless()); +/// neutron-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_e,quantity,1.04066882e-3*dimensionless(),2.5e-10*dimensionless()); +/// neutron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p,quantity,-0.68497934*dimensionless(),1.6e-7*dimensionless()); +/// neutron-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p_prime,quantity,-0.68499694*dimensionless(),1.6e-7*dimensionless()); +/// neutron gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n,quantity,1.83247185e8/second/tesla,4.3e1/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/physico-chemical_constants.hpp b/Slang/boost/units/systems/si/codata/physico-chemical_constants.hpp new file mode 100644 index 0000000..e9ed035 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/physico-chemical_constants.hpp @@ -0,0 +1,79 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental physico-chemical constants +/// CODATA 2014 values as of 2016/04/26 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +// PHYSICO-CHEMICAL +/// Avogadro constant +BOOST_UNITS_PHYSICAL_CONSTANT(N_A,quantity,6.022140857e23/mole,7.4e15/mole); +/// atomic mass constant +BOOST_UNITS_PHYSICAL_CONSTANT(m_u,quantity,1.660539040e-27*kilograms,2.0e-35*kilograms); +/// Faraday constant +BOOST_UNITS_PHYSICAL_CONSTANT(F,quantity,96485.33289*coulombs/mole,5.9e-4*coulombs/mole); +/// molar gas constant +BOOST_UNITS_PHYSICAL_CONSTANT(R,quantity,8.3144598*joules/kelvin/mole,4.8e-06*joules/kelvin/mole); +/// Boltzmann constant +BOOST_UNITS_PHYSICAL_CONSTANT(k_B,quantity,1.38064852e-23*joules/kelvin,7.9e-30*joules/kelvin); +/// Stefan-Boltzmann constant +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_SB,quantity,5.670367e-8*watts/square_meter/pow<4>(kelvin),1.3e-13*watts/square_meter/pow<4>(kelvin)); +/// first radiation constant +BOOST_UNITS_PHYSICAL_CONSTANT(c_1,quantity,3.741771790e-16*watt*square_meters,4.6e-24*watt*square_meters); +/// first radiation constant for spectral radiance +BOOST_UNITS_PHYSICAL_CONSTANT(c_1L,quantity,1.191042953e-16*watt*square_meters/steradian,1.5e-24*watt*square_meters/steradian); +/// second radiation constant +BOOST_UNITS_PHYSICAL_CONSTANT(c_2,quantity,1.43877736e-2*meter*kelvin,8.3e-9*meter*kelvin); +/// Wien displacement law constant : lambda_max T +BOOST_UNITS_PHYSICAL_CONSTANT(b,quantity,2.8977729e-3*meter*kelvin,1.7e-9*meter*kelvin); +/// Wien displacement law constant : nu_max/T +BOOST_UNITS_PHYSICAL_CONSTANT(b_prime,quantity,5.8789238e10*hertz/kelvin,3.4e4*hertz/kelvin); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/proton_constants.hpp b/Slang/boost/units/systems/si/codata/proton_constants.hpp new file mode 100644 index 0000000..78cce8c --- /dev/null +++ b/Slang/boost/units/systems/si/codata/proton_constants.hpp @@ -0,0 +1,98 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// proton mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_p,quantity,1.672621637e-27*kilograms,8.3e-35*kilograms); +/// proton-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_e,quantity,1836.15267247*dimensionless(),8.0e-7*dimensionless()); +/// proton-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_mu,quantity,8.88024339*dimensionless(),2.3e-7*dimensionless()); +/// proton-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_tau,quantity,0.528012*dimensionless(),8.6e-5*dimensionless()); +/// proton-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_n,quantity,0.99862347824*dimensionless(),4.6e-10*dimensionless()); +/// proton charge to mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_p,quantity,9.57883392e7*coulombs/kilogram,2.4e0*coulombs/kilogram); +/// proton molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_p,quantity,1.00727646677e-3*kilograms/mole,1.0e-13*kilograms/mole); +/// proton Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_p,quantity,1.3214098446e-15*meters,1.9e-24*meters); +/// proton rms charge radius +BOOST_UNITS_PHYSICAL_CONSTANT(R_p,quantity,0.8768e-15*meters,6.9e-18*meters); +/// proton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p,quantity,1.410606662e-26*joules/tesla,3.7e-34*joules/tesla); +/// proton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_B,quantity,1.521032209e-3*dimensionless(),1.2e-11*dimensionless()); +/// proton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_N,quantity,2.792847356*dimensionless(),2.3e-8*dimensionless()); +/// proton g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_p,quantity,5.585694713*dimensionless(),4.6e-8*dimensionless()); +/// proton-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_n,quantity,-1.45989806*dimensionless(),3.4e-7*dimensionless()); +/// shielded proton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime,quantity,1.410570419e-26*joules/tesla,3.8e-34*joules/tesla); +/// shielded proton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_B,quantity,1.520993128e-3*dimensionless(),1.7e-11*dimensionless()); +/// shielded proton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_N,quantity,2.792775598*dimensionless(),3.0e-8*dimensionless()); +/// proton magnetic shielding correction +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_p_prime,quantity,25.694e-6*dimensionless(),1.4e-8*dimensionless()); +/// proton gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p,quantity,2.675222099e8/second/tesla,7.0e0/second/tesla); +/// shielded proton gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime,quantity,2.675153362e8/second/tesla,7.3e0/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/tau_constants.hpp b/Slang/boost/units/systems/si/codata/tau_constants.hpp new file mode 100644 index 0000000..ea047bc --- /dev/null +++ b/Slang/boost/units/systems/si/codata/tau_constants.hpp @@ -0,0 +1,72 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// tau mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau,quantity,3.16777e-27*kilograms,5.2e-31*kilograms); +/// tau-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_e,quantity,3477.48*dimensionless(),5.7e-1*dimensionless()); +/// tau-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_mu,quantity,16.8183*dimensionless(),2.7e-3*dimensionless()); +/// tau-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_p,quantity,1.89390*dimensionless(),3.1e-4*dimensionless()); +/// tau-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_n,quantity,1.89129*dimensionless(),3.1e-4*dimensionless()); +/// tau molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_tau,quantity,1.90768e-3*kilograms/mole,3.1e-7*kilograms/mole); +/// tau Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau,quantity,0.69772e-15*meters,1.1e-19*meters); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/triton_constants.hpp b/Slang/boost/units/systems/si/codata/triton_constants.hpp new file mode 100644 index 0000000..5866082 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/triton_constants.hpp @@ -0,0 +1,80 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// triton mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_t,quantity,5.00735588e-27*kilograms,2.5e-34*kilograms); +/// triton-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_e,quantity,5496.9215269*dimensionless(),5.1e-6*dimensionless()); +/// triton-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_p,quantity,2.9937170309*dimensionless(),2.5e-9*dimensionless()); +/// triton molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_t,quantity,3.0155007134e-3*kilograms/mole,2.5e-12*kilograms/mole); +/// triton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t,quantity,1.504609361e-26*joules/tesla,4.2e-34*joules/tesla); +/// triton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_B,quantity,1.622393657e-3*dimensionless(),2.1e-11*dimensionless()); +/// triton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_N,quantity,2.978962448*dimensionless(),3.8e-8*dimensionless()); +/// triton g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_t,quantity,5.957924896*dimensionless(),7.6e-8*dimensionless()); +/// triton-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_e,quantity,-1.620514423e-3*dimensionless(),2.1e-11*dimensionless()); +/// triton-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_p,quantity,1.066639908*dimensionless(),1.0e-8*dimensionless()); +/// triton-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n,quantity,-1.55718553*dimensionless(),3.7e-7*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP diff --git a/Slang/boost/units/systems/si/codata/typedefs.hpp b/Slang/boost/units/systems/si/codata/typedefs.hpp new file mode 100644 index 0000000..27330ce --- /dev/null +++ b/Slang/boost/units/systems/si/codata/typedefs.hpp @@ -0,0 +1,79 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TYPEDEFS_HPP +#define BOOST_UNITS_CODATA_TYPEDEFS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +typedef divide_typeof_helper::type frequency_over_electric_potential; +typedef divide_typeof_helper::type electric_charge_over_mass; +typedef divide_typeof_helper::type mass_over_amount; +typedef divide_typeof_helper::type energy_over_magnetic_flux_density; +typedef divide_typeof_helper::type frequency_over_magnetic_flux_density; +typedef divide_typeof_helper::type current_over_energy; +typedef divide_typeof_helper::type inverse_amount; +typedef divide_typeof_helper::type energy_over_temperature; +typedef divide_typeof_helper::type energy_over_temperature_amount; +typedef divide_typeof_helper< + divide_typeof_helper::type, + power_typeof_helper >::type + >::type power_over_area_temperature_4; +typedef multiply_typeof_helper::type power_area; +typedef divide_typeof_helper::type power_area_over_solid_angle; +typedef multiply_typeof_helper::type length_temperature; +typedef divide_typeof_helper::type frequency_over_temperature; +typedef divide_typeof_helper::type,current>::type force_over_current_squared; +typedef divide_typeof_helper::type capacitance_over_length; +typedef divide_typeof_helper< + divide_typeof_helper::type,time>::type, + time + >::type volume_over_mass_time_squared; +typedef multiply_typeof_helper::type energy_time; +typedef divide_typeof_helper::type electric_charge_over_amount; + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif diff --git a/Slang/boost/units/systems/si/codata/universal_constants.hpp b/Slang/boost/units/systems/si/codata/universal_constants.hpp new file mode 100644 index 0000000..9aa64c4 --- /dev/null +++ b/Slang/boost/units/systems/si/codata/universal_constants.hpp @@ -0,0 +1,81 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/// \file +/// CODATA recommended values of fundamental universal constants +/// using CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +// UNIVERSAL +/// speed of light +BOOST_UNITS_PHYSICAL_CONSTANT(c,quantity,299792458.0*meters/second,0.0*meters/second); +/// magnetic constant (exactly 4 pi x 10^(-7) - error is due to finite precision of pi) +BOOST_UNITS_PHYSICAL_CONSTANT(mu_0,quantity,12.56637061435917295385057353311801153679e-7*newtons/ampere/ampere,0.0*newtons/ampere/ampere); +/// electric constant +BOOST_UNITS_PHYSICAL_CONSTANT(epsilon_0,quantity,8.854187817620389850536563031710750260608e-12*farad/meter,0.0*farad/meter); +/// characteristic impedance of vacuum +BOOST_UNITS_PHYSICAL_CONSTANT(Z_0,quantity,376.7303134617706554681984004203193082686*ohm,0.0*ohm); +/// Newtonian constant of gravitation +BOOST_UNITS_PHYSICAL_CONSTANT(G,quantity,6.67428e-11*cubic_meters/kilogram/second/second,6.7e-15*cubic_meters/kilogram/second/second); +/// Planck constant +BOOST_UNITS_PHYSICAL_CONSTANT(h,quantity,6.62606896e-34*joule*seconds,3.3e-41*joule*seconds); +/// Dirac constant +BOOST_UNITS_PHYSICAL_CONSTANT(hbar,quantity,1.054571628e-34*joule*seconds,5.3e-42*joule*seconds); +/// Planck mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_P,quantity,2.17644e-8*kilograms,1.1e-12*kilograms); +/// Planck temperature +BOOST_UNITS_PHYSICAL_CONSTANT(T_P,quantity,1.416785e32*kelvin,7.1e27*kelvin); +/// Planck length +BOOST_UNITS_PHYSICAL_CONSTANT(l_P,quantity,1.616252e-35*meters,8.1e-40*meters); +/// Planck time +BOOST_UNITS_PHYSICAL_CONSTANT(t_P,quantity