//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // template , // class Compare = less> // class priority_queue // { // public: // typedef Container container_type; // typedef typename container_type::value_type value_type; // typedef typename container_type::reference reference; // typedef typename container_type::const_reference const_reference; // typedef typename container_type::size_type size_type; // // protected: // container_type c; // Compare comp; #include #include #include struct test : private std::priority_queue { test() { c.push_back(1); assert(comp(1, 2)); } }; struct C { typedef int value_type; typedef int& reference; typedef const int& const_reference; typedef int size_type; }; int main() { static_assert((std::is_same::container_type, std::vector >::value), ""); static_assert((std::is_same >::container_type, std::deque >::value), ""); static_assert((std::is_same >::value_type, int>::value), ""); static_assert((std::is_same::reference, std::vector::reference>::value), ""); static_assert((std::is_same::const_reference, std::vector::const_reference>::value), ""); static_assert((std::is_same::size_type, std::vector::size_type>::value), ""); static_assert((std::uses_allocator, std::allocator >::value), ""); static_assert((!std::uses_allocator, std::allocator >::value), ""); test t; }