Qx v0.7
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::WStringLiteral< N > Class Template Referencefinal

WStringLiteral acts like a typedef/alias for a StringLiteral that uses wchar_t as its storage type.

#include <qx/utility/qx-stringliteral.h>

Inheritance diagram for Qx::WStringLiteral< N >:
[legend]

Public Member Functions

constexpr WStringLiteral (const wchar_t(&str)[N])
 
- Public Member Functions inherited from Qx::StringLiteral< wchar_t, N >
constexpr StringLiteral (const C(&str)[N])
 
constexpr C * data () const
 
constexpr operator QLatin1StringView () const
 
constexpr operator QStringView () const
 
constexpr operator std::basic_string_view< C > () const
 
constexpr std::strong_ordering operator<=> (const StringLiteral &other) const=default
 
constexpr bool operator== (const StringLiteral &other) const=default
 
constexpr size_t size () const
 
constexpr std::basic_string_view< C > std_view () const
 
constexpr view_t view () const
 

Additional Inherited Members

- Public Types inherited from Qx::StringLiteral< wchar_t, N >
using data_t
 
using view_t
 
- Static Public Attributes inherited from Qx::StringLiteral< wchar_t, N >
static constexpr size_t size_v
 

Constructor & Destructor Documentation

◆ WStringLiteral()

template<size_t N>
Qx::WStringLiteral< N >::WStringLiteral ( const wchar_t(&) str[N])
inlineconstexpr

Wraps the raw string str of length N.

Warning
If preparing a character array manually, be sure to included a null-terminator as its presence is assumed! If none is provided, the "size" members will report incorrect values and concatenation will result in UB.

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