From 45e607023d0612097fec5dda1375ee8eb2e6c2cf Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Thu, 3 Nov 2022 08:59:59 +0100 Subject: [PATCH] Do not use `maybe_unused` --- .../test/std/views/views.span/span.elem/back.pass.cpp | 6 +++++- .../test/std/views/views.span/span.elem/front.pass.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.upstream-tests/test/std/views/views.span/span.elem/back.pass.cpp b/.upstream-tests/test/std/views/views.span/span.elem/back.pass.cpp index efd865b41e..3b0a84d61a 100644 --- a/.upstream-tests/test/std/views/views.span/span.elem/back.pass.cpp +++ b/.upstream-tests/test/std/views/views.span/span.elem/back.pass.cpp @@ -23,6 +23,10 @@ using cuda::std::span; +template +__host__ __device__ +constexpr bool unused(T &&) {return true;} + template __host__ __device__ TEST_CONSTEXPR_CXX14 bool testConstexprSpan(Span sp) @@ -44,7 +48,7 @@ __host__ __device__ void testEmptySpan(Span sp) { if (!sp.empty()) - [[maybe_unused]] auto res = sp.back(); + unused(sp.back()); } struct A{}; diff --git a/.upstream-tests/test/std/views/views.span/span.elem/front.pass.cpp b/.upstream-tests/test/std/views/views.span/span.elem/front.pass.cpp index c8abf917c3..82fb715db3 100644 --- a/.upstream-tests/test/std/views/views.span/span.elem/front.pass.cpp +++ b/.upstream-tests/test/std/views/views.span/span.elem/front.pass.cpp @@ -23,6 +23,10 @@ using cuda::std::span; +template +__host__ __device__ +constexpr bool unused(T &&) {return true;} + template __host__ __device__ TEST_CONSTEXPR_CXX14 bool testConstexprSpan(Span sp) @@ -45,7 +49,7 @@ __host__ __device__ void testEmptySpan(Span sp) { if (!sp.empty()) - [[maybe_unused]] auto res = sp.front(); + unused(sp.front()); } struct A{};