# std::experimental::ranges::identity

> C++ Atlas: `cppatlas.com/w/cpp/experimental/ranges/functional/identity` | Source: https://en.cppreference.com/w/cpp/experimental/ranges/functional/identity | Domain: Technical specifications

ranges::identity is a function object type whose operator() returns its argument unchanged. It is used as the default projection for all Ranges TS algorithms.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <experimental/ranges/functional>
struct identity; // (ranges TS)
```

`ranges::identity` is a function object type whose `operator()` returns its argument unchanged. It is used as the default projection for all Ranges TS algorithms.

#### Nested types

**Nested type — Definition**

- `is_transparent`: unspecified

#### Member functions

- `operator()`: returns the argument unchanged (public member function)

### std::experimental::ranges::identity::operator()

```cpp
template< class T >
constexpr T&& operator()( T&& t ) const noexcept;
```

Returns `std::forward<T>(t)`.

#### Parameters

- `t` - argument to return

#### Return value

`std::forward<T>(t)`.

#### Example

> Note: This section is incomplete Reason: no example

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