Groups | Search | Server Info | Keyboard shortcuts | Login | Register


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

Re: object and pointer-to-member closure: trivial intent, arcane implementation

Message-ID <743773f8-cc76-4935-80b3-61d44fc1880f@googlegroups.com> (permalink)
Newsgroups comp.std.c++
From via.usov@googlemail.com
Subject Re: object and pointer-to-member closure: trivial intent, arcane implementation
Organization unknown
References <4b41ec09-4b4f-46ac-9334-7aa41384732a@googlegroups.com> <esydnZd52--Wv5HInZ2dnUVZ7s6dnZ2d@giganews.com>
Date 2015-03-30 12:21 -0600

Show all headers | View raw


On Thursday, March 26, 2015 at 6:10:07 PM UTC+1, Jakob Bohm wrote:

[...]

> A major issue is that the expression (&d.g) is already a valid
> expression of the type "pointer to member function of class D with a
> certain prototype"

As indicated in my original message, the expression &d.g, where g is a
non-static member function, is invalid in standard C++14. A pointer to a
non-static member function of class D, in standard C++14, is solely
obtainable via &D::g.

Regardless, the point of my message was not about &d.g in particular, which
seems to be the focus of your message. I spoke of extending the meaning of
d.g when it is not followed by the function call operator; such meaning is
unspecified now and such use is forbidden by the current standard.

Supposing the standard is extended as I proposed, so that d.g generates a
temporary closure object, &d.g will be ill-formed unless further extensions
are made, because the current standard disallows taking addresses of
temporaries.


--
[ 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 | Find similar


Thread

object and pointer-to-member closure: trivial intent, arcane implementation via.usov@googlemail.com - 2015-02-28 14:59 -0600
  Re: object and pointer-to-member closure: trivial intent, arcane implementation Jakob Bohm <jb-usenet@wisemo.com> - 2015-03-26 12:09 -0600
    Re: object and pointer-to-member closure: trivial intent, arcane implementation via.usov@googlemail.com - 2015-03-30 12:21 -0600

csiph-web