title: ctime std:: namespace conflict
body: <p>I have project with many C and C++ files. I try to add thread-safe queue.
  In my header:</p>
  
  <pre><code>#include &lt;queue&gt;
  #include &lt;mutex&gt;
  #include &lt;thread&gt;
  #include &lt;condition_variable&gt;
  // Some code..
  </code></pre>
  
  <p>When I try to compile this, its fault with this errors:</p>
  
  <pre><code>In file included from /usr/include/c++/4.9/chrono:41:0,
               from /usr/include/c++/4.9/mutex:39,
               from queue.hpp:4,
               from main.cpp:24:
  /usr/include/c++/4.9/ctime:60:11: error: '::clock_t' has not been declared
  using ::clock_t;
  
  /usr/include/c++/4.9/condition_variable:161:23: error: 'time_t' in namespace 'std' does not name a type
    static_cast&lt;std::time_t&gt;(__s.time_since_epoch().count()),
  </code></pre>
  
  <p>As I understand it, compiler try to find std::time_*, but why? And how fix it?
  Thanks!</p>
  
  <p>UPD: main.cpp</p>
  
  <pre><code>#include "gpu.hpp" //Error here
  
  int main(int argc, char const *argv[]) {
  
    return 0;
  }
  </code></pre>
  
  <p>gpu.hpp</p>
  
  <pre><code>#pragma once
  #include "filter.hpp"
  #include "queue.hpp" //Error here
  
  #include &lt;nvcuvid.h&gt;
  
  #include &lt;avformat.h&gt;
  
  #include &lt;vector&gt;
  </code></pre>
  
  <p>queue.hpp</p>
  
  <pre><code>#pragma once
  
  #include &lt;queue&gt;
  #include &lt;mutex&gt;
  #include &lt;thread&gt;
  #include &lt;condition_variable&gt;
  
  template&lt;typename T&gt;
  class CQueue
  {
    std::queue&lt;T&gt; m_queue;
    std::mutex m_mutex;
    std::condition_variable m_cond;
    // ...
  </code></pre>
  
  <p>First error message:</p>
  
  <pre><code>In file included from queue.hpp:3:0,
               from gpu.hpp:3,
               from main-test.cpp:2:
  /usr/include/c++/4.9/ctime:60:11: error: '::clock_t' has not been declared
  using ::clock_t;
  </code></pre>
  
  <p>Makefile:</p>
  
  <pre><code>FFMPEG_INCLUDES := -I$(FFMPEG_PATH) $(FFMPEG_PATH)/libavutil ...
  
  $(OBJECTS_DIRS)/app-main-test.o: src/app/main-test.cpp
    $(CXX) $(CXXFLAGS) $(FFMPEG_INCLUDES) $(CUDA_INCLUDES) -o $@ -c $&lt;
  </code></pre>