Bug 724818

Summary: FTBFS due to boost rebase
Product: [Fedora] Fedora Reporter: Petr Machata <pmachata>
Component: wesnothAssignee: Jon Ciesla <limburgher>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bruno, laurent.rineau__fedora, limburgher, mnewsome
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-22 11:30:26 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 711845    
Attachments:
Description Flags
Work around BOOST_FOREACH regression none

Description Petr Machata 2011-07-21 17:45:46 EDT
Created attachment 514578 [details]
Work around BOOST_FOREACH regression

Wesnoth fails to build as a result of boost rebase.  The root of the problem is described here: https://svn.boost.org/trac/boost/ticket/5279 .  In essence, GCC changed behavior and BOOST_FOREACH had to change the rvalue detection strategy to BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION.  But this is written in sources for that detection strategy:

// Detect at run-time whether an expression yields an rvalue
// or an lvalue. This is 100% standard C++, but not all compilers
// accept it. Also, it causes FOREACH to break when used with non-
// copyable collection types.

Unfortunately, wesnoth indeed iterates over noncopyable collection objects, so we have to fall back to hand-rolled iteration.  The attached patch implements exactly this workaround.

Version-Release number of selected component (if applicable):
1.8.6-3
Comment 1 Jon Ciesla 2011-07-22 09:39:31 EDT
Sent upstream:

https://gna.org/bugs/index.php?18399
Comment 2 Jon Ciesla 2011-07-22 11:30:26 EDT
Built in rawhide.  Thanks!