There is limited support for
in the library, currently the
front end supports
on default construction and all forwarding constructors, but not on any of
the non-member operators. So if some type
is a literal type, then
is also a literal type, and you will be able to compile-time-construct such
a type from any literal that
is compile-time-constructible from. However, you will not be able to perform
compile-time arithmetic on such types.
Currently the only backend type provided by the library that is also a literal
type are instantiations of
where the Allocator parameter is type
and the Checked parameter is
using namespace boost::multiprecision; constexpr int128_t i = 0; // OK, fixed precision int128_t has no allocator. constexpr uint1024_t j = 0xFFFFFFFF00000000uLL; // OK, fixed precision uint1024_t has no allocator. constexpr checked_uint128_t k = -1; // Error, checked type is not a literal type as we need runtime error checking. constexpr cpp_int l = 2; // Error, type is not a literal as it performs memory management.