@@ -22,162 +22,162 @@ namespace decimal {
2222# pragma GCC diagnostic ignored "-Wconversion"
2323#endif
2424
25- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d32 (decimal32_t val) noexcept -> std::uint32_t
25+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d32 (const decimal32_t val) noexcept -> std::uint32_t
2626{
2727 return val.bits_ ;
2828}
2929
30- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d32 (std::uint32_t bits) noexcept -> decimal32_t
30+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d32 (const std::uint32_t bits) noexcept -> decimal32_t
3131{
3232 return from_bits (bits);
3333}
3434
35- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d32f (decimal_fast32_t val) noexcept -> std::uint32_t
35+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d32f (const decimal_fast32_t val) noexcept -> std::uint32_t
3636{
3737 const decimal32_t compliant_val {val};
3838 return to_bid_d32 (compliant_val);
3939}
4040
41- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d32f (std::uint32_t bits) noexcept -> decimal_fast32_t
41+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d32f (const std::uint32_t bits) noexcept -> decimal_fast32_t
4242{
4343 const auto compliant_val {from_bid_d32 (bits)};
4444 const decimal_fast32_t val {compliant_val};
4545 return val;
4646}
4747
48- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d64 (decimal64_t val) noexcept -> std::uint64_t
48+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d64 (const decimal64_t val) noexcept -> std::uint64_t
4949{
5050 return val.bits_ ;
5151}
5252
53- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d64 (std::uint64_t bits) noexcept -> decimal64_t
53+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d64 (const std::uint64_t bits) noexcept -> decimal64_t
5454{
5555 return from_bits (bits);
5656}
5757
58- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d64f (decimal_fast64_t val) noexcept -> std::uint64_t
58+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d64f (const decimal_fast64_t val) noexcept -> std::uint64_t
5959{
6060 const decimal64_t compliant_val {val};
6161 return to_bid_d64 (compliant_val);
6262}
6363
64- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d64f (std::uint64_t bits) noexcept -> decimal_fast64_t
64+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d64f (const std::uint64_t bits) noexcept -> decimal_fast64_t
6565{
6666 const auto compliant_val {from_bid_d64 (bits)};
6767 const decimal_fast64_t val {compliant_val};
6868 return val;
6969}
7070
71- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d128 (decimal128_t val) noexcept -> int128::uint128_t
71+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d128 (const decimal128_t val) noexcept -> int128::uint128_t
7272{
7373 return val.bits_ ;
7474}
7575
76- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128 (int128::uint128_t bits) noexcept -> decimal128_t
76+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128 (const int128::uint128_t bits) noexcept -> decimal128_t
7777{
7878 return from_bits (bits);
7979}
8080
8181#ifdef BOOST_DECIMAL_HAS_INT128
82- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128 (detail::builtin_uint128_t bits) noexcept -> decimal128_t
82+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128 (const detail::builtin_uint128_t bits) noexcept -> decimal128_t
8383{
8484 return from_bits (bits);
8585}
8686#endif
8787
88- BOOST_DECIMAL_EXPORT constexpr auto to_bid_d128f (decimal_fast128_t val) noexcept -> int128::uint128_t
88+ BOOST_DECIMAL_EXPORT constexpr auto to_bid_d128f (const decimal_fast128_t & val) noexcept -> int128::uint128_t
8989{
9090 const decimal128_t compliant_val {val};
9191 return to_bid_d128 (compliant_val);
9292}
9393
94- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128f (int128::uint128_t bits) noexcept -> decimal_fast128_t
94+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128f (const int128::uint128_t bits) noexcept -> decimal_fast128_t
9595{
9696 const auto compliant_val {from_bid_d128 (bits)};
9797 const decimal_fast128_t val {compliant_val};
9898 return val;
9999}
100100
101101#ifdef BOOST_DECIMAL_HAS_INT128
102- BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128f (detail::builtin_uint128_t bits) noexcept -> decimal_fast128_t
102+ BOOST_DECIMAL_EXPORT constexpr auto from_bid_d128f (const detail::builtin_uint128_t bits) noexcept -> decimal_fast128_t
103103{
104104 const auto compliant_val {from_bid_d128 (bits)};
105105 const decimal_fast128_t val {compliant_val};
106106 return val;
107107}
108108#endif
109109
110- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal32_t val) noexcept -> std::uint32_t
110+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal32_t val) noexcept -> std::uint32_t
111111{
112112 return to_bid_d32 (val);
113113}
114114
115- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal_fast32_t val) noexcept -> std::uint32_t
115+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal_fast32_t val) noexcept -> std::uint32_t
116116{
117117 return to_bid_d32f (val);
118118}
119119
120- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal64_t val) noexcept -> std::uint64_t
120+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal64_t val) noexcept -> std::uint64_t
121121{
122122 return to_bid_d64 (val);
123123}
124124
125- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal_fast64_t val) noexcept -> std::uint64_t
125+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal_fast64_t val) noexcept -> std::uint64_t
126126{
127127 return to_bid_d64f (val);
128128}
129129
130- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal128_t val) noexcept -> int128::uint128_t
130+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal128_t val) noexcept -> int128::uint128_t
131131{
132132 return to_bid_d128 (val);
133133}
134134
135- BOOST_DECIMAL_EXPORT constexpr auto to_bid (decimal_fast128_t val) noexcept -> int128::uint128_t
135+ BOOST_DECIMAL_EXPORT constexpr auto to_bid (const decimal_fast128_t & val) noexcept -> int128::uint128_t
136136{
137137 return to_bid_d128f (val);
138138}
139139
140140BOOST_DECIMAL_EXPORT template <typename T>
141- constexpr auto to_bid (T val) noexcept
141+ constexpr auto to_bid (const T val) noexcept
142142{
143143 return to_bid (val);
144144}
145145
146146BOOST_DECIMAL_EXPORT template <typename T = decimal32_t >
147- constexpr auto from_bid (std::uint32_t bits) noexcept
147+ constexpr auto from_bid (const std::uint32_t bits) noexcept
148148 BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T)
149149{
150150 return from_bid_d32 (bits);
151151}
152152
153153BOOST_DECIMAL_EXPORT template <>
154- constexpr auto from_bid<decimal_fast32_t >(std::uint32_t bits) noexcept -> decimal_fast32_t
154+ constexpr auto from_bid<decimal_fast32_t >(const std::uint32_t bits) noexcept -> decimal_fast32_t
155155{
156156 return from_bid_d32f (bits);
157157}
158158
159159BOOST_DECIMAL_EXPORT template <typename T = decimal64_t >
160- constexpr auto from_bid (std::uint64_t bits) noexcept
160+ constexpr auto from_bid (const std::uint64_t bits) noexcept
161161 BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T)
162162{
163163 return from_bid_d64 (bits);
164164}
165165
166166BOOST_DECIMAL_EXPORT template <>
167- constexpr auto from_bid<decimal_fast64_t >(std::uint64_t bits) noexcept -> decimal_fast64_t
167+ constexpr auto from_bid<decimal_fast64_t >(const std::uint64_t bits) noexcept -> decimal_fast64_t
168168{
169169 return from_bid_d64f (bits);
170170}
171171
172172BOOST_DECIMAL_EXPORT template <typename T = decimal128_t >
173- constexpr auto from_bid (int128::uint128_t bits) noexcept
173+ constexpr auto from_bid (const int128::uint128_t bits) noexcept
174174 BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T)
175175{
176176 return from_bid_d128 (bits);
177177}
178178
179179BOOST_DECIMAL_EXPORT template <>
180- constexpr auto from_bid<decimal_fast128_t >(int128::uint128_t bits) noexcept -> decimal_fast128_t
180+ constexpr auto from_bid<decimal_fast128_t >(const int128::uint128_t bits) noexcept -> decimal_fast128_t
181181{
182182 return from_bid_d128f (bits);
183183}
0 commit comments