mimic++ v6
Loading...
Searching...
No Matches
Fwd.hpp
Go to the documentation of this file.
1// Copyright Dominic (DNKpp) Koepke 2024 - 2025.
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// ReSharper disable once CppUnusedIncludeDirective
14#include <version>
15
16namespace mimicpp::call
17{
18 template <typename Return, typename... Args>
19 class Info;
20}
21
22namespace mimicpp
23{
24 enum class Constness
25 {
26 non_const = 0b01,
27 as_const = 0b10,
29 };
30
31 enum class ValueCategory
32 {
33 lvalue = 0b01,
34 rvalue = 0b10,
36 };
37
42 template <typename... Args>
43 struct type_list
44 {
45 };
46
52 template <typename Signature>
54
60 template <typename Signature>
62
68 template <typename Signature>
70
76 template <typename Signature>
78
84 template <typename Signature>
86
92 template <typename Signature>
94
100 template <typename Signature>
102
108 template <typename Signature>
110
116 template <typename Signature>
118
124 template <typename Signature>
126
132 template <typename Signature>
134
140 template <typename Signature>
142
148 template <typename Signature>
149 struct signature_decay;
150
156 template <typename Signature>
158
164 template <typename Signature>
166
172 template <typename Signature>
174
180 template <typename Signature>
182
188 template <typename Signature>
190
196 template <typename Signature>
198
204 template <typename Signature>
206
212 template <typename Signature>
214
220 template <typename Signature>
222
228 template <std::size_t index, typename Signature>
230
236 template <std::size_t index, typename Signature>
238
244 template <typename Signature>
246
252 template <typename Signature>
254
261 template <typename First, typename Second>
263
270 template <typename First, typename Second>
272
279 template <typename First, typename... Others>
280 struct is_overload_set;
281
288 template <typename First, typename... Others>
289 inline constexpr bool is_overload_set_v = is_overload_set<First, Others...>::value;
290
296 template <typename Tag>
298
304 template <std::size_t byteCount>
306
312 template <std::size_t byteCount>
314
315 template <typename T>
316 struct is_character;
317
318 template <typename T>
320
321 template <typename Signature>
322 requires std::same_as<Signature, signature_decay_t<Signature>>
324
325 template <typename Signature>
326 requires std::same_as<Signature, signature_decay_t<Signature>>
328
329 class ScopedExpectation;
330
337
338 class CallReport;
339 class MatchReport;
340 class ExpectationReport;
341
342 using CharT = char;
343 using CharTraitsT = std::char_traits<CharT>;
344 using StringT = std::basic_string<CharT, CharTraitsT>;
345 using StringViewT = std::basic_string_view<CharT, CharTraitsT>;
346
347 template <typename FirstSignature, typename... OtherSignatures>
348 requires is_overload_set_v<FirstSignature, OtherSignatures...>
349 class Mock;
350}
351
353{
354 enum Tag : std::ptrdiff_t
355 {
356 };
357
358 enum class Id : int
359 {
360 };
361
362 struct rating
363 {
364 int priority{};
366
367 [[nodiscard]]
368 friend bool operator==(const rating&, const rating&) = default;
369 };
370}
371
372namespace mimicpp::detail
373{
374 template <
375 typename Derived,
376 typename Signature,
379 typename ParamList = signature_param_list_t<Signature>>
380 class DefaultCallInterface;
381
382 template <typename>
383 class Printer;
384}
385
387{
388 class NullBackend;
389
390 struct find_backend;
391
392 template <typename Backend>
393 struct backend_traits;
394}
395
396namespace mimicpp
397{
398 class Stacktrace;
399}
400
401#endif
ExpectationCollection()=default
Defaulted default constructor.
Expectation()=default
Defaulted default constructor.
A Mock type, which fully supports overload sets.
Definition Mock.hpp:397
Takes the ownership of an expectation and check whether it's satisfied during destruction.
Definition Expectation.hpp:561
A simple type-erase stacktrace abstraction.
Definition Stacktrace.hpp:173
Definition Fwd.hpp:19
The fallback stacktrace-backend.
Definition Stacktrace.hpp:412
constexpr bool is_overload_set_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:289
constexpr bool is_overloadable_with_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:271
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:61
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:77
constexpr Constness signature_const_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:189
typename signature_decay< Signature >::type signature_decay_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:157
constexpr bool signature_is_noexcept_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:221
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:253
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:237
constexpr ValueCategory signature_ref_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:205
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:93
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:141
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:109
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:125
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:173
typename uint_with_size< byteCount >::type uint_with_size_t
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:313
Definition Call.hpp:20
Definition Fwd.hpp:353
Tag
Definition Fwd.hpp:355
Id
Definition Fwd.hpp:359
Definition Fwd.hpp:387
Definition BoostTest.hpp:20
MatchResult
Definition Fwd.hpp:332
@ inapplicable
Definition Fwd.hpp:334
@ none
Definition Fwd.hpp:333
@ full
Definition Fwd.hpp:335
char CharT
Definition Fwd.hpp:342
std::char_traits< CharT > CharTraitsT
Definition Fwd.hpp:343
ValueCategory
Definition Fwd.hpp:32
@ lvalue
Definition Fwd.hpp:33
@ rvalue
Definition Fwd.hpp:34
Constness
Definition Fwd.hpp:25
@ any
Definition Fwd.hpp:28
@ as_const
Definition Fwd.hpp:27
@ non_const
Definition Fwd.hpp:26
std::basic_string_view< CharT, CharTraitsT > StringViewT
Definition Fwd.hpp:345
std::basic_string< CharT, CharTraitsT > StringT
Definition Fwd.hpp:344
Primary template, purposely undefined.
Definition Fwd.hpp:297
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:363
Tag tag
Definition Fwd.hpp:365
int priority
Definition Fwd.hpp:364
friend bool operator==(const rating &, const rating &)=default
Primary template, purposely undefined.
Definition Fwd.hpp:53
Primary template, purposely undefined.
Definition Fwd.hpp:69
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:133
Primary template, purposely undefined.
Definition Fwd.hpp:101
Primary template, purposely undefined.
Definition Fwd.hpp:117
Primary template.
Definition TypeTraits.hpp:972
Trait type for stacktrace backends.
Definition Stacktrace.hpp:97
Definition Stacktrace.hpp:649
Definition Fwd.hpp:319
A very basic type-list template.
Definition Fwd.hpp:44
Primary template, purposely undefined.
Definition Fwd.hpp:305