aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/args.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r--src/libutil/args.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh
index 35a5238c0..71f8f88fa 100644
--- a/src/libutil/args.hh
+++ b/src/libutil/args.hh
@@ -244,6 +244,13 @@ protected:
*/
virtual void initialFlagsProcessed() {}
+ /**
+ * Returns this Args as a RootArgs if it is one, or \ref std::nullopt otherwise.
+ */
+ virtual std::optional<std::reference_wrapper<RootArgs>> asRootArgs() {
+ return std::nullopt;
+ }
+
public:
void addFlag(Flag && flag);