Opened 8 years ago
Closed 8 years ago
#11087 closed Bugs (fixed)
Converting assignment operator is too generous
| Reported by: | anonymous | Owned by: | akrzemi1 |
|---|---|---|---|
| Milestone: | Boost 1.58.0 | Component: | optional |
| Version: | Boost 1.57.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
This has been reported by Karol Nowacki. The following program compiles although it shoudl not.
#include <boost/optional.hpp>
enum E1 {e1};
enum E2 {e2};
int main()
{
boost::optional<E2> o2(e2);
boost::optional<E1> o1;
o1 = o2; // SHOULD NOT WORK
}
It should not compile given that the following do not compile:
E1 v1 = e2; // FAILS E1 v1_; v1_ = e2; // FAILS
Change History (2)
comment:1 by , 8 years ago
| Milestone: | To Be Determined → Boost 1.58.0 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
