Opened 12 years ago
Closed 10 years ago
#4706 closed Bugs (fixed)
ValueType requirements seem wrong
Reported by: | Dave Abrahams | Owned by: | nasonov |
---|---|---|---|
Milestone: | To Be Determined | Component: | any |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: |
Description (last modified by )
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 (3)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I agree. This is a spurious requirement.