Skip to content

Commit

Permalink
std-compat: remove #include:s which were added for pre C++17
Browse files Browse the repository at this point in the history
these `#include`s were introduced by 0bbcbba and 79e846e, for backward
compatibility with pre-C++17 era. since we've dropped C++17 support,
and now only support C++20 and up. let's remove these cruft.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb#2257
  • Loading branch information
tchaikov authored and xemul committed May 23, 2024
1 parent 914a424 commit b822c94
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/seastar/core/internal/uname.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#pragma once

#include <seastar/util/modules.hh>
#include <seastar/util/std-compat.hh>
#ifndef SEASTAR_MODULE
#include <optional>
#include <string>
#include <initializer_list>
#include <iosfwd>
Expand Down
3 changes: 2 additions & 1 deletion include/seastar/core/resource.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@

#pragma once

#include <seastar/util/std-compat.hh>
#include <seastar/util/spinlock.hh>
#include <seastar/util/modules.hh>
#ifndef SEASTAR_MODULE
#include <cassert>
#include <cstdlib>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion include/seastar/net/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#pragma once

#include <seastar/util/std-compat.hh>
#include <optional>
#include <istream>
#include <string>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion include/seastar/util/exceptions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma once

#include <seastar/util/std-compat.hh>
#include <filesystem>

namespace seastar {

Expand Down
2 changes: 1 addition & 1 deletion include/seastar/util/read_first_line.hh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seastar/util/std-compat.hh>
#include <filesystem>
#include <seastar/core/sstring.hh>
#ifndef SEASTAR_MODULE
#include <boost/lexical_cast.hpp>
Expand Down
6 changes: 0 additions & 6 deletions include/seastar/util/std-compat.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@

#ifndef SEASTAR_MODULE

#include <optional>
#include <string_view>
#include <variant>

#include <filesystem>

#if __has_include(<memory_resource>)
#include <memory_resource>
#else
Expand Down
2 changes: 1 addition & 1 deletion include/seastar/util/variant_utils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#pragma once

#include <seastar/util/std-compat.hh>
#include <variant>

namespace seastar {

Expand Down
1 change: 1 addition & 0 deletions src/net/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module;
#include <yaml-cpp/yaml.h>
#include <algorithm>
#include <istream>
#include <optional>
#include <unordered_map>
#include <string>

Expand Down

0 comments on commit b822c94

Please sign in to comment.