Closed stefansullivan closed 6 years ago
Also, note that
auto width( size_t newWidth ) -> Column& {
assert( newWidth > 0 );
m_width = newWidth;
return *this;
}
in clara_textflow.hpp won't ever trigger the assert, because size_t is an unsigned type, and its invocations will wrap-around if they aren't called correctly
Hi, Sorry for the delay in getting to this. I've pushed a fix for it, along with some basic tests (I plan to do more, property-based style, tests of this sort of thing). Could you check if it works for you now?
Regarding that assert - yeah that looks like a hold over from newWidth
being a signed type. Not harmful, but I'll remove it - thanks.
HI @stefansullivan are you able to confirm (or otherwise) that this is fixed for you? As of yesterday it should be part of the v1.1.0 release.
Thanks for the update @philsquared. I'll update soon and let you know.
Sorry for the slow response. Just finally got around to testing newer version. Looks fine. Thanks for the fix!
I get a
std::bad_alloc
for help strings that are too wide for my console when trying to dostd::cerr << cli << std::endl;
The problem comes from this line of code:
where
optWidth
is not bounded to be less thanconsoleWidth - 7