summaryrefslogtreecommitdiff
path: root/lib/nes/common/containers/path-view.hh
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-02-06 19:54:38 +0100
committerHannes Schulze <haschu0103@outlook.de>2025-02-06 19:54:38 +0100
commit64ebfde8bcd6408e3b6925624e8680c314db6efc (patch)
treeb969314f909f7f16ef5acc63f90dca317a40850a /lib/nes/common/containers/path-view.hh
parentd060e3a50c987d10799ccc739bdbf9d7d7a13c10 (diff)
get rid of nasty stdlib
Diffstat (limited to 'lib/nes/common/containers/path-view.hh')
-rw-r--r--lib/nes/common/containers/path-view.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/nes/common/containers/path-view.hh b/lib/nes/common/containers/path-view.hh
index 7741060..1c25d26 100644
--- a/lib/nes/common/containers/path-view.hh
+++ b/lib/nes/common/containers/path-view.hh
@@ -1,14 +1,14 @@
#pragma once
+#include "nes/common/containers/string-view.hh"
#include "nes/common/types.hh"
-#include <string_view>
namespace nes
{
/// Non-owning copy of a path, useful for iterating over its components.
class path_view
{
- std::string_view path_;
+ string_view path_;
public:
/// An iterator for the path components.
@@ -24,7 +24,7 @@ namespace nes
auto operator==(iterator const& other) -> bool { return current_ == other.current_; }
auto operator!=(iterator const& other) -> bool { return current_ != other.current_; }
- auto operator*() const -> std::string_view;
+ auto operator*() const -> string_view;
auto operator++() -> iterator&;
auto operator++(int) -> iterator;
@@ -38,12 +38,12 @@ namespace nes
};
explicit path_view() = default;
- explicit path_view(std::string_view const path)
+ explicit path_view(string_view const path)
: path_{ path }
{
}
- auto get_path() const -> std::string_view { return path_; }
+ auto get_path() const -> string_view { return path_; }
auto begin() const -> iterator;
auto end() const -> iterator;