Changeset 432


Ignore:
Timestamp:
Dec 13, 2005, 3:49:55 PM (18 years ago)
Author:
Markus Ringnér
Message:

Added operator<< for pairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility/stl_utility.h

    r411 r432  
    1212///
    1313
     14#include<ostream>
    1415#include <string>
    1516#include <utility>
    1617#include <vector>
    1718
     19namespace std {
     20  ///
     21  /// Print out a pair
     22  ///
     23  // This is in namespace std because we have not figured out how to have
     24  // pair and its operator<< in different namespaces
     25  template <class T1, class T2> 
     26  std::ostream& operator<<(std::ostream& out, const std::pair<T1,T2>& p)
     27  { out << p.first << "\t" << p.second; return out; }
     28}
     29
    1830namespace theplu {
    1931namespace utility {
     32
    2033
    2134  ///
     
    3750    }
    3851  };
     52
     53 
    3954
    4055  ///
Note: See TracChangeset for help on using the changeset viewer.