mimic++ v6
Loading...
Searching...
No Matches
FinalizerPolicies.hpp File Reference
#include "mimic++/Fwd.hpp"
#include "mimic++/Utility.hpp"
#include "mimic++/policies/ArgumentList.hpp"
#include <concepts>
#include <functional>
#include <type_traits>
#include <utility>
Include dependency graph for FinalizerPolicies.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mimicpp::expectation_policies::ReturnsResultOf< Action >
 
class  mimicpp::expectation_policies::Throws< Exception >
 

Namespaces

namespace  mimicpp
 
namespace  mimicpp::expectation_policies
 
namespace  mimicpp::finally
 

Functions

template<typename Fun>
requires std::invocable<std::remove_cvref_t<Fun>&> && (!std::is_void_v<std::invoke_result_t<std::remove_cvref_t<Fun>&>>)
constexpr auto mimicpp::finally::returns_result_of (Fun &&fun) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Fun >, Fun >)
 During the finalization step, the invocation result of the given function is returned.
 
template<typename T>
requires std::copyable<std::remove_cvref_t<T>>
constexpr auto mimicpp::finally::returns (T &&value) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< T >, T >)
 During the finalization step, the stored value is returned.
 
template<std::size_t index, std::size_t... otherIndices, typename Action>
constexpr auto mimicpp::finally::returns_apply_result_of (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >)
 During the finalization step, the selected call arguments are applied on the given action.
 
template<typename Action>
constexpr auto mimicpp::finally::returns_apply_all_result_of (Action &&action) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< Action >, Action >)
 During the finalization step, all call arguments are applied on the given action.
 
template<std::size_t index>
consteval auto mimicpp::finally::returns_arg () noexcept
 During the finalization step, the selected call argument is returned.
 
template<typename T>
requires std::copyable<std::remove_cvref_t<T>>
constexpr expectation_policies::Throws< std::remove_cvref_t< T > > mimicpp::finally::throws (T &&exception) noexcept(std::is_nothrow_constructible_v< std::remove_cvref_t< T >, T >)
 During the finalization step, the given exception is thrown.