Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 257a348

Browse files
committed
do not emit semicolon after if_then_else macro
This macro can be used inside a larger expression and the semicolon would appear before the end of statement. Generally, it's a bad idea to have semicolons in macros.
1 parent 095b0c3 commit 257a348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/tc/core/libraries.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ constexpr auto boundsAsTemplate = R"C(
144144
template<typename T> inline __device__ T floord(T n, T d) {
145145
return n < 0 ? - (-n + d - 1)/d : n / d;
146146
}
147-
#define if_then_else(cond,a,b) (cond) ? (a) : (b);
147+
#define if_then_else(cond,a,b) ((cond) ? (a) : (b))
148148
)C";
149149
} // namespace cpp
150150

0 commit comments

Comments
 (0)