mimic++ v10.0.1
Loading...
Searching...
No Matches
Fwd.hpp
Go to the documentation of this file.
1// Copyright Dominic (DNKpp) Koepke 2024-2026.
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
301 template <typename Signature>
302 struct signature_arity;
303
309 template <typename Signature>
311
318 template <typename Signature, typename T>
319 struct signature_prepend_param;
320
326 template <typename Signature, typename T>
328
335 template <typename First, typename Second>
337
344 template <typename First, typename Second>
346
353 template <typename First, typename... Others>
354 struct is_overload_set;
355
362 template <typename First, typename... Others>
363 inline constexpr bool is_overload_set_v = is_overload_set<First, Others...>::value;
364
370 template <typename Tag>
372
378 template <std::size_t byteCount>
380
386 template <std::size_t byteCount>
388
389 template <typename T>
390 struct is_character;
391
392 template <typename T>
394
395 using CharT = char;
396 using CharTraitsT = std::char_traits<CharT>;
397 using StringT = std::basic_string<CharT, CharTraitsT>;
398 using StringViewT = std::basic_string_view<CharT, CharTraitsT>;
399
400 template <typename FirstSignature, typename... OtherSignatures>
401 requires is_overload_set_v<FirstSignature, OtherSignatures...>
402 class Mock;
403}
404
406{
407 enum Tag : std::ptrdiff_t
408 {
409 };
410
411 enum class Id : int
412 {
413 };
414
415 struct rating
416 {
417 int priority{};
419
420 [[nodiscard]]
421 friend bool operator==(rating const&, rating const&) = default;
422 };
423
424 namespace detail
425 {
426 template <typename Id, auto priorityStrategy>
427 requires std::is_enum_v<Id>
428 && std::signed_integral<std::underlying_type_t<Id>>
429 && std::convertible_to<
430 std::invoke_result_t<decltype(priorityStrategy), Id, int>,
431 int>
432 class BasicSequence;
433
434 template <typename Id, auto priorityStrategy>
435 class BasicSequenceInterface;
436 }
437}
438
439namespace mimicpp::detail
440{
441 template <
442 typename Derived,
443 typename Signature,
446 typename ParamList = signature_param_list_t<Signature>>
447 class DefaultCallInterface;
448}
449
451{
452 namespace stacktrace
453 {
454 class NullBackend;
455
456 struct find_backend;
457
458 template <typename Backend>
460 }
461
462 class Stacktrace;
463 class SourceLocation;
464}
465
467{
468 class Collector;
469 class Expectation;
470 class Registry;
471 class Owner;
472}
473
475{
481
487}
488
489#endif
#define MIMICPP_DETAIL_MODULE_EXPORT
Definition Config.hpp:19
A Mock type, which fully supports overload sets.
Definition Mock.hpp:442
Definition Call.hpp:27
Collects scoped expectations and verifies them during destruction.
Definition Collector.hpp:32
Takes the ownership of an expectation and checks whether it's satisfied during destruction.
Definition Owner.hpp:42
A thin wrapper around general source-location info.
Definition SourceLocation.hpp:33
A simple type-erased stacktrace abstraction.
Definition Stacktrace.hpp:196
The fallback stacktrace-backend.
Definition Stacktrace.hpp:126
expectation::Collector ScopedExpectations
Collects scoped expectations and verifies them during destruction.
Definition Fwd.hpp:486
expectation::Owner ScopedExpectation
Takes the ownership of an expectation and checks whether it's satisfied during destruction.
Definition Fwd.hpp:480
constexpr bool is_overload_set_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:363
constexpr bool is_overloadable_with_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:345
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
constexpr std::size_t signature_arity_v
Convenience constant, exposing the value member of the actual type-trait.
Definition Fwd.hpp:310
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:327
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:387
Definition Call.hpp:24
Definition Builder.hpp:33
Definition Fwd.hpp:406
Tag
Definition Fwd.hpp:408
Id
Definition Fwd.hpp:412
Definition Fwd.hpp:453
Definition Fwd.hpp:451
Definition Call.hpp:24
char CharT
Definition Fwd.hpp:395
std::char_traits< CharT > CharTraitsT
Definition Fwd.hpp:396
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:398
std::basic_string< CharT, CharTraitsT > StringT
Definition Fwd.hpp:397
Primary template, purposely undefined.
Definition Fwd.hpp:371
Primary template, which always yields false.
Definition String.hpp:108
Primary template.
Definition TypeTraits.hpp:1600
Primary template.
Definition TypeTraits.hpp:1563
Definition Fwd.hpp:416
friend bool operator==(rating const &, rating const &)=default
Tag tag
Definition Fwd.hpp:418
int priority
Definition Fwd.hpp:417
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.
Definition TypeTraits.hpp:1344
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:1472
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:393
Primary template, purposely undefined.
Definition Fwd.hpp:379
Trait type for stacktrace backends.
Definition Fwd.hpp:459
Definition Stacktrace.hpp:529