CPP-AP 2.2.6
Command-line argument parser for C++20
Loading...
Searching...
No Matches
specifiers.hpp
Go to the documentation of this file.
1// Copyright (c) 2023-2025 Jakub MusiaƂ
2// This file is part of the CPP-AP project (https://github.com/SpectraL519/cpp-ap).
3// Licensed under the MIT License. See the LICENSE file in the project root for full license information.
4
10#pragma once
11
13
14#include <functional>
15
16namespace ap::action_type {
17
24struct observe {
25 template <ap::detail::c_argument_value_type T>
26 using type = std::function<void(const T&)>;
27};
28
35struct transform {
36 template <ap::detail::c_argument_value_type T>
37 using type = std::function<T(const T&)>;
38};
39
46struct modify {
47 template <ap::detail::c_argument_value_type T>
48 using type = std::function<void(T&)>;
49};
50
59struct on_flag {
60 using type = std::function<void()>;
61};
62
63} // namespace ap::action_type
Provides the general concept definitions.
A modifying value action specifier.
An observing value action specifier.
An on-flag action specifier.
A transformating value action specifier.