I suggested a small edit to an answer to make a bit of code more clear, only to have it rejected 3-2. I resubmitted it (as I think that this was mistakenly rejected, and resubmitting was the suggested remedy from another meta post), and it was rejected 3-1. Both times the tag is "This edit changes too much in the original post; the original meaning or intent of the post would be lost."
https://stackoverflow.com/review/suggested-edits/5620178
https://stackoverflow.com/review/suggested-edits/5620911
The answer, concerning how to get pretty strings for types, has a block
std::unique_ptr<char, void(*)(void*)> res {
abi::__cxa_demangle(name, NULL, NULL, &status),
std::free
};
which I changed to
std::unique_ptr<char, decltype(&std::free)> res {
abi::__cxa_demangle(name, NULL, NULL, &status),
std::free
};
Functionally these two are equivalent, but I think that the style is nicer in my edit and makes the intent of the line much more clear (ie. it takes a second to figure out what the void(*)(void*)
means, but it's just the type signature of std::free. So why not just say that outright?).
Anyway, I don't want to get in an edit war or anything but I was surprised that this was rejected. Are these not the type of edits that I should be making? And if so, why not?