fixed_point128 1.0.1.0
128 bit integer, fixed point and floating point arithmetic for C++20
Loading...
Searching...
No Matches
int128_shared.h File Reference

Implementation shared by the 128 bit signed and unsigned integer types. More...

#include <format>
#include <functional>
#include <limits>
#include <istream>
#include <ostream>
#include "fp128_shared.h"

Go to the source code of this file.

Classes

class  fp128::int128_base< IsSigned >
 128 bit integer class, signed or unsigned depending on the template parameter. More...
class  std::numeric_limits< fp128::int128_base< IsSigned > >
 Numeric properties of the 128 bit integer types. More...
struct  std::hash< fp128::int128_base< IsSigned > >
 Hash support, so a 128 bit integer can be a key in an unordered container. More...
struct  std::formatter< fp128::int128_base< IsSigned >, char >
 std::format support for the 128 bit integer types. More...

Namespaces

namespace  fp128
 Everything the library provides.
namespace  std
 STL namespace.

Functions

template<bool IsSigned>
std::ostream & fp128::operator<< (std::ostream &os, const int128_base< IsSigned > &value)
 Writes a 128 bit integer to a stream, honouring its width, fill and adjustment.
template<bool IsSigned>
std::istream & fp128::operator>> (std::istream &is, int128_base< IsSigned > &value)
 Reads a 128 bit integer from a stream, the way the builtin integer extractors do.

Detailed Description

Implementation shared by the 128 bit signed and unsigned integer types.

Provides fp128::int128_base, a single class template parameterized on the signedness of the type. fp128::uint128_t and fp128::int128_t are aliases of its two instantiations, declared by uint128_t.h and int128_t.h respectively. Include one of those headers rather than this one.

See also
uint128_t.h for the unsigned alias and its user-defined literal.
int128_t.h for the signed alias, its user-defined literal and abs().
fp128_shared.h for supporting intrinsics and utilities.

Definition in file int128_shared.h.