[/ Copyright 2011 - 2020 John Maddock. Copyright 2013 - 2019 Paul A. Bristow. Copyright 2013 Christopher Kormanyos. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). ] [section:cpp_int_ref cpp_int] namespace boost{ namespace multiprecision{ typedef unspecified-type limb_type; enum cpp_integer_type { signed_magnitude, unsigned_magnitude }; enum cpp_int_check_type { checked, unchecked }; template > class cpp_int_backend; // // Expression templates default to et_off if there is no allocator: // template struct expression_template_default > { static const expression_template_option value = et_off; }; typedef number > cpp_int; // arbitrary precision integer typedef rational_adaptor > cpp_rational_backend; typedef number cpp_rational; // arbitrary precision rational number // Fixed precision unsigned types: typedef number > uint128_t; typedef number > uint256_t; typedef number > uint512_t; typedef number > uint1024_t; // Fixed precision signed types: typedef number > int128_t; typedef number > int256_t; typedef number > int512_t; typedef number > int1024_t; // Over again, but with checking enabled this time: typedef number > checked_cpp_int; typedef rational_adaptor > checked_cpp_rational_backend; typedef number checked_cpp_rational; // Checked fixed precision unsigned types: typedef number > checked_uint128_t; typedef number > checked_uint256_t; typedef number > checked_uint512_t; typedef number > checked_uint1024_t; // Fixed precision signed types: typedef number > checked_int128_t; typedef number > checked_int256_t; typedef number > checked_int512_t; typedef number > checked_int1024_t; }} // namespaces Class template `cpp_int_backend` fulfils all of the requirements for a [link boost_multiprecision.ref.backendconc Backend] type. Its members and non-member functions are deliberately not documented: these are considered implementation details that are subject to change. The template arguments are: [variablelist [[MinBits][Determines the number of Bits to store directly within the object before resorting to dynamic memory allocation. When zero, this field is determined automatically based on how many bits can be stored in union with the dynamic storage header: setting a larger value may improve performance as larger integer values will be stored internally before memory allocation is required.]] [[MaxBits][Determines the maximum number of bits to be stored in the type: resulting in a fixed precision type. When this value is the same as MinBits, then the Allocator parameter is ignored, as no dynamic memory allocation will ever be performed: in this situation the Allocator parameter should be set to type `void`. Note that this parameter should not be used simply to prevent large memory allocations, not only is that role better performed by the allocator, but fixed precision integers have a tendency to allocate all of MaxBits of storage more often than one would expect.]] [[SignType][Determines whether the resulting type is signed or not. Note that for [@http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic arbitrary precision] types this parameter must be `signed_magnitude`. For fixed precision types then this type may be either `signed_magnitude` or `unsigned_magnitude`.]] [[Checked][This parameter has two values: `checked` or `unchecked`. See the [link boost_multiprecision.tut.ints.cpp_int tutorial] for more information.]] [[Allocator][The allocator to use for dynamic memory allocation, or type `void` if MaxBits == MinBits.]] ] The type of `number_category >::type` is `std::integral_constant`. More information on this type can be found in the [link boost_multiprecision.tut.ints.cpp_int tutorial]. [endsect]