[range.empty]

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

## 25.6 Range factories [[range.factories]](range.factories#range.empty)

### 25.6.2 Empty view [range.empty]

#### [25.6.2.1](#overview) Overview [[range.empty.overview]](range.empty.overview)

[1](#overview-1)

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

empty_view produces a view of no elements of
a particular type[.](#overview-1.sentence-1)

[2](#overview-2)

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

[*Example [1](#overview-example-1)*: auto e = views::empty<int>;static_assert(ranges::empty(e));static_assert(0 == e.size()); â *end example*]

#### [25.6.2.2](#view) Class template empty_view [[range.empty.view]](range.empty.view)

[ð](#lib:empty_view)

namespace std::ranges {template<class T>requires is_object_v<T>class empty_view : public view_interface<empty_view<T>> {public:static constexpr T* begin() noexcept { return nullptr; }static constexpr T* end() noexcept { return nullptr; }static constexpr T* data() noexcept { return nullptr; }static constexpr size_t size() noexcept { return 0; }static constexpr bool empty() noexcept { return true; }};}
