File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ struct UnrollUtils {
4242 * return an array of results.
4343 */
4444 template <typename T, std::size_t N, typename Op>
45- FOLLY_NODISCARD FOLLY_ALWAYS_INLINE static constexpr auto arrayMap (
45+ [[nodiscard]] FOLLY_ALWAYS_INLINE static constexpr auto arrayMap (
4646 const std::array<T, N>& x, Op op) {
4747 return arrayMapImpl (x, op, std::make_index_sequence<N>());
4848 }
@@ -56,7 +56,7 @@ struct UnrollUtils {
5656 * (a + b) + (c + d)
5757 */
5858 template <typename T, std::size_t N, typename Op>
59- FOLLY_NODISCARD FOLLY_ALWAYS_INLINE static constexpr T arrayReduce (
59+ [[nodiscard]] FOLLY_ALWAYS_INLINE static constexpr T arrayReduce (
6060 const std::array<T, N>& x, Op op) {
6161 return arrayReduceImpl<0 , N>(x, op);
6262 }
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ class CoreAllocator : private std::allocator<T> {
474474 };
475475};
476476
477- class FOLLY_NODISCARD CoreAllocatorGuard {
477+ class [[nodiscard]] CoreAllocatorGuard {
478478 public:
479479 CoreAllocatorGuard (size_t numStripes, size_t stripe);
480480 ~CoreAllocatorGuard ();
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ template <
211211 typename Reference,
212212 typename Value = remove_cvref_t <Reference>,
213213 bool RequiresCleanup = false >
214- class FOLLY_NODISCARD AsyncGenerator {
214+ class [[nodiscard]] AsyncGenerator {
215215 static_assert (
216216 std::is_constructible<Value, Reference>::value,
217217 " AsyncGenerator 'value_type' must be constructible from a 'reference'." );
@@ -253,7 +253,7 @@ class FOLLY_NODISCARD AsyncGenerator {
253253
254254 class CleanupSemiAwaitable ;
255255
256- class FOLLY_NODISCARD CleanupAwaitable {
256+ class [[nodiscard]] CleanupAwaitable {
257257 public:
258258 bool await_ready () noexcept { return !scopeExit_; }
259259
@@ -292,7 +292,7 @@ class FOLLY_NODISCARD AsyncGenerator {
292292 folly::Executor::KeepAlive<> executor_;
293293 };
294294
295- class FOLLY_NODISCARD CleanupSemiAwaitable {
295+ class [[nodiscard]] CleanupSemiAwaitable {
296296 public:
297297 CleanupAwaitable viaIfAsync (Executor::KeepAlive<> executor) noexcept {
298298 return CleanupAwaitable{scopeExit_, std::move (executor)};
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ using as_noexcept_with_executor_base = TaskWithExecutorWrapperCrtp<
214214} // namespace detail
215215
216216template <typename Inner, auto CancelCfg = OnCancel<void >{}>
217- class FOLLY_NODISCARD as_noexcept_with_executor final
217+ class [[nodiscard]] as_noexcept_with_executor final
218218 : public detail::as_noexcept_with_executor_base<Inner, CancelCfg> {
219219 protected:
220220 using detail::as_noexcept_with_executor_base<Inner, CancelCfg>::
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace coro {
3636namespace detail {
3737
3838template <typename Mutex, typename Policy>
39- class FOLLY_NODISCARD LockBase {
39+ class [[nodiscard]] LockBase {
4040 public:
4141 static_assert (std::is_same_v<
4242 bool ,
You can’t perform that action at this time.
0 commit comments