6#ifndef MIMICPP_POLICIES_GENERAL_POLICIES_HPP
7#define MIMICPP_POLICIES_GENERAL_POLICIES_HPP
16#ifndef MIMICPP_DETAIL_IS_MODULE
21namespace mimicpp::detail
41 template <
typename Return,
typename... Args>
47 template <ValueCategory expected>
57 template <
typename Return,
typename... Args>
61 return mimicpp::detail::is_matching(info.fromCategory, expected);
64 template <
typename Return,
typename... Args>
67 MIMICPP_ASSERT(mimicpp::detail::is_matching(info.fromCategory, expected),
"Call does not match.");
76 stream <<
"expect: from ";
78 stream <<
" category overload";
80 return std::move(stream).str();
89 template <Constness constness>
99 template <
typename Return,
typename... Args>
103 return mimicpp::detail::is_matching(info.fromConstness, constness);
106 template <
typename Return,
typename... Args>
109 MIMICPP_ASSERT(mimicpp::detail::is_matching(info.fromConstness, constness),
"Call does not match.");
118 stream <<
"expect: from ";
120 stream <<
" qualified overload";
122 return std::move(stream).str();
#define MIMICPP_ASSERT(condition, msg)
Definition Config.hpp:51
Definition GeneralPolicies.hpp:49
static constexpr bool is_satisfied() noexcept
Definition GeneralPolicies.hpp:52
static constexpr void consume(const call::Info< Return, Args... > &info) noexcept
Definition GeneralPolicies.hpp:65
static auto describe()
Definition GeneralPolicies.hpp:71
static constexpr bool matches(const call::Info< Return, Args... > &info) noexcept
Definition GeneralPolicies.hpp:59
Definition GeneralPolicies.hpp:91
static constexpr bool is_satisfied() noexcept
Definition GeneralPolicies.hpp:94
static auto describe()
Definition GeneralPolicies.hpp:113
static constexpr void consume(const call::Info< Return, Args... > &info) noexcept
Definition GeneralPolicies.hpp:107
static constexpr bool matches(const call::Info< Return, Args... > &info) noexcept
Definition GeneralPolicies.hpp:101
Definition GeneralPolicies.hpp:39
static constexpr void finalize_call(const call::Info< Return, Args... > &) noexcept
Definition GeneralPolicies.hpp:42
constexpr printing::PrintFn print
Functional object, converting the given object to its textual representation.
Definition Print.hpp:183
Definition ArgRequirementPolicies.hpp:28
constexpr std::underlying_type_t< T > to_underlying(T const value) noexcept
Definition C++23Backports.hpp:62
ValueCategory
Definition Fwd.hpp:34
@ any
Definition Fwd.hpp:37
std::basic_ostringstream< CharT, CharTraitsT > StringStreamT
Definition Format.hpp:35
Constness
Definition Fwd.hpp:27
@ any
Definition Fwd.hpp:30