Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b1175acb
Commit
b1175acb
authored
Jul 22, 2021
by
Max Kellermann
Committed by
Max Kellermann
Aug 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/StringView: hard-code C++17
parent
672278e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
StringView.hxx
src/util/StringView.hxx
+1
-7
No files found.
src/util/StringView.hxx
View file @
b1175acb
...
@@ -32,14 +32,10 @@
...
@@ -32,14 +32,10 @@
#include "ConstBuffer.hxx"
#include "ConstBuffer.hxx"
#include "StringAPI.hxx"
#include "StringAPI.hxx"
#include "Compiler.h"
#include <utility>
#include <cstddef>
#include <cstddef>
#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0)
#include <string_view>
#include <string_view>
#
endif
#
include <utility>
template
<
typename
T
>
template
<
typename
T
>
struct
BasicStringView
:
ConstBuffer
<
T
>
{
struct
BasicStringView
:
ConstBuffer
<
T
>
{
...
@@ -72,14 +68,12 @@ struct BasicStringView : ConstBuffer<T> {
...
@@ -72,14 +68,12 @@ struct BasicStringView : ConstBuffer<T> {
constexpr
BasicStringView
(
std
::
nullptr_t
n
)
noexcept
constexpr
BasicStringView
(
std
::
nullptr_t
n
)
noexcept
:
ConstBuffer
<
T
>
(
n
)
{}
:
ConstBuffer
<
T
>
(
n
)
{}
#if __cplusplus >= 201703L && !GCC_OLDER_THAN(7,0)
constexpr
BasicStringView
(
std
::
basic_string_view
<
T
>
src
)
noexcept
constexpr
BasicStringView
(
std
::
basic_string_view
<
T
>
src
)
noexcept
:
ConstBuffer
<
T
>
(
src
.
data
(),
src
.
size
())
{}
:
ConstBuffer
<
T
>
(
src
.
data
(),
src
.
size
())
{}
constexpr
operator
std
::
basic_string_view
<
T
>
()
const
noexcept
{
constexpr
operator
std
::
basic_string_view
<
T
>
()
const
noexcept
{
return
{
data
,
size
};
return
{
data
,
size
};
}
}
#endif
using
ConstBuffer
<
T
>::
empty
;
using
ConstBuffer
<
T
>::
empty
;
using
ConstBuffer
<
T
>::
begin
;
using
ConstBuffer
<
T
>::
begin
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment