24 #ifndef _CONTAINER_HPP_
25 #define _CONTAINER_HPP_
36 #include <boost/foreach.hpp>
51 using std::find_first_of;
55 using std::remove_copy;
56 using std::remove_copy_if;
60 using std::replace_copy;
61 using std::replace_copy_if;
62 using std::replace_if;
66 using std::accumulate;
68 using std::stable_sort;
70 using std::binary_search;
71 using std::adjacent_find;
73 using std::equal_range;
74 using std::lower_bound;
75 using std::upper_bound;
78 #ifndef PWIZ_CONFIG_NO_CONTAINER_OUTPUT_OPERATORS
83 template<
typename T1,
typename T2>
84 ostream& operator<< (ostream& o,
const pair<T1, T2>& p)
86 return (o <<
"( " << p.first <<
", " << p.second <<
" )");
90 ostream& operator<< (ostream& o,
const vector<T>& v)
93 for(
const auto& i : v)
100 template<
typename T,
typename P>
101 ostream& operator<< (ostream& o,
const set< T, P >& s)
104 for (
const auto& i : s)
111 inline ostream& operator<< (ostream& o,
const map< string, string >& m)
114 for (
const auto& p : m)
115 o <<
" \"" << p.first <<
"\"->\"" << p.second <<
"\"";
121 template<
typename KeyT>
122 ostream& operator<< (ostream& o,
const map< KeyT, string >& m)
125 for (
const auto& p : m)
126 o <<
" " << p.first <<
"->\"" << p.second <<
"\"";
132 template<
typename ValueT>
133 ostream& operator<< (ostream& o,
const map< string, ValueT >& m)
136 for (
const auto& p : m)
137 o <<
" \"" << p.first <<
"\"->" << p.second <<
"";
143 template<
typename KeyT,
typename ValueT>
144 ostream& operator<< (ostream& o,
const map< KeyT, ValueT >& m)
147 for (
const auto& p : m)
148 o <<
" " << p.first <<
"->" << p.second <<
"";
155 #endif // PWIZ_CONFIG_NO_CONTAINER_OUTPUT_OPERATORS
157 #endif // _CONTAINER_HPP_