# std::experimental::unique_resource<R, D>::operator*, std::experimental::unique_resource<R, D>::operator->

> C++ Atlas: `cppatlas.com/w/cpp/experimental/unique_resource/operator*` | Source: https://en.cppreference.com/w/cpp/experimental/unique_resource/operator* | Domain: Technical specifications

## Official Specification Summary (cppreference)

```cpp
std::add_lvalue_reference_t<std::remove_pointer_t<R>>
    operator*() const noexcept; // (1) (library fundamentals TS v3)

R operator->() const noexcept; // (2) (library fundamentals TS v3)
```

1) Access the object or function pointed by the underlying resource handle which is a pointer. This function participates in overload resolution only if `std::is_pointer_v<R>` is `true` and `std::is_void_v<std::remove_pointer_t<R>>` is `false`. If the resource handle is not pointing to an object or a function, the behavior is undefined.

2) Get a copy of the underlying resource handle which is a pointer. This function participates in overload resolution only if `std::is_pointer_v<R>` is `true`. The return value is typically used to access the pointed object.

### Parameters

(none)

### Return value

1) The object or function pointed by the underlying resource handle.

2) Copy of the underlying resource handle.

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`get`](https://en.cppreference.com/w/cpp/experimental/unique_resource/get): accesses the underlying resource handle (public member function)
- [`operator*`](https://en.cppreference.com/w/cpp/memory/unique_ptr/operator*), [`operator->`](https://en.cppreference.com/w/cpp/memory/unique_ptr/operator*): dereferences pointer to the managed object (public member function of `std::unique_ptr<T,Deleter>`)

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/unique_resource/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.