10 #if !defined(SG14_ELASTIC_FIXED_POINT_H) 11 #define SG14_ELASTIC_FIXED_POINT_H 1 13 #include "elastic_integer.h" 14 #include <sg14/fixed_point> 30 template<
int IntegerDigits,
int FractionalDigits = 0,
class Narrowest =
signed>
54 typename Narrowest = int,
55 typename Integral = int,
57 constexpr
elastic_fixed_point<_impl::max(_impl::used_bits_symmetric(Value), 1), -trailing_bits(Value), Narrowest>
79 template<
class Narrowest =
int,
class Integral =
int>
105 template<
char... Digits>
106 constexpr
auto operator "" _elastic()
107 -> decltype(
make_elastic_fixed_point<
int, std::intmax_t, _const_integer_impl::digits_to_integral<Digits...>::value>()) {
113 #endif // SG14_ELASTIC_FIXED_POINT_H constexpr elastic_fixed_point< _impl::max(_impl::used_bits_symmetric(Value), 1), -trailing_bits(Value), Narrowest > make_elastic_fixed_point(const_integer< Integral, Value >=const_integer< Integral, Value >{})
generate an sg14::elastic_fixed_point object of given value
Definition: elastic_fixed_point.h:58
a compile-time-only integer type like a std::integral_constant with arithmetic support ...
Definition: const_integer.h:98
literal real number approximation that uses fixed-point arithmetic
Definition: fixed_point_type.h:20
study group 14 of the C++ working group
Definition: const_integer.h:22