# std::function_ref::operator()

> C++ Atlas: `cppatlas.com/w/cpp/utility/functional/function_ref/operator()` | Source: https://en.cppreference.com/w/cpp/utility/functional/function_ref/operator() | Domain: Utility | Standards: C++26

Invokes the stored thunk-ptr with bound-entity as its first parameter and the rest of the parameters args. The /*noex*/ part of operator() is identical to those of the template parameter of std::function_ref.

## Official Specification Summary (cppreference)

```cpp
R operator()( Args... args ) const noexcept(/*noex*/); // (since C++26)
```

Invokes the stored `thunk-ptr` with `bound-entity` as its first parameter and the rest of the parameters `args`. The `/*noex*/` part of `operator()` is identical to those of the template parameter of `std::function_ref`.

Equivalent to `return thunk-ptr(bound-entity, std::forward<Args>(args)...);`.

### Parameters

- `args` - rest parameters to pass to the stored `thunk-ptr`

### Return value

`thunk-ptr(bound-entity, std::forward<Args>(args)...)`.

### Exceptions

Propagates the exception thrown by the underlying function call.

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`operator()`](https://en.cppreference.com/w/cpp/utility/functional/function/operator()): invokes the target (public member function of `std::function<R(Args...)>`)
- [`operator()`](https://en.cppreference.com/w/cpp/utility/functional/reference_wrapper/operator()): calls the stored function (public member function of `std::reference_wrapper<T>`)

---
Attribution: content from https://en.cppreference.com/w/cpp/utility/functional/function_ref/operator() (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.