hybstr
Hybrid constexpr string library for compile-time and runtime use
Loading...
Searching...
No Matches
hybstr::literals Namespace Reference

Contains user defined literal operators for creating 'hybstr::string_impl' objects. More...

Functions

template<hybstr::string_impl str>
consteval auto operator""_hyb () noexcept
 User-defined literal for creating a 'hybstr::string_impl'. C++20 or above.
consteval auto operator""_hyb (const char *str, std::size_t len) noexcept
 User-defined literal for creating a 'hybstr::string_impl'. C++17.

Detailed Description

Contains user defined literal operators for creating 'hybstr::string_impl' objects.

Function Documentation

◆ operator""_hyb() [1/2]

template<hybstr::string_impl str>
auto hybstr::literals::operator""_hyb ( )
nodiscardconstevalnoexcept

User-defined literal for creating a 'hybstr::string_impl'. C++20 or above.

using namespace hybstr::literals;
constexpr auto s = "Hello"_hyb;
static_assert(s == hybstr::string("Hello"));
Contains user defined literal operators for creating 'hybstr::string_impl' objects.
constexpr auto string()
Creates an empty hybrid string.
Definition hybstr.hpp:945

◆ operator""_hyb() [2/2]

auto hybstr::literals::operator""_hyb ( const char * str,
std::size_t len )
nodiscardconstevalnoexcept

User-defined literal for creating a 'hybstr::string_impl'. C++17.

using namespace hybstr::literals;
constexpr auto s = "Hello"_hyb;
static_assert(s == hybstr::string("Hello"));