Opened 11 years ago
Closed 6 years ago
#5871 closed Bugs (fixed)
variant constructible/assignable from anything
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.62.0 | Component: | variant |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: | raad@… |
Description
Boost variant has a constructor and an assignment operator that would take just anything. If it cannot be converted to any of its bounded types, it will result in an error within variant's internals. This, mixed with conversion operators, interferes with overload resolution (code that reproduces the issue attached). SFINAE'ing out the non-candidate constructors (and assignments) would fix this.
Attachments (1)
Change History (6)
by , 11 years ago
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
comment:3 by , 6 years ago
Milestone: | To Be Determined → Boost 1.62.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 6 years ago
Fixed in b3650685 develop, will be merged to the master branch as soon as the regression tests will cycle.
comment:5 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
This problem also makes boost::variant unusable in C++17's std::tuple as implemented in MSVC 14 Update 2, affecting boost::signals2 (ticket #12123). A solution has been proposed in ticket #11602.