Opened 5 years ago
Closed 5 years ago
#13288 closed Bugs (fixed)
boost::apply_visitor compilation failure when used with inlined lambda transfering unique_ptr ownership
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.67.0 | Component: | variant |
Version: | Boost 1.65.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi,
I have a lambda that captures std::unique_ptr ownership by move on it's capture list and transfers is further.
When such lambda is inlined in boost::apply_visitor function it failes to compile. I think it's connected with boost::apply_visitor template deduction .
Wordaround is to create functor not and pass it to apply_visitor.
Minimal example reproducing problem with boost 1.65 is includded as attachment and also can be found here: http://coliru.stacked-crooked.com/a/955148fcc337290f
Compilation log is included as attachment.
Attachments (2)
Change History (6)
by , 5 years ago
Attachment: | boost_variant_apply_visitor_error.tar.gz added |
---|
by , 5 years ago
Attachment: | boost_variant_apply_visitor_error.compilation.log added |
---|
compilation log
comment:1 by , 5 years ago
Severity: | Cosmetic → Problem |
---|
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.67.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
minimal problem example