C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Proposal of constpub (DRAFT 1)
From: Thiago Macieira (thiago_at_[hidden])
Date: 2020-01-14 13:17:49


On Monday, 13 January 2020 20:06:48 PST connor horman via Std-Proposals wrote:
> I’d recommend having read/write properties return a reference, and
> potentially having read properties return a const reference, and otherwise
> be similar to methods (cv-qualifiers, ref-qualifiers, etc)

So long as that's a recommendation, not required, that's fine.

Because I recommend property getters always return by value, never a
reference. That allows you to change the internal implementation to hold
something different.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups