arg_router
1.4.0
C++ command line argument parsing and routing
program_addendum.hpp
1
// Copyright (C) 2022 by Camden Mannett.
2
// Distributed under the Boost Software License, Version 1.0.
3
// (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5
#pragma once
6
7
#include "arg_router/policy/policy.hpp"
8
9
namespace
arg_router::policy
10
{
24
template
<
typename
S>
25
class
program_addendum_t
26
{
27
public
:
29
using
string_type
= S;
30
35
constexpr
explicit
program_addendum_t
([[maybe_unused]] S str = {}) noexcept {}
36
41
[[nodiscard]] constexpr
static
std::string_view
program_addendum
() noexcept {
return
S::get(); }
42
43
private
:
44
static_assert(
utility::utf8::count
(
program_addendum
()) > 1,
45
"Program addendum must be longer than one character"
);
46
};
47
52
template
<
typename
S>
53
constexpr
auto
program_addendum
=
program_addendum_t<S>
{};
54
55
template
<
typename
S>
56
struct
is_policy<program_addendum_t<S>> : std::true_type {
57
};
58
}
// namespace arg_router::policy
arg_router::policy::program_addendum_t
Definition:
program_addendum.hpp:26
arg_router::policy::program_addendum_t::program_addendum
constexpr static std::string_view program_addendum() noexcept
Definition:
program_addendum.hpp:41
arg_router::policy::program_addendum_t::program_addendum_t
constexpr program_addendum_t([[maybe_unused]] S str={}) noexcept
Definition:
program_addendum.hpp:35
arg_router::policy::program_addendum_t::string_type
S string_type
Definition:
program_addendum.hpp:29
arg_router::policy
Definition:
alias.hpp:15
arg_router::policy::program_addendum
constexpr auto program_addendum
Definition:
program_addendum.hpp:53
arg_router::utility::utf8::count
constexpr std::size_t count(std::string_view str) noexcept
Definition:
utf8.hpp:278
arg_router
policy
program_addendum.hpp
Generated by
1.9.1