From 9be381b796e18aba8f53ce29b90d652ebd6fb6ec Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Thu, 23 Jan 2020 09:05:42 +0200 Subject: [PATCH] [#1071] static assert if sizeof(bool) is not 1 --- src/lib/mysql/mysql_constants.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/mysql/mysql_constants.h b/src/lib/mysql/mysql_constants.h index ba0908907f..76e9703ad7 100644 --- a/src/lib/mysql/mysql_constants.h +++ b/src/lib/mysql/mysql_constants.h @@ -27,6 +27,9 @@ const my_bool MLM_FALSE = 0; const my_bool MLM_TRUE = 1; #else +///@brief check for bool size +static_assert(sizeof(bool) == 1, "unsupported bool size"); + /// @brief my_bool type in MySQL 8.x. typedef bool my_bool;