MaxMatrix
Drive chained 8x8 LED dot matrix modules with MAX7219.
Loading...
Searching...
No Matches
span.h File Reference

Elements that lie elsewhere, reached by index within their size, as std::span. More...

#include <stddef.h>
#include "MaxMatrixAttributes.h"
#include "Utility/array.h"

Go to the source code of this file.

Classes

class  max_matrix::span< T >
 A view of size() elements that another owns: a font, a bitmap, a text or a buffer. More...

Typedefs

template<typename T, typename Element>
using max_matrix::internal::IfPointerConverts
 Names a type only if an Element* converts to a T*.

Functions

template<typename To>
constexpr To * max_matrix::internal::ConvertPointer (To *pointer)
 Returns pointer; in a decltype, whether a pointer converts to a To* without a cast, so that a constructor applies only then.

Detailed Description

Elements that lie elsewhere, reached by index within their size, as std::span.

Typedef Documentation

◆ IfPointerConverts

template<typename T, typename Element>
using max_matrix::internal::IfPointerConverts
Initial value:
decltype(ConvertPointer<T>(static_cast<Element*>(nullptr)))
constexpr To * ConvertPointer(To *pointer)
Returns pointer; in a decltype, whether a pointer converts to a To* without a cast,...
Definition span.h:29

Names a type only if an Element* converts to a T*.

Function Documentation

◆ ConvertPointer()

template<typename To>
To * max_matrix::internal::ConvertPointer ( To * pointer)
constexpr

Returns pointer; in a decltype, whether a pointer converts to a To* without a cast, so that a constructor applies only then.

Parameters
[in]pointerThe pointer.