[program-options] Line width ignored on add()-ed options_description?
I've got a "primary" options_description instance to which I add()
other "secondary" options_description instances. I want operator<< to
print the primary and all secondary instances with the primary
instance's line width.
I expect that this should happen automagically because, after
construction, I cannot adjust the private m_line_length member of the
secondary instances through any public means. However, it does not.
A small re-create follows my signature.
In my applications, I do not control the construction of the secondary
instances and so I cannot adjust the secondary instance's
construction-time width setting.
Is this behavior a deliberate design decision? Some minor rework to
options_description::print(...) within src/options_description.cpp
would make it possible.
Thanks,
Rhys
#include <iostream>
#include
participants (1)
-
Rhys Ulerich