GTPin: gtpin::Span< T > Struct Template Reference

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
gtpin::Span< T > Struct Template Reference
GTPin: Utilities

Structure that points to an array of elements of type 'T', without owning it. More...

`#include <gt_basic_defs.h>`

## Public Member Functions
constexpr reference | operator[] (size_t pos) const
| Return reference to the element at the specified position.
constexpr iterator | begin () const
| Return iterator addressing the first element of the array.
constexpr iterator | end () const
| Return Iiterator that indicates end of the array.
constexpr size_t | size () const
| Return number of elements in the array.
constexpr bool | empty () const
| Return true if array is empty.
constexpr pointer | data () const
| Return pointer to the beginning of the array of elements.
constexpr reference | first () const
| Return reference to the first element of the array.
constexpr reference | last () const
| Return reference to the last element of the array.

## Detailed Description

### template<typename T>
struct gtpin::Span< T >

Structure that points to an array of elements of type 'T', without owning it.

Similar to std::span (C++20) with static extent

## Member Function Documentation

template<typename T >

constexpr reference gtpin::Span< T >::first | ( |  | ) | const`[inline]`

Return reference to the first element of the array.

Precondition:
  !empty()

template<typename T >

constexpr reference gtpin::Span< T >::last | ( |  | ) | const`[inline]`

Return reference to the last element of the array.

Precondition:
  !empty()

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT