# std::istream_iterator<T,CharT,Traits,Distance>::operator*, operator->

> C++ Atlas: `cppatlas.com/w/cpp/iterator/istream_iterator/operator*` | Source: https://en.cppreference.com/w/cpp/iterator/istream_iterator/operator* | Domain: Iterator

Returns a pointer or a reference to the current element.

## Official Specification Summary (cppreference)

```cpp
const T& operator*() const; // (1)
const T* operator->() const; // (2)
```

Returns a pointer or a reference to the current element.

The behavior is undefined if the iterator is end-of-stream iterator.

### Parameters

(none)

### Return value

A pointer or a reference to the current element.

### Exceptions

May throw implementation-defined exceptions.

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