For example, the MySQL ++ library has macros that can be used to define simple structures based on the definition of the sql table, for example:
sql_create_6(stock, 1, 6, mysqlpp::sql_char, item, mysqlpp::sql_bigint, num, mysqlpp::sql_double, weight, mysqlpp::sql_decimal, price, mysqlpp::sql_date, sdate, mysqlpp::Null<mysqlpp::sql_mediumtext>, description)
The problem is that clang-format will reformat it in a way that is much harder to read (each parameter on a new line). Most code formatters can recognize special off-format / format-on comments, but I haven't found anything like this in the clang format guide.
c ++ clang-format
Alex
source share