Opened 9 years ago

Closed 9 years ago

#9455 closed Bugs (fixed)

[fusion][c++11] In place construction of a class containing a fusion map is broken

Reported by: Chris Crickmar <chris.crickmar@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.55.0 Severity: Regression
Keywords: Cc:

Description

In place construction of a class containing a fusion map is broken using 1.55 and gcc 4.8 in c++11 mode. The problem is not present with c++11 disabled or when using previous boost versions (tested with 1.51 & 1.54).

Assuming a class ClassA contains a fusion map. The following code functions correctly:

ClassA object1;
std::pair<int, ClassA> pair0(0, object1);

This example does not function correctly:

std::pair<int, ClassA> pair0(0, ClassA());

Minimal sample attached.

Chris

Attachments (1)

main.cpp (847 bytes ) - added by Chris Crickmar <chris.crickmar@…> 9 years ago.

Download all attachments as: .zip

Change History (3)

by Chris Crickmar <chris.crickmar@…>, 9 years ago

Attachment: main.cpp added

comment:1 by Chris Crickmar <chris.crickmar@…>, 9 years ago

I've just tested this on trunk (2014-03-18) with Fedora 18 (gcc 4.7). This is still an issue.

For completeness these are the compiler command lines being used and output:

g++ -W -Wall -Wextra -pedantic -I<path-to-boost> -o test-c main.cpp (works)

object copy construction (not broken)
MappedType 0 : 1234
MappedType 1 : 1234
in place construction (broken for c++11)
MappedType 0 : 1234
MappedType 1 : 1234

g++ -W -Wall -Wextra -pedantic -I<path-to-boost> -std=c++0x -o test-c main.cpp (fails)

object copy construction (not broken)
MappedType 0 : 1234
MappedType 1 : 1234
in place construction (broken for c++11)
MappedType 0 : 1234
MappedType 1 : 4.94066e-324 <------ FAILURE

comment:2 by Joel de Guzman, 9 years ago

Resolution: fixed
Status: newclosed

fixed now. thanks!

Note: See TracTickets for help on using tickets.