Skip to content

Commit 5da4f64

Browse files
committed
Bug#33306219 replace stdx::string_view by std::string_view
Issue ===== stdx/string_view.h provided a C++17 equivalent of std::string_view for C++14. Since C++17 is now the baseline, it can be removed. Change ====== - replaced stdx::string_view by std::string_view - removed mysql/harness/stdx/string_view.h RB: 26943
1 parent cc7d886 commit 5da4f64

File tree

11 files changed

+49
-1275
lines changed

11 files changed

+49
-1275
lines changed

router/src/harness/include/mysql/harness/config_option.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#include <system_error>
3232

3333
#include "mysql/harness/config_parser.h"
34+
#include "mysql/harness/stdx/attribute.h" // STDX_NONNULL
3435
#include "mysql/harness/stdx/expected.h"
35-
#include "mysql/harness/stdx/string_view.h"
3636

3737
namespace mysql_harness {
3838
enum class option_errc {
@@ -74,7 +74,7 @@ inline std::error_code make_error_code(option_errc e) noexcept {
7474

7575
class ConfigOption {
7676
public:
77-
ConfigOption(stdx::string_view name, stdx::string_view default_value)
77+
ConfigOption(std::string_view name, std::string_view default_value)
7878
: name_{std::move(name)},
7979
is_required_{false},
8080
default_value_{std::move(default_value)} {
@@ -83,8 +83,8 @@ class ConfigOption {
8383
}
8484
}
8585

86-
explicit ConfigOption(::stdx::string_view name)
87-
: name_{name}, is_required_{true} {
86+
explicit ConfigOption(std::string_view name)
87+
: name_{std::move(name)}, is_required_{true} {
8888
if (name.empty()) {
8989
throw std::invalid_argument("expected 'name' to be non-empty");
9090
}

router/src/harness/include/mysql/harness/net_ts/impl/netif.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <forward_list>
3030
#include <list>
3131
#include <string>
32+
#include <string_view>
3233

3334
#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
3435
defined(__sun__)
@@ -55,7 +56,6 @@
5556

5657
#include "mysql/harness/net_ts/internet.h"
5758
#include "mysql/harness/stdx/expected.h"
58-
#include "mysql/harness/stdx/string_view.h"
5959

6060
namespace net {
6161

@@ -331,7 +331,7 @@ class NetworkInterfaceResults {
331331

332332
#elif defined(_WIN32)
333333
static stdx::expected<std::string, std::error_code> convert_wstring_to_utf8(
334-
const stdx::wstring_view &ws) {
334+
const std::wstring_view &ws) {
335335
std::string out;
336336

337337
// first, call it with 0 to get the buffer length

router/src/harness/include/mysql/harness/net_ts/local.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#include "mysql/harness/net_ts/internet.h"
5656
#include "mysql/harness/net_ts/socket.h"
5757
#include "mysql/harness/stdx/expected.h"
58-
#include "mysql/harness/stdx/string_view.h"
5958

6059
namespace local {
6160

@@ -82,7 +81,7 @@ class basic_endpoint {
8281
// namespace' (starting with \0)
8382
//
8483
// note: can be 'constexpr' with C++2a's http://wg21.link/P0202 applied
85-
basic_endpoint(stdx::string_view path) : data_{} {
84+
basic_endpoint(std::string_view path) : data_{} {
8685
data_.sun_family = protocol_type().family();
8786

8887
const auto truncated_path =

0 commit comments

Comments
 (0)