Skip to content

Commit 953874f

Browse files
SizzinSealdjava
andauthored
fix SentinelValue floating-point values
Co-authored-by: Leo Riesenbach <[email protected]>
1 parent 479f1c4 commit 953874f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/common/result.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ constexpr T sentinel_v = SentinelValue<T>::value;
4242
// partial specialization for HasSentinel.
4343
// any integral type (e.g double, int, uint8, etc) has a sentinel value equal to its maximum value.
4444
// floating-point numbers with infinity support have sentinel values equal to infinity.
45-
template<std::integral T>
45+
template<typename T>
46+
requires (std::integral<T> || std::floating_point<T>)
4647
class SentinelValue<T> {
4748
public:
4849
static constexpr T get() {

0 commit comments

Comments
 (0)