constexpr basic_string_view() noexcept;
Effects:
Constructs an empty basic_string_view.
Postconditions:
size_ == 0 and data_ == nullptr.
constexpr basic_string_view(const charT* str);
Requires:
[str, str + traits::length(str)) is a valid range.
Effects:
Constructs a basic_string_view, with the postconditions
in Table 64.
Table
64 —
basic_string_view(const charT*) effects
Element | Value |
data_ | str |
size_ | traits::length(str) |
Complexity:
O(traits::length(str)).
constexpr basic_string_view(const charT* str, size_type len);
Requires:
[str, str + len) is a valid range.
Effects:
Constructs a basic_string_view, with the postconditions in Table 65.
Table
65 —
basic_string_view(const charT*, size_type) effects
Element | Value |
data_ | str |
size_ | len |