Trivial bug: add missing #include

If CGAL::cpp0x::tuple is Boosts implementation, one wants equality operator
operator==.

Add the corresponding test in test/STL_Extension/.
This commit is contained in:
Laurent Rineau 2012-04-12 14:35:20 +00:00
parent 40f3e21e3e
commit f22ae81a91
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@
# include <tr1/tuple>
#else
# include <boost/tuple/tuple.hpp>
# include <boost/tuple/tuple_comparison.hpp>
#endif
namespace CGAL {

View File

@ -8109,10 +8109,14 @@ void test_tuple(){
CGAL_static_assertion( (boost::is_same<CGAL::cpp0x::tuple_element<1,T2>::type,My_to_int>::value) );
T1 t1=CGAL::cpp0x::make_tuple(1,2);
T1 t1_2=CGAL::cpp0x::make_tuple(1,2);
int i1=-1,i2=-1;
CGAL::cpp0x::tie(i1,i2)=t1;
CGAL_assertion( CGAL::cpp0x::get<0>(t1)==i1 );
CGAL_assertion( CGAL::cpp0x::get<1>(t1)==i2 );
CGAL_assertion(t1==t1_2); // test the equality operator
T2 t2 = T2();
CGAL_assertion( t2 == T2() );
}
void test_prev_next()