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

eagine::basic_c_str< C, P, S > Class Template Reference

Helper template for getting zero-terminated strings from string spans. More...

#include <eagine/string_span.hpp>

Public Member Functions

constexpr auto c_str () const noexcept -> pointer_type
 Return a zero terminated C-string as pointer_type.
 
constexpr operator pointer_type () const noexcept
 Implicit conversion to character pointer_type. More...
 

Detailed Description

template<typename C, typename P, typename S>
class eagine::basic_c_str< C, P, S >

Helper template for getting zero-terminated strings from string spans.

See also
c_str

String spans can in many cases internally know if the element past the end is zero or not. There are cases where string spans or generally spans are not zero terminated. Because of this whenever a zero-terminated C-string is used, for example as an argument to a C-API call, instantiations of this template should be used the obtain a valid C-string.

Member Function Documentation

◆ operator pointer_type()

template<typename C , typename P , typename S >
constexpr eagine::basic_c_str< C, P, S >::operator pointer_type ( ) const
inlineconstexprnoexcept

Implicit conversion to character pointer_type.

See also
c_str

The documentation for this class was generated from the following file:

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