diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-27 09:56:14 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-27 09:56:44 +0200 |
commit | 5d0e9f961073f6ecc2f3f7095cd6514861bda339 (patch) | |
tree | 5cc1115e308f5276d56a8a764550d89aae6cf509 | |
parent | 39a87e2281176a57a2d9b00b6deeb0c46c702397 (diff) |
compat: add function2 fwd decl
-rw-r--r-- | compat/function2.fwd.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/compat/function2.fwd.hpp b/compat/function2.fwd.hpp new file mode 100644 index 00000000..ea0c0df9 --- /dev/null +++ b/compat/function2.fwd.hpp @@ -0,0 +1,35 @@ +#pragma once +// Copyright 2015-2020 Denis Blank <denis.blank at outlook dot com> +// Distributed under the Boost Software License, Version 1.0 +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +namespace fu2 { +inline namespace abi_400 { +namespace detail { + +template <typename Config, typename Property> class function; +template <bool Owning, bool Copyable, typename Capacity> struct config; +template <bool Throws, bool HasStrongExceptGuarantee, typename... Args> struct property; + +} // namespace detail +} // namespace abi_400 + +struct capacity_default; + +template <bool IsOwning, bool IsCopyable, typename Capacity, bool IsThrowing, + bool HasStrongExceptGuarantee, typename... Signatures> +using function_base = detail::function< + detail::config<IsOwning, IsCopyable, Capacity>, + detail::property<IsThrowing, HasStrongExceptGuarantee, Signatures...>>; + +template <typename... Signatures> +using function = function_base<true, true, capacity_default, true, false, Signatures...>; + +template <typename... Signatures> +using unique_function = function_base<true, false, capacity_default, true, false, Signatures...>; + +template <typename... Signatures> +using function_view = function_base<false, true, capacity_default, true, false, Signatures...>; + +} // namespace fu2 |