https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67085

            Bug ID: 67085
           Summary: priority queue should not copy comparators when
                    calling push_heap and pop_heap
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: konig121 at gmail dot com
  Target Milestone: ---

Created attachment 36103
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36103&action=edit
Program demonstrating the extra copy operations

The implementation of std::priority_queue's constructor, push, and pop methods
do not force the comparators to be passed by reference, resulting in extra copy
operations. See the attached program for example reproduction steps. The issue
seems to be due to the way that push_heap and pop_heap are called.

Reply via email to