mimic++ v2
Loading...
Searching...
No Matches
Fwd.hpp
Go to the documentation of this file.
1// // Copyright Dominic (DNKpp) Koepke 2024 - 2024.
2// // Distributed under the Boost Software License, Version 1.0.
3// // (See accompanying file LICENSE_1_0.txt or copy at
4// // https://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef MIMICPP_FWD_HPP
7#define MIMICPP_FWD_HPP
8
9#pragma once
10
11#include <string>
12
13namespace mimicpp::call
14{
15 template <typename Return, typename... Args>
16 class Info;
17}
18
19namespace mimicpp
20{
21 template <typename Signature>
23
24 template <typename Signature>
26
27 template <typename Signature>
29
30 template <typename Signature>
32
33 template <typename Signature>
35
36 template <typename Signature>
38
39 template <typename Signature>
41
42 template <typename Signature>
44
45 template <std::size_t index, typename Signature>
47
48 template <std::size_t index, typename Signature>
50
51 template <typename Signature>
53
54 template <typename Signature>
56
57 template <typename First, typename Second>
59
60 template <typename First, typename Second>
62
63 template <typename First, typename... Others>
65
66 template <typename First, typename... Others>
67 inline constexpr bool is_overload_set_v = is_overload_set<First, Others...>::value;
68
69 template <typename T>
70 struct is_character;
71
72 template <typename T>
74
75 template <typename Signature>
76 requires std::same_as<Signature, signature_decay_t<Signature>>
78
79 template <typename Signature>
80 requires std::same_as<Signature, signature_decay_t<Signature>>
82
84
85 enum class MatchResult
86 {
87 none,
89 full
90 };
91
92 enum class Constness
93 {
94 non_const = 0b01,
95 as_const = 0b10,
97 };
98
99 enum class ValueCategory
100 {
101 lvalue = 0b01,
102 rvalue = 0b10,
103 any = lvalue | rvalue
104 };
105
106 class CallReport;
107 class MatchReport;
108 class ExpectationReport;
109
110 using CharT = char;
111 using CharTraitsT = std::char_traits<CharT>;
112 using StringT = std::basic_string<CharT, CharTraitsT>;
113}
114
116{
117 enum Tag
118 : std::ptrdiff_t
119 {
120 };
121
122 enum class Id
123 : int
124 {
125 };
126
127 struct rating
128 {
129 int priority{};
131
132 [[nodiscard]]
133 friend bool operator==(const rating&, const rating&) = default;
134 };
135}
136
137#endif
Collects all expectations for a specific (decayed) signature.
Definition Fwd.hpp:81
The base interface for expectations.
Definition Fwd.hpp:77
Takes the ownership of an expectation and check whether it's satisfied during destruction.
Definition Expectation.hpp:568
Definition Fwd.hpp:16
Definition Call.hpp:20
Definition Fwd.hpp:116
Tag
Definition Fwd.hpp:119
Id
Definition Fwd.hpp:124
Definition BoostTest.hpp:20
MatchResult
Definition Fwd.hpp:86
typename signature_remove_noexcept< Signature >::type signature_remove_noexcept_t
Definition Fwd.hpp:31
constexpr bool is_overload_set_v
Definition Fwd.hpp:67
char CharT
Definition Fwd.hpp:110
constexpr bool is_overloadable_with_v
Definition Fwd.hpp:61
std::char_traits< CharT > CharTraitsT
Definition Fwd.hpp:111
ValueCategory
Definition Fwd.hpp:100
typename signature_param_type< index, Signature >::type signature_param_type_t
Definition Fwd.hpp:49
typename signature_add_noexcept< Signature >::type signature_add_noexcept_t
Definition Fwd.hpp:25
Constness
Definition Fwd.hpp:93
typename signature_param_list< Signature >::type signature_param_list_t
Definition Fwd.hpp:55
typename signature_return_type< Signature >::type signature_return_type_t
Definition Fwd.hpp:43
typename signature_decay< Signature >::type signature_decay_t
Definition Fwd.hpp:37
std::basic_string< CharT, CharTraitsT > StringT
Definition Fwd.hpp:112
Primary template, which always yields false.
Definition String.hpp:46
Definition Fwd.hpp:64
Definition TypeTraits.hpp:569
Definition Fwd.hpp:128
Tag tag
Definition Fwd.hpp:130
int priority
Definition Fwd.hpp:129
friend bool operator==(const rating &, const rating &)=default
Definition Fwd.hpp:22
Definition Fwd.hpp:34
Definition Fwd.hpp:52
Definition Fwd.hpp:46
Definition Fwd.hpp:40
Definition Fwd.hpp:73