File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1528,7 +1528,7 @@ namespace po {
1528
1528
1529
1529
public:
1530
1530
option& type ( value_type type ) {
1531
- PROGRAMOPTIONS_ASSERT ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty (),
1531
+ PROGRAMOPTIONS_ASSERT ( ( m_type == type ) || ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty () ),
1532
1532
" type() must be set prior to: fallback(), callback(), parsing" );
1533
1533
PROGRAMOPTIONS_ASSERT ( valid_type ( type ), " type: invalid value_type" );
1534
1534
mutable_operation ();
@@ -1540,14 +1540,14 @@ namespace po {
1540
1540
}
1541
1541
1542
1542
option& single () {
1543
- PROGRAMOPTIONS_ASSERT ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty (),
1543
+ PROGRAMOPTIONS_ASSERT ( ( m_multi == false ) || ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty () ),
1544
1544
" single() must be set prior to: fallback(), callback(), parsing" );
1545
1545
mutable_operation ();
1546
1546
m_multi = false ;
1547
1547
return *this ;
1548
1548
}
1549
1549
option& multi () {
1550
- PROGRAMOPTIONS_ASSERT ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty (),
1550
+ PROGRAMOPTIONS_ASSERT ( ( m_multi == true ) || ( m_fallback == nullptr && m_data == nullptr && m_callbacks.empty () ),
1551
1551
" multi() must be set prior to: fallback(), callback(), parsing" );
1552
1552
mutable_operation ();
1553
1553
m_multi = true ;
You can’t perform that action at this time.
0 commit comments