[range.single.overview]

# 25 Ranges library [[ranges]](./#ranges)

## 25.6 Range factories [[range.factories]](range.factories#range.single.overview)

### 25.6.3 Single view [[range.single]](range.single#overview)

#### 25.6.3.1 Overview [range.single.overview]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L2626)

single_view produces a view that contains
exactly one element of a specified value[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L2630)

The name views​::​single denotes a
customization point object ([[customization.point.object]](customization.point.object "16.3.3.3.5 Customization Point Object types"))[.](#2.sentence-1)

Given a subexpression E, the expressionviews​::​single(E) is expression-equivalent tosingle_view<decay_t<decltype((E))>>(E)[.](#2.sentence-2)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L2638)

[*Example [1](#example-1)*: for (int i : views::single(4)) cout << i; // prints 4 â *end example*]
