Inserts an item into priority queue If the priority queue is full, the function returns \p false, no item has been added. Otherwise, the function inserts the copy of \p val into the heap and returns \p true. The function use copy constructor to create new heap item from \p val. */
| 161 | The function use copy constructor to create new heap item from \p val. |
| 162 | */ |
| 163 | bool push( value_type const& val ) |
| 164 | { |
| 165 | scoped_ptr pVal( cxx_allocator().New( val )); |
| 166 | if ( base_class::push( *(pVal.get()))) { |
| 167 | pVal.release(); |
| 168 | return true; |
| 169 | } |
| 170 | return false; |
| 171 | } |
| 172 | |
| 173 | /// Inserts an item into the queue using a functor |
| 174 | /** |