Ticket #3026: tuple.patch

File tuple.patch, 2.4 KB (added by Richard Webb <richard.webb@…>, 13 years ago)
  • another_tuple_test_bench.cpp

     
    2323#include <string>
    2424#include <utility>
    2525
    26 using namespace std;
    2726using namespace boost;
    2827using namespace boost::tuples;
    2928
  • io_test.cpp

     
    2727#include <sstream>
    2828#endif
    2929
    30 using namespace std;
    3130using namespace boost;
    3231
    3332#if defined BOOST_NO_STRINGSTREAM
    34 typedef ostrstream useThisOStringStream;
    35 typedef istrstream useThisIStringStream;
     33typedef std::ostrstream useThisOStringStream;
     34typedef std::istrstream useThisIStringStream;
    3635#else
    37 typedef ostringstream useThisOStringStream;
    38 typedef istringstream useThisIStringStream;
     36typedef std::ostringstream useThisOStringStream;
     37typedef std::istringstream useThisIStringStream;
    3938#endif
    4039
    4140int test_main(int argc, char * argv[] ) {
     
    7069  os1 << make_tuple(1, 2, 3);
    7170  BOOST_CHECK (os1.str() == std::string("[1,2,3][1,2,3]") );
    7271
    73   ofstream tmp("temp.tmp");
     72  std::ofstream tmp("temp.tmp");
    7473
    7574#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    7675  tmp << make_tuple("One", "Two", 3);
    7776#endif   
    7877  tmp << set_delimiter(':');
    79   tmp << make_tuple(1000, 2000, 3000) << endl;
     78  tmp << make_tuple(1000, 2000, 3000) << std::endl;
    8079
    8180  tmp.close();
    8281 
    8382  // When teading tuples from a stream, manipulators must be set correctly:
    84   ifstream tmp3("temp.tmp");
    85   tuple<string, string, int> j;
     83  std::ifstream tmp3("temp.tmp");
     84  tuple<std::string, std::string, int> j;
    8685
    8786#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    8887  tmp3 >> j;
  • tuple_test_bench.cpp

     
    2121#include <string>
    2222#include <utility>
    2323
    24 using namespace std;
    2524using namespace boost;
    2625
    2726// ----------------------------------------------------------------------------
     
    274273  BOOST_CHECK(get<1>(t1) == 'a');
    275274
    276275  tuple<int, std::string> t2;
    277   t2 = make_tuple((short int)2, std::string("Hi"));
     276  t2 = boost::make_tuple((short int)2, std::string("Hi"));
    278277  BOOST_CHECK(get<0>(t2) == 2);
    279278  BOOST_CHECK(get<1>(t2) == "Hi");
    280279