Skip to content

Conversation

@BenPope
Copy link
Contributor

@BenPope BenPope commented Apr 21, 2014

No description provided.

@BenPope BenPope changed the title Fix directed_graph::swap Fix [un]directed_graph::swap and add tests May 14, 2014
@BenPope
Copy link
Contributor Author

BenPope commented May 14, 2014

Some other points you might like to comment on:

  • adjacency_list::Base (detail::adj_list_gen) appears to be contain no members, but is copied and assigned, whilst maybe_named_graph appears to contain members, but is not copied or assigned.
  • adjacency_list::swap looks suboptimal (copying, as it does).

Should I look into reimplementing adjacency_list::swap to be cheap and correct, and then reimplement copy and assignment in the idiomatic way?

I'm also considering free function swap, but that didn't seem to work when I gave it a quick try, perhaps because it should exist in the boost namespace (for ADL) and doesn't get picked up over boost/utility/swap, or I may have messed up the implementation.

Belcourt added a commit that referenced this pull request May 14, 2014
Fix [un]directed_graph::swap and add tests

Nice job, thanks!  I'll have to look at your other points a bit more carefully before responding.
@Belcourt Belcourt merged commit 12d334f into boostorg:develop May 14, 2014
@BenPope
Copy link
Contributor Author

BenPope commented May 14, 2014

That was quick, nice one!

jzmaddock pushed a commit that referenced this pull request Oct 12, 2018
Getting together PR's for first batch of merges.
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

Successfully merging this pull request may close these issues.

2 participants