OGLplus  (0.59.0) a C++ wrapper for rendering APIs

offset_ptr.hpp File Reference
#include "../assert.hpp"
#include "../extract.hpp"
#include "../type_identity.hpp"
#include "address.hpp"

Go to the source code of this file.

Classes

class  eagine::memory::basic_offset_ptr< Pointee, OffsetType >
 Basic offset pointer class template. More...
 

Namespaces

 eagine
 Common code is placed in this namespace.
 

Typedefs

template<typename Pointee >
using eagine::memory::offset_ptr = basic_offset_ptr< Pointee, std::ptrdiff_t >
 Default type alias for basic offset pointer.
 
template<typename Pointee >
using eagine::memory::short_offset_ptr = basic_offset_ptr< Pointee, short >
 Type alias for basic offset pointer with short offset.
 

Functions

template<typename P , typename O >
static constexpr auto eagine::memory::extract (basic_offset_ptr< P, O > ptr) noexcept -> P &
 Overload of extract for basic_offset_ptr. More...
 
template<typename P , typename O >
static constexpr auto eagine::memory::extract_or (basic_offset_ptr< P, O > ptr, P &fallback) noexcept -> P &
 Overload of extract_or for basic_offset_ptr.
 
template<typename P , typename O , typename F >
static constexpr auto eagine::memory::extract_or (basic_offset_ptr< P, O > ptr, P &fallback) -> std::enable_if_t< std::is_convertible_v< F, P >, P >
 Overload of extract_or for basic_offset_ptr.
 
template<typename P , typename O >
static constexpr auto eagine::memory::as_address (basic_offset_ptr< P, O > op) noexcept -> basic_address< std::is_const_v< P >>
 Converts basic_offset_ptr into basic_address.
 

Detailed Description

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt

Function Documentation

◆ extract()

template<typename P , typename O >
static constexpr auto eagine::memory::extract ( basic_offset_ptr< P, O >  ptr) -> P&
staticconstexprnoexcept

Overload of extract for basic_offset_ptr.

Precondition
bool(ptr)

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).