[ox/std] Add CStringView::CStringView(StringLiteral)
This commit is contained in:
parent
9ab3543b32
commit
8f5173e52a
7
deps/ox/src/ox/std/cstringview.hpp
vendored
7
deps/ox/src/ox/std/cstringview.hpp
vendored
@ -8,13 +8,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef OX_USE_STDLIB
|
|
||||||
#include <string_view>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "basestringview.hpp"
|
#include "basestringview.hpp"
|
||||||
#include "bstring.hpp"
|
#include "bstring.hpp"
|
||||||
#include "string.hpp"
|
#include "string.hpp"
|
||||||
|
#include "stringliteral.hpp"
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
@ -24,6 +21,8 @@ class CStringView: public detail::BaseStringView {
|
|||||||
|
|
||||||
constexpr CStringView(CStringView const&sv) noexcept = default;
|
constexpr CStringView(CStringView const&sv) noexcept = default;
|
||||||
|
|
||||||
|
constexpr CStringView(StringLiteral const&str) noexcept: BaseStringView(str.data(), str.len()) {}
|
||||||
|
|
||||||
template<std::size_t SmallStrSz>
|
template<std::size_t SmallStrSz>
|
||||||
constexpr CStringView(BasicString<SmallStrSz> const&str) noexcept: BaseStringView(str.data(), str.len()) {}
|
constexpr CStringView(BasicString<SmallStrSz> const&str) noexcept: BaseStringView(str.data(), str.len()) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user