File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -447,19 +447,21 @@ namespace po {
447
447
};
448
448
449
449
template <typename T>
450
- struct parsing_report {
450
+ class parsing_report {
451
+ T m_value; // should be optional
452
+
453
+ public:
451
454
error_code error = error_code::none;
452
- T value; // should be optional
453
455
454
456
parsing_report () = default ;
455
457
parsing_report (error_code error)
456
458
: error(error) {
457
459
}
458
460
parsing_report (T const & value)
459
- : value (value) {
461
+ : m_value (value) {
460
462
}
461
463
parsing_report (T&& value)
462
- : value (std::move(value)) {
464
+ : m_value (std::move(value)) {
463
465
}
464
466
465
467
bool good () const {
@@ -471,7 +473,7 @@ namespace po {
471
473
472
474
T const & get () const {
473
475
PROGRAMOPTIONS_ASSERT (good (), " parsing_report: cannot access data of an erroneous report" );
474
- return value ;
476
+ return m_value ;
475
477
}
476
478
operator T const &() const {
477
479
return get ();
You can’t perform that action at this time.
0 commit comments