public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/47433] libstdc++ parallel mode calls std::swap explicitely
Date: Mon, 24 Jan 2011 14:03:00 -0000	[thread overview]
Message-ID: <bug-47433-4-BLfagwirg8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47433-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47433

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-24 13:53:27 UTC ---
(In reply to comment #3)
> Is anything specified in the standard in this direction?

20.2.2 Swappable requirements               [swappable.requirements]

3  The context in which swap(t, u) and swap(u, t) are evaluated shall ensure
that a binary non-member function named “swap” is selected via overload
resolution (13.3) on a candidate set that includes:
— the two swap function templates defined in <utility> (20.3) and
— the lookup set produced by argument-dependent lookup (3.4.2).


The usual way to do that is:

  using std::swap;  // overloads in <utility> are candidates
  swap(t, u);       // overloads found by ADL are also candidates


  parent reply	other threads:[~2011-01-24 13:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 12:52 [Bug libstdc++/47433] New: " manuel.holtgrewe@fu-berlin.de
2011-01-24 12:56 ` [Bug libstdc++/47433] " paolo.carlini at oracle dot com
2011-01-24 13:10 ` paolo.carlini at oracle dot com
2011-01-24 13:12 ` manuel.holtgrewe@fu-berlin.de
2011-01-24 13:23 ` paolo.carlini at oracle dot com
2011-01-24 13:28 ` singler at kit dot edu
2011-01-24 13:36 ` singler at kit dot edu
2011-01-24 13:55 ` paolo.carlini at oracle dot com
2011-01-24 14:03 ` redi at gcc dot gnu.org [this message]
2011-01-24 14:07 ` singler at kit dot edu
2011-01-24 14:11 ` singler at kit dot edu
2011-01-24 14:43 ` paolo.carlini at oracle dot com
2011-01-24 17:31 ` singler at gcc dot gnu.org
2011-01-24 17:34 ` singler at kit dot edu
2011-02-11 10:13 ` singler at gcc dot gnu.org
2011-02-25 14:44 ` singler at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47433-4-BLfagwirg8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).