Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #362

Re: Proposal: constexpr, non-const member functions

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Dave Abrahams <dave@boostpro.com>
Newsgroups comp.std.c++
Subject Re: Proposal: constexpr, non-const member functions
Date Tue, 8 Nov 2011 14:45:27 -0800 (PST)
Organization unknown
Lines 23
Sender std-cpp-request@vandevoorde.com
Approved james.dennett@gmail.com
Message-ID <m2r51i1i55.fsf@boostpro.com> (permalink)
References <46713.10.0.7.178.1320718071.squirrel@webmail.secure.aluminati.net>
NNTP-Posting-Host hxmrubRzXqbn95v1WjWCnPe48Sm4MjtAlYyHmvIeOHI=
Content-Type text/plain
X-Trace news.albasani.net pwAkt3AEFdD9LVGxAmVv0itgF0JpjknAyFZTDRwRoRd5YI4nWkjaOhApNJKqQ1IySqC8ui9QLMw9itY+BVO4eQ==
X-Complaints-To abuse@albasani.net
NNTP-Posting-Date Tue, 8 Nov 2011 22:45:29 +0000 (UTC)
X-Mailer Perl5 Mail::Internet v2.05
X-Submission-Address std-cpp-submit@vandevoorde.com
Cancel-Lock sha1:4Fbs3xxTpN22oWftQwdKCFYZog0=
X-Original-Date Tue, 08 Nov 2011 15:19:50 -0500
Xref x330-a1.tempe.blueboxinc.net comp.std.c++:362

Show key headers only | View raw


on Tue Nov 08 2011, "Richard Smith"<richard-AT-metafoo.co.uk> wrote:

> Since C++11 is already out of the gate, it's too late to remove the 'constexpr
> implies const' rule, so instead we could consider a syntax like this:
>
>    constexpr T&get() mutable { return v; }
>
> Does this seem like a useful extension?

I don't know whether the intent of your proposal makes sense (haven't
given it much thought) but in principle there's never any impediment to
making a previously-illegal usage legal, so this might not need new syntax.

--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com


[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Proposal: constexpr, non-const member functions "Richard Smith"<richard@metafoo.co.uk> - 2011-11-08 11:32 -0800
  Re: Proposal: constexpr, non-const member functions Dave Abrahams <dave@boostpro.com> - 2011-11-08 14:45 -0800
  Re: Proposal: constexpr, non-const member functions Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-11-08 14:47 -0800
  Re: Proposal: constexpr, non-const member functions Marc <marc.glisse@gmail.com> - 2011-11-08 14:47 -0800
    Re: Proposal: constexpr, non-const member functions Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-11-09 21:54 -0800
      Re: Proposal: constexpr, non-const member functions Daniel Krügler<daniel.kruegler@googlemail.com> - 2011-11-09 23:14 -0800

csiph-web