mqt-core 3.3.2__cp314-cp314t-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mqt/core/__init__.py +77 -0
- mqt/core/__main__.py +55 -0
- mqt/core/_commands.py +52 -0
- mqt/core/_compat/__init__.py +11 -0
- mqt/core/_compat/typing.py +29 -0
- mqt/core/_version.py +34 -0
- mqt/core/_version.pyi +12 -0
- mqt/core/dd.cpython-314t-darwin.so +0 -0
- mqt/core/dd.pyi +1016 -0
- mqt/core/dd_evaluation.py +368 -0
- mqt/core/fomac.cpython-314t-darwin.so +0 -0
- mqt/core/fomac.pyi +125 -0
- mqt/core/include/mqt-core/algorithms/BernsteinVazirani.hpp +39 -0
- mqt/core/include/mqt-core/algorithms/GHZState.hpp +18 -0
- mqt/core/include/mqt-core/algorithms/Grover.hpp +33 -0
- mqt/core/include/mqt-core/algorithms/QFT.hpp +21 -0
- mqt/core/include/mqt-core/algorithms/QPE.hpp +30 -0
- mqt/core/include/mqt-core/algorithms/RandomCliffordCircuit.hpp +22 -0
- mqt/core/include/mqt-core/algorithms/StatePreparation.hpp +43 -0
- mqt/core/include/mqt-core/algorithms/WState.hpp +18 -0
- mqt/core/include/mqt-core/algorithms/mqt_core_algorithms_export.h +43 -0
- mqt/core/include/mqt-core/boost/config/abi/borland_prefix.hpp +27 -0
- mqt/core/include/mqt-core/boost/config/abi/borland_suffix.hpp +12 -0
- mqt/core/include/mqt-core/boost/config/abi/msvc_prefix.hpp +22 -0
- mqt/core/include/mqt-core/boost/config/abi/msvc_suffix.hpp +8 -0
- mqt/core/include/mqt-core/boost/config/abi_prefix.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/abi_suffix.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx03.hpp +211 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx11.hpp +212 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx14.hpp +47 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx17.hpp +65 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx20.hpp +59 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx23.hpp +41 -0
- mqt/core/include/mqt-core/boost/config/assert_cxx98.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/auto_link.hpp +525 -0
- mqt/core/include/mqt-core/boost/config/compiler/borland.hpp +342 -0
- mqt/core/include/mqt-core/boost/config/compiler/clang.hpp +370 -0
- mqt/core/include/mqt-core/boost/config/compiler/clang_version.hpp +89 -0
- mqt/core/include/mqt-core/boost/config/compiler/codegear.hpp +389 -0
- mqt/core/include/mqt-core/boost/config/compiler/comeau.hpp +59 -0
- mqt/core/include/mqt-core/boost/config/compiler/common_edg.hpp +185 -0
- mqt/core/include/mqt-core/boost/config/compiler/compaq_cxx.hpp +19 -0
- mqt/core/include/mqt-core/boost/config/compiler/cray.hpp +446 -0
- mqt/core/include/mqt-core/boost/config/compiler/diab.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/compiler/digitalmars.hpp +146 -0
- mqt/core/include/mqt-core/boost/config/compiler/gcc.hpp +386 -0
- mqt/core/include/mqt-core/boost/config/compiler/gcc_xml.hpp +115 -0
- mqt/core/include/mqt-core/boost/config/compiler/greenhills.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/compiler/hp_acc.hpp +153 -0
- mqt/core/include/mqt-core/boost/config/compiler/intel.hpp +577 -0
- mqt/core/include/mqt-core/boost/config/compiler/kai.hpp +33 -0
- mqt/core/include/mqt-core/boost/config/compiler/metrowerks.hpp +201 -0
- mqt/core/include/mqt-core/boost/config/compiler/mpw.hpp +143 -0
- mqt/core/include/mqt-core/boost/config/compiler/nvcc.hpp +64 -0
- mqt/core/include/mqt-core/boost/config/compiler/pathscale.hpp +141 -0
- mqt/core/include/mqt-core/boost/config/compiler/pgi.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/compiler/sgi_mipspro.hpp +29 -0
- mqt/core/include/mqt-core/boost/config/compiler/sunpro_cc.hpp +225 -0
- mqt/core/include/mqt-core/boost/config/compiler/vacpp.hpp +189 -0
- mqt/core/include/mqt-core/boost/config/compiler/visualc.hpp +398 -0
- mqt/core/include/mqt-core/boost/config/compiler/xlcpp.hpp +303 -0
- mqt/core/include/mqt-core/boost/config/compiler/xlcpp_zos.hpp +174 -0
- mqt/core/include/mqt-core/boost/config/detail/cxx_composite.hpp +218 -0
- mqt/core/include/mqt-core/boost/config/detail/posix_features.hpp +95 -0
- mqt/core/include/mqt-core/boost/config/detail/select_compiler_config.hpp +157 -0
- mqt/core/include/mqt-core/boost/config/detail/select_platform_config.hpp +147 -0
- mqt/core/include/mqt-core/boost/config/detail/select_stdlib_config.hpp +121 -0
- mqt/core/include/mqt-core/boost/config/detail/suffix.hpp +1334 -0
- mqt/core/include/mqt-core/boost/config/header_deprecated.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/helper_macros.hpp +37 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/cmath.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/complex.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/functional.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/memory.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/no_tr1/utility.hpp +28 -0
- mqt/core/include/mqt-core/boost/config/platform/aix.hpp +33 -0
- mqt/core/include/mqt-core/boost/config/platform/amigaos.hpp +15 -0
- mqt/core/include/mqt-core/boost/config/platform/beos.hpp +26 -0
- mqt/core/include/mqt-core/boost/config/platform/bsd.hpp +83 -0
- mqt/core/include/mqt-core/boost/config/platform/cloudabi.hpp +18 -0
- mqt/core/include/mqt-core/boost/config/platform/cray.hpp +18 -0
- mqt/core/include/mqt-core/boost/config/platform/cygwin.hpp +71 -0
- mqt/core/include/mqt-core/boost/config/platform/haiku.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/hpux.hpp +87 -0
- mqt/core/include/mqt-core/boost/config/platform/irix.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/linux.hpp +106 -0
- mqt/core/include/mqt-core/boost/config/platform/macos.hpp +87 -0
- mqt/core/include/mqt-core/boost/config/platform/qnxnto.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/solaris.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/platform/symbian.hpp +97 -0
- mqt/core/include/mqt-core/boost/config/platform/vms.hpp +25 -0
- mqt/core/include/mqt-core/boost/config/platform/vxworks.hpp +422 -0
- mqt/core/include/mqt-core/boost/config/platform/wasm.hpp +23 -0
- mqt/core/include/mqt-core/boost/config/platform/win32.hpp +90 -0
- mqt/core/include/mqt-core/boost/config/platform/zos.hpp +32 -0
- mqt/core/include/mqt-core/boost/config/pragma_message.hpp +31 -0
- mqt/core/include/mqt-core/boost/config/requires_threads.hpp +92 -0
- mqt/core/include/mqt-core/boost/config/stdlib/dinkumware.hpp +324 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libcomo.hpp +93 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libcpp.hpp +180 -0
- mqt/core/include/mqt-core/boost/config/stdlib/libstdcpp3.hpp +482 -0
- mqt/core/include/mqt-core/boost/config/stdlib/modena.hpp +79 -0
- mqt/core/include/mqt-core/boost/config/stdlib/msl.hpp +98 -0
- mqt/core/include/mqt-core/boost/config/stdlib/roguewave.hpp +208 -0
- mqt/core/include/mqt-core/boost/config/stdlib/sgi.hpp +168 -0
- mqt/core/include/mqt-core/boost/config/stdlib/stlport.hpp +258 -0
- mqt/core/include/mqt-core/boost/config/stdlib/vacpp.hpp +74 -0
- mqt/core/include/mqt-core/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- mqt/core/include/mqt-core/boost/config/user.hpp +133 -0
- mqt/core/include/mqt-core/boost/config/warning_disable.hpp +47 -0
- mqt/core/include/mqt-core/boost/config/workaround.hpp +305 -0
- mqt/core/include/mqt-core/boost/config.hpp +67 -0
- mqt/core/include/mqt-core/boost/cstdint.hpp +556 -0
- mqt/core/include/mqt-core/boost/cxx11_char_types.hpp +70 -0
- mqt/core/include/mqt-core/boost/detail/workaround.hpp +10 -0
- mqt/core/include/mqt-core/boost/limits.hpp +146 -0
- mqt/core/include/mqt-core/boost/multiprecision/complex128.hpp +24 -0
- mqt/core/include/mqt-core/boost/multiprecision/complex_adaptor.hpp +1046 -0
- mqt/core/include/mqt-core/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/io.hpp +698 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_bin_float.hpp +2297 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_complex.hpp +12 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_dec_float.hpp +3690 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add.hpp +368 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/bitwise.hpp +889 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/checked.hpp +178 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/comparison.hpp +374 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/divide.hpp +703 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/import_export.hpp +248 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/limits.hpp +282 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/literals.hpp +295 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/misc.hpp +1457 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/multiply.hpp +848 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/serialize.hpp +211 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
- mqt/core/include/mqt-core/boost/multiprecision/cpp_int.hpp +2360 -0
- mqt/core/include/mqt-core/boost/multiprecision/debug_adaptor.hpp +760 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/assert.hpp +29 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/atomic.hpp +62 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/bitscan.hpp +317 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/constexpr.hpp +88 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/default_ops.hpp +4052 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/digits.hpp +49 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/dynamic_array.hpp +44 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/empty_value.hpp +87 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/endian.hpp +35 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/et_ops.hpp +1831 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/float128_functions.hpp +95 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/fpclassify.hpp +101 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/constants.hpp +288 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/pow.hpp +905 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trig.hpp +1058 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/functions/trunc.hpp +82 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/hash.hpp +56 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/integer_ops.hpp +474 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/itos.hpp +39 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/min_max.hpp +106 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/no_et_ops.hpp +661 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/number_base.hpp +1656 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/number_compare.hpp +848 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/precision.hpp +313 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/rebind.hpp +19 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/standalone_config.hpp +148 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/static_array.hpp +42 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/string_helpers.hpp +48 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/tables.hpp +80 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/ublas_interop.hpp +75 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
- mqt/core/include/mqt-core/boost/multiprecision/detail/utype_helper.hpp +374 -0
- mqt/core/include/mqt-core/boost/multiprecision/eigen.hpp +248 -0
- mqt/core/include/mqt-core/boost/multiprecision/float128.hpp +920 -0
- mqt/core/include/mqt-core/boost/multiprecision/fwd.hpp +268 -0
- mqt/core/include/mqt-core/boost/multiprecision/gmp.hpp +4060 -0
- mqt/core/include/mqt-core/boost/multiprecision/integer.hpp +363 -0
- mqt/core/include/mqt-core/boost/multiprecision/logged_adaptor.hpp +834 -0
- mqt/core/include/mqt-core/boost/multiprecision/miller_rabin.hpp +221 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpc.hpp +1721 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpfi.hpp +2559 -0
- mqt/core/include/mqt-core/boost/multiprecision/mpfr.hpp +3644 -0
- mqt/core/include/mqt-core/boost/multiprecision/number.hpp +2500 -0
- mqt/core/include/mqt-core/boost/multiprecision/random.hpp +23 -0
- mqt/core/include/mqt-core/boost/multiprecision/rational_adaptor.hpp +1289 -0
- mqt/core/include/mqt-core/boost/multiprecision/tommath.hpp +1034 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_backend.hpp +91 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_byte_container.hpp +51 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_complex.hpp +22 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/max_digits10.hpp +79 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/std_integer_traits.hpp +90 -0
- mqt/core/include/mqt-core/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
- mqt/core/include/mqt-core/boost/version.hpp +32 -0
- mqt/core/include/mqt-core/circuit_optimizer/CircuitOptimizer.hpp +119 -0
- mqt/core/include/mqt-core/circuit_optimizer/mqt_core_circuit_optimizer_export.h +43 -0
- mqt/core/include/mqt-core/datastructures/DirectedAcyclicGraph.hpp +117 -0
- mqt/core/include/mqt-core/datastructures/DirectedGraph.hpp +158 -0
- mqt/core/include/mqt-core/datastructures/DisjointSet.hpp +50 -0
- mqt/core/include/mqt-core/datastructures/Layer.hpp +172 -0
- mqt/core/include/mqt-core/datastructures/SymmetricMatrix.hpp +57 -0
- mqt/core/include/mqt-core/datastructures/UndirectedGraph.hpp +227 -0
- mqt/core/include/mqt-core/datastructures/mqt_core_ds_export.h +43 -0
- mqt/core/include/mqt-core/dd/Approximation.hpp +45 -0
- mqt/core/include/mqt-core/dd/CachedEdge.hpp +174 -0
- mqt/core/include/mqt-core/dd/Complex.hpp +165 -0
- mqt/core/include/mqt-core/dd/ComplexNumbers.hpp +150 -0
- mqt/core/include/mqt-core/dd/ComplexValue.hpp +184 -0
- mqt/core/include/mqt-core/dd/ComputeTable.hpp +183 -0
- mqt/core/include/mqt-core/dd/DDDefinitions.hpp +139 -0
- mqt/core/include/mqt-core/dd/DDpackageConfig.hpp +104 -0
- mqt/core/include/mqt-core/dd/DensityNoiseTable.hpp +114 -0
- mqt/core/include/mqt-core/dd/Edge.hpp +416 -0
- mqt/core/include/mqt-core/dd/Export.hpp +438 -0
- mqt/core/include/mqt-core/dd/FunctionalityConstruction.hpp +75 -0
- mqt/core/include/mqt-core/dd/GateMatrixDefinitions.hpp +43 -0
- mqt/core/include/mqt-core/dd/LinkedListBase.hpp +45 -0
- mqt/core/include/mqt-core/dd/MemoryManager.hpp +193 -0
- mqt/core/include/mqt-core/dd/Node.hpp +223 -0
- mqt/core/include/mqt-core/dd/NoiseFunctionality.hpp +144 -0
- mqt/core/include/mqt-core/dd/Operations.hpp +306 -0
- mqt/core/include/mqt-core/dd/Package.hpp +2036 -0
- mqt/core/include/mqt-core/dd/Package_fwd.hpp +22 -0
- mqt/core/include/mqt-core/dd/RealNumber.hpp +255 -0
- mqt/core/include/mqt-core/dd/RealNumberUniqueTable.hpp +217 -0
- mqt/core/include/mqt-core/dd/Simulation.hpp +98 -0
- mqt/core/include/mqt-core/dd/StateGeneration.hpp +143 -0
- mqt/core/include/mqt-core/dd/StochasticNoiseOperationTable.hpp +88 -0
- mqt/core/include/mqt-core/dd/UnaryComputeTable.hpp +121 -0
- mqt/core/include/mqt-core/dd/UniqueTable.hpp +243 -0
- mqt/core/include/mqt-core/dd/mqt_core_dd_export.h +43 -0
- mqt/core/include/mqt-core/dd/statistics/MemoryManagerStatistics.hpp +84 -0
- mqt/core/include/mqt-core/dd/statistics/PackageStatistics.hpp +55 -0
- mqt/core/include/mqt-core/dd/statistics/Statistics.hpp +48 -0
- mqt/core/include/mqt-core/dd/statistics/TableStatistics.hpp +79 -0
- mqt/core/include/mqt-core/dd/statistics/UniqueTableStatistics.hpp +31 -0
- mqt/core/include/mqt-core/fomac/FoMaC.hpp +568 -0
- mqt/core/include/mqt-core/ir/Definitions.hpp +108 -0
- mqt/core/include/mqt-core/ir/Permutation.hpp +213 -0
- mqt/core/include/mqt-core/ir/QuantumComputation.hpp +596 -0
- mqt/core/include/mqt-core/ir/Register.hpp +125 -0
- mqt/core/include/mqt-core/ir/mqt_core_ir_export.h +43 -0
- mqt/core/include/mqt-core/ir/operations/AodOperation.hpp +92 -0
- mqt/core/include/mqt-core/ir/operations/CompoundOperation.hpp +212 -0
- mqt/core/include/mqt-core/ir/operations/Control.hpp +142 -0
- mqt/core/include/mqt-core/ir/operations/Expression.hpp +847 -0
- mqt/core/include/mqt-core/ir/operations/IfElseOperation.hpp +169 -0
- mqt/core/include/mqt-core/ir/operations/NonUnitaryOperation.hpp +118 -0
- mqt/core/include/mqt-core/ir/operations/OpType.hpp +120 -0
- mqt/core/include/mqt-core/ir/operations/OpType.inc +76 -0
- mqt/core/include/mqt-core/ir/operations/Operation.hpp +247 -0
- mqt/core/include/mqt-core/ir/operations/StandardOperation.hpp +140 -0
- mqt/core/include/mqt-core/ir/operations/SymbolicOperation.hpp +144 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/device.h +602 -0
- mqt/core/include/mqt-core/mqt_na_qdmi/types.h +78 -0
- mqt/core/include/mqt-core/na/NAComputation.hpp +185 -0
- mqt/core/include/mqt-core/na/device/Device.hpp +410 -0
- mqt/core/include/mqt-core/na/device/DeviceMemberInitializers.hpp +724 -0
- mqt/core/include/mqt-core/na/device/Generator.hpp +447 -0
- mqt/core/include/mqt-core/na/entities/Atom.hpp +62 -0
- mqt/core/include/mqt-core/na/entities/Location.hpp +154 -0
- mqt/core/include/mqt-core/na/entities/Zone.hpp +95 -0
- mqt/core/include/mqt-core/na/fomac/Device.hpp +169 -0
- mqt/core/include/mqt-core/na/mqt_core_na_export.h +43 -0
- mqt/core/include/mqt-core/na/operations/GlobalCZOp.hpp +38 -0
- mqt/core/include/mqt-core/na/operations/GlobalOp.hpp +58 -0
- mqt/core/include/mqt-core/na/operations/GlobalRYOp.hpp +42 -0
- mqt/core/include/mqt-core/na/operations/LoadOp.hpp +89 -0
- mqt/core/include/mqt-core/na/operations/LocalOp.hpp +56 -0
- mqt/core/include/mqt-core/na/operations/LocalRZOp.hpp +42 -0
- mqt/core/include/mqt-core/na/operations/LocalUOp.hpp +49 -0
- mqt/core/include/mqt-core/na/operations/MoveOp.hpp +66 -0
- mqt/core/include/mqt-core/na/operations/Op.hpp +62 -0
- mqt/core/include/mqt-core/na/operations/ShuttlingOp.hpp +51 -0
- mqt/core/include/mqt-core/na/operations/StoreOp.hpp +87 -0
- mqt/core/include/mqt-core/qasm3/Exception.hpp +85 -0
- mqt/core/include/mqt-core/qasm3/Gate.hpp +65 -0
- mqt/core/include/mqt-core/qasm3/Importer.hpp +192 -0
- mqt/core/include/mqt-core/qasm3/InstVisitor.hpp +145 -0
- mqt/core/include/mqt-core/qasm3/NestedEnvironment.hpp +41 -0
- mqt/core/include/mqt-core/qasm3/Parser.hpp +170 -0
- mqt/core/include/mqt-core/qasm3/Scanner.hpp +73 -0
- mqt/core/include/mqt-core/qasm3/Statement.hpp +486 -0
- mqt/core/include/mqt-core/qasm3/Statement_fwd.hpp +39 -0
- mqt/core/include/mqt-core/qasm3/StdGates.hpp +232 -0
- mqt/core/include/mqt-core/qasm3/Token.hpp +198 -0
- mqt/core/include/mqt-core/qasm3/Types.hpp +238 -0
- mqt/core/include/mqt-core/qasm3/Types_fwd.hpp +22 -0
- mqt/core/include/mqt-core/qasm3/mqt_core_qasm_export.h +43 -0
- mqt/core/include/mqt-core/qasm3/passes/CompilerPass.hpp +22 -0
- mqt/core/include/mqt-core/qasm3/passes/ConstEvalPass.hpp +102 -0
- mqt/core/include/mqt-core/qasm3/passes/TypeCheckPass.hpp +124 -0
- mqt/core/include/mqt-core/qdmi/Driver.hpp +431 -0
- mqt/core/include/mqt-core/zx/FunctionalityConstruction.hpp +125 -0
- mqt/core/include/mqt-core/zx/Rational.hpp +318 -0
- mqt/core/include/mqt-core/zx/Rules.hpp +132 -0
- mqt/core/include/mqt-core/zx/Simplify.hpp +182 -0
- mqt/core/include/mqt-core/zx/Utils.hpp +212 -0
- mqt/core/include/mqt-core/zx/ZXDefinitions.hpp +93 -0
- mqt/core/include/mqt-core/zx/ZXDiagram.hpp +480 -0
- mqt/core/include/mqt-core/zx/mqt_core_zx_export.h +43 -0
- mqt/core/include/nlohmann/adl_serializer.hpp +55 -0
- mqt/core/include/nlohmann/byte_container_with_subtype.hpp +103 -0
- mqt/core/include/nlohmann/detail/abi_macros.hpp +111 -0
- mqt/core/include/nlohmann/detail/conversions/from_json.hpp +577 -0
- mqt/core/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
- mqt/core/include/nlohmann/detail/conversions/to_json.hpp +479 -0
- mqt/core/include/nlohmann/detail/exceptions.hpp +291 -0
- mqt/core/include/nlohmann/detail/hash.hpp +129 -0
- mqt/core/include/nlohmann/detail/input/binary_reader.hpp +3068 -0
- mqt/core/include/nlohmann/detail/input/input_adapters.hpp +549 -0
- mqt/core/include/nlohmann/detail/input/json_sax.hpp +986 -0
- mqt/core/include/nlohmann/detail/input/lexer.hpp +1643 -0
- mqt/core/include/nlohmann/detail/input/parser.hpp +519 -0
- mqt/core/include/nlohmann/detail/input/position_t.hpp +37 -0
- mqt/core/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
- mqt/core/include/nlohmann/detail/iterators/iter_impl.hpp +760 -0
- mqt/core/include/nlohmann/detail/iterators/iteration_proxy.hpp +235 -0
- mqt/core/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
- mqt/core/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
- mqt/core/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
- mqt/core/include/nlohmann/detail/json_custom_base_class.hpp +39 -0
- mqt/core/include/nlohmann/detail/json_pointer.hpp +988 -0
- mqt/core/include/nlohmann/detail/json_ref.hpp +78 -0
- mqt/core/include/nlohmann/detail/macro_scope.hpp +595 -0
- mqt/core/include/nlohmann/detail/macro_unscope.hpp +46 -0
- mqt/core/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
- mqt/core/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
- mqt/core/include/nlohmann/detail/meta/detected.hpp +70 -0
- mqt/core/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
- mqt/core/include/nlohmann/detail/meta/is_sax.hpp +159 -0
- mqt/core/include/nlohmann/detail/meta/std_fs.hpp +29 -0
- mqt/core/include/nlohmann/detail/meta/type_traits.hpp +795 -0
- mqt/core/include/nlohmann/detail/meta/void_t.hpp +24 -0
- mqt/core/include/nlohmann/detail/output/binary_writer.hpp +1850 -0
- mqt/core/include/nlohmann/detail/output/output_adapters.hpp +147 -0
- mqt/core/include/nlohmann/detail/output/serializer.hpp +988 -0
- mqt/core/include/nlohmann/detail/string_concat.hpp +146 -0
- mqt/core/include/nlohmann/detail/string_escape.hpp +72 -0
- mqt/core/include/nlohmann/detail/string_utils.hpp +37 -0
- mqt/core/include/nlohmann/detail/value_t.hpp +118 -0
- mqt/core/include/nlohmann/json.hpp +5306 -0
- mqt/core/include/nlohmann/json_fwd.hpp +75 -0
- mqt/core/include/nlohmann/ordered_map.hpp +359 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
- mqt/core/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
- mqt/core/include/qdmi/qdmi/client.h +990 -0
- mqt/core/include/qdmi/qdmi/constants.h +1139 -0
- mqt/core/include/qdmi/qdmi/device.h +602 -0
- mqt/core/include/qdmi/qdmi/types.h +78 -0
- mqt/core/include/spdlog/async.h +99 -0
- mqt/core/include/spdlog/async_logger-inl.h +84 -0
- mqt/core/include/spdlog/async_logger.h +74 -0
- mqt/core/include/spdlog/cfg/argv.h +40 -0
- mqt/core/include/spdlog/cfg/env.h +36 -0
- mqt/core/include/spdlog/cfg/helpers-inl.h +107 -0
- mqt/core/include/spdlog/cfg/helpers.h +29 -0
- mqt/core/include/spdlog/common-inl.h +68 -0
- mqt/core/include/spdlog/common.h +406 -0
- mqt/core/include/spdlog/details/backtracer-inl.h +63 -0
- mqt/core/include/spdlog/details/backtracer.h +45 -0
- mqt/core/include/spdlog/details/circular_q.h +115 -0
- mqt/core/include/spdlog/details/console_globals.h +28 -0
- mqt/core/include/spdlog/details/file_helper-inl.h +153 -0
- mqt/core/include/spdlog/details/file_helper.h +61 -0
- mqt/core/include/spdlog/details/fmt_helper.h +141 -0
- mqt/core/include/spdlog/details/log_msg-inl.h +44 -0
- mqt/core/include/spdlog/details/log_msg.h +40 -0
- mqt/core/include/spdlog/details/log_msg_buffer-inl.h +54 -0
- mqt/core/include/spdlog/details/log_msg_buffer.h +32 -0
- mqt/core/include/spdlog/details/mpmc_blocking_q.h +177 -0
- mqt/core/include/spdlog/details/null_mutex.h +35 -0
- mqt/core/include/spdlog/details/os-inl.h +606 -0
- mqt/core/include/spdlog/details/os.h +127 -0
- mqt/core/include/spdlog/details/periodic_worker-inl.h +26 -0
- mqt/core/include/spdlog/details/periodic_worker.h +58 -0
- mqt/core/include/spdlog/details/registry-inl.h +270 -0
- mqt/core/include/spdlog/details/registry.h +131 -0
- mqt/core/include/spdlog/details/synchronous_factory.h +22 -0
- mqt/core/include/spdlog/details/tcp_client-windows.h +135 -0
- mqt/core/include/spdlog/details/tcp_client.h +127 -0
- mqt/core/include/spdlog/details/thread_pool-inl.h +126 -0
- mqt/core/include/spdlog/details/thread_pool.h +117 -0
- mqt/core/include/spdlog/details/udp_client-windows.h +98 -0
- mqt/core/include/spdlog/details/udp_client.h +81 -0
- mqt/core/include/spdlog/details/windows_include.h +11 -0
- mqt/core/include/spdlog/fmt/bin_to_hex.h +224 -0
- mqt/core/include/spdlog/fmt/bundled/args.h +220 -0
- mqt/core/include/spdlog/fmt/bundled/base.h +2989 -0
- mqt/core/include/spdlog/fmt/bundled/chrono.h +2330 -0
- mqt/core/include/spdlog/fmt/bundled/color.h +637 -0
- mqt/core/include/spdlog/fmt/bundled/compile.h +539 -0
- mqt/core/include/spdlog/fmt/bundled/core.h +5 -0
- mqt/core/include/spdlog/fmt/bundled/fmt.license.rst +27 -0
- mqt/core/include/spdlog/fmt/bundled/format-inl.h +1948 -0
- mqt/core/include/spdlog/fmt/bundled/format.h +4244 -0
- mqt/core/include/spdlog/fmt/bundled/os.h +427 -0
- mqt/core/include/spdlog/fmt/bundled/ostream.h +167 -0
- mqt/core/include/spdlog/fmt/bundled/printf.h +633 -0
- mqt/core/include/spdlog/fmt/bundled/ranges.h +850 -0
- mqt/core/include/spdlog/fmt/bundled/std.h +728 -0
- mqt/core/include/spdlog/fmt/bundled/xchar.h +369 -0
- mqt/core/include/spdlog/fmt/chrono.h +23 -0
- mqt/core/include/spdlog/fmt/compile.h +23 -0
- mqt/core/include/spdlog/fmt/fmt.h +30 -0
- mqt/core/include/spdlog/fmt/ostr.h +23 -0
- mqt/core/include/spdlog/fmt/ranges.h +23 -0
- mqt/core/include/spdlog/fmt/std.h +24 -0
- mqt/core/include/spdlog/fmt/xchar.h +23 -0
- mqt/core/include/spdlog/formatter.h +17 -0
- mqt/core/include/spdlog/fwd.h +18 -0
- mqt/core/include/spdlog/logger-inl.h +198 -0
- mqt/core/include/spdlog/logger.h +379 -0
- mqt/core/include/spdlog/mdc.h +52 -0
- mqt/core/include/spdlog/pattern_formatter-inl.h +1340 -0
- mqt/core/include/spdlog/pattern_formatter.h +118 -0
- mqt/core/include/spdlog/sinks/android_sink.h +137 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink-inl.h +142 -0
- mqt/core/include/spdlog/sinks/ansicolor_sink.h +116 -0
- mqt/core/include/spdlog/sinks/base_sink-inl.h +59 -0
- mqt/core/include/spdlog/sinks/base_sink.h +51 -0
- mqt/core/include/spdlog/sinks/basic_file_sink-inl.h +48 -0
- mqt/core/include/spdlog/sinks/basic_file_sink.h +66 -0
- mqt/core/include/spdlog/sinks/callback_sink.h +56 -0
- mqt/core/include/spdlog/sinks/daily_file_sink.h +254 -0
- mqt/core/include/spdlog/sinks/dist_sink.h +81 -0
- mqt/core/include/spdlog/sinks/dup_filter_sink.h +91 -0
- mqt/core/include/spdlog/sinks/hourly_file_sink.h +193 -0
- mqt/core/include/spdlog/sinks/kafka_sink.h +119 -0
- mqt/core/include/spdlog/sinks/mongo_sink.h +108 -0
- mqt/core/include/spdlog/sinks/msvc_sink.h +68 -0
- mqt/core/include/spdlog/sinks/null_sink.h +41 -0
- mqt/core/include/spdlog/sinks/ostream_sink.h +43 -0
- mqt/core/include/spdlog/sinks/qt_sinks.h +304 -0
- mqt/core/include/spdlog/sinks/ringbuffer_sink.h +67 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink-inl.h +179 -0
- mqt/core/include/spdlog/sinks/rotating_file_sink.h +93 -0
- mqt/core/include/spdlog/sinks/sink-inl.h +22 -0
- mqt/core/include/spdlog/sinks/sink.h +34 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
- mqt/core/include/spdlog/sinks/stdout_color_sinks.h +49 -0
- mqt/core/include/spdlog/sinks/stdout_sinks-inl.h +127 -0
- mqt/core/include/spdlog/sinks/stdout_sinks.h +84 -0
- mqt/core/include/spdlog/sinks/syslog_sink.h +104 -0
- mqt/core/include/spdlog/sinks/systemd_sink.h +121 -0
- mqt/core/include/spdlog/sinks/tcp_sink.h +75 -0
- mqt/core/include/spdlog/sinks/udp_sink.h +69 -0
- mqt/core/include/spdlog/sinks/win_eventlog_sink.h +260 -0
- mqt/core/include/spdlog/sinks/wincolor_sink-inl.h +172 -0
- mqt/core/include/spdlog/sinks/wincolor_sink.h +82 -0
- mqt/core/include/spdlog/spdlog-inl.h +96 -0
- mqt/core/include/spdlog/spdlog.h +357 -0
- mqt/core/include/spdlog/stopwatch.h +66 -0
- mqt/core/include/spdlog/tweakme.h +148 -0
- mqt/core/include/spdlog/version.h +11 -0
- mqt/core/ir/__init__.pyi +2078 -0
- mqt/core/ir/operations.pyi +1011 -0
- mqt/core/ir/registers.pyi +91 -0
- mqt/core/ir/symbolic.pyi +177 -0
- mqt/core/ir.cpython-314t-darwin.so +0 -0
- mqt/core/lib/libmqt-core-algorithms.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-algorithms.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-algorithms.dylib +0 -0
- mqt/core/lib/libmqt-core-circuit-optimizer.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-circuit-optimizer.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-circuit-optimizer.dylib +0 -0
- mqt/core/lib/libmqt-core-dd.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-dd.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-dd.dylib +0 -0
- mqt/core/lib/libmqt-core-ds.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-ds.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-ds.dylib +0 -0
- mqt/core/lib/libmqt-core-fomac.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-fomac.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-fomac.dylib +0 -0
- mqt/core/lib/libmqt-core-ir.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-ir.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-ir.dylib +0 -0
- mqt/core/lib/libmqt-core-na-fomac.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-na-fomac.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-na-fomac.dylib +0 -0
- mqt/core/lib/libmqt-core-na.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-na.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-na.dylib +0 -0
- mqt/core/lib/libmqt-core-qasm.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-qasm.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-qasm.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-driver.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-driver.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-driver.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-na-device-gen.a +0 -0
- mqt/core/lib/libmqt-core-qdmi-na-device.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-na-device.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-qdmi-na-device.dylib +0 -0
- mqt/core/lib/libmqt-core-zx.3.3.2.dylib +0 -0
- mqt/core/lib/libmqt-core-zx.3.3.dylib +0 -0
- mqt/core/lib/libmqt-core-zx.dylib +0 -0
- mqt/core/lib/libspdlog.a +0 -0
- mqt/core/lib/pkgconfig/spdlog.pc +13 -0
- mqt/core/na/__init__.py +12 -0
- mqt/core/na/fomac.cpython-314t-darwin.so +0 -0
- mqt/core/na/fomac.pyi +117 -0
- mqt/core/plugins/__init__.py +9 -0
- mqt/core/plugins/qiskit/__init__.py +19 -0
- mqt/core/plugins/qiskit/mqt_to_qiskit.py +420 -0
- mqt/core/plugins/qiskit/qiskit_to_mqt.py +562 -0
- mqt/core/py.typed +2 -0
- mqt/core/share/cmake/mqt-core/AddMQTPythonBinding.cmake +55 -0
- mqt/core/share/cmake/mqt-core/Cache.cmake +33 -0
- mqt/core/share/cmake/mqt-core/FindGMP.cmake +103 -0
- mqt/core/share/cmake/mqt-core/PackageAddTest.cmake +46 -0
- mqt/core/share/cmake/mqt-core/PreventInSourceBuilds.cmake +25 -0
- mqt/core/share/cmake/mqt-core/StandardProjectSettings.cmake +87 -0
- mqt/core/share/cmake/mqt-core/mqt-core-config-version.cmake +85 -0
- mqt/core/share/cmake/mqt-core/mqt-core-config.cmake +52 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets-release.cmake +141 -0
- mqt/core/share/cmake/mqt-core/mqt-core-targets.cmake +446 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
- mqt/core/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +109 -0
- mqt/core/share/cmake/qdmi/Cache.cmake +44 -0
- mqt/core/share/cmake/qdmi/PrefixHandling.cmake +78 -0
- mqt/core/share/cmake/qdmi/prefix_defs.txt +26 -0
- mqt/core/share/cmake/qdmi/qdmi-config-version.cmake +85 -0
- mqt/core/share/cmake/qdmi/qdmi-config.cmake +42 -0
- mqt/core/share/cmake/qdmi/qdmi-targets.cmake +129 -0
- mqt/core/share/cmake/spdlog/spdlogConfig.cmake +44 -0
- mqt/core/share/cmake/spdlog/spdlogConfigTargets-release.cmake +19 -0
- mqt/core/share/cmake/spdlog/spdlogConfigTargets.cmake +118 -0
- mqt/core/share/cmake/spdlog/spdlogConfigVersion.cmake +65 -0
- mqt/core/share/pkgconfig/nlohmann_json.pc +7 -0
- mqt_core-3.3.2.dist-info/METADATA +210 -0
- mqt_core-3.3.2.dist-info/RECORD +546 -0
- mqt_core-3.3.2.dist-info/WHEEL +6 -0
- mqt_core-3.3.2.dist-info/entry_points.txt +4 -0
- mqt_core-3.3.2.dist-info/licenses/LICENSE.md +22 -0
|
@@ -0,0 +1,1831 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// Copyright 2011 John Maddock. Distributed under the Boost
|
|
3
|
+
// Software License, Version 1.0. (See accompanying file
|
|
4
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
5
|
+
|
|
6
|
+
#ifndef BOOST_MP_ET_OPS_HPP
|
|
7
|
+
#define BOOST_MP_ET_OPS_HPP
|
|
8
|
+
|
|
9
|
+
namespace boost { namespace multiprecision {
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
// Non-member operators for number which return expression templates.
|
|
13
|
+
//
|
|
14
|
+
// Note that operators taking rvalue-references DO NOT return expression templates
|
|
15
|
+
// as this can lead to dangling references, see https://github.com/boostorg/multiprecision/issues/175.
|
|
16
|
+
//
|
|
17
|
+
// Unary operators first.
|
|
18
|
+
// Note that these *must* return by value, even though that's somewhat against
|
|
19
|
+
// existing practice. The issue is that in C++11 land one could easily and legitimately
|
|
20
|
+
// write:
|
|
21
|
+
// auto x = +1234_my_user_defined_suffix;
|
|
22
|
+
// which would result in a dangling-reference-to-temporary if unary + returned a reference
|
|
23
|
+
// to it's argument. While return-by-value is obviously inefficient in other situations
|
|
24
|
+
// the reality is that no one ever uses unary operator+ anyway...!
|
|
25
|
+
//
|
|
26
|
+
template <class B, expression_template_option ExpressionTemplates>
|
|
27
|
+
inline constexpr const number<B, ExpressionTemplates> operator+(const number<B, ExpressionTemplates>& v) { return v; }
|
|
28
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
29
|
+
inline constexpr const detail::expression<tag, Arg1, Arg2, Arg3, Arg4> operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return v; }
|
|
30
|
+
template <class B>
|
|
31
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, number<B, et_on> > operator-(const number<B, et_on>& v)
|
|
32
|
+
{
|
|
33
|
+
static_assert(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
|
|
34
|
+
return detail::expression<detail::negate, number<B, et_on> >(v);
|
|
35
|
+
}
|
|
36
|
+
// rvalue ops:
|
|
37
|
+
template <class B>
|
|
38
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on> operator-(number<B, et_on>&& v)
|
|
39
|
+
{
|
|
40
|
+
static_assert(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
|
|
41
|
+
v.backend().negate();
|
|
42
|
+
return std::move(v);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
46
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v)
|
|
47
|
+
{
|
|
48
|
+
static_assert((is_signed_number<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value), "Negating an unsigned type results in ill-defined behavior.");
|
|
49
|
+
return detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v);
|
|
50
|
+
}
|
|
51
|
+
template <class B>
|
|
52
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
53
|
+
detail::expression<detail::complement_immediates, number<B, et_on> > >::type
|
|
54
|
+
operator~(const number<B, et_on>& v) { return detail::expression<detail::complement_immediates, number<B, et_on> >(v); }
|
|
55
|
+
|
|
56
|
+
template <class B>
|
|
57
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
58
|
+
number<B, et_on> >::type
|
|
59
|
+
operator~(number<B, et_on>&& v)
|
|
60
|
+
{
|
|
61
|
+
using default_ops::eval_complement;
|
|
62
|
+
eval_complement(v.backend(), v.backend());
|
|
63
|
+
return std::move(v);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
67
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
|
68
|
+
detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
69
|
+
operator~(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v); }
|
|
70
|
+
//
|
|
71
|
+
// Then addition:
|
|
72
|
+
//
|
|
73
|
+
template <class B>
|
|
74
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >
|
|
75
|
+
operator+(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
76
|
+
{
|
|
77
|
+
return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
template <class B>
|
|
81
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
82
|
+
operator+(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
83
|
+
{
|
|
84
|
+
using default_ops::eval_add;
|
|
85
|
+
eval_add(a.backend(), b.backend());
|
|
86
|
+
return std::move(a);
|
|
87
|
+
}
|
|
88
|
+
template <class B>
|
|
89
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
90
|
+
operator+(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
91
|
+
{
|
|
92
|
+
using default_ops::eval_add;
|
|
93
|
+
eval_add(b.backend(), a.backend());
|
|
94
|
+
return std::move(b);
|
|
95
|
+
}
|
|
96
|
+
template <class B>
|
|
97
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
98
|
+
operator+(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
99
|
+
{
|
|
100
|
+
using default_ops::eval_add;
|
|
101
|
+
eval_add(a.backend(), b.backend());
|
|
102
|
+
return std::move(a);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
template <class B, class V>
|
|
106
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, detail::expression<detail::add_immediates, number<B, et_on>, V> >::type
|
|
107
|
+
operator+(const number<B, et_on>& a, const V& b)
|
|
108
|
+
{
|
|
109
|
+
return detail::expression<detail::add_immediates, number<B, et_on>, V>(a, b);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
template <class B, class V>
|
|
113
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
114
|
+
operator+(number<B, et_on>&& a, const V& b)
|
|
115
|
+
{
|
|
116
|
+
using default_ops::eval_add;
|
|
117
|
+
eval_add(a.backend(), number<B, et_on>::canonical_value(b));
|
|
118
|
+
return std::move(a);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
template <class V, class B>
|
|
122
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type
|
|
123
|
+
operator+(const V& a, const number<B, et_on>& b)
|
|
124
|
+
{
|
|
125
|
+
return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
template <class V, class B>
|
|
129
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
130
|
+
operator+(const V& a, number<B, et_on>&& b)
|
|
131
|
+
{
|
|
132
|
+
using default_ops::eval_add;
|
|
133
|
+
eval_add(b.backend(), number<B, et_on>::canonical_value(a));
|
|
134
|
+
return std::move(b);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
138
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
|
139
|
+
operator+(const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
140
|
+
{
|
|
141
|
+
return detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
145
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
146
|
+
std::is_same<typename detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET> >::value,
|
|
147
|
+
typename detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
148
|
+
operator+(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
149
|
+
{
|
|
150
|
+
a += b;
|
|
151
|
+
return std::move(a);
|
|
152
|
+
}
|
|
153
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
154
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
155
|
+
!std::is_same<typename detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET> >::value,
|
|
156
|
+
typename detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
157
|
+
operator+(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
158
|
+
{
|
|
159
|
+
return detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
163
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
|
164
|
+
operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
165
|
+
{
|
|
166
|
+
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
170
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
171
|
+
std::is_same<typename detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
172
|
+
typename detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
173
|
+
operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
174
|
+
{
|
|
175
|
+
b += a;
|
|
176
|
+
return std::move(b);
|
|
177
|
+
}
|
|
178
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
179
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
180
|
+
!std::is_same<typename detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
181
|
+
typename detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
182
|
+
operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
183
|
+
{
|
|
184
|
+
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
188
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
|
189
|
+
operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
190
|
+
{
|
|
191
|
+
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
192
|
+
}
|
|
193
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
194
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
195
|
+
operator+(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
196
|
+
{
|
|
197
|
+
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
198
|
+
}
|
|
199
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
200
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
201
|
+
operator+(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
202
|
+
{
|
|
203
|
+
return detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
204
|
+
}
|
|
205
|
+
//
|
|
206
|
+
// Fused multiply add:
|
|
207
|
+
//
|
|
208
|
+
template <class V, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
209
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>::value,
|
|
210
|
+
detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
|
211
|
+
operator+(const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
212
|
+
{
|
|
213
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a);
|
|
214
|
+
}
|
|
215
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
216
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>::value,
|
|
217
|
+
detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
|
218
|
+
operator+(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
219
|
+
{
|
|
220
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b);
|
|
221
|
+
}
|
|
222
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
223
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
|
224
|
+
operator+(const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
225
|
+
{
|
|
226
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
230
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
231
|
+
std::is_same<typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
232
|
+
typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type>::type
|
|
233
|
+
operator+(number<B, ET>&& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
234
|
+
{
|
|
235
|
+
a += b;
|
|
236
|
+
return std::move(a);
|
|
237
|
+
}
|
|
238
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
239
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
240
|
+
!std::is_same<typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
241
|
+
typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type>::type
|
|
242
|
+
operator+(number<B, ET>&& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
243
|
+
{
|
|
244
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
248
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
|
249
|
+
operator+(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
250
|
+
{
|
|
251
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
255
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
256
|
+
std::is_same<typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
257
|
+
typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type>::type
|
|
258
|
+
operator+(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
259
|
+
{
|
|
260
|
+
b += a;
|
|
261
|
+
return std::move(b);
|
|
262
|
+
}
|
|
263
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
264
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
265
|
+
!std::is_same<typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
266
|
+
typename detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type>::type
|
|
267
|
+
operator+(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
268
|
+
{
|
|
269
|
+
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
//
|
|
273
|
+
// Fused multiply subtract:
|
|
274
|
+
//
|
|
275
|
+
template <class V, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
276
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>::value,
|
|
277
|
+
detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> > >::type
|
|
278
|
+
operator-(const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
279
|
+
{
|
|
280
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >(detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a));
|
|
281
|
+
}
|
|
282
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
283
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>::value,
|
|
284
|
+
detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
|
285
|
+
operator-(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
286
|
+
{
|
|
287
|
+
return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b);
|
|
288
|
+
}
|
|
289
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
290
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >
|
|
291
|
+
operator-(const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
292
|
+
{
|
|
293
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >(detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
297
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
298
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >::result_type, number<B, ET>>::value,
|
|
299
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >::result_type>::type
|
|
300
|
+
operator-(number<B, ET>&& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
301
|
+
{
|
|
302
|
+
a -= b;
|
|
303
|
+
return std::move(a);
|
|
304
|
+
}
|
|
305
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
306
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
307
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >::result_type, number<B, ET>>::value,
|
|
308
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >::result_type>::type
|
|
309
|
+
operator-(number<B, ET>&& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
|
310
|
+
{
|
|
311
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >(detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
315
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
|
316
|
+
operator-(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
317
|
+
{
|
|
318
|
+
return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
322
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >::result_type
|
|
323
|
+
operator-(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
324
|
+
{
|
|
325
|
+
return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
//
|
|
329
|
+
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
|
330
|
+
//
|
|
331
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
332
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::minus, number<B, ET>, Arg1>
|
|
333
|
+
operator+(const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
334
|
+
{
|
|
335
|
+
return detail::expression<detail::minus, number<B, ET>, Arg1>(a, b.left_ref());
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
339
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
340
|
+
std::is_same<typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
341
|
+
typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type>::type
|
|
342
|
+
operator+(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
343
|
+
{
|
|
344
|
+
a -= b.left_ref();
|
|
345
|
+
return std::move(a);
|
|
346
|
+
}
|
|
347
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
348
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
349
|
+
!std::is_same<typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
350
|
+
typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type>::type
|
|
351
|
+
operator+(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
352
|
+
{
|
|
353
|
+
return detail::expression<detail::minus, number<B, ET>, Arg1>(a, b.left_ref());
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
357
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::minus, number<B, ET>, Arg1>
|
|
358
|
+
operator+(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
359
|
+
{
|
|
360
|
+
return detail::expression<detail::minus, number<B, ET>, Arg1>(b, a.left_ref());
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
364
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
365
|
+
std::is_same<typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
366
|
+
typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type>::type
|
|
367
|
+
operator+(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
368
|
+
{
|
|
369
|
+
b -= a.left_ref();
|
|
370
|
+
return std::move(b);
|
|
371
|
+
}
|
|
372
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
373
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
374
|
+
!std::is_same<typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
375
|
+
typename detail::expression<detail::minus, number<B, ET>, Arg1>::result_type>::type
|
|
376
|
+
operator+(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
377
|
+
{
|
|
378
|
+
return detail::expression<detail::minus, number<B, ET>, Arg1>(b, a.left_ref());
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
template <class B>
|
|
382
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
|
383
|
+
operator+(const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
384
|
+
{
|
|
385
|
+
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref());
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
template <class B>
|
|
389
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >::result_type
|
|
390
|
+
operator+(number<B, et_on>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
391
|
+
{
|
|
392
|
+
using default_ops::eval_subtract;
|
|
393
|
+
eval_subtract(a.backend(), b.left_ref().backend());
|
|
394
|
+
return std::move(a);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
template <class B>
|
|
398
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
|
399
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
|
400
|
+
{
|
|
401
|
+
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref());
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
template <class B>
|
|
405
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >::result_type
|
|
406
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
407
|
+
{
|
|
408
|
+
using default_ops::eval_subtract;
|
|
409
|
+
eval_subtract(b.backend(), a.left_ref().backend());
|
|
410
|
+
return std::move(b);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
template <class B, class V>
|
|
414
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type
|
|
415
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
|
416
|
+
{
|
|
417
|
+
return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(b, a.left_ref());
|
|
418
|
+
}
|
|
419
|
+
template <class B, class B2, expression_template_option ET>
|
|
420
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type
|
|
421
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
|
422
|
+
{
|
|
423
|
+
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(b, a.left_ref());
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
template <class B, class B2, expression_template_option ET>
|
|
427
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >::result_type>::type
|
|
428
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, number<B2, ET>&& b)
|
|
429
|
+
{
|
|
430
|
+
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(b, a.left_ref());
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
template <class B2, expression_template_option ET, class B>
|
|
434
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type
|
|
435
|
+
operator+(const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
436
|
+
{
|
|
437
|
+
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
template <class B2, expression_template_option ET, class B>
|
|
441
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >::result_type>::type
|
|
442
|
+
operator+(number<B2, ET>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
443
|
+
{
|
|
444
|
+
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
template <class B>
|
|
448
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >
|
|
449
|
+
operator+(const detail::expression<detail::negate, number<B, et_on> >& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
450
|
+
{
|
|
451
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b.left_ref()));
|
|
452
|
+
}
|
|
453
|
+
//
|
|
454
|
+
// Subtraction:
|
|
455
|
+
//
|
|
456
|
+
template <class B>
|
|
457
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
|
458
|
+
operator-(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
459
|
+
{
|
|
460
|
+
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
template <class B>
|
|
464
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
465
|
+
operator-(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
466
|
+
{
|
|
467
|
+
using default_ops::eval_subtract;
|
|
468
|
+
eval_subtract(a.backend(), b.backend());
|
|
469
|
+
return std::move(a);
|
|
470
|
+
}
|
|
471
|
+
template <class B>
|
|
472
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
473
|
+
operator-(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
474
|
+
{
|
|
475
|
+
using default_ops::eval_subtract;
|
|
476
|
+
eval_subtract(b.backend(), a.backend());
|
|
477
|
+
b.backend().negate();
|
|
478
|
+
return std::move(b);
|
|
479
|
+
}
|
|
480
|
+
template <class B>
|
|
481
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
482
|
+
operator-(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
483
|
+
{
|
|
484
|
+
using default_ops::eval_subtract;
|
|
485
|
+
eval_subtract(a.backend(), b.backend());
|
|
486
|
+
return std::move(a);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
template <class B, class V>
|
|
490
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, detail::expression<detail::subtract_immediates, number<B, et_on>, V> >::type
|
|
491
|
+
operator-(const number<B, et_on>& a, const V& b)
|
|
492
|
+
{
|
|
493
|
+
return detail::expression<detail::subtract_immediates, number<B, et_on>, V>(a, b);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
template <class B, class V>
|
|
497
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
498
|
+
operator-(number<B, et_on>&& a, const V& b)
|
|
499
|
+
{
|
|
500
|
+
using default_ops::eval_subtract;
|
|
501
|
+
eval_subtract(a.backend(), number<B, et_on>::canonical_value(b));
|
|
502
|
+
return std::move(a);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
template <class V, class B>
|
|
506
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type
|
|
507
|
+
operator-(const V& a, const number<B, et_on>& b)
|
|
508
|
+
{
|
|
509
|
+
return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(a, b);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
template <class V, class B>
|
|
513
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
514
|
+
operator-(const V& a, number<B, et_on>&& b)
|
|
515
|
+
{
|
|
516
|
+
using default_ops::eval_subtract;
|
|
517
|
+
eval_subtract(b.backend(), number<B, et_on>::canonical_value(a));
|
|
518
|
+
b.backend().negate();
|
|
519
|
+
return std::move(b);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
523
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
|
524
|
+
operator-(const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
525
|
+
{
|
|
526
|
+
return detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
530
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
531
|
+
std::is_same<typename detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
532
|
+
typename detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
533
|
+
operator-(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
534
|
+
{
|
|
535
|
+
a -= b;
|
|
536
|
+
return std::move(a);
|
|
537
|
+
}
|
|
538
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
539
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
540
|
+
!std::is_same<typename detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
541
|
+
typename detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
542
|
+
operator-(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
543
|
+
{
|
|
544
|
+
return detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
548
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
|
549
|
+
operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
550
|
+
{
|
|
551
|
+
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
555
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
556
|
+
std::is_same<typename detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
557
|
+
typename detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
558
|
+
operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
559
|
+
{
|
|
560
|
+
b -= a;
|
|
561
|
+
b.backend().negate();
|
|
562
|
+
return std::move(b);
|
|
563
|
+
}
|
|
564
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
565
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
566
|
+
!std::is_same<typename detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
567
|
+
typename detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
568
|
+
operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
569
|
+
{
|
|
570
|
+
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
574
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
|
575
|
+
operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
576
|
+
{
|
|
577
|
+
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
578
|
+
}
|
|
579
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
580
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
581
|
+
operator-(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
582
|
+
{
|
|
583
|
+
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
584
|
+
}
|
|
585
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
586
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
587
|
+
operator-(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
588
|
+
{
|
|
589
|
+
return detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
590
|
+
}
|
|
591
|
+
//
|
|
592
|
+
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
|
593
|
+
//
|
|
594
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
595
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::plus, number<B, ET>, Arg1>
|
|
596
|
+
operator-(const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
597
|
+
{
|
|
598
|
+
return detail::expression<detail::plus, number<B, ET>, Arg1>(a, b.left_ref());
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
602
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
603
|
+
std::is_same<typename detail::expression<detail::plus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
604
|
+
typename detail::expression<detail::plus, number<B, ET>, Arg1>::result_type>::type
|
|
605
|
+
operator-(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
606
|
+
{
|
|
607
|
+
a += b.left_ref();
|
|
608
|
+
return std::move(a);
|
|
609
|
+
}
|
|
610
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
611
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
612
|
+
!std::is_same<typename detail::expression<detail::plus, number<B, ET>, Arg1>::result_type, number<B, ET>>::value,
|
|
613
|
+
typename detail::expression<detail::plus, number<B, ET>, Arg1>::result_type>::type
|
|
614
|
+
operator-(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
615
|
+
{
|
|
616
|
+
return detail::expression<detail::plus, number<B, ET>, Arg1>(a, b.left_ref());
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
620
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >
|
|
621
|
+
operator-(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
622
|
+
{
|
|
623
|
+
return detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >(
|
|
624
|
+
detail::expression<detail::plus, number<B, ET>, Arg1>(b, a.left_ref()));
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
628
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
629
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >::result_type, number<B, ET>>::value,
|
|
630
|
+
typename detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >::result_type>::type
|
|
631
|
+
operator-(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
632
|
+
{
|
|
633
|
+
b += a.left_ref();
|
|
634
|
+
b.backend().negate();
|
|
635
|
+
return std::move(b);
|
|
636
|
+
}
|
|
637
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
638
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
639
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >::result_type, number<B, ET>>::value,
|
|
640
|
+
typename detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >::result_type>::type
|
|
641
|
+
operator-(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
642
|
+
{
|
|
643
|
+
return detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >(detail::expression<detail::plus, number<B, ET>, Arg1>(b, a.left_ref()));
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
template <class B>
|
|
647
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >
|
|
648
|
+
operator-(const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
649
|
+
{
|
|
650
|
+
return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref());
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
template <class B>
|
|
654
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >::result_type
|
|
655
|
+
operator-(number<B, et_on>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
656
|
+
{
|
|
657
|
+
using default_ops::eval_add;
|
|
658
|
+
eval_add(a.backend(), b.left_ref().backend());
|
|
659
|
+
return std::move(a);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
template <class B>
|
|
663
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >
|
|
664
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
|
665
|
+
{
|
|
666
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
667
|
+
detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
template <class B>
|
|
671
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
672
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
673
|
+
typename detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
674
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
675
|
+
{
|
|
676
|
+
using default_ops::eval_add;
|
|
677
|
+
eval_add(b.backend(), a.left_ref().backend());
|
|
678
|
+
b.backend().negate();
|
|
679
|
+
return std::move(b);
|
|
680
|
+
}
|
|
681
|
+
template <class B>
|
|
682
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
683
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
684
|
+
typename detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
685
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
686
|
+
{
|
|
687
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
688
|
+
detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
template <class B, class V>
|
|
692
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V> > >::type
|
|
693
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
|
694
|
+
{
|
|
695
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V> >(detail::expression<detail::add_immediates, number<B, et_on>, V>(a.left_ref(), b));
|
|
696
|
+
}
|
|
697
|
+
template <class B, class B2, expression_template_option ET>
|
|
698
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
|
699
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
|
700
|
+
{
|
|
701
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
template <class B, class B2, expression_template_option ET>
|
|
705
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > >::result_type>::type
|
|
706
|
+
operator-(const detail::expression<detail::negate, number<B, et_on> >& a, number<B2, ET>&& b)
|
|
707
|
+
{
|
|
708
|
+
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
template <class V, class B>
|
|
712
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type
|
|
713
|
+
operator-(const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
714
|
+
{
|
|
715
|
+
return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b.left_ref());
|
|
716
|
+
}
|
|
717
|
+
template <class B2, expression_template_option ET, class B>
|
|
718
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> > >::type
|
|
719
|
+
operator-(const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
720
|
+
{
|
|
721
|
+
return detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
template <class B2, expression_template_option ET, class B>
|
|
725
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> >::result_type>::type
|
|
726
|
+
operator-(number<B2, ET>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
727
|
+
{
|
|
728
|
+
return detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
//
|
|
732
|
+
// Multiplication:
|
|
733
|
+
//
|
|
734
|
+
template <class B>
|
|
735
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >
|
|
736
|
+
operator*(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
737
|
+
{
|
|
738
|
+
return detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
template <class B>
|
|
742
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
743
|
+
operator*(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
744
|
+
{
|
|
745
|
+
using default_ops::eval_multiply;
|
|
746
|
+
eval_multiply(a.backend(), b.backend());
|
|
747
|
+
return std::move(a);
|
|
748
|
+
}
|
|
749
|
+
template <class B>
|
|
750
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
751
|
+
operator*(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
752
|
+
{
|
|
753
|
+
using default_ops::eval_multiply;
|
|
754
|
+
eval_multiply(b.backend(), a.backend());
|
|
755
|
+
return std::move(b);
|
|
756
|
+
}
|
|
757
|
+
template <class B>
|
|
758
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
759
|
+
operator*(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
760
|
+
{
|
|
761
|
+
using default_ops::eval_multiply;
|
|
762
|
+
eval_multiply(a.backend(), b.backend());
|
|
763
|
+
return std::move(a);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
template <class B, class V>
|
|
767
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, detail::expression<detail::multiply_immediates, number<B, et_on>, V> >::type
|
|
768
|
+
operator*(const number<B, et_on>& a, const V& b)
|
|
769
|
+
{
|
|
770
|
+
return detail::expression<detail::multiply_immediates, number<B, et_on>, V>(a, b);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
template <class B, class V>
|
|
774
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
775
|
+
operator*(number<B, et_on>&& a, const V& b)
|
|
776
|
+
{
|
|
777
|
+
using default_ops::eval_multiply;
|
|
778
|
+
eval_multiply(a.backend(), number<B, et_on>::canonical_value(b));
|
|
779
|
+
return std::move(a);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
template <class V, class B>
|
|
783
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::multiply_immediates, V, number<B, et_on> > >::type
|
|
784
|
+
operator*(const V& a, const number<B, et_on>& b)
|
|
785
|
+
{
|
|
786
|
+
return detail::expression<detail::multiply_immediates, V, number<B, et_on> >(a, b);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
template <class V, class B>
|
|
790
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
791
|
+
operator*(const V& a, number<B, et_on>&& b)
|
|
792
|
+
{
|
|
793
|
+
using default_ops::eval_multiply;
|
|
794
|
+
eval_multiply(b.backend(), number<B, et_on>::canonical_value(a));
|
|
795
|
+
return std::move(b);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
799
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
|
800
|
+
operator*(const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
801
|
+
{
|
|
802
|
+
return detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
806
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
807
|
+
std::is_same<typename detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
808
|
+
typename detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
809
|
+
operator*(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
810
|
+
{
|
|
811
|
+
a *= b;
|
|
812
|
+
return std::move(a);
|
|
813
|
+
}
|
|
814
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
815
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
816
|
+
!std::is_same<typename detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
817
|
+
typename detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
818
|
+
operator*(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
819
|
+
{
|
|
820
|
+
return detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
824
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
|
825
|
+
operator*(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
826
|
+
{
|
|
827
|
+
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
831
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
832
|
+
std::is_same<typename detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
833
|
+
typename detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
834
|
+
operator*(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
835
|
+
{
|
|
836
|
+
b *= a;
|
|
837
|
+
return std::move(b);
|
|
838
|
+
}
|
|
839
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
840
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
841
|
+
!std::is_same<typename detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type, number<B, ET>>::value,
|
|
842
|
+
typename detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type>::type
|
|
843
|
+
operator*(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
844
|
+
{
|
|
845
|
+
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
849
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
|
850
|
+
operator*(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
851
|
+
{
|
|
852
|
+
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
853
|
+
}
|
|
854
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
855
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
856
|
+
operator*(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
857
|
+
{
|
|
858
|
+
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
859
|
+
}
|
|
860
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
861
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
862
|
+
operator*(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
863
|
+
{
|
|
864
|
+
return detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
865
|
+
}
|
|
866
|
+
//
|
|
867
|
+
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
|
868
|
+
//
|
|
869
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
870
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >
|
|
871
|
+
operator*(const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
872
|
+
{
|
|
873
|
+
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
|
874
|
+
detail::expression<detail::multiplies, number<B, ET>, Arg1>(a, b.left_ref()));
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
878
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >::result_type
|
|
879
|
+
operator*(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
880
|
+
{
|
|
881
|
+
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
|
882
|
+
detail::expression<detail::multiplies, number<B, ET>, Arg1>(a, b.left_ref()));
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
886
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >
|
|
887
|
+
operator*(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
888
|
+
{
|
|
889
|
+
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
|
890
|
+
detail::expression<detail::multiplies, number<B, ET>, Arg1>(b, a.left_ref()));
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
894
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >::result_type
|
|
895
|
+
operator*(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
896
|
+
{
|
|
897
|
+
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
|
898
|
+
detail::expression<detail::multiplies, number<B, ET>, Arg1>(b, a.left_ref()));
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
template <class B>
|
|
902
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >
|
|
903
|
+
operator*(const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
904
|
+
{
|
|
905
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
906
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()));
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
template <class B>
|
|
910
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
911
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
912
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
913
|
+
operator*(number<B, et_on>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
914
|
+
{
|
|
915
|
+
a *= b.left_ref();
|
|
916
|
+
a.backend().negate();
|
|
917
|
+
return std::move(a);
|
|
918
|
+
}
|
|
919
|
+
template <class B>
|
|
920
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
921
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
922
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
923
|
+
operator*(number<B, et_on>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
924
|
+
{
|
|
925
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
926
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()));
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
template <class B>
|
|
930
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >
|
|
931
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
|
932
|
+
{
|
|
933
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
934
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
template <class B>
|
|
938
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
939
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
940
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
941
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
942
|
+
{
|
|
943
|
+
b *= a.left_ref();
|
|
944
|
+
b.backend().negate();
|
|
945
|
+
return std::move(b);
|
|
946
|
+
}
|
|
947
|
+
template <class B>
|
|
948
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
949
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type, number<B, et_on>>::value,
|
|
950
|
+
typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >::result_type>::type
|
|
951
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
952
|
+
{
|
|
953
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
954
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
template <class B, class V>
|
|
958
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V> > >::type
|
|
959
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
|
960
|
+
{
|
|
961
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V> >(
|
|
962
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, V>(a.left_ref(), b));
|
|
963
|
+
}
|
|
964
|
+
template <class B, class B2, expression_template_option ET>
|
|
965
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
|
966
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
|
967
|
+
{
|
|
968
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
969
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
template <class B, class B2, expression_template_option ET>
|
|
973
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >::result_type>::type
|
|
974
|
+
operator*(const detail::expression<detail::negate, number<B, et_on> >& a, number<B2, ET>&& b)
|
|
975
|
+
{
|
|
976
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
977
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
template <class V, class B>
|
|
981
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V> > >::type
|
|
982
|
+
operator*(const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
983
|
+
{
|
|
984
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V> >(
|
|
985
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, V>(b.left_ref(), a));
|
|
986
|
+
}
|
|
987
|
+
template <class B2, expression_template_option ET, class B>
|
|
988
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
|
989
|
+
operator*(const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
990
|
+
{
|
|
991
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
992
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(b.left_ref(), a));
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
template <class B2, expression_template_option ET, class B>
|
|
996
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >::result_type>::type
|
|
997
|
+
operator*(number<B2, ET>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
998
|
+
{
|
|
999
|
+
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
1000
|
+
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(b.left_ref(), a));
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
//
|
|
1004
|
+
// Division:
|
|
1005
|
+
//
|
|
1006
|
+
template <class B>
|
|
1007
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >
|
|
1008
|
+
operator/(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
1009
|
+
{
|
|
1010
|
+
return detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1011
|
+
}
|
|
1012
|
+
template <class B>
|
|
1013
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
1014
|
+
operator/(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
1015
|
+
{
|
|
1016
|
+
using default_ops::eval_divide;
|
|
1017
|
+
eval_divide(a.backend(), b.backend());
|
|
1018
|
+
return std::move(a);
|
|
1019
|
+
}
|
|
1020
|
+
template <class B>
|
|
1021
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
1022
|
+
operator/(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
1023
|
+
{
|
|
1024
|
+
return detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1025
|
+
}
|
|
1026
|
+
template <class B>
|
|
1027
|
+
inline BOOST_MP_CXX14_CONSTEXPR number<B, et_on>
|
|
1028
|
+
operator/(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
1029
|
+
{
|
|
1030
|
+
using default_ops::eval_divide;
|
|
1031
|
+
eval_divide(a.backend(), b.backend());
|
|
1032
|
+
return std::move(a);
|
|
1033
|
+
}
|
|
1034
|
+
template <class B, class V>
|
|
1035
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, detail::expression<detail::divide_immediates, number<B, et_on>, V> >::type
|
|
1036
|
+
operator/(const number<B, et_on>& a, const V& b)
|
|
1037
|
+
{
|
|
1038
|
+
return detail::expression<detail::divide_immediates, number<B, et_on>, V>(a, b);
|
|
1039
|
+
}
|
|
1040
|
+
template <class B, class V>
|
|
1041
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && !is_equivalent_number_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
1042
|
+
operator/(number<B, et_on>&& a, const V& b)
|
|
1043
|
+
{
|
|
1044
|
+
using default_ops::eval_divide;
|
|
1045
|
+
eval_divide(a.backend(), number<B, et_on>::canonical_value(b));
|
|
1046
|
+
return std::move(a);
|
|
1047
|
+
}
|
|
1048
|
+
template <class V, class B>
|
|
1049
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::divide_immediates, V, number<B, et_on> > >::type
|
|
1050
|
+
operator/(const V& a, const number<B, et_on>& b)
|
|
1051
|
+
{
|
|
1052
|
+
return detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b);
|
|
1053
|
+
}
|
|
1054
|
+
template <class V, class B>
|
|
1055
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, number<B, et_on> >::type
|
|
1056
|
+
operator/(const V& a, number<B, et_on>&& b)
|
|
1057
|
+
{
|
|
1058
|
+
return detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b);
|
|
1059
|
+
}
|
|
1060
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1061
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
|
1062
|
+
operator/(const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1063
|
+
{
|
|
1064
|
+
return detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1065
|
+
}
|
|
1066
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1067
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1068
|
+
std::is_same<typename detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
1069
|
+
typename detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1070
|
+
operator/(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1071
|
+
{
|
|
1072
|
+
a /= b;
|
|
1073
|
+
return std::move(a);
|
|
1074
|
+
}
|
|
1075
|
+
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1076
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1077
|
+
!std::is_same<typename detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, ET>>::value,
|
|
1078
|
+
typename detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1079
|
+
operator/(number<B, ET>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1080
|
+
{
|
|
1081
|
+
return detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1082
|
+
}
|
|
1083
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
1084
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
|
1085
|
+
operator/(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
1086
|
+
{
|
|
1087
|
+
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
1088
|
+
}
|
|
1089
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
1090
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >::result_type
|
|
1091
|
+
operator/(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
1092
|
+
{
|
|
1093
|
+
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
|
1094
|
+
}
|
|
1095
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
1096
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
|
1097
|
+
operator/(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
1098
|
+
{
|
|
1099
|
+
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
1100
|
+
}
|
|
1101
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
1102
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
1103
|
+
operator/(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
1104
|
+
{
|
|
1105
|
+
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
1106
|
+
}
|
|
1107
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1108
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value, detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1109
|
+
operator/(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1110
|
+
{
|
|
1111
|
+
return detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1112
|
+
}
|
|
1113
|
+
//
|
|
1114
|
+
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
|
1115
|
+
//
|
|
1116
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1117
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >
|
|
1118
|
+
operator/(const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1119
|
+
{
|
|
1120
|
+
return detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >(
|
|
1121
|
+
detail::expression<detail::divides, number<B, ET>, Arg1>(a, b.left_ref()));
|
|
1122
|
+
}
|
|
1123
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1124
|
+
inline typename std::enable_if<
|
|
1125
|
+
std::is_same<typename detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >::result_type, number<B, ET>>::value,
|
|
1126
|
+
typename detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >::result_type>::type
|
|
1127
|
+
operator/(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1128
|
+
{
|
|
1129
|
+
a /= b.left_ref();
|
|
1130
|
+
a.backend().negate();
|
|
1131
|
+
return std::move(a);
|
|
1132
|
+
}
|
|
1133
|
+
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1134
|
+
inline typename std::enable_if<
|
|
1135
|
+
!std::is_same<typename detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >::result_type, number<B, ET>>::value,
|
|
1136
|
+
typename detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >::result_type>::type
|
|
1137
|
+
operator/(number<B, ET>&& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1138
|
+
{
|
|
1139
|
+
return detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >(
|
|
1140
|
+
detail::expression<detail::divides, number<B, ET>, Arg1>(a, b.left_ref()));
|
|
1141
|
+
}
|
|
1142
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
1143
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >
|
|
1144
|
+
operator/(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
|
1145
|
+
{
|
|
1146
|
+
return detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >(
|
|
1147
|
+
detail::expression<detail::divides, Arg1, number<B, ET> >(a.left_ref(), b));
|
|
1148
|
+
}
|
|
1149
|
+
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
|
1150
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >::result_type
|
|
1151
|
+
operator/(const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, number<B, ET>&& b)
|
|
1152
|
+
{
|
|
1153
|
+
return detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >(
|
|
1154
|
+
detail::expression<detail::divides, Arg1, number<B, ET> >(a.left_ref(), b));
|
|
1155
|
+
}
|
|
1156
|
+
template <class B>
|
|
1157
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >
|
|
1158
|
+
operator/(const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
1159
|
+
{
|
|
1160
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
1161
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()));
|
|
1162
|
+
}
|
|
1163
|
+
template <class B>
|
|
1164
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >::result_type
|
|
1165
|
+
operator/(number<B, et_on>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
1166
|
+
{
|
|
1167
|
+
a /= b.left_ref();
|
|
1168
|
+
a.backend().negate();
|
|
1169
|
+
return std::move(a);
|
|
1170
|
+
}
|
|
1171
|
+
template <class B>
|
|
1172
|
+
inline BOOST_MP_CXX14_CONSTEXPR detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >
|
|
1173
|
+
operator/(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
|
1174
|
+
{
|
|
1175
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
1176
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b));
|
|
1177
|
+
}
|
|
1178
|
+
template <class B>
|
|
1179
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >::result_type
|
|
1180
|
+
operator/(const detail::expression<detail::negate, number<B, et_on> >& a, number<B, et_on>&& b)
|
|
1181
|
+
{
|
|
1182
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >(
|
|
1183
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b));
|
|
1184
|
+
}
|
|
1185
|
+
template <class B, class V>
|
|
1186
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V> > >::type
|
|
1187
|
+
operator/(const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
|
1188
|
+
{
|
|
1189
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V> >(
|
|
1190
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, V>(a.left_ref(), b));
|
|
1191
|
+
}
|
|
1192
|
+
template <class B, class B2, expression_template_option ET>
|
|
1193
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
|
1194
|
+
operator/(const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
|
1195
|
+
{
|
|
1196
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
1197
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
1198
|
+
}
|
|
1199
|
+
template <class B, class B2, expression_template_option ET>
|
|
1200
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, typename detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > >::result_type>::type
|
|
1201
|
+
operator/(const detail::expression<detail::negate, number<B, et_on> >& a, number<B2, ET>&& b)
|
|
1202
|
+
{
|
|
1203
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > >(
|
|
1204
|
+
detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
|
1205
|
+
}
|
|
1206
|
+
template <class V, class B>
|
|
1207
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > > >::type
|
|
1208
|
+
operator/(const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
1209
|
+
{
|
|
1210
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > >(
|
|
1211
|
+
detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b.left_ref()));
|
|
1212
|
+
}
|
|
1213
|
+
template <class B2, expression_template_option ET, class B>
|
|
1214
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >::value, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > > >::type
|
|
1215
|
+
operator/(const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
1216
|
+
{
|
|
1217
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > >(
|
|
1218
|
+
detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref()));
|
|
1219
|
+
}
|
|
1220
|
+
template <class B2, expression_template_option ET, class B>
|
|
1221
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<number<B2, ET>, typename detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > >::result_type>::value, number<B, et_on> >::type
|
|
1222
|
+
operator/(number<B2, ET>&& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
|
1223
|
+
{
|
|
1224
|
+
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > >(
|
|
1225
|
+
detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref()));
|
|
1226
|
+
}
|
|
1227
|
+
//
|
|
1228
|
+
// Modulus:
|
|
1229
|
+
//
|
|
1230
|
+
template <class B>
|
|
1231
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1232
|
+
detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> > >::type
|
|
1233
|
+
operator%(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
1234
|
+
{
|
|
1235
|
+
return detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1236
|
+
}
|
|
1237
|
+
template <class B>
|
|
1238
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1239
|
+
number<B, et_on> >::type
|
|
1240
|
+
operator%(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
1241
|
+
{
|
|
1242
|
+
using default_ops::eval_modulus;
|
|
1243
|
+
eval_modulus(a.backend(), b.backend());
|
|
1244
|
+
return std::move(a);
|
|
1245
|
+
}
|
|
1246
|
+
template <class B>
|
|
1247
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1248
|
+
number<B, et_on> >::type
|
|
1249
|
+
operator%(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
1250
|
+
{
|
|
1251
|
+
return detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1252
|
+
}
|
|
1253
|
+
template <class B>
|
|
1254
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1255
|
+
number<B, et_on> >::type
|
|
1256
|
+
operator%(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
1257
|
+
{
|
|
1258
|
+
using default_ops::eval_modulus;
|
|
1259
|
+
eval_modulus(a.backend(), b.backend());
|
|
1260
|
+
return std::move(a);
|
|
1261
|
+
}
|
|
1262
|
+
template <class B, class V>
|
|
1263
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer) && !is_equivalent_number_type<V, number<B, et_on> >::value,
|
|
1264
|
+
detail::expression<detail::modulus_immediates, number<B, et_on>, V> >::type
|
|
1265
|
+
operator%(const number<B, et_on>& a, const V& b)
|
|
1266
|
+
{
|
|
1267
|
+
return detail::expression<detail::modulus_immediates, number<B, et_on>, V>(a, b);
|
|
1268
|
+
}
|
|
1269
|
+
template <class B, class V>
|
|
1270
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer) && !is_equivalent_number_type<V, number<B, et_on> >::value,
|
|
1271
|
+
number<B, et_on> >::type
|
|
1272
|
+
operator%(number<B, et_on>&& a, const V& b)
|
|
1273
|
+
{
|
|
1274
|
+
using default_ops::eval_modulus;
|
|
1275
|
+
eval_modulus(a.backend(), number<B, et_on>::canonical_value(b));
|
|
1276
|
+
return std::move(a);
|
|
1277
|
+
}
|
|
1278
|
+
template <class V, class B>
|
|
1279
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1280
|
+
detail::expression<detail::modulus_immediates, V, number<B, et_on> > >::type
|
|
1281
|
+
operator%(const V& a, const number<B, et_on>& b)
|
|
1282
|
+
{
|
|
1283
|
+
return detail::expression<detail::modulus_immediates, V, number<B, et_on> >(a, b);
|
|
1284
|
+
}
|
|
1285
|
+
template <class V, class B>
|
|
1286
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1287
|
+
number<B, et_on> >::type
|
|
1288
|
+
operator%(const V& a, number<B, et_on>&& b)
|
|
1289
|
+
{
|
|
1290
|
+
return detail::expression<detail::modulus_immediates, V, number<B, et_on> >(a, b);
|
|
1291
|
+
}
|
|
1292
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1293
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1294
|
+
detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1295
|
+
operator%(const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1296
|
+
{
|
|
1297
|
+
return detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1298
|
+
}
|
|
1299
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1300
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1301
|
+
std::is_same<typename detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1302
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1303
|
+
typename detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type >::type
|
|
1304
|
+
operator%(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1305
|
+
{
|
|
1306
|
+
a %= b;
|
|
1307
|
+
return std::move(a);
|
|
1308
|
+
}
|
|
1309
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1310
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1311
|
+
!std::is_same<typename detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1312
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1313
|
+
typename detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type >::type
|
|
1314
|
+
operator%(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1315
|
+
{
|
|
1316
|
+
return detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1317
|
+
}
|
|
1318
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1319
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1320
|
+
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
|
1321
|
+
operator%(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
|
1322
|
+
{
|
|
1323
|
+
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1324
|
+
}
|
|
1325
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1326
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1327
|
+
typename detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type >::type
|
|
1328
|
+
operator%(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1329
|
+
{
|
|
1330
|
+
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1331
|
+
}
|
|
1332
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
1333
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
|
1334
|
+
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
|
1335
|
+
operator%(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
1336
|
+
{
|
|
1337
|
+
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
1338
|
+
}
|
|
1339
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
1340
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1341
|
+
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
1342
|
+
operator%(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
1343
|
+
{
|
|
1344
|
+
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
1345
|
+
}
|
|
1346
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1347
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1348
|
+
detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1349
|
+
operator%(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1350
|
+
{
|
|
1351
|
+
return detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1352
|
+
}
|
|
1353
|
+
//
|
|
1354
|
+
// Left shift:
|
|
1355
|
+
//
|
|
1356
|
+
template <class B, class I>
|
|
1357
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<B>::value == number_kind_integer), detail::expression<detail::shift_left, number<B, et_on>, I> >::type
|
|
1358
|
+
operator<<(const number<B, et_on>& a, const I& b)
|
|
1359
|
+
{
|
|
1360
|
+
return detail::expression<detail::shift_left, number<B, et_on>, I>(a, b);
|
|
1361
|
+
}
|
|
1362
|
+
template <class B, class I>
|
|
1363
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_on> >::type
|
|
1364
|
+
operator<<(number<B, et_on>&& a, const I& b)
|
|
1365
|
+
{
|
|
1366
|
+
using default_ops::eval_left_shift;
|
|
1367
|
+
eval_left_shift(a.backend(), b);
|
|
1368
|
+
return std::move(a);
|
|
1369
|
+
}
|
|
1370
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I>
|
|
1371
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1372
|
+
detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type
|
|
1373
|
+
operator<<(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b)
|
|
1374
|
+
{
|
|
1375
|
+
return detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b);
|
|
1376
|
+
}
|
|
1377
|
+
//
|
|
1378
|
+
// Right shift:
|
|
1379
|
+
//
|
|
1380
|
+
template <class B, class I>
|
|
1381
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<B>::value == number_kind_integer),
|
|
1382
|
+
detail::expression<detail::shift_right, number<B, et_on>, I> >::type
|
|
1383
|
+
operator>>(const number<B, et_on>& a, const I& b)
|
|
1384
|
+
{
|
|
1385
|
+
return detail::expression<detail::shift_right, number<B, et_on>, I>(a, b);
|
|
1386
|
+
}
|
|
1387
|
+
template <class B, class I>
|
|
1388
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<B>::value == number_kind_integer),
|
|
1389
|
+
number<B, et_on> >::type
|
|
1390
|
+
operator>>(number<B, et_on>&& a, const I& b)
|
|
1391
|
+
{
|
|
1392
|
+
using default_ops::eval_right_shift;
|
|
1393
|
+
eval_right_shift(a.backend(), b);
|
|
1394
|
+
return std::move(a);
|
|
1395
|
+
}
|
|
1396
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I>
|
|
1397
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<I>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1398
|
+
detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type
|
|
1399
|
+
operator>>(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b)
|
|
1400
|
+
{
|
|
1401
|
+
return detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b);
|
|
1402
|
+
}
|
|
1403
|
+
//
|
|
1404
|
+
// Bitwise AND:
|
|
1405
|
+
//
|
|
1406
|
+
template <class B>
|
|
1407
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1408
|
+
detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> > >::type
|
|
1409
|
+
operator&(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
1410
|
+
{
|
|
1411
|
+
return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1412
|
+
}
|
|
1413
|
+
template <class B>
|
|
1414
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1415
|
+
number<B, et_on> >::type
|
|
1416
|
+
operator&(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
1417
|
+
{
|
|
1418
|
+
using default_ops::eval_bitwise_and;
|
|
1419
|
+
eval_bitwise_and(a.backend(), b.backend());
|
|
1420
|
+
return std::move(a);
|
|
1421
|
+
}
|
|
1422
|
+
template <class B>
|
|
1423
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1424
|
+
number<B, et_on> >::type
|
|
1425
|
+
operator&(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
1426
|
+
{
|
|
1427
|
+
using default_ops::eval_bitwise_and;
|
|
1428
|
+
eval_bitwise_and(b.backend(), a.backend());
|
|
1429
|
+
return std::move(b);
|
|
1430
|
+
}
|
|
1431
|
+
template <class B>
|
|
1432
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1433
|
+
number<B, et_on> >::type
|
|
1434
|
+
operator&(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
1435
|
+
{
|
|
1436
|
+
using default_ops::eval_bitwise_and;
|
|
1437
|
+
eval_bitwise_and(a.backend(), b.backend());
|
|
1438
|
+
return std::move(a);
|
|
1439
|
+
}
|
|
1440
|
+
template <class B, class V>
|
|
1441
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1442
|
+
detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V> >::type
|
|
1443
|
+
operator&(const number<B, et_on>& a, const V& b)
|
|
1444
|
+
{
|
|
1445
|
+
return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V>(a, b);
|
|
1446
|
+
}
|
|
1447
|
+
template <class B, class V>
|
|
1448
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1449
|
+
number<B, et_on> >::type
|
|
1450
|
+
operator&(number<B, et_on>&& a, const V& b)
|
|
1451
|
+
{
|
|
1452
|
+
using default_ops::eval_bitwise_and;
|
|
1453
|
+
eval_bitwise_and(a.backend(), number<B, et_on>::canonical_value(b));
|
|
1454
|
+
return std::move(a);
|
|
1455
|
+
}
|
|
1456
|
+
template <class V, class B>
|
|
1457
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1458
|
+
detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> > >::type
|
|
1459
|
+
operator&(const V& a, const number<B, et_on>& b)
|
|
1460
|
+
{
|
|
1461
|
+
return detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> >(a, b);
|
|
1462
|
+
}
|
|
1463
|
+
template <class V, class B>
|
|
1464
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1465
|
+
number<B, et_on> >::type
|
|
1466
|
+
operator&(const V& a, number<B, et_on>&& b)
|
|
1467
|
+
{
|
|
1468
|
+
using default_ops::eval_bitwise_and;
|
|
1469
|
+
eval_bitwise_and(b.backend(), number<B, et_on>::canonical_value(a));
|
|
1470
|
+
return std::move(b);
|
|
1471
|
+
}
|
|
1472
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1473
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1474
|
+
detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1475
|
+
operator&(const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1476
|
+
{
|
|
1477
|
+
return detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1478
|
+
}
|
|
1479
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1480
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1481
|
+
std::is_same<typename detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1482
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1483
|
+
typename detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type >::type
|
|
1484
|
+
operator&(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1485
|
+
{
|
|
1486
|
+
a &= b;
|
|
1487
|
+
return std::move(a);
|
|
1488
|
+
}
|
|
1489
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1490
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1491
|
+
!std::is_same<typename detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1492
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1493
|
+
typename detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type >::type
|
|
1494
|
+
operator&(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1495
|
+
{
|
|
1496
|
+
return detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1497
|
+
}
|
|
1498
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1499
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1500
|
+
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
|
1501
|
+
operator&(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
|
1502
|
+
{
|
|
1503
|
+
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1504
|
+
}
|
|
1505
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1506
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1507
|
+
std::is_same<typename detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1508
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1509
|
+
typename detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type >::type
|
|
1510
|
+
operator&(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1511
|
+
{
|
|
1512
|
+
b &= a;
|
|
1513
|
+
return std::move(b);
|
|
1514
|
+
}
|
|
1515
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1516
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1517
|
+
!std::is_same<typename detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1518
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1519
|
+
typename detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type >::type
|
|
1520
|
+
operator&(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1521
|
+
{
|
|
1522
|
+
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1523
|
+
}
|
|
1524
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
1525
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
|
1526
|
+
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
|
1527
|
+
operator&(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
1528
|
+
{
|
|
1529
|
+
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
1530
|
+
}
|
|
1531
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
1532
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1533
|
+
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
1534
|
+
operator&(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
1535
|
+
{
|
|
1536
|
+
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
1537
|
+
}
|
|
1538
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1539
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1540
|
+
detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1541
|
+
operator&(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1542
|
+
{
|
|
1543
|
+
return detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1544
|
+
}
|
|
1545
|
+
//
|
|
1546
|
+
// Bitwise OR:
|
|
1547
|
+
//
|
|
1548
|
+
template <class B>
|
|
1549
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1550
|
+
detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> > >::type
|
|
1551
|
+
operator|(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
1552
|
+
{
|
|
1553
|
+
return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1554
|
+
}
|
|
1555
|
+
template <class B>
|
|
1556
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1557
|
+
number<B, et_on> >::type
|
|
1558
|
+
operator|(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
1559
|
+
{
|
|
1560
|
+
using default_ops::eval_bitwise_or;
|
|
1561
|
+
eval_bitwise_or(a.backend(), b.backend());
|
|
1562
|
+
return std::move(a);
|
|
1563
|
+
}
|
|
1564
|
+
template <class B>
|
|
1565
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1566
|
+
number<B, et_on> >::type
|
|
1567
|
+
operator|(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
1568
|
+
{
|
|
1569
|
+
using default_ops::eval_bitwise_or;
|
|
1570
|
+
eval_bitwise_or(b.backend(), a.backend());
|
|
1571
|
+
return std::move(b);
|
|
1572
|
+
}
|
|
1573
|
+
template <class B>
|
|
1574
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1575
|
+
number<B, et_on> >::type
|
|
1576
|
+
operator|(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
1577
|
+
{
|
|
1578
|
+
using default_ops::eval_bitwise_or;
|
|
1579
|
+
eval_bitwise_or(a.backend(), b.backend());
|
|
1580
|
+
return std::move(a);
|
|
1581
|
+
}
|
|
1582
|
+
template <class B, class V>
|
|
1583
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1584
|
+
detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V> >::type
|
|
1585
|
+
operator|(const number<B, et_on>& a, const V& b)
|
|
1586
|
+
{
|
|
1587
|
+
return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V>(a, b);
|
|
1588
|
+
}
|
|
1589
|
+
template <class B, class V>
|
|
1590
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1591
|
+
number<B, et_on> >::type
|
|
1592
|
+
operator|(number<B, et_on>&& a, const V& b)
|
|
1593
|
+
{
|
|
1594
|
+
using default_ops::eval_bitwise_or;
|
|
1595
|
+
eval_bitwise_or(a.backend(), number<B, et_on>::canonical_value(b));
|
|
1596
|
+
return std::move(a);
|
|
1597
|
+
}
|
|
1598
|
+
template <class V, class B>
|
|
1599
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1600
|
+
detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> > >::type
|
|
1601
|
+
operator|(const V& a, const number<B, et_on>& b)
|
|
1602
|
+
{
|
|
1603
|
+
return detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> >(a, b);
|
|
1604
|
+
}
|
|
1605
|
+
template <class V, class B>
|
|
1606
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1607
|
+
number<B, et_on> >::type
|
|
1608
|
+
operator|(const V& a, number<B, et_on>&& b)
|
|
1609
|
+
{
|
|
1610
|
+
using default_ops::eval_bitwise_or;
|
|
1611
|
+
eval_bitwise_or(b.backend(), number<B, et_on>::canonical_value(a));
|
|
1612
|
+
return std::move(b);
|
|
1613
|
+
}
|
|
1614
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1615
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1616
|
+
detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1617
|
+
operator|(const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1618
|
+
{
|
|
1619
|
+
return detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1620
|
+
}
|
|
1621
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1622
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1623
|
+
std::is_same<typename detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1624
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1625
|
+
typename detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1626
|
+
operator|(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1627
|
+
{
|
|
1628
|
+
a |= b;
|
|
1629
|
+
return std::move(a);
|
|
1630
|
+
}
|
|
1631
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1632
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1633
|
+
!std::is_same<typename detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1634
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1635
|
+
typename detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1636
|
+
operator|(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1637
|
+
{
|
|
1638
|
+
return detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1639
|
+
}
|
|
1640
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1641
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1642
|
+
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
|
1643
|
+
operator|(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
|
1644
|
+
{
|
|
1645
|
+
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1646
|
+
}
|
|
1647
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1648
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1649
|
+
std::is_same<typename detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1650
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1651
|
+
typename detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type>::type
|
|
1652
|
+
operator|(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1653
|
+
{
|
|
1654
|
+
b |= a;
|
|
1655
|
+
return std::move(b);
|
|
1656
|
+
}
|
|
1657
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1658
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1659
|
+
!std::is_same<typename detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1660
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1661
|
+
typename detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type>::type
|
|
1662
|
+
operator|(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1663
|
+
{
|
|
1664
|
+
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1665
|
+
}
|
|
1666
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
1667
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
|
1668
|
+
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
|
1669
|
+
operator|(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
1670
|
+
{
|
|
1671
|
+
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
1672
|
+
}
|
|
1673
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
1674
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1675
|
+
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
1676
|
+
operator|(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
1677
|
+
{
|
|
1678
|
+
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
1679
|
+
}
|
|
1680
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1681
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1682
|
+
detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1683
|
+
operator|(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1684
|
+
{
|
|
1685
|
+
return detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1686
|
+
}
|
|
1687
|
+
//
|
|
1688
|
+
// Bitwise XOR:
|
|
1689
|
+
//
|
|
1690
|
+
template <class B>
|
|
1691
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1692
|
+
detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> > >::type
|
|
1693
|
+
operator^(const number<B, et_on>& a, const number<B, et_on>& b)
|
|
1694
|
+
{
|
|
1695
|
+
return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
|
1696
|
+
}
|
|
1697
|
+
template <class B>
|
|
1698
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1699
|
+
number<B, et_on> >::type
|
|
1700
|
+
operator^(number<B, et_on>&& a, const number<B, et_on>& b)
|
|
1701
|
+
{
|
|
1702
|
+
using default_ops::eval_bitwise_xor;
|
|
1703
|
+
eval_bitwise_xor(a.backend(), b.backend());
|
|
1704
|
+
return std::move(a);
|
|
1705
|
+
}
|
|
1706
|
+
template <class B>
|
|
1707
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1708
|
+
number<B, et_on> >::type
|
|
1709
|
+
operator^(const number<B, et_on>& a, number<B, et_on>&& b)
|
|
1710
|
+
{
|
|
1711
|
+
using default_ops::eval_bitwise_xor;
|
|
1712
|
+
eval_bitwise_xor(b.backend(), a.backend());
|
|
1713
|
+
return std::move(b);
|
|
1714
|
+
}
|
|
1715
|
+
template <class B>
|
|
1716
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1717
|
+
number<B, et_on> >::type
|
|
1718
|
+
operator^(number<B, et_on>&& a, number<B, et_on>&& b)
|
|
1719
|
+
{
|
|
1720
|
+
using default_ops::eval_bitwise_xor;
|
|
1721
|
+
eval_bitwise_xor(a.backend(), b.backend());
|
|
1722
|
+
return std::move(a);
|
|
1723
|
+
}
|
|
1724
|
+
template <class B, class V>
|
|
1725
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1726
|
+
detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V> >::type
|
|
1727
|
+
operator^(const number<B, et_on>& a, const V& b)
|
|
1728
|
+
{
|
|
1729
|
+
return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V>(a, b);
|
|
1730
|
+
}
|
|
1731
|
+
template <class B, class V>
|
|
1732
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1733
|
+
number<B, et_on> >::type
|
|
1734
|
+
operator^(number<B, et_on>&& a, const V& b)
|
|
1735
|
+
{
|
|
1736
|
+
using default_ops::eval_bitwise_xor;
|
|
1737
|
+
eval_bitwise_xor(a.backend(), number<B, et_on>::canonical_value(b));
|
|
1738
|
+
return std::move(a);
|
|
1739
|
+
}
|
|
1740
|
+
template <class V, class B>
|
|
1741
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1742
|
+
detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> > >::type
|
|
1743
|
+
operator^(const V& a, const number<B, et_on>& b)
|
|
1744
|
+
{
|
|
1745
|
+
return detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> >(a, b);
|
|
1746
|
+
}
|
|
1747
|
+
template <class V, class B>
|
|
1748
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
|
1749
|
+
number<B, et_on> >::type
|
|
1750
|
+
operator^(const V& a, number<B, et_on>&& b)
|
|
1751
|
+
{
|
|
1752
|
+
using default_ops::eval_bitwise_xor;
|
|
1753
|
+
eval_bitwise_xor(b.backend(), number<B, et_on>::canonical_value(a));
|
|
1754
|
+
return std::move(b);
|
|
1755
|
+
}
|
|
1756
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1757
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1758
|
+
detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1759
|
+
operator^(const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1760
|
+
{
|
|
1761
|
+
return detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1762
|
+
}
|
|
1763
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1764
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1765
|
+
std::is_same<typename detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1766
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1767
|
+
typename detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1768
|
+
operator^(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1769
|
+
{
|
|
1770
|
+
a ^= b;
|
|
1771
|
+
return std::move(a);
|
|
1772
|
+
}
|
|
1773
|
+
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1774
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1775
|
+
!std::is_same<typename detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type, number<B, et_on>>::value
|
|
1776
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1777
|
+
typename detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >::result_type>::type
|
|
1778
|
+
operator^(number<B, et_on>&& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1779
|
+
{
|
|
1780
|
+
return detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1781
|
+
}
|
|
1782
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1783
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<B>::value == number_kind_integer,
|
|
1784
|
+
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
|
1785
|
+
operator^(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
|
1786
|
+
{
|
|
1787
|
+
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1788
|
+
}
|
|
1789
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1790
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1791
|
+
std::is_same<typename detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1792
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1793
|
+
typename detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type>::type
|
|
1794
|
+
operator^(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1795
|
+
{
|
|
1796
|
+
b ^= a;
|
|
1797
|
+
return std::move(b);
|
|
1798
|
+
}
|
|
1799
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
|
1800
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
|
|
1801
|
+
!std::is_same<typename detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type, number<B, et_on>>::value
|
|
1802
|
+
&& number_category<B>::value == number_kind_integer,
|
|
1803
|
+
typename detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >::result_type>::type
|
|
1804
|
+
operator^(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, number<B, et_on>&& b)
|
|
1805
|
+
{
|
|
1806
|
+
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
|
1807
|
+
}
|
|
1808
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
|
1809
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
|
1810
|
+
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
|
1811
|
+
operator^(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
|
1812
|
+
{
|
|
1813
|
+
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
|
1814
|
+
}
|
|
1815
|
+
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
|
1816
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
|
1817
|
+
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V> >::type
|
|
1818
|
+
operator^(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
|
1819
|
+
{
|
|
1820
|
+
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(a, b);
|
|
1821
|
+
}
|
|
1822
|
+
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
|
1823
|
+
inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
|
1824
|
+
operator^(const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
|
1825
|
+
{
|
|
1826
|
+
return detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
}} // namespace boost::multiprecision
|
|
1830
|
+
|
|
1831
|
+
#endif
|