[Boost-bugs] [Boost C++ Libraries] #9327: Fix compilation using Sun CC standard library

Subject: [Boost-bugs] [Boost C++ Libraries] #9327: Fix compilation using Sun CC standard library
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-30 19:36:54


#9327: Fix compilation using Sun CC standard library
------------------------------+---------------------
 Reporter: vz-boost@… | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 I am not sure if this patch is going to be accepted, as it makes the code
 slightly longer and less clear, but it is needed to make the library build
 with Sun CC using its standard library (that we're unfortunately stuck
 with due to binary compatibility concerns). As `std::vector` simply
 doesn't provide a template ctor from 2 iterators, this is the best that
 can be done, AFAICS.

 Here is the same patch as in the attachment, for convenience:
 {{{
 #!diff
 diff --git a/boost/test/impl/unit_test_main.ipp
 b/boost/test/impl/unit_test_main.ipp
 index 9874c69..6896343 100644
 --- a/boost/test/impl/unit_test_main.ipp
 +++ b/boost/test/impl/unit_test_main.ipp
 @@ -110,9 +110,11 @@ public:
          string_token_iterator tit( tc_to_run, (dropped_delimeters = "/",
 kept_delimeters = dt_none) );

          while( tit != string_token_iterator() ) {
 - m_filters.push_back(
 - std::vector<single_filter>( string_token_iterator( *tit,
 (dropped_delimeters = ",", kept_delimeters = dt_none) ),
 - string_token_iterator() ) );
 + std::vector<single_filter> f;
 + for( string_token_iterator titf( *tit, (dropped_delimeters =
 ",", kept_delimeters = dt_none) ); titf != string_token_iterator(); ++titf
 )
 + f.push_back( *titf );
 +
 + m_filters.push_back( f );

              ++tit;
          }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9327>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC