C++11 <less, greater> 的用法
发布时间
阅读量:
阅读量
#include <algorithm>
#include <functional>
#include <limits>
#include <set>
#include <iostream>
#include <vector>
using namespace std;
/*
template <class T> struct less{
bool operator()(const T& x, const T& y) { return x < y};
}
template <class T> struct greater{
bool operator()(const T& x, const T& y) { return x > y};
}*/
int main()
{
std::multiset<double, std::greater<double>> right_bounds;
right_bounds.insert(std::numeric_limits<double>::lowest());
right_bounds.insert(1.0);
ri
全部评论 (0)
还没有任何评论哟~
