Skip to content

Commit 2c5bb1c

Browse files
Lorak-mmkjul-stas
authored andcommitted
Fixed building driver with clang
Implicitly converting string literal to bool warns on clang, and this warn was turned to error because of -Werror.
1 parent c3f675f commit 2c5bb1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/optional/optional_akrzemi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ template <class T> inline constexpr typename std::remove_reference<T>::type&& co
219219
#if defined NDEBUG
220220
# define TR2_OPTIONAL_ASSERTED_EXPRESSION(CHECK, EXPR) (EXPR)
221221
#else
222-
# define TR2_OPTIONAL_ASSERTED_EXPRESSION(CHECK, EXPR) ((CHECK) ? (EXPR) : ([]{assert(!#CHECK);}(), (EXPR)))
222+
# define TR2_OPTIONAL_ASSERTED_EXPRESSION(CHECK, EXPR) ((CHECK) ? (EXPR) : ([]{assert(((void)#CHECK, false));}(), (EXPR)))
223223
#endif
224224

225225

0 commit comments

Comments
 (0)