Skip to content

Commit f5f9e86

Browse files
committed
Make comparison slightly more readable by inserting spaces.
1 parent eb307b9 commit f5f9e86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

talk/expert/cpp20concepts.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<typename T,
2828
typename = std::enable_if_t<std::is_floating_point_v<T>>>
2929
bool equal( T e1, T e2 ) {
30-
return std::abs(e1-e2)<std::numeric_limits<T>::epsilon();
30+
return std::abs(e1-e2) < std::numeric_limits<T>::epsilon();
3131
}
3232
... equal(10,5+5) ...
3333
\end{cppcode*}
@@ -62,7 +62,7 @@
6262
template<typename T>
6363
requires std::is_floating_point_v<T>
6464
bool equal( T e1, T e2 ) {
65-
return std::abs(e1-e2)<std::numeric_limits<T>::epsilon();
65+
return std::abs(e1-e2) < std::numeric_limits<T>::epsilon();
6666
}
6767
... equal(10,5+5) ...
6868
\end{cppcode*}
@@ -119,7 +119,7 @@
119119
template< typename T>
120120
concept MyFloatingPoint =
121121
std::is_floating_point_v<T> &&
122-
std::numeric_limits<T>::epsilon()>0;
122+
std::numeric_limits<T>::epsilon() > 0;
123123

124124
template<typename T>
125125
requires MyFloatingPoint<T>

0 commit comments

Comments
 (0)