Opened 12 years ago

Last modified 10 years ago

#4706 closed Bugs

ValueType requirements seem wrong — at Initial Version

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

Description

According to the doc:

The specific requirements on value types to be used in an any are:

A ValueType is CopyConstructible [20.1.3]. A ValueType is optionally Assignable [23.1]. The strong exception-safety guarantee is required for all forms of assignment. The destructor for a ValueType upholds the no-throw exception-safety guarantee.

The doc seems to be saying that Assignable is not strictly required, but if you supply an assignment operator, it must offer the strong guarantee. But nothing in any depends on assignability of its ValueType parameter, much less that it provides the strong guarantee.

Change History (0)

Note: See TracTickets for help on using tickets.