---
title: "ClikaRT::cli::Flag"
sidebar_label: "Flag"
description: "A boolean switch (carries no value). count() on the parsed Args supports -vvv. Non-owning handle, valid while the owning App lives."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/cli/arg.h`

A boolean switch (carries no value). `count()` on the parsed [`Args`](./Args.md) supports `-vvv`. Non-owning handle, valid while the owning [`App`](./App.md) lives.

## Member functions

### help() {#help}

<div class="api-signature">

`Flag&` **`help`**(`std::string_view` `text`)

</div>

The help line shown for this flag; chainable.

<div class="api-declared">

Declared in `ClikaRT/cli/arg.h`, line 130

</div>

### hidden() {#hidden}

<div class="api-signature">

`Flag&` **`hidden`**(`bool` `v` `=` `true`)

</div>

Hide from help/usage (still parsed); chainable.

<div class="api-declared">

Declared in `ClikaRT/cli/arg.h`, line 132

</div>

### alias() {#alias}

<div class="api-signature">

`Flag&` **`alias`**(`std::string_view` `name`)

</div>

An additional accepted spelling; chainable.

<div class="api-declared">

Declared in `ClikaRT/cli/arg.h`, line 134

</div>

### conflicts\_with() {#conflicts_with}

<div class="api-signature">

`Flag&` **`conflicts_with`**(`std::string_view` `other`)

</div>

Mutual exclusion with `other`; both present is a usage error.

<div class="api-declared">

Declared in `ClikaRT/cli/arg.h`, line 136

</div>

### needs() {#needs}

<div class="api-signature">

`Flag&` **`needs`**(`std::string_view` `other`)

</div>

Require `other` whenever this flag is present.

<div class="api-declared">

Declared in `ClikaRT/cli/arg.h`, line 138

</div>
