mimic++ v5
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#include <string_view>
13
14namespace mimicpp::call
15{
16 template <typename Return, typename... Args>
17 class Info;
18}
19
20namespace mimicpp
21{
22 enum class Constness
23 {
24 non_const = 0b01,
25 as_const = 0b10,
27 };
28
29 enum class ValueCategory
30 {
31 lvalue = 0b01,
32 rvalue = 0b10,
33 any = lvalue | rvalue
34 };
35
40 template <typename... Args>
41 struct type_list
42 {
43 };
44
50 template <typename Signature>
52
58 template <typename Signature>
60
66 template <typename Signature>
68
74 template <typename Signature>
76
82 template <typename Signature>
84
90 template <typename Signature>
92
98 template <typename Signature>
100
106 template <typename Signature>
108
114 template <typename Signature>
116
122 template <typename Signature>
124
130 template <typename Signature>
132
138 template <typename Signature>
140
146 template <typename Signature>
147 struct signature_decay;
148
154 template <typename Signature>
156
162 template <typename Signature>
164
170 template <typename Signature>
172
178 template <typename Signature>
180
186 template <typename Signature>
188
194 template <typename Signature>
196
202 template <typename Signature>
204
210 template <typename Signature>
212
218 template <typename Signature>
220
226 template <std::size_t index, typename Signature>
228
234 template <std::size_t index, typename Signature>
236
242 template <typename Signature>
244
250 template <typename Signature>
252
259 template <typename First, typename Second>
261
268 template <typename First, typename Second>
270
277 template <typename First, typename... Others>
278 struct is_overload_set;
279
286 template <typename First, typename... Others>
287 inline constexpr bool is_overload_set_v = is_overload_set<First, Others...>::value;
288
294 template <typename Tag>
296
302 template <std::size_t byteCount>
304
310 template <std::size_t byteCount>
312
313 template <typename T>
314 struct is_character;
315
316 template <typename T>
318
319 template <typename Signature>
320 requires std::same_as<Signature, signature_decay_t<Signature>>
322
323 template <typename Signature>
324 requires std::same_as<Signature, signature_decay_t<Signature>>
326
327 class ScopedExpectation;
328
329 enum class MatchResult
330 {
331 none,
333 full
334 };
335
336 class CallReport;
337 class MatchReport;
338 class ExpectationReport;
339
340 using CharT = char;
341 using CharTraitsT = std::char_traits<CharT>;
342 using StringT = std::basic_string<CharT, CharTraitsT>;
343 using StringViewT = std::basic_string_view<CharT, CharTraitsT>;
344}
345
347{
348 enum Tag : std::ptrdiff_t
349 {
350 };
351
352 enum class Id : int
353 {
354 };
355
356 struct rating
357 {
358 int priority{};
360
361 [[nodiscard]]
362 friend bool operator==(const rating&, const rating&) = default;
363 };
364}
365
366namespace mimicpp::detail
367{
368 template <
369 typename Derived,
370 typename Signature,
373 typename ParamList = signature_param_list_t<Signature>>
374 class DefaultCallInterface;
375}
376
377#endif
Collects all expectations for a specific (decayed) signature.
Definition Fwd.hpp:325
The base interface for expectations.
Definition Fwd.hpp:321
Takes the ownership of an expectation and check whether it's satisfied during destruction.
Definition Expectation.hpp:551
Definition Fwd.hpp:17
constexpr bool is_overload_set_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:287
constexpr bool is_overloadable_with_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:269
typename signature_add_noexcept< Signature >::type signature_add_noexcept_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:59
typename signature_call_convention< Signature >::type signature_call_convention_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:75
constexpr Constness signature_const_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:187
typename signature_decay< Signature >::type signature_decay_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:155
constexpr bool signature_is_noexcept_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:219
typename signature_param_list< Signature >::type signature_param_list_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:251
typename signature_param_type< index, Signature >::type signature_param_type_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:235
constexpr ValueCategory signature_ref_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:203
typename signature_remove_call_convention< Signature >::type signature_remove_call_convention_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:91
typename signature_remove_const_qualifier< Signature >::type signature_remove_const_qualifier_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:139
typename signature_remove_noexcept< Signature >::type signature_remove_noexcept_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:107
typename signature_remove_ref_qualifier< Signature >::type signature_remove_ref_qualifier_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:123
typename signature_return_type< Signature >::type signature_return_type_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:171
typename uint_with_size< byteCount >::type uint_with_size_t
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:311
Definition Call.hpp:20
Definition Fwd.hpp:347
Tag
Definition Fwd.hpp:349
Id
Definition Fwd.hpp:353
Definition BoostTest.hpp:20
MatchResult
Definition Fwd.hpp:330
char CharT
Definition Fwd.hpp:340
std::char_traits< CharT > CharTraitsT
Definition Fwd.hpp:341
ValueCategory
Definition Fwd.hpp:30
Constness
Definition Fwd.hpp:23
std::basic_string_view< CharT, CharTraitsT > StringViewT
Definition Fwd.hpp:343
std::basic_string< CharT, CharTraitsT > StringT
Definition Fwd.hpp:342
Primary template, purposely undefined.
Definition Fwd.hpp:295
Primary template, which always yields false.
Definition String.hpp:105
Primary template.
Definition TypeTraits.hpp:1259
Primary template.
Definition TypeTraits.hpp:1239
Definition Fwd.hpp:357
Tag tag
Definition Fwd.hpp:359
int priority
Definition Fwd.hpp:358
friend bool operator==(const rating &, const rating &)=default
Primary template, purposely undefined.
Definition Fwd.hpp:51
Primary template, purposely undefined.
Definition Fwd.hpp:67
Primary template.
Definition TypeTraits.hpp:1034
Primary template.
Definition TypeTraits.hpp:947
signature_remove_noexcept_t< signature_remove_ref_qualifier_t< signature_remove_const_qualifier_t< signature_remove_call_convention_t< Signature > > > > type
Definition TypeTraits.hpp:948
Primary template.
Definition TypeTraits.hpp:1124
Primary template.
Definition TypeTraits.hpp:1145
Primary template.
Definition TypeTraits.hpp:1006
Primary template.
Definition TypeTraits.hpp:1057
Primary template, purposely undefined.
Definition TypeTraits.hpp:427
typename call_convention_traits< signature_call_convention_t< Signature > >::template remove_call_convention_t< Signature > type
Definition TypeTraits.hpp:428
Primary template, purposely undefined.
Definition Fwd.hpp:131
Primary template, purposely undefined.
Definition Fwd.hpp:99
Primary template, purposely undefined.
Definition Fwd.hpp:115
Primary template.
Definition TypeTraits.hpp:972
Definition Fwd.hpp:317
A very basic type-list template.
Definition Fwd.hpp:42
Primary template, purposely undefined.
Definition Fwd.hpp:303