Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76175 - trunk/libs/icl/test
From: afojgo_at_[hidden]
Date: 2011-12-26 11:11:40


Author: jofaber
Date: 2011-12-26 11:11:40 EST (Mon, 26 Dec 2011)
New Revision: 76175
URL: http://svn.boost.org/trac/boost/changeset/76175

Log:
Workaround for gcc static_cast complaints in move emulation tests.
Text files modified:
   trunk/libs/icl/test/test_interval_map_shared.hpp | 8 ++++++--
   trunk/libs/icl/test/test_interval_set_shared.hpp | 8 ++++++--
   2 files changed, 12 insertions(+), 4 deletions(-)

Modified: trunk/libs/icl/test/test_interval_map_shared.hpp
==============================================================================
--- trunk/libs/icl/test/test_interval_map_shared.hpp (original)
+++ trunk/libs/icl/test/test_interval_map_shared.hpp 2011-12-26 11:11:40 EST (Mon, 26 Dec 2011)
@@ -1530,13 +1530,17 @@
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
 
- IntervalMapT map_A(boost::move(static_cast<IntervalMapT&>(IntervalMapT(IDv(0,4,2)))));
+ //JODO static_cast fails for gcc compilers
+ //IntervalMapT map_A(boost::move(static_cast<IntervalMapT&>(IntervalMapT(IDv(0,4,2)))));
+ IntervalMapT map_A(boost::move(static_cast<IntervalMapT&>(IntervalMapT(IDv(0,4,2)).add(IDv(0,0,0)) )));
     IntervalMapT map_B(boost::move(static_cast<IntervalMapT&>(IntervalMapT(IDv(0,2,1)).add(IDv(2,4,1)).add(IDv(0,4,1)))));
 
     BOOST_CHECK( icl::is_element_equal(map_A, map_B) );
     BOOST_CHECK_EQUAL( map_A, join(map_B) );
 
- map_A = boost::move(static_cast<IntervalMapT&>(IntervalMapT(IIv(1,4,2))));
+ //JODO static_cast fails for gcc compilers
+ //map_A = boost::move(static_cast<IntervalMapT&>(IntervalMapT(IIv(1,4,2))));
+ map_A = boost::move(static_cast<IntervalMapT&>(IntervalMapT(IIv(1,4,2)).add(IDv(0,0,0)) ));
     map_B = boost::move(static_cast<IntervalMapT&>(IntervalMapT(CIv(0,2,1)).insert(IDv(3,5,1)).add(CDv(0,5,1))));
 
     BOOST_CHECK( icl::is_element_equal(map_A, map_B) );

Modified: trunk/libs/icl/test/test_interval_set_shared.hpp
==============================================================================
--- trunk/libs/icl/test/test_interval_set_shared.hpp (original)
+++ trunk/libs/icl/test/test_interval_set_shared.hpp 2011-12-26 11:11:40 EST (Mon, 26 Dec 2011)
@@ -827,13 +827,17 @@
     typedef typename IntervalSetT::interval_type IntervalT;
     typedef std::vector<T> VectorT;
 
- IntervalSetT set_A(boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_D(0,4)))));
+ //JODO static_cast fails for gcc compilers
+ //IntervalSetT set_A(boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_D(0,4)))));
+ IntervalSetT set_A(boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_D(0,4)).add(I_D(0,0)) )));
     IntervalSetT set_B(boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_D(0,2)).add(I_D(2,4)).add(I_D(0,4)))));
 
     BOOST_CHECK( icl::is_element_equal(set_A, set_B) );
     BOOST_CHECK_EQUAL( set_A, join(set_B) );
 
- set_A = boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_I(1,4))));
+ //JODO static_cast fails for gcc compilers
+ //set_A = boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_I(1,4))));
+ set_A = boost::move(static_cast<IntervalSetT&>(IntervalSetT(I_I(1,4)).add(I_D(0,0))));
     set_B = boost::move(static_cast<IntervalSetT&>(IntervalSetT(C_I(0,2)).insert(I_D(3,5)).add(C_D(0,5))));
 
     BOOST_CHECK( icl::is_element_equal(set_A, set_B) );


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