Skip to content

Commit 43277c2

Browse files
author
Fytch
committed
simplify assertion in option::get_vector
1 parent bb92550 commit 43277c2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ProgramOptions.hxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,7 @@ namespace po {
11551155
#endif // PROGRAMOPTIONS_DEBUG
11561156

11571157
value_vector_base& get_vector() const {
1158-
PROGRAMOPTIONS_ASSERT( m_data != nullptr || m_fallback != nullptr,
1159-
"cannot access an option with neither user set value nor fallback" );
1158+
PROGRAMOPTIONS_ASSERT( available(), "cannot access an option with neither user set value nor fallback" );
11601159
if( m_data != nullptr )
11611160
return *m_data;
11621161
else

0 commit comments

Comments
 (0)