mimic++ v9.2.1
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
12
13#ifndef MIMICPP_DETAIL_IS_MODULE
14 #include <string>
15 #include <string_view>
16#endif
17
18namespace mimicpp::call
19{
20 template <typename Return, typename... Args>
21 class Info;
22}
23
25{
26 enum class Constness
27 {
28 non_const = 0b01,
29 as_const = 0b10,
31 };
32
33 enum class ValueCategory
34 {
35 lvalue = 0b01,
36 rvalue = 0b10,
38 };
39
45 template <typename Signature>
46 struct signature_add_noexcept;
47
53 template <typename Signature>
55
61 template <typename Signature>
63
69 template <typename Signature>
71
77 template <typename Signature>
79
85 template <typename Signature>
87
93 template <typename Signature>
95
101 template <typename Signature>
103
109 template <typename Signature>
111
117 template <typename Signature>
119
125 template <typename Signature>
127
133 template <typename Signature>
135
141 template <typename Signature>
143
149 template <typename Signature>
151
157 template <typename Signature>
159
165 template <typename Signature>
167
173 template <typename Signature>
175
181 template <typename Signature>
183
189 template <typename Signature>
191
197 template <typename Signature>
199
205 template <typename Signature>
206 struct signature_decay;
207
213 template <typename Signature>
215
221 template <typename Signature>
223
229 template <typename Signature>
231
237 template <typename Signature>
239
245 template <typename Signature>
247
253 template <typename Signature>
255
261 template <typename Signature>
263
269 template <std::size_t index, typename Signature>
271
277 template <std::size_t index, typename Signature>
279
285 template <typename Signature>
287
293 template <typename Signature>
295
302 template <typename Signature, typename T>
304
310 template <typename Signature, typename T>
312
319 template <typename First, typename Second>
321
328 template <typename First, typename Second>
330
337 template <typename First, typename... Others>
338 struct is_overload_set;
339
346 template <typename First, typename... Others>
347 inline constexpr bool is_overload_set_v = is_overload_set<First, Others...>::value;
348
354 template <typename Tag>
356
362 template <std::size_t byteCount>
364
370 template <std::size_t byteCount>
372
373 template <typename T>
374 struct is_character;
375
376 template <typename T>
378
379 template <typename Signature>
380 requires std::same_as<Signature, signature_decay_t<Signature>>
381 class Expectation;
382
383 template <typename Signature>
384 requires std::same_as<Signature, signature_decay_t<Signature>>
386
387 class ScopedExpectation;
388
389 using CharT = char;
390 using CharTraitsT = std::char_traits<CharT>;
391 using StringT = std::basic_string<CharT, CharTraitsT>;
392 using StringViewT = std::basic_string_view<CharT, CharTraitsT>;
393
394 template <typename FirstSignature, typename... OtherSignatures>
395 requires is_overload_set_v<FirstSignature, OtherSignatures...>
396 class Mock;
397}
398
400{
401 enum Tag : std::ptrdiff_t
402 {
403 };
404
405 enum class Id : int
406 {
407 };
408
409 struct rating
410 {
411 int priority{};
413
414 [[nodiscard]]
415 friend bool operator==(rating const&, rating const&) = default;
416 };
417
418 namespace detail
419 {
420 template <typename Id, auto priorityStrategy>
421 requires std::is_enum_v<Id>
422 && std::signed_integral<std::underlying_type_t<Id>>
423 && std::convertible_to<
424 std::invoke_result_t<decltype(priorityStrategy), Id, int>,
425 int>
426 class BasicSequence;
427
428 template <typename Id, auto priorityStrategy>
429 class BasicSequenceInterface;
430 }
431}
432
433namespace mimicpp::detail
434{
435 template <
436 typename Derived,
437 typename Signature,
440 typename ParamList = signature_param_list_t<Signature>>
441 class DefaultCallInterface;
442}
443
445{
446 namespace stacktrace
447 {
448 class NullBackend;
449
450 struct find_backend;
451
452 template <typename Backend>
454 }
455
456 class Stacktrace;
457 class SourceLocation;
458}
459
460#endif
#define MIMICPP_DETAIL_MODULE_EXPORT
Definition Config.hpp:19
Collects all expectations for a specific (decayed) signature.
Definition Expectation.hpp:258
The base interface for expectations.
Definition Expectation.hpp:148
A Mock type, which fully supports overload sets.
Definition Mock.hpp:463
Takes the ownership of an expectation and check whether it's satisfied during destruction.
Definition Expectation.hpp:645
Definition Call.hpp:27
A thin wrapper around general source-location info.
Definition SourceLocation.hpp:38
A simple type-erased stacktrace abstraction.
Definition Stacktrace.hpp:196
The fallback stacktrace-backend.
Definition Stacktrace.hpp:126
constexpr bool is_overload_set_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:347
constexpr bool is_overloadable_with_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:329
typename signature_add_const_qualifier< Signature >::type signature_add_const_qualifier_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:150
typename signature_add_lvalue_ref_qualifier< Signature >::type signature_add_lvalue_ref_qualifier_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:166
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:54
typename signature_add_rvalue_ref_qualifier< Signature >::type signature_add_rvalue_ref_qualifier_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:182
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:102
constexpr Constness signature_const_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:246
typename signature_decay< Signature >::type signature_decay_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:214
constexpr bool signature_is_noexcept_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:86
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:294
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:278
typename signature_prepend_param< Signature, T >::type signature_prepend_param_t
Convenience alias, exposing the type member alias of the actual type-trait.
Definition Fwd.hpp:311
constexpr ValueCategory signature_ref_qualification_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:262
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:118
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:198
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:70
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:134
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:230
typename uint_with_size< byteCount >::type uint_with_size_t
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:371
Definition Call.hpp:24
Definition Fwd.hpp:400
Tag
Definition Fwd.hpp:402
Id
Definition Fwd.hpp:406
Definition Fwd.hpp:447
Definition Fwd.hpp:445
Definition Call.hpp:24
char CharT
Definition Fwd.hpp:389
std::char_traits< CharT > CharTraitsT
Definition Fwd.hpp:390
ValueCategory
Definition Fwd.hpp:34
@ lvalue
Definition Fwd.hpp:35
@ rvalue
Definition Fwd.hpp:36
Constness
Definition Fwd.hpp:27
@ any
Definition Fwd.hpp:30
@ as_const
Definition Fwd.hpp:29
@ non_const
Definition Fwd.hpp:28
std::basic_string_view< CharT, CharTraitsT > StringViewT
Definition Fwd.hpp:392
std::basic_string< CharT, CharTraitsT > StringT
Definition Fwd.hpp:391
Primary template, purposely undefined.
Definition Fwd.hpp:355
Primary template, which always yields false.
Definition String.hpp:108
Primary template.
Definition TypeTraits.hpp:1576
Primary template.
Definition TypeTraits.hpp:1539
Definition Fwd.hpp:410
friend bool operator==(rating const &, rating const &)=default
Tag tag
Definition Fwd.hpp:412
int priority
Definition Fwd.hpp:411
Primary template, purposely undefined.
Definition TypeTraits.hpp:940
Primary template, purposely undefined.
Definition TypeTraits.hpp:1031
Primary template, purposely undefined.
Definition TypeTraits.hpp:602
Primary template, purposely undefined.
Definition TypeTraits.hpp:1122
Primary template, purposely undefined.
Definition Fwd.hpp:94
Primary template.
Definition TypeTraits.hpp:1228
Primary template.
Definition TypeTraits.hpp:1139
typename detail::signature_remove_ref_qualifier_impl< typename detail::signature_remove_const_qualifier_impl< typename detail::signature_remove_noexcept< signature_remove_call_convention_t< Signature > >::type, false >::type, false >::type type
Definition TypeTraits.hpp:1140
Primary template.
Definition TypeTraits.hpp:620
Primary template.
Definition TypeTraits.hpp:1320
Primary template.
Definition TypeTraits.hpp:1200
Primary template.
Definition TypeTraits.hpp:1448
Primary template.
Definition TypeTraits.hpp:1251
Primary template, purposely undefined.
Definition TypeTraits.hpp:274
typename call_convention_traits< signature_call_convention_t< Signature > >::template remove_call_convention_t< Signature > type
Definition TypeTraits.hpp:275
Primary template, purposely undefined.
Definition TypeTraits.hpp:856
Primary template, purposely undefined.
Definition TypeTraits.hpp:486
Primary template, purposely undefined.
Definition TypeTraits.hpp:738
Primary template.
Definition TypeTraits.hpp:1166
Definition Fwd.hpp:377
Primary template, purposely undefined.
Definition Fwd.hpp:363
Trait type for stacktrace backends.
Definition Fwd.hpp:453
Definition Stacktrace.hpp:529