C++ Logo

std-proposals

Advanced search

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

From: Bjorn Reese <breese_at_[hidden]>
Date: Fri, 6 Oct 2023 17:39:08 +0200
On 10/5/23 22:03, Giuseppe D'Angelo via Std-Proposals wrote:

> Hoping that EWGI will reconvene in Kona, I have prepared a proposal to
> allow attributes on expressions, and also proposes the [[discard]]

Another possibility that may be worth discussing in your paper is the
use of a "sink" function:

   template <typename... T>
   void discard(const T&...) {};

A concrete example:

 
https://www.boost.org/doc/libs/master/libs/core/doc/html/core/ignore_unused.html

Received on 2023-10-06 15:39:11