Arguments: Element element, IntegerPriority priority
Push a new element in the queue. Its priority must be greater or equal to
the highest priority present in the queue, minus one. This condition is
DCHECKed, and violating it yields erroneous queue behavior in NDEBUG mode.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003ePriorityQueueWithRestrictedPush\u003c/code\u003e is a C++ class offering a priority queue implementation with specific restrictions on element insertion.\u003c/p\u003e\n"],["\u003cp\u003eThe queue allows pushing elements only if their priority is within a certain range relative to the current highest priority.\u003c/p\u003e\n"],["\u003cp\u003eCore functionalities include \u003ccode\u003ePush\u003c/code\u003e, \u003ccode\u003ePop\u003c/code\u003e, \u003ccode\u003eIsEmpty\u003c/code\u003e, and \u003ccode\u003eClear\u003c/code\u003e for managing elements and queue state.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePop\u003c/code\u003e retrieves and removes the highest priority element, while \u003ccode\u003eIsEmpty\u003c/code\u003e checks if the queue is empty.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eClear\u003c/code\u003e method resets the queue to an empty state.\u003c/p\u003e\n"]]],["The `PriorityQueueWithRestrictedPush` class in C++ offers methods to manage a priority queue. Key actions include `Clear` to empty the queue, `IsEmpty` to check if it's empty, and `Pop` to retrieve and remove the highest-priority element. `Push` adds a new element with a specified priority, but it enforces a rule: the new priority must be at most one less than the current highest priority. The constructor `PriorityQueueWithRestrictedPush` initializes the class.\n"],null,[]]