//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // explicit priority_queue(const Compare& comp, const container_type& c); #include #include #include template C make(int n) { C c; for (int i = 0; i < n; ++i) c.push_back(i); return c; } int main() { std::vector v = make >(5); std::priority_queue, std::greater > q(std::greater(), v); assert(q.size() == 5); assert(q.top() == 0); }