mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
always use absl for string_view
This commit is contained in:
parent
605da68e15
commit
7d949ebf5d
1 changed files with 0 additions and 16 deletions
|
@ -1,21 +1,6 @@
|
||||||
#ifndef LLARP_STRING_VIEW_HPP
|
#ifndef LLARP_STRING_VIEW_HPP
|
||||||
#define LLARP_STRING_VIEW_HPP
|
#define LLARP_STRING_VIEW_HPP
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
|
||||||
#include <string_view>
|
|
||||||
#include <string>
|
|
||||||
namespace llarp
|
|
||||||
{
|
|
||||||
using string_view = std::string_view;
|
|
||||||
using string_view_hash = std::hash< string_view >;
|
|
||||||
|
|
||||||
static std::string
|
|
||||||
string_view_string(const string_view& v)
|
|
||||||
{
|
|
||||||
return std::string(v.data(), v.size());
|
|
||||||
}
|
|
||||||
} // namespace llarp
|
|
||||||
#else
|
|
||||||
#include <absl/hash/hash.h>
|
#include <absl/hash/hash.h>
|
||||||
#include <absl/strings/string_view.h>
|
#include <absl/strings/string_view.h>
|
||||||
namespace llarp
|
namespace llarp
|
||||||
|
@ -30,4 +15,3 @@ namespace llarp
|
||||||
}
|
}
|
||||||
} // namespace llarp
|
} // namespace llarp
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue