Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Do not use maybe_unused
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Nov 3, 2022
1 parent 43e5b84 commit 45e6070
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

using cuda::std::span;

template <typename T>
__host__ __device__
constexpr bool unused(T &&) {return true;}

template <typename Span>
__host__ __device__
TEST_CONSTEXPR_CXX14 bool testConstexprSpan(Span sp)
Expand All @@ -44,7 +48,7 @@ __host__ __device__
void testEmptySpan(Span sp)
{
if (!sp.empty())
[[maybe_unused]] auto res = sp.back();
unused(sp.back());
}

struct A{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

using cuda::std::span;

template <typename T>
__host__ __device__
constexpr bool unused(T &&) {return true;}

template <typename Span>
__host__ __device__
TEST_CONSTEXPR_CXX14 bool testConstexprSpan(Span sp)
Expand All @@ -45,7 +49,7 @@ __host__ __device__
void testEmptySpan(Span sp)
{
if (!sp.empty())
[[maybe_unused]] auto res = sp.front();
unused(sp.front());
}

struct A{};
Expand Down

0 comments on commit 45e6070

Please sign in to comment.