Commit f498404b authored by Andres Suarez's avatar Andres Suarez Committed by Facebook GitHub Bot

Apply clang-format

Reviewed By: igorsugak

Differential Revision: D28582083

fbshipit-source-id: 9beedfccfd1fc6b9dc4f7ff8ab0139282bd285ab
parent beded0e8
...@@ -163,9 +163,8 @@ beginInsertInternal: ...@@ -163,9 +163,8 @@ beginInsertInternal:
if (tryLockMap(nextMapIdx)) { if (tryLockMap(nextMapIdx)) {
// Alloc a new map and shove it in. We can change whatever // Alloc a new map and shove it in. We can change whatever
// we want because other threads are waiting on us... // we want because other threads are waiting on us...
size_t numCellsAllocated = (size_t)( size_t numCellsAllocated =
primarySubMap->capacity_ * (size_t)(primarySubMap->capacity_ * std::pow(1.0 + kGrowthFrac_, nextMapIdx - 1));
std::pow(1.0 + kGrowthFrac_, nextMapIdx - 1));
size_t newSize = size_t(numCellsAllocated * kGrowthFrac_); size_t newSize = size_t(numCellsAllocated * kGrowthFrac_);
DCHECK( DCHECK(
subMaps_[nextMapIdx].load(std::memory_order_relaxed) == subMaps_[nextMapIdx].load(std::memory_order_relaxed) ==
......
...@@ -312,9 +312,8 @@ auto getLastElement(const Ts&... ts) ...@@ -312,9 +312,8 @@ auto getLastElement(const Ts&... ts)
} }
template <class... Ts> template <class... Ts>
struct LastElement : std::decay<decltype( struct LastElement : std::decay<decltype(LastElementImpl<Ts...>::call(
LastElementImpl<Ts...>::call(std::declval<Ts>()...))> { std::declval<Ts>()...))> {};
};
#endif #endif
} // namespace detail } // namespace detail
...@@ -1420,8 +1419,8 @@ parseToWrap(StringPiece sp, Tgt& out) { ...@@ -1420,8 +1419,8 @@ parseToWrap(StringPiece sp, Tgt& out) {
} }
template <typename Tgt> template <typename Tgt>
using ParseToError = ExpectedErrorType<decltype( using ParseToError = ExpectedErrorType<decltype(detail::parseToWrap(
detail::parseToWrap(StringPiece{}, std::declval<Tgt&>()))>; StringPiece{}, std::declval<Tgt&>()))>;
} // namespace detail } // namespace detail
......
...@@ -1103,8 +1103,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> { ...@@ -1103,8 +1103,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> {
* then * then
*/ */
template <class... Fns FOLLY_REQUIRES_TRAILING(sizeof...(Fns) >= 1)> template <class... Fns FOLLY_REQUIRES_TRAILING(sizeof...(Fns) >= 1)>
auto then(Fns&&... fns) const& -> decltype( auto then(Fns&&... fns)
expected_detail::ExpectedHelper::then_( const& -> decltype(expected_detail::ExpectedHelper::then_(
std::declval<const Base&>(), std::declval<Fns>()...)) { std::declval<const Base&>(), std::declval<Fns>()...)) {
if (this->uninitializedByException()) { if (this->uninitializedByException()) {
throw_exception<BadExpectedAccess>(); throw_exception<BadExpectedAccess>();
...@@ -1137,8 +1137,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> { ...@@ -1137,8 +1137,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> {
* thenOrThrow * thenOrThrow
*/ */
template <class Yes, class No = MakeBadExpectedAccess> template <class Yes, class No = MakeBadExpectedAccess>
auto thenOrThrow(Yes&& yes, No&& no = No{}) const& -> decltype( auto thenOrThrow(Yes&& yes, No&& no = No{})
std::declval<Yes>()(std::declval<const Value&>())) { const& -> decltype(std::declval<Yes>()(std::declval<const Value&>())) {
using Ret = decltype(std::declval<Yes>()(std::declval<const Value&>())); using Ret = decltype(std::declval<Yes>()(std::declval<const Value&>()));
if (this->uninitializedByException()) { if (this->uninitializedByException()) {
throw_exception<BadExpectedAccess>(); throw_exception<BadExpectedAccess>();
...@@ -1148,8 +1148,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> { ...@@ -1148,8 +1148,8 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> {
} }
template <class Yes, class No = MakeBadExpectedAccess> template <class Yes, class No = MakeBadExpectedAccess>
auto thenOrThrow(Yes&& yes, No&& no = No{}) & -> decltype( auto thenOrThrow(Yes&& yes, No&& no = No{}) & -> decltype(std::declval<Yes>()(
std::declval<Yes>()(std::declval<Value&>())) { std::declval<Value&>())) {
using Ret = decltype(std::declval<Yes>()(std::declval<Value&>())); using Ret = decltype(std::declval<Yes>()(std::declval<Value&>()));
if (this->uninitializedByException()) { if (this->uninitializedByException()) {
throw_exception<BadExpectedAccess>(); throw_exception<BadExpectedAccess>();
...@@ -1159,8 +1159,10 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> { ...@@ -1159,8 +1159,10 @@ class Expected final : expected_detail::ExpectedStorage<Value, Error> {
} }
template <class Yes, class No = MakeBadExpectedAccess> template <class Yes, class No = MakeBadExpectedAccess>
auto thenOrThrow(Yes&& yes, No&& no = No{}) && -> decltype( auto thenOrThrow(
std::declval<Yes>()(std::declval<Value&&>())) { Yes&& yes,
No&& no =
No{}) && -> decltype(std::declval<Yes>()(std::declval<Value&&>())) {
using Ret = decltype(std::declval<Yes>()(std::declval<Value&&>())); using Ret = decltype(std::declval<Yes>()(std::declval<Value&&>()));
if (this->uninitializedByException()) { if (this->uninitializedByException()) {
throw_exception<BadExpectedAccess>(); throw_exception<BadExpectedAccess>();
......
...@@ -70,8 +70,8 @@ struct ValueTypeForTransparentConversionToRange { ...@@ -70,8 +70,8 @@ struct ValueTypeForTransparentConversionToRange {
template <typename T> template <typename T>
struct ValueTypeForTransparentConversionToRange< struct ValueTypeForTransparentConversionToRange<
T, T,
void_t<decltype( void_t<
std::declval<hasher<Range<typename T::value_type const*>>>()( decltype(std::declval<hasher<Range<typename T::value_type const*>>>()(
std::declval<Range<typename T::value_type const*>>()))>> { std::declval<Range<typename T::value_type const*>>()))>> {
using type = std::remove_const_t<typename T::value_type>; using type = std::remove_const_t<typename T::value_type>;
}; };
......
...@@ -59,8 +59,8 @@ struct ArgumentTypesByKind {}; ...@@ -59,8 +59,8 @@ struct ArgumentTypesByKind {};
template <typename Fn> template <typename Fn>
struct ArgumentTypesByKind<IdentifyCallable::Kind::MemberFunction, Fn> { struct ArgumentTypesByKind<IdentifyCallable::Kind::MemberFunction, Fn> {
using type = typename boost::mpl::template pop_front< using type = typename boost::mpl::template pop_front<
typename boost::function_types::template parameter_types<decltype( typename boost::function_types::template parameter_types<
&Fn::operator())>::type>::type; decltype(&Fn::operator())>::type>::type;
}; };
template <typename Fn> template <typename Fn>
struct ArgumentTypesByKind<IdentifyCallable::Kind::Function, Fn> { struct ArgumentTypesByKind<IdentifyCallable::Kind::Function, Fn> {
......
...@@ -45,8 +45,8 @@ bool folly::JemallocHugePageAllocator::hugePagesSupported{true}; ...@@ -45,8 +45,8 @@ bool folly::JemallocHugePageAllocator::hugePagesSupported{true};
#if !defined(JEMALLOC_VERSION_MAJOR) || (JEMALLOC_VERSION_MAJOR < 5) #if !defined(JEMALLOC_VERSION_MAJOR) || (JEMALLOC_VERSION_MAJOR < 5)
typedef struct extent_hooks_s extent_hooks_t; typedef struct extent_hooks_s extent_hooks_t;
typedef void*(extent_alloc_t)( typedef void*(
extent_hooks_t*, void*, size_t, size_t, bool*, bool*, unsigned); extent_alloc_t)(extent_hooks_t*, void*, size_t, size_t, bool*, bool*, unsigned);
struct extent_hooks_s { struct extent_hooks_s {
extent_alloc_t* alloc; extent_alloc_t* alloc;
}; };
......
...@@ -353,8 +353,8 @@ auto collectAllTryWindowed(InputRange awaitables, std::size_t maxConcurrency) ...@@ -353,8 +353,8 @@ auto collectAllTryWindowed(InputRange awaitables, std::size_t maxConcurrency)
template <typename SemiAwaitable> template <typename SemiAwaitable>
auto collectAllWindowed( auto collectAllWindowed(
std::vector<SemiAwaitable> awaitables, std::size_t maxConcurrency) std::vector<SemiAwaitable> awaitables, std::size_t maxConcurrency)
-> decltype( -> decltype(collectAllWindowed(
collectAllWindowed(awaitables | ranges::views::move, maxConcurrency)) { awaitables | ranges::views::move, maxConcurrency)) {
co_return co_await collectAllWindowed( co_return co_await collectAllWindowed(
awaitables | ranges::views::move, maxConcurrency); awaitables | ranges::views::move, maxConcurrency);
} }
......
...@@ -195,8 +195,9 @@ class StackAwareViaIfAsyncAwaiter { ...@@ -195,8 +195,9 @@ class StackAwareViaIfAsyncAwaiter {
using CoroutinePromise = typename CoroutineType::promise_type; using CoroutinePromise = typename CoroutineType::promise_type;
using WrapperHandle = coroutine_handle<CoroutinePromise>; using WrapperHandle = coroutine_handle<CoroutinePromise>;
using await_suspend_result_t = decltype( using await_suspend_result_t =
std::declval<Awaiter&>().await_suspend(std::declval<WrapperHandle>())); decltype(std::declval<Awaiter&>().await_suspend(
std::declval<WrapperHandle>()));
public: public:
explicit StackAwareViaIfAsyncAwaiter( explicit StackAwareViaIfAsyncAwaiter(
...@@ -255,8 +256,9 @@ class ViaIfAsyncAwaiter { ...@@ -255,8 +256,9 @@ class ViaIfAsyncAwaiter {
using CoroutinePromise = typename CoroutineType::promise_type; using CoroutinePromise = typename CoroutineType::promise_type;
using WrapperHandle = coroutine_handle<CoroutinePromise>; using WrapperHandle = coroutine_handle<CoroutinePromise>;
using await_suspend_result_t = decltype( using await_suspend_result_t =
std::declval<Awaiter&>().await_suspend(std::declval<WrapperHandle>())); decltype(std::declval<Awaiter&>().await_suspend(
std::declval<WrapperHandle>()));
public: public:
explicit ViaIfAsyncAwaiter( explicit ViaIfAsyncAwaiter(
......
...@@ -42,8 +42,8 @@ struct WithCancellationFunction { ...@@ -42,8 +42,8 @@ struct WithCancellationFunction {
const folly::CancellationToken& cancelToken, Awaitable&& awaitable) const const folly::CancellationToken& cancelToken, Awaitable&& awaitable) const
noexcept( noexcept(
noexcept(co_withCancellation(cancelToken, (Awaitable &&) awaitable))) noexcept(co_withCancellation(cancelToken, (Awaitable &&) awaitable)))
-> decltype( -> decltype(co_withCancellation(
co_withCancellation(cancelToken, (Awaitable &&) awaitable)) { cancelToken, (Awaitable &&) awaitable)) {
return co_withCancellation(cancelToken, (Awaitable &&) awaitable); return co_withCancellation(cancelToken, (Awaitable &&) awaitable);
} }
......
...@@ -253,7 +253,7 @@ class Recursion { ...@@ -253,7 +253,7 @@ class Recursion {
InlineTask<int> operator co_await() { InlineTask<int> operator co_await() {
if (child_) { if (child_) {
co_return co_await* child_ + 1; co_return co_await *child_ + 1;
} }
co_return 0; co_return 0;
} }
......
...@@ -62,8 +62,9 @@ static_assert( ...@@ -62,8 +62,9 @@ static_assert(
""); "");
static_assert( static_assert(
std::is_same< std::is_same<
folly::coro::semi_await_result_t<decltype( folly::coro::semi_await_result_t<
std::declval<folly::coro::SharedMutex&>().co_scoped_lock_shared())>, decltype(std::declval<folly::coro::SharedMutex&>()
.co_scoped_lock_shared())>,
folly::coro::SharedLock<folly::coro::SharedMutex>>::value, folly::coro::SharedLock<folly::coro::SharedMutex>>::value,
""); "");
......
...@@ -179,8 +179,8 @@ using TypeIdentityT = typename TypeIdentity<T>::type; ...@@ -179,8 +179,8 @@ using TypeIdentityT = typename TypeIdentity<T>::type;
Aggregate all off these together in a single section for better TLB \ Aggregate all off these together in a single section for better TLB \
and cache locality. */ \ and cache locality. */ \
__attribute__((__section__(".folly.settings.cache"))) \ __attribute__((__section__(".folly.settings.cache"))) \
std::atomic<folly::settings::detail::SettingCore<_Type>*> \ std::atomic<folly::settings::detail::SettingCore<_Type>*> \
FOLLY_SETTINGS_CACHE__##_project##_##_name; \ FOLLY_SETTINGS_CACHE__##_project##_##_name; \
/* Location for the small value cache (if _Type is small and trivial). \ /* Location for the small value cache (if _Type is small and trivial). \
Intentionally located right after the pointer cache above to take \ Intentionally located right after the pointer cache above to take \
advantage of the prefetching */ \ advantage of the prefetching */ \
......
...@@ -510,8 +510,8 @@ void UnsafeSelfAllocateStackTracePrinter::printSymbolizedStackTrace() { ...@@ -510,8 +510,8 @@ void UnsafeSelfAllocateStackTracePrinter::printSymbolizedStackTrace() {
makecontext( makecontext(
&alt, &alt,
(void (*)())(void (*)(UnsafeSelfAllocateStackTracePrinter*))( (void (*)())(void (*)(
contextStart), UnsafeSelfAllocateStackTracePrinter*))(contextStart),
/* argc */ 1, /* argc */ 1,
/* arg */ this); /* arg */ this);
// NOTE: swapcontext is not async-signal-safe // NOTE: swapcontext is not async-signal-safe
......
...@@ -80,8 +80,8 @@ struct ApplyInvoke { ...@@ -80,8 +80,8 @@ struct ApplyInvoke {
static constexpr auto static constexpr auto
invoke_(F&& f, T&& t, std::index_sequence<I...>) noexcept( invoke_(F&& f, T&& t, std::index_sequence<I...>) noexcept(
noexcept(invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...))) noexcept(invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...)))
-> decltype( -> decltype(invoke(
invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...)) { static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...)) {
return invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...); return invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...);
} }
......
...@@ -495,8 +495,8 @@ struct tag_invoke_fn { ...@@ -495,8 +495,8 @@ struct tag_invoke_fn {
template <typename Tag, typename... Args> template <typename Tag, typename... Args>
constexpr auto operator()(Tag tag, Args&&... args) const noexcept(noexcept( constexpr auto operator()(Tag tag, Args&&... args) const noexcept(noexcept(
tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...))) tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...)))
-> decltype( -> decltype(tag_invoke(
tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...)) { static_cast<Tag&&>(tag), static_cast<Args&&>(args)...)) {
return tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...); return tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...);
} }
}; };
......
...@@ -2057,8 +2057,8 @@ template < ...@@ -2057,8 +2057,8 @@ template <
class F, class F,
class ItT = typename std::iterator_traits<It>::value_type, class ItT = typename std::iterator_traits<It>::value_type,
class Tag = std::enable_if_t<is_invocable_v<F, typename ItT::value_type&&>>, class Tag = std::enable_if_t<is_invocable_v<F, typename ItT::value_type&&>>,
class Result = typename decltype( class Result = typename decltype(std::declval<ItT>().thenValue(
std::declval<ItT>().thenValue(std::declval<F>()))::value_type> std::declval<F>()))::value_type>
std::vector<Future<Result>> mapValue(It first, It last, F func); std::vector<Future<Result>> mapValue(It first, It last, F func);
/** /**
...@@ -2071,8 +2071,8 @@ template < ...@@ -2071,8 +2071,8 @@ template <
class ItT = typename std::iterator_traits<It>::value_type, class ItT = typename std::iterator_traits<It>::value_type,
class Tag = class Tag =
std::enable_if_t<!is_invocable_v<F, typename ItT::value_type&&>>, std::enable_if_t<!is_invocable_v<F, typename ItT::value_type&&>>,
class Result = typename decltype( class Result = typename decltype(std::declval<ItT>().thenTry(
std::declval<ItT>().thenTry(std::declval<F>()))::value_type> std::declval<F>()))::value_type>
std::vector<Future<Result>> mapTry(It first, It last, F func, int = 0); std::vector<Future<Result>> mapTry(It first, It last, F func, int = 0);
/** /**
......
...@@ -148,22 +148,24 @@ auto add_to_tuple(std::tuple<Types1...> t1, std::tuple<Types2...> t2) ...@@ -148,22 +148,24 @@ auto add_to_tuple(std::tuple<Types1...> t1, std::tuple<Types2...> t2)
} }
template <class... Types1, class Type2> template <class... Types1, class Type2>
auto add_to_tuple(std::tuple<Types1...> t1, Type2&& t2) -> decltype( auto add_to_tuple(std::tuple<Types1...> t1, Type2&& t2)
std::tuple_cat(std::move(t1), std::make_tuple(std::forward<Type2>(t2)))) { -> decltype(std::tuple_cat(
std::move(t1), std::make_tuple(std::forward<Type2>(t2)))) {
return std::tuple_cat( return std::tuple_cat(
std::move(t1), std::make_tuple(std::forward<Type2>(t2))); std::move(t1), std::make_tuple(std::forward<Type2>(t2)));
} }
template <class Type1, class... Types2> template <class Type1, class... Types2>
auto add_to_tuple(Type1&& t1, std::tuple<Types2...> t2) -> decltype( auto add_to_tuple(Type1&& t1, std::tuple<Types2...> t2)
std::tuple_cat(std::make_tuple(std::forward<Type1>(t1)), std::move(t2))) { -> decltype(std::tuple_cat(
std::make_tuple(std::forward<Type1>(t1)), std::move(t2))) {
return std::tuple_cat( return std::tuple_cat(
std::make_tuple(std::forward<Type1>(t1)), std::move(t2)); std::make_tuple(std::forward<Type1>(t1)), std::move(t2));
} }
template <class Type1, class Type2> template <class Type1, class Type2>
auto add_to_tuple(Type1&& t1, Type2&& t2) -> decltype( auto add_to_tuple(Type1&& t1, Type2&& t2) -> decltype(std::make_tuple(
std::make_tuple(std::forward<Type1>(t1), std::forward<Type2>(t2))) { std::forward<Type1>(t1), std::forward<Type2>(t2))) {
return std::make_tuple(std::forward<Type1>(t1), std::forward<Type2>(t2)); return std::make_tuple(std::forward<Type1>(t1), std::forward<Type2>(t2));
} }
......
...@@ -31,25 +31,25 @@ ...@@ -31,25 +31,25 @@
#define FOLLY_DETAIL_SAFE_CHECK_LINKAGE static #define FOLLY_DETAIL_SAFE_CHECK_LINKAGE static
#endif #endif
#define FOLLY_DETAIL_SAFE_CHECK_IMPL(d, p, expr, expr_s, ...) \ #define FOLLY_DETAIL_SAFE_CHECK_IMPL(d, p, expr, expr_s, ...) \
do { \ do { \
if ((!d || ::folly::kIsDebug || ::folly::kIsSanitize) && \ if ((!d || ::folly::kIsDebug || ::folly::kIsSanitize) && \
!static_cast<bool>(expr)) { \ !static_cast<bool>(expr)) { \
FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr auto \ FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr auto \
__folly_detail_safe_assert_fun = __func__; \ __folly_detail_safe_assert_fun = __func__; \
FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr ::folly::detail:: \ FOLLY_DETAIL_SAFE_CHECK_LINKAGE constexpr ::folly::detail:: \
safe_assert_arg __folly_detail_safe_assert_arg{ \ safe_assert_arg __folly_detail_safe_assert_arg{ \
FOLLY_PP_STRINGIZE(expr_s), \ FOLLY_PP_STRINGIZE(expr_s), \
__FILE__, \ __FILE__, \
__LINE__, \ __LINE__, \
__folly_detail_safe_assert_fun, \ __folly_detail_safe_assert_fun, \
::folly::detail::safe_assert_msg_types<decltype( \ ::folly::detail::safe_assert_msg_types< \
::folly::detail::safe_assert_msg_types_seq_of( \ decltype(::folly::detail::safe_assert_msg_types_seq_of( \
__VA_ARGS__))>::value.data}; \ __VA_ARGS__))>::value.data}; \
::folly::detail::safe_assert_terminate<p>( \ ::folly::detail::safe_assert_terminate<p>( \
__folly_detail_safe_assert_arg FOLLY_PP_DETAIL_APPEND_VA_ARG( \ __folly_detail_safe_assert_arg FOLLY_PP_DETAIL_APPEND_VA_ARG( \
__VA_ARGS__)); \ __VA_ARGS__)); \
} \ } \
} while (false) } while (false)
// FOLLY_SAFE_CHECK // FOLLY_SAFE_CHECK
......
...@@ -89,9 +89,8 @@ namespace detail { ...@@ -89,9 +89,8 @@ namespace detail {
using folly::toAppend; using folly::toAppend;
template <typename Arg> template <typename Arg>
auto appendObjectToString(std::string& str, const Arg* arg, int) -> decltype( auto appendObjectToString(std::string& str, const Arg* arg, int)
toAppend(std::declval<Arg>(), std::declval<std::string*>()), -> decltype(toAppend(std::declval<Arg>(), std::declval<std::string*>()), std::declval<void>()) {
std::declval<void>()) {
::folly::catch_exception( ::folly::catch_exception(
[&] { toAppend(*arg, &str); }, [&] { toAppend(*arg, &str); },
// If anything goes wrong in `toAppend()` fall back to // If anything goes wrong in `toAppend()` fall back to
......
...@@ -401,8 +401,8 @@ struct MakeUnsafeVectorSetLargerSize : std::vector<T> { ...@@ -401,8 +401,8 @@ struct MakeUnsafeVectorSetLargerSize : std::vector<T> {
&std::vector<TYPE>::_Mypair, \ &std::vector<TYPE>::_Mypair, \
decltype(&decltype(std::declval<std::vector<TYPE>>()._Mypair)::_Myval2), \ decltype(&decltype(std::declval<std::vector<TYPE>>()._Mypair)::_Myval2), \
&decltype(std::declval<std::vector<TYPE>>()._Mypair)::_Myval2, \ &decltype(std::declval<std::vector<TYPE>>()._Mypair)::_Myval2, \
decltype(&decltype( \ decltype(&decltype(std::declval<std::vector<TYPE>>() \
std::declval<std::vector<TYPE>>()._Mypair._Myval2)::_Mylast), \ ._Mypair._Myval2)::_Mylast), \
&decltype(std::declval<std::vector<TYPE>>()._Mypair._Myval2)::_Mylast>; \ &decltype(std::declval<std::vector<TYPE>>()._Mypair._Myval2)::_Mylast>; \
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT_IMPL(TYPE) FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT_IMPL(TYPE)
......
...@@ -84,7 +84,7 @@ TEST(Expected, CoroutineSuccess) { ...@@ -84,7 +84,7 @@ TEST(Expected, CoroutineSuccess) {
EXPECT_EQ(2.0 * 7, y); EXPECT_EQ(2.0 * 7, y);
auto z = co_await f3(x, y); auto z = co_await f3(x, y);
EXPECT_EQ(int(2.0 * 7 + 7), *z); EXPECT_EQ(int(2.0 * 7 + 7), *z);
co_return* z; co_return *z;
}(); }();
EXPECT_TRUE(r0.hasValue()); EXPECT_TRUE(r0.hasValue());
EXPECT_EQ(21, *r0); EXPECT_EQ(21, *r0);
......
...@@ -42,7 +42,7 @@ TEST(Optional, CoroutineSuccess) { ...@@ -42,7 +42,7 @@ TEST(Optional, CoroutineSuccess) {
EXPECT_EQ(2.0 * 7, y); EXPECT_EQ(2.0 * 7, y);
auto z = co_await f3(x, y); auto z = co_await f3(x, y);
EXPECT_EQ((int)(2.0 * 7 + 7), *z); EXPECT_EQ((int)(2.0 * 7 + 7), *z);
co_return* z; co_return *z;
}(); }();
EXPECT_TRUE(r0.has_value()); EXPECT_TRUE(r0.has_value());
EXPECT_EQ(21, *r0); EXPECT_EQ(21, *r0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment