Function is_2s_complement

Synopsis

#include "breeze/meta/is_2s_complement.hpp"

template <typename T>
constexpr bool is_2s_complement() noexcept

Description

Tells whether a type uses a two's complement representation.

If T is not an integral type or a cv-qualified version thereof, the program is ill-formed. Otherwise is_2s_complement() returns true if and only if the type T uses a two's complement representation.

Note
Starting with C++20, two's complement is the only representation allowed by the standard.

Source

Line 37 in breeze/meta/is_2s_complement.hpp.