8000 trying to use 17 · arangodb/arangodb@65a514c · GitHub
[go: up one dir, main page]

Skip to content

Commit 65a514c

Browse files
committed
trying to use 17
1 parent 8344d96 commit 65a514c

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

VERSIONS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
CXX_STANDARD "17"
12
STARTER_REV "0.13.2"
23
SYNCER_REV "0.5.3"
34
GSEARCH_ID_HTTP "010085642145132923492:fixi4yzeiz8"

lib/Futures/backports.h

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
#ifndef ARANGOD_FUTURES_BACKPORTS_H
2424
#define ARANGOD_FUTURES_BACKPORTS_H 1
2525

26+
#if __cplusplus >= 201703L
27+
#include <type_traits>
28+
#include <utility>
29+
#endif
30+
2631
namespace arangodb {
2732
namespace futures {
2833

@@ -69,13 +74,19 @@ constexpr auto invoke(M(C::*d), Args&&... args)
6974
}
7075

7176
#else
72-
#include <type_traits>
73-
#include <utility>
7477
using in_place_t = std::in_place_t;
75-
using in_place = std::in_place;
76-
using is_invocable = std::is_invocable;
77-
using is_invocable_r = std::is_invocable_r;
78-
using invoke = std::invoke;
78+
inline constexpr in_place_t in_place{};
79+
80+
template <class R, class FN, class... ArgTypes>
81+
using is_invocable_r = std::is_invocable_r<R, FN, ArgTypes...>;
82+
83+
template <class FN, class... ArgTypes>
84+
using is_invocable = std::is_invocable<FN, ArgTypes...>;
85+
86+
template< class F, class... Args>
87+
auto invoke(F&& f, Args&&... args) noexcept -> decltype(std::invoke(f, args...)) {
88+
return std::invoke(f, args...);
89+
}
7990
#endif
8091

8192
}}

0 commit comments

Comments
 (0)
0