Skip to content

Commit 15f933f

Browse files
authored
fix: update xhalf_float_impl.hpp for modern clang and gcc to avoid -Wdeprecated-literal-operator warning on Clang 16 that will soon become a hard error.
1 parent 174e99d commit 15f933f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/xtl/xhalf_float_impl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ namespace half_float {
179179
/// half_float::half = 4.2_h;
180180
/// ~~~~
181181
namespace literal {
182-
half operator "" _h(long double);
182+
half operator""_h(long double);
183183
}
184184

185185
/// \internal
@@ -1820,7 +1820,7 @@ namespace half_float {
18201820
template<class,class,std::float_round_style> friend struct detail::half_caster;
18211821
friend class std::numeric_limits<half>;
18221822
friend struct std::hash<half>;
1823-
friend half literal::operator "" _h(long double);
1823+
friend half literal::operator""_h(long double);
18241824
};
18251825

18261826
namespace literal {
@@ -1831,7 +1831,7 @@ namespace half_float {
18311831
/// \param value literal value
18321832
/// \return half with of given value (possibly rounded)
18331833
/// \exception FE_OVERFLOW, ...UNDERFLOW, ...INEXACT according to rounding
1834-
inline half operator "" _h(long double value) { return half(detail::binary, detail::float2half<half::round_style>(value)); }
1834+
inline half operator""_h(long double value) { return half(detail::binary, detail::float2half<half::round_style>(value)); }
18351835
}
18361836

18371837
namespace detail {

0 commit comments

Comments
 (0)