update api reference

This commit is contained in:
BlackMATov
2024-02-10 14:34:34 +07:00
parent 468b2abb36
commit ed4f4d65c6
2 changed files with 88 additions and 7 deletions

View File

@@ -102,12 +102,16 @@
### Functions
| | |
| -------------------------------------------------------------- | --------------------- |
| [invoke](./api/invoke.md#invoke) | invoke |
| [try_invoke](./api/invoke.md#try_invoke) | try_invoke |
| [is_invocable_with](./api/invoke.md#is_invocable_with) | is_invocable_with |
| [check_invocable_error](./api/invoke.md#check_invocable_error) | check_invocable_error |
| | |
| -------------------------------------------------------------------------------- | ------------------------------ |
| [invoke](./api/invoke.md#invoke) | invoke |
| [invoke_variadic](./api/invoke.md#invoke_variadic) | invoke_variadic |
| [try_invoke](./api/invoke.md#try_invoke) | try_invoke |
| [try_invoke_variadic](./api/invoke.md#try_invoke_variadic) | try_invoke_variadic |
| [is_invocable_with](./api/invoke.md#is_invocable_with) | is_invocable_with |
| [is_variadic_invocable_with](./api/invoke.md#is_variadic_invocable_with) | is_variadic_invocable_with |
| [check_invocable_error](./api/invoke.md#check_invocable_error) | check_invocable_error |
| [check_variadic_invocable_error](./api/invoke.md#check_variadic_invocable_error) | check_variadic_invocable_error |
## Policies
@@ -156,7 +160,7 @@
| | |
| --------------------------------------------------- | ---------------- |
| [type_id](./api/basics.md#type_id) | type_id |
| [type_id](./api/types.md#type_id) | type_id |
| [type_base](./api/types.md#type_base) | type_base |
| [any_type](./api/types.md#any_type) | any_type |
| [array_type](./api/types.md#array_type) | array_type |

View File

@@ -1,9 +1,13 @@
- [API Invoke](#api-invoke)
- [Functions](#functions)
- [invoke](#invoke)
- [invoke\_variadic](#invoke_variadic)
- [try\_invoke](#try_invoke)
- [try\_invoke\_variadic](#try_invoke_variadic)
- [is\_invocable\_with](#is_invocable_with)
- [is\_variadic\_invocable\_with](#is_variadic_invocable_with)
- [check\_invocable\_error](#check_invocable_error)
- [check\_variadic\_invocable\_error](#check_variadic_invocable_error)
# API Invoke
@@ -35,6 +39,25 @@ template < method_pointer_kind Method, typename Instance, typename... Args >
uvalue invoke(Method method_ptr, Instance&& instance, Args&&... args);
```
### invoke_variadic
```cpp
template < typename Iter >
uvalue invoke_variadic(const function& function, Iter first, Iter last);
template < function_pointer_kind Function, typename Iter >
uvalue invoke_variadic(Function function_ptr, Iter first, Iter last);
//
template < typename Instance, typename Iter >
uvalue invoke_variadic(const method& method, Instance&& instance, Iter first, Iter last);
template < method_pointer_kind Method, typename Instance, typename Iter >
uvalue invoke_variadic(Method method_ptr, Instance&& instance, Iter first, Iter last);
```
### try_invoke
```cpp
@@ -61,6 +84,24 @@ template < method_pointer_kind Method, typename Instance, typename... Args >
uresult try_invoke(Method method_ptr, Instance&& instance, Args&&... args);
```
### try_invoke_variadic
```cpp
template < typename Iter >
uresult try_invoke_variadic(const function& function, Iter first, Iter last);
template < function_pointer_kind Function, typename Iter >
uresult try_invoke_variadic(Function function_ptr, Iter first, Iter last);
//
template < typename Instance, typename Iter >
uresult try_invoke_variadic(const method& method, Instance&& instance, Iter first, Iter last);
template < method_pointer_kind Method, typename Instance, typename Iter >
uresult try_invoke_variadic(Method method_ptr, Instance&& instance, Iter first, Iter last);
```
### is_invocable_with
```cpp
@@ -105,6 +146,24 @@ template < typename Instance, typename... Args, method_pointer_kind Method >
bool is_invocable_with(Method method_ptr, Instance&& instance, Args&&... args) noexcept;
```
### is_variadic_invocable_with
```cpp
template < typename Iter >
bool is_variadic_invocable_with(const function& function, Iter first, Iter last) noexcept;
template < typename Iter, function_pointer_kind Function >
bool is_variadic_invocable_with(Function function_ptr, Iter first, Iter last) noexcept;
//
template < typename Instance, typename Iter >
bool is_variadic_invocable_with(const method& method, Instance&& instance, Iter first, Iter last) noexcept;
template < typename Instance, typename Iter, method_pointer_kind Method >
bool is_variadic_invocable_with(Method method_ptr, Instance&& instance, Iter first, Iter last) noexcept;
```
### check_invocable_error
```cpp
@@ -148,3 +207,21 @@ uerror check_invocable_error(Method method_ptr) noexcept;
template < typename Instance, typename... Args, method_pointer_kind Method >
uerror check_invocable_error(Method method_ptr, Instance&& instance, Args&&... args) noexcept;
```
### check_variadic_invocable_error
```cpp
template < typename Iter >
uerror check_variadic_invocable_error(const function& function, Iter first, Iter last) noexcept;
template < typename Iter, function_pointer_kind Function >
uerror check_variadic_invocable_error(Function function_ptr, Iter first, Iter last) noexcept;
//
template < typename Instance, typename Iter >
uerror check_variadic_invocable_error(const method& method, Instance&& instance, Iter first, Iter last) noexcept;
template < typename Instance, typename Iter, method_pointer_kind Method >
uerror check_variadic_invocable_error(Method method_ptr, Instance&& instance, Iter first, Iter last) noexcept;
```