31#ifndef ETL_NOT_NULL_INCLUDED
32#define ETL_NOT_NULL_INCLUDED
37#include "static_assert.h"
50 not_null_exception(string_type reason_, string_type file_name_, numeric_type line_number_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
51 :
exception(reason_, file_name_, line_number_)
59 class not_null_contains_null :
public not_null_exception
63 not_null_contains_null(string_type file_name_, numeric_type line_number_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
64 : not_null_exception(ETL_ERROR_TEXT(
"not_null:contains null", ETL_NOT_NULL_FILE_ID
"A"), file_name_, line_number_)
87 typedef const T* const_pointer;
89 typedef const T& const_reference;
90 typedef pointer underlying_type;
96 ETL_CONSTEXPR14
explicit not_null(underlying_type ptr_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
114 ETL_CONSTEXPR14
not_null& operator =(underlying_type rhs) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
136 ETL_CONSTEXPR14 pointer
get() const ETL_NOEXCEPT
144 ETL_CONSTEXPR14
operator pointer() const ETL_NOEXCEPT
152 ETL_CONSTEXPR14 reference
operator*() const ETL_NOEXCEPT
175 template <
typename T,
typename TDeleter>
185 typedef T value_type;
187 typedef const T* const_pointer;
188 typedef T& reference;
189 typedef const T& const_reference;
197 ETL_CONSTEXPR14
explicit not_null(underlying_type&& u_ptr_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
198 : u_ptr(etl::move(u_ptr_))
208 ETL_CONSTEXPR14 not_null& operator =(underlying_type&& rhs) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
212 u_ptr = etl::move(rhs);
221 ETL_CONSTEXPR14 pointer
get() const ETL_NOEXCEPT
229 ETL_CONSTEXPR14
operator pointer() const ETL_NOEXCEPT
237 ETL_CONSTEXPR14 reference
operator*() const ETL_NOEXCEPT
252 ETL_CONSTEXPR14
explicit not_null(
const this_type& u_ptr_) ETL_NOEXCEPT ETL_DELETE;
253 ETL_CONSTEXPR14
not_null& operator=(
const this_type& rhs) ETL_NOEXCEPT ETL_DELETE;
256 ETL_CONSTEXPR14
explicit not_null(this_type&& u_ptr_) ETL_NOEXCEPT =
delete;
257 ETL_CONSTEXPR14
not_null& operator=(this_type&& rhs) ETL_NOEXCEPT =
delete;
ETL_CONSTEXPR14 not_null(underlying_type ptr_) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
Definition not_null.h:96
ETL_CONSTEXPR14 not_null(const etl::not_null< T * > &other) ETL_NOEXCEPT
Copy construct from a not_null pointer.
Definition not_null.h:105
ETL_CONSTEXPR14 pointer get() const ETL_NOEXCEPT
Gets the underlying pointer.
Definition not_null.h:136
ETL_CONSTEXPR14 pointer operator->() const ETL_NOEXCEPT
Arrow operator.
Definition not_null.h:160
ETL_CONSTEXPR14 reference operator*() const ETL_NOEXCEPT
Dereference operator.
Definition not_null.h:152
ETL_CONSTEXPR14 pointer operator->() const ETL_NOEXCEPT
Arrow operator.
Definition not_null.h:245
ETL_CONSTEXPR14 pointer get() const ETL_NOEXCEPT
Gets the underlying ptr.
Definition not_null.h:221
ETL_CONSTEXPR14 reference operator*() const ETL_NOEXCEPT
Dereference operator.
Definition not_null.h:237
The exception when the not_null contains a null.
Definition not_null.h:60
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
ETL_CONSTEXPR exception(string_type reason_, string_type, numeric_type line_)
Constructor.
Definition exception.h:69
bitset_ext
Definition absolute.h:39
Primary template for etl::underlying_type Users must specialise this template for their enumerations.
Definition type_traits_generator.h:2472