VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::Args::Opt< T > Struct Template Reference

#include <Args.hpp>

Public Member Functions

template<class U = T>
decltype(U::Value) ValueOr (decltype(U::Value) fallback) const
 

Public Attributes

std::optional< T > Value
 

Detailed Description

template<class T>
struct VoltMod::Args::Opt< T >

An argument the caller may omit. Only trailing arguments may be Opt, and an Opt may not wrap another Opt.

Definition at line 141 of file Args.hpp.

Member Function Documentation

◆ ValueOr()

template<class T >
template<class U = T>
decltype(U::Value) VoltMod::Args::Opt< T >::ValueOr ( decltype(U::Value)  fallback) const
inline

The argument's own value, or fallback when the caller omitted it.

Definition at line 147 of file Args.hpp.

References VoltMod::ReadFile(), and VoltMod::Args::Opt< T >::Value.

Member Data Documentation

◆ Value

template<class T >
std::optional<T> VoltMod::Args::Opt< T >::Value

Definition at line 143 of file Args.hpp.

Referenced by VoltMod::Args::Opt< T >::ValueOr().


The documentation for this struct was generated from the following file: