Opened 12 years ago

Closed 12 years ago

#5231 closed Patches (fixed)

Unncessary forward declaration of std::pair

Reported by: Chris Jefferson Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

fusion/adapted/std_pair.hpp contains a forward declaration of std::pair. This upsets libc++.

However, <utility> is also (I believe) always included anywhere (at least, in every test I did), so the forward declaration isn't very useful anyway. This patch just replaces it with a #include <utility>. For me, this very slightly decreases the size of the pre-processed file on both mac and linux g++.

Attachments (1)

adapted_std_pair.patch (483 bytes ) - added by Chris Jefferson 12 years ago.
Patch to boost/fusion/adapted/struct/adapt_struct.hpp

Download all attachments as: .zip

Change History (4)

by Chris Jefferson, 12 years ago

Attachment: adapted_std_pair.patch added

Patch to boost/fusion/adapted/struct/adapt_struct.hpp

comment:1 by Chris Jefferson, 12 years ago

On boost, <utility> is (I believe) always pulled in during config. That is certainly the case on the platforms I have access to (clang, g++, visual c++). Therefore I would like to propose just replacing this forward declaration with a #include <utility>

comment:2 by Chris Jefferson, 12 years ago

ping.

I would really like to get this fixed for the next version of boost, and the patch seems fairly simple.

comment:3 by Joel de Guzman, 12 years ago

Resolution: fixed
Status: newclosed

Fixed. Added #include <utility> and removed the unnecessary forward declaration. Check the trunk. I'll merge to release ASAP.

Note: See TracTickets for help on using tickets.