title: NVCC bug with gcc7
body: <p>I have the following code and it has an error only with cuda9 + gcc7. Cuda9 + gcc6 doesn't have compilation errors. </p>
  
  <p>This is a minimal reproducer I wrote for the error. I suspect it is a compiler error but I have to fix my code to work with gcc7. I want to know a workaround to get rid of the compilation error. </p>
  
  <p>Cuda compilation tools, release 9.2, V9.2.148</p>
  
  <p>gcc version 7.3.0 (Ubuntu 7.3.0-21ubuntu1~16.04)</p>
  
  <p>Error: </p>
  
  <pre><code>$ nvcc test.cu
  test.h: In constructor 'TestOp::TestOp()':
  test.h:6:54: error: 'Dummy' is not a member of 'TestOp'
  </code></pre>
  
  <p>//op.h</p>
  
  <pre><code>   class OperatorBase {
       public:
        template &lt;typename T&gt;
        inline bool Dummy(T default_value) {
          return true;
        }
      };
  
      template &lt;class Context&gt;
      class Operator : public OperatorBase {
      };
  </code></pre>
  
  <p>//test.cu</p>
  
  <pre><code>#include "test.h"
  </code></pre>
  
  <p>//test.h</p>
  
  <pre><code>#include "op.h"
  template &lt;class Context&gt;
  class TestOp : public Operator&lt;Context&gt; {
   public:
    TestOp()
        : msg_(
              OperatorBase::Dummy&lt;bool&gt;(true)) {}
  
   private:
    bool msg_;
  };
  </code></pre>