Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a2fec7d

Browse files
Make comparison slightly more readable by inserting spaces.
1 parent e7592ed commit a2fec7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎talk/expert/cpp20concepts.tex‎

Lines changed: 3 additions & 3 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /