Skip to content

Commit

Permalink
bux::C_ErrorOrIndex helper method index()
Browse files Browse the repository at this point in the history
  • Loading branch information
buck-yeh committed Oct 17, 2021
1 parent bf173e4 commit 02078ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/bux/EZArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct C_ErrorOrIndex
C_ErrorOrIndex(const std::string &help): m_message(help) {}
C_ErrorOrIndex(auto flagStartInd): m_optIndex(flagStartInd) {}
operator bool() const { return m_message.empty(); }
auto index() const { return m_optIndex.value(); }
std::string message() const;
};

Expand Down

0 comments on commit 02078ed

Please sign in to comment.