Skip to content

Commit

Permalink
Revert "sstring: deprecate formatters for vector and unordered_map"
Browse files Browse the repository at this point in the history
This reverts commit 914a424.

Signed-off-by: Matan Breizman <[email protected]>
  • Loading branch information
Matan-B committed Jul 9, 2024
1 parent 3dc415a commit 23e0595
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ option (Seastar_SSTRING
"Use seastar's own string implementation"
ON)

option (Seastar_DEPRECATED_OSTREAM_FORMATTERS
"Enable operator<< for formatting standard library containers, which will be deprecated in future"
ON)

set (Seastar_API_LEVEL
"7"
CACHE
Expand Down Expand Up @@ -934,11 +930,6 @@ if (Seastar_SSTRING)
PUBLIC SEASTAR_SSTRING)
endif ()

if (Seastar_DEPRECATED_OSTREAM_FORMATTERS)
target_compile_definitions (seastar
PUBLIC SEASTAR_DEPRECATED_OSTREAM_FORMATTERS)
endif ()

if (LinuxMembarrier_FOUND)
list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAS_MEMBARRIER)

Expand Down
6 changes: 0 additions & 6 deletions include/seastar/core/sstring.hh
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,10 @@ string_type to_sstring(T value) {
}
}

#ifdef SEASTAR_DEPRECATED_OSTREAM_FORMATTERS

namespace std {

SEASTAR_MODULE_EXPORT
template <typename T>
[[deprecated("Use {fmt} instead")]]
inline
std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
bool first = true;
Expand All @@ -861,7 +858,6 @@ std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {

SEASTAR_MODULE_EXPORT
template <typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator>
[[deprecated("Use {fmt} instead")]]
std::ostream& operator<<(std::ostream& os, const std::unordered_map<Key, T, Hash, KeyEqual, Allocator>& v) {
bool first = true;
os << "{";
Expand All @@ -878,8 +874,6 @@ std::ostream& operator<<(std::ostream& os, const std::unordered_map<Key, T, Hash
}
}

#endif

#if FMT_VERSION >= 90000

// Due to https://github.com/llvm/llvm-project/issues/68849, we inherit
Expand Down

0 comments on commit 23e0595

Please sign in to comment.