C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Attribute [[discard]] and attributes on expressions

From: Bjorn Reese <breese_at_[hidden]>
Date: Thu, 12 Oct 2023 14:29:10 +0200
On 10/12/23 11:43, Giuseppe D'Angelo via Std-Proposals wrote:

> The purpose of [[discard]] is really for expressions, I don't see much
> value at discarding a pack as-is?

template <typename... Args>
void foo(Args... args)
{
#if SOME_PLATFORM
     use(args...);
#else
     discard(args...);
#endif
}

Received on 2023-10-12 12:29:14