Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83556 - trunk/tools/regression/src
From: steven_at_[hidden]
Date: 2013-03-25 11:03:06


Author: steven_watanabe
Date: 2013-03-25 11:03:05 EDT (Mon, 25 Mar 2013)
New Revision: 83556
URL: http://svn.boost.org/trac/boost/changeset/83556

Log:
Fix library_status for C++03 compilers. Fixes #8078
Text files modified:
   trunk/tools/regression/src/library_status.cpp | 53 +++++++++++++++++++++------------------
   1 files changed, 28 insertions(+), 25 deletions(-)

Modified: trunk/tools/regression/src/library_status.cpp
==============================================================================
--- trunk/tools/regression/src/library_status.cpp (original)
+++ trunk/tools/regression/src/library_status.cpp 2013-03-25 11:03:05 EDT (Mon, 25 Mar 2013)
@@ -169,18 +169,19 @@
 
     // find_element ------------------------------------------------------------//
 
+ struct element_equal {
+ const string & m_name;
+ element_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::element_ptr & xep) const {
+ return xep.get()->name == m_name;
+ }
+ };
+
     xml::element_list::const_iterator find_element(
         const xml::element & root, const string & name
     ){
- struct element_equal {
- const string & m_name;
- element_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::element_ptr & xep) const {
- return xep.get()->name == m_name;
- }
- };
         return std::find_if(
             root.elements.begin(),
             root.elements.end(),
@@ -201,19 +202,20 @@
 
     // attribute_value ----------------------------------------------------------//
 
+ struct attribute_equal {
+ const string & m_name;
+ attribute_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::attribute & a) const {
+ return a.name == m_name;
+ }
+ };
+
     const string & attribute_value(
         const xml::element & element,
         const string & attribute_name
     ){
- struct attribute_equal {
- const string & m_name;
- attribute_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::attribute & a) const {
- return a.name == m_name;
- }
- };
         xml::attribute_list::const_iterator itr;
         itr = std::find_if(
             element.attributes.begin(),
@@ -367,6 +369,13 @@
         return result;
     }
 
+ struct has_fail_result {
+ //bool operator()(const boost::shared_ptr<const xml::element> e) const {
+ bool operator()(const xml::element_ptr & e) const {
+ return attribute_value(*e, "result") == "fail";
+ }
+ };
+
     // do_cell ---------------------------------------------------------------//
     bool do_cell(
         const fs::path & target_dir,
@@ -401,16 +410,10 @@
 
         // if we don't find any failures
         // mark it as a pass
- struct predicate {
- //bool operator()(const boost::shared_ptr<const xml::element> e) const {
- bool operator()(const xml::element_ptr & e) const {
- return attribute_value(*e, "result") == "fail";
- }
- };
         pass = (db.elements.end() == std::find_if(
             db.elements.begin(),
             db.elements.end(),
- predicate()
+ has_fail_result()
         ));
 
         int anything_generated = 0;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk