Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
arg.h File Reference

Structure to store an argument, with possibly a type, name and default value. Refer to args.h for its usage. More...

#include <ostream>
#include "concepts/stringconvert.h"
#include "util/reference.h"
#include "util/typestring.h"
#include "util/string_literal.h"

Go to the source code of this file.

Classes

struct  arg< void, Name, void >
 Untyped Argument (only a name) More...
 
struct  arg< Type, Name, void >
 
struct  arg< Type, Name, Default >
 

Namespaces

namespace  bbm
 

Macros

#define ArgDef(value)   decltype([](){return value; })
 Helper Macro for creating the type of a lambda that returns a value.
 

Functions

template<typename T , bbm::string_literal N, typename D >
std::ostream & operator<< (std::ostream &s, const bbm::arg< T, N, D > &arg)
 Print bbm::arg.
 
template<string_literal NAME>
arg< void, NAME > operator""_arg (void)
 arg literal
 

type traits

@{

template<typename T >
using is_arg = bbm::detail::is_arg_impl< std::decay_t< T > >
 
template<typename T >
constexpr bool is_arg_v = is_arg<T>::value
 

Detailed Description

Structure to store an argument, with possibly a type, name and default value. Refer to args.h for its usage.

Macro Definition Documentation

◆ ArgDef

#define ArgDef (   value)    decltype([](){return value; })

Helper Macro for creating the type of a lambda that returns a value.