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: Paweł Dac <pawel.dac@…> 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)

boost_variant_apply_visitor_error.tar.gz (949 bytes ) - added by Paweł Dac <pawel.dac@…> 5 years ago.
minimal problem example
boost_variant_apply_visitor_error.compilation.log (7.6 KB ) - added by Paweł Dac <pawel.dac@…> 5 years ago.
compilation log

Download all attachments as: .zip

Change History (6)

by Paweł Dac <pawel.dac@…>, 5 years ago

minimal problem example

by Paweł Dac <pawel.dac@…>, 5 years ago

compilation log

comment:1 by Paweł Dac <pawel.dac@…>, 5 years ago

Severity: CosmeticProblem

comment:2 by Antony Polukhin, 5 years ago

Milestone: To Be DeterminedBoost 1.67.0
Owner: changed from ebf to Antony Polukhin
Status: newassigned

comment:3 by Antony Polukhin, 5 years ago

comment:4 by Antony Polukhin, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.