CPP-AP 2.2.6
Command-line argument parser for C++20
Loading...
Searching...
No Matches
argument_base.hpp File Reference

Defines the base argument class and common utility. More...

#include "argument_descriptor.hpp"
#include "argument_name.hpp"
#include <any>
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

class  ap::detail::argument_base
 Argument class interface. More...
 

Functions

template<c_argument_value_type T>
bool ap::detail::is_valid_choice (const T &value, const std::vector< T > &choices) noexcept
 Checks if the provided choice is valid for the given set of choices.
 

Detailed Description

Defines the base argument class and common utility.

Definition in file argument_base.hpp.

Function Documentation

◆ is_valid_choice()

template<c_argument_value_type T>
bool ap::detail::is_valid_choice ( const T &  value,
const std::vector< T > &  choices 
)
noexcept

Checks if the provided choice is valid for the given set of choices.

Parameters
valueA value, the validity of which is to be checked.
choicesThe set against which the choice validity will be checked.
Returns
true if the choice is valid, false otherwise.

Definition at line 104 of file argument_base.hpp.