-
Notifications
You must be signed in to change notification settings - Fork 442
Open
Description
Description
Hi, I'm using Uncrustify 0.80.1 and the default config from https://github.com/uncrustify/uncrustify/blob/master/documentation/htdocs/default.cfg and else if constexpr block is not correctly formatted
Original
if constexpr (std::is_same_v<T, bool>) {
values.push_back(arg ? "true" : "false");
} else if constexpr (std::is_same_v<T, string>) {
values.push_back(string::format("\"%@\"", arg));
} else if constexpr (std::is_same_v<T, json>) {
values.push_back(arg.dump());
} else {
std::cout << "Unsupported type" << std::endl;
}
I'm expecting uncrustify to leave this untouched but it formats the code as follows
Formatted
if constexpr (std::is_same_v<T, bool>) {
values.push_back(arg ? "true" : "false");
} else if constexpr (std::is_same_v<T, string>) {
values.push_back(string::format("\"%@\"", arg));
} else if constexpr (std::is_same_v<T, json>) {
values.push_back(arg.dump());
} else {
std::cout << "Unsupported type" << std::endl;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels