Skip to content

Commit 382d19a

Browse files
committed
try fix build
Signed-off-by: turuslan <[email protected]>
1 parent a303b8a commit 382d19a

File tree

3 files changed

+3
-77
lines changed

3 files changed

+3
-77
lines changed

cmake/Hunter/init.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ set(
3131
include(${CMAKE_CURRENT_LIST_DIR}/HunterGate.cmake)
3232

3333
HunterGate(
34-
URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.23.257-qdrvm10.tar.gz
35-
SHA1 72b446a4424ba28ea90f9a68a9134b0f8e44b5b2
34+
URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm5.zip
35+
SHA1 ae75fdf1850bd21dead239b8580012b6091be855
3636
LOCAL
3737
)

include/libp2p/outcome/outcome.hpp

-75
Original file line numberDiff line numberDiff line change
@@ -95,78 +95,3 @@ struct fmt::formatter<boost::system::error_code> {
9595
return std::copy(std::begin(message), std::end(message), ctx.out());
9696
}
9797
};
98-
99-
// Remove after it will be added to libp2p (will be happened compilation error)
100-
template <typename T>
101-
struct fmt::formatter<outcome::success_type<T>> {
102-
// Parses format specifications. Must be empty
103-
constexpr auto parse(format_parse_context &ctx) -> decltype(ctx.begin()) {
104-
// Parse the presentation format and store it in the formatter:
105-
auto it = ctx.begin(), end = ctx.end();
106-
107-
// Check if reached the end of the range:
108-
if (it != end && *it != '}') {
109-
throw format_error("invalid format");
110-
}
111-
112-
// Return an iterator past the end of the parsed range:
113-
return it;
114-
}
115-
116-
// Formats the success<non_void_type>
117-
template <typename OutputIt>
118-
typename std::enable_if_t<not std::is_void_v<T>, OutputIt> format_impl(
119-
OutputIt out, const outcome::success_type<T> &success) const {
120-
return fmt::format_to(out, "{}", success.value());
121-
}
122-
123-
// Formats the success<void>
124-
template <typename OutputIt>
125-
typename std::enable_if_t<std::is_void_v<T>, OutputIt> format_impl(
126-
OutputIt out, const outcome::success_type<void> &) const {
127-
static constexpr string_view message("<success>");
128-
return std::copy(std::begin(message), std::end(message), out);
129-
}
130-
131-
// Formats the success<T>
132-
template <typename FormatContext>
133-
auto format(const outcome::success_type<T> &success, FormatContext &ctx) const
134-
-> decltype(ctx.out()) {
135-
return format_impl(ctx.out(), success);
136-
}
137-
};
138-
139-
template <typename Result, typename Failure>
140-
struct fmt::formatter<outcome::result<Result, Failure>> {
141-
// Parses format specifications. Must be empty
142-
constexpr auto parse(format_parse_context &ctx) -> decltype(ctx.begin()) {
143-
// Parse the presentation format and store it in the formatter:
144-
auto it = ctx.begin(), end = ctx.end();
145-
146-
// Check if reached the end of the range:
147-
if (it != end && *it != '}') {
148-
throw format_error("invalid format");
149-
}
150-
151-
// Return an iterator past the end of the parsed range:
152-
return it;
153-
}
154-
155-
// Formats the outcome result
156-
template <typename FormatContext>
157-
auto format(const outcome::result<Result, Failure> &res,
158-
FormatContext &ctx) const -> decltype(ctx.out()) {
159-
// ctx.out() is an output iterator to write to.
160-
161-
if (res.has_value()) {
162-
if constexpr (not std::is_void_v<Result>) {
163-
return fmt::format_to(ctx.out(), "{}", res.value());
164-
} else {
165-
static constexpr string_view message("<success>");
166-
return std::copy(std::begin(message), std::end(message), ctx.out());
167-
}
168-
} else {
169-
return fmt::format_to(ctx.out(), "{}", res.error());
170-
}
171-
}
172-
};

include/libp2p/protocol/echo/client_echo_session.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#pragma once
88

9+
#include <optional>
910
#include <vector>
1011

1112
#include <libp2p/connection/stream.hpp>

0 commit comments

Comments
 (0)