Opened 10 years ago

Closed 10 years ago

#7578 closed Bugs (fixed)

boost::any missing free swap function

Reported by: Dave Abrahams Owned by: nasonov
Milestone: To Be Determined Component: any
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

Given that a free swap function is the "official" interface used by generic algorithms, this is a rather shocking omission (though I know the status of swap wasn't settled at the time of any's design). Suggestion: add

friend void swap(any& x, any& y) { x.swap(y); }

to the body of any and update the docs accordingly.

Change History (3)

comment:1 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: newclosed

(In [82887]) Add free swap. Fixes #7578.

comment:2 by viboes, 10 years ago

Resolution: fixed
Status: closedreopened

Shouldn't this function be documented?

comment:3 by Steven Watanabe, 10 years ago

Resolution: fixed
Status: reopenedclosed

(In [82908]) Document free swap. Fixes #7578.

Note: See TracTickets for help on using tickets.