Path: csiph.com!xmission!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 20 Aug 2015 01:20:02 -0500 Return-Path: Sender: std-cpp-request@vandevoorde.com Approved: james.dennett@gmail.com Message-ID: Newsgroups: comp.std.c++ From: Richard Smith Subject: Re: Shouldn't there be a way to exclude member functions out of name lookup explicitly? Organization: unknown References: <820594f6-b670-4dba-8254-26d352489616@googlegroups.com> Content-Type: text/plain; charset=windows-1252; format=flowed X-Original-Date: Wed, 19 Aug 2015 09:44:02 +0100 X-Submission-Address: std-cpp-submit@vandevoorde.com Date: Thu, 20 Aug 2015 01:10:12 CST Lines: 24 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-KJEEUR18AwiAkcsGmJAu5jcuny2zixatn4GM5943WLe26TpYkUXgu1xUSpdOxcIaHDTZ5xO4kOPTb8r!Go7vKGmJonYsclR7b32cF3wPXfQOfYqvR05Es5DgFt5KxZpEN9EEKXP81v4= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2071 Xref: csiph.com comp.std.c++:773 On 27/07/15 18:22, Johannes Gerd Becker wrote: Currently, you cannot rely on ADL within a class defining a member > function of the same name as the function you would like to be called. > I must admit that my C++ is getting a bit rusty, but this "problem" was well-known a decade ago, typically manifesting with std::swap and member functions of the name. The solution then was equally well known, and continues to work in C++11/14: using std::begin; auto i = begin(c); Richard -- [ 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 ]