ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::ranges::empty_view< value_t > Class Template Reference

Implements an empty view of a given type. More...

#include <detray/utils/ranges/empty.hpp>

Inheritance diagram for detray::ranges::empty_view< value_t >:
[legend]
Collaboration diagram for detray::ranges::empty_view< value_t >:
[legend]

Public Types

using iterator_t = value_t*
 Iterator category: bidirectional.

Public Member Functions

constexpr value_t front () const noexcept=delete
 No value contained in view.
constexpr value_t back () const noexcept=delete
constexpr value_t operator[] (const dindex) const noexcept=delete
Public Member Functions inherited from detray::ranges::view_interface< empty_view< value_t > >
constexpr decltype(auto) back () const
 Return a reference to the last element.
constexpr auto data () const
 Return a pointer to the first element, or null for an empty view.
constexpr auto empty () const -> bool
 Check whether the view contains no elements.
constexpr decltype(auto) front () const
 Return a reference to the first element.
constexpr operator bool () const
 Test whether the view contains at least one element.
constexpr decltype(auto) operator[] (const dindex i) const
 Subscript operator that takes detray dindex.
constexpr auto size () const
 Return the number of elements in the view.

Static Public Member Functions

static constexpr value_t * begin () noexcept
static constexpr value_t * data () noexcept
static constexpr bool empty () noexcept
static constexpr value_t * end () noexcept
static constexpr std::size_t size () noexcept

Detailed Description

template<typename value_t>
class detray::ranges::empty_view< value_t >

Implements an empty view of a given type.

See also
https://en.cppreference.com/w/cpp/ranges/empty_view
Template Parameters
value_ttype of the empty view.

Member Function Documentation

◆ begin()

template<typename value_t>
constexpr value_t * detray::ranges::empty_view< value_t >::begin ( )
staticconstexprnoexcept
Returns
nullptr

◆ data()

template<typename value_t>
constexpr value_t * detray::ranges::empty_view< value_t >::data ( )
staticconstexprnoexcept
Returns
nullptr

◆ empty()

template<typename value_t>
constexpr bool detray::ranges::empty_view< value_t >::empty ( )
staticconstexprnoexcept
Returns
true

◆ end()

template<typename value_t>
constexpr value_t * detray::ranges::empty_view< value_t >::end ( )
staticconstexprnoexcept
Returns
nullptr

◆ size()

template<typename value_t>
constexpr std::size_t detray::ranges::empty_view< value_t >::size ( )
staticconstexprnoexcept
Returns
zero