Skip to content

Commit d0b9bd3

Browse files
author
Rogerluo
authored
Merge 679fb6b into d2edc82
2 parents d2edc82 + 679fb6b commit d0b9bd3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Measurements.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,8 @@ include("show.jl")
126126
include("parsing.jl")
127127
include("plot-recipes.jl")
128128

129+
@static if VERSION > v"1.8-"
130+
include("compat.1.8.jl")
131+
end
132+
129133
end # module

src/compat.1.8.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://github.com/JuliaLang/julia/pull/25085
2+
Base.ceil(::Type{Bool}, x::Measurement) = measurement(ceil(Bool, value(x)))
3+
Base.round(::Type{Bool}, x::Measurement) = measurement(round(Bool, value(x)))
4+
Base.trunc(::Type{Bool}, x::Measurement) = measurement(trunc(Bool, value(x)))
5+
Base.floor(::Type{Bool}, x::Measurement) = measurement(floor(Bool, value(x)))

0 commit comments

Comments
 (0)