Skip to content

Fix [un]directed_graph::swap and add tests - #5

Merged
Belcourt merged 4 commits into
boostorg:developfrom
BenPope:develop
May 14, 2014
Merged

Fix [un]directed_graph::swap and add tests#5
Belcourt merged 4 commits into
boostorg:developfrom
BenPope:develop

Conversation

@BenPope

Copy link
Copy Markdown
Contributor

No description provided.

@BenPopeBenPope changed the title Fix directed_graph::swapFix [un]directed_graph::swap and add testsMay 14, 2014
@BenPope

Copy link
Copy Markdown
ContributorAuthor

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:developMay 14, 2014
@BenPope

Copy link
Copy Markdown
ContributorAuthor

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 freeto 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

@BenPope@Belcourt