title: How do I clear the std::queue efficiently?
body: <p>I am using std::queue for implementing JobQueue class. ( Basically this class process each job in FIFO manner).
  In one scenario, I want to clear the queue in one shot( delete all jobs from the queue).
  I don't see any clear method available in std::queue class.</p>
  
  <p>How do I efficiently implement the clear method for JobQueue class ?</p>
  
  <p>I have one simple solution of popping in a loop but I am looking for better ways.</p>
  
  <pre><code>//Clears the job queue
  void JobQueue ::clearJobs()
   {
    // I want to avoid pop in a loop
      while (!m_Queue.empty())
      {
          m_Queue.pop();
      }
  }
  </code></pre>