Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[thread.thread.class] missing declaration of swap(thread&,thread&) #65

Closed
sdutoit opened this issue Apr 15, 2013 · 2 comments
Closed

[thread.thread.class] missing declaration of swap(thread&,thread&) #65

sdutoit opened this issue Apr 15, 2013 · 2 comments
Assignees

Comments

@sdutoit
Copy link
Contributor

sdutoit commented Apr 15, 2013

From an email to cxxeditor@:

I suggest to add in
30.3.1 Class thread [thread.thread.class]
right after the declaration of class thread but still inside
namespace std a declaration of the global swap():

namespace std {
  class thread {
    ...
  };

HERE:

  // 30.3.1.7 specialized algorithms:
  void swap(thread& x, thread& y) noexcept;
}

As it is usually done for container and other classes.

@jwakely
Copy link
Member

jwakely commented Apr 15, 2013

swap(thread&, thread&) is declared in the 30.3 [thread.threads] synopsis of the <thread> header, which is where it belongs because it's not a member of std::thread

@ghost ghost assigned sdutoit Apr 15, 2013
@sdutoit
Copy link
Contributor Author

sdutoit commented Apr 15, 2013

@jwakely Thanks - I agree. The containers are different because they have a separate mini-synopsis from the header synopsis that also introduces the class definition, but that's not the case here. A bit inconsistent perhaps but not something that needs to be fixed now.

@sdutoit sdutoit closed this as completed Apr 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants