C++ Logo

std-proposals

Advanced search

Re: Do we need a way to take *this by value, for coroutines?

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 08 Nov 2021 15:28:04 -0800
On Monday, 8 November 2021 15:26:18 PST DBJ via Std-Proposals wrote:
> struct Circle {
> float r;
> // the new standard attribute "self"
> [[self]]
> float area() const noexcept {
> return pi*r*r;
> }
> };

Attributes can be ignored without changing the validity of the code.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2021-11-08 17:28:10